From 4306223ae4f6d456001c5d7497a8505315414f69 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 17 Jul 2011 10:51:58 -0700 Subject: [PATCH] Fixed gtk's compile-file dependencies. --- src/gtk/compile.scm | 45 ++++-- src/gtk/gtk-new.pkg | 359 -------------------------------------------- src/gtk/gtk.pkg | 26 ++-- 3 files changed, 43 insertions(+), 387 deletions(-) delete mode 100644 src/gtk/gtk-new.pkg diff --git a/src/gtk/compile.scm b/src/gtk/compile.scm index 186646aa0..1176b85a8 100644 --- a/src/gtk/compile.scm +++ b/src/gtk/compile.scm @@ -12,19 +12,34 @@ ;; and simply warns about new options it does not ;; support, like the depends-on options commented out ;; of gtk.pkg and recreated below. - ;; - ;; File integrate-external c-include - ;; ------------ ----------------------- --------------- 'dependencies - '(("gobject" "gtk-const.bin") - ("gio" "gtk-const.bin") - ("pango" "gtk-const.bin") - ("gtk-object" "gtk-const.bin") - ("scm-widget" "gtk-const.bin") - ("fix-layout" "gtk.ext" "pango.ext" "gtk-const.bin") - ("keys" "gtk-const.bin") - ("thread" "gtk.ext" "pango.ext" "gtk-const.bin") - ("main" "gtk-const.bin") - ("gtk-ev" "gtk.ext" "pango.ext" "gtk-const.bin") - ("fix-demo" "gtk.ext" "pango.ext") - ("swat" "gtk.ext" "pango.ext"))) \ No newline at end of file + (let ( + ;; gtk.scm includes the Gtk c-includes, but does + ;; not otherwise use the FFI. + (c-types '("gtk-const.bin")) + + ;; The wrappers use the FFI, c-includes, and + ;; some integrable definitions in gtk.scm. + ;; Dependencies between them are rare. + (base '("gtk.bin" "gtk" + ;; "../runtime/ffi" ;; No workie???!!! + )) + + ;; Users of the toolkit interface do NOT use the + ;; FFI directly, and do not need integrable + ;; definitions. + (user '())) + `(("gtk" ,@c-types) + ("gobject" ,@base) + ("gio" ,@base) + ("pango" ,@base) + ("gtk-object" ,@base) + ("scm-widget" ,@base) + ("fix-layout" "pango" ,@base) + ("keys" ,@base) + ("main" ,@base) + ("thread" "main" ,@user) + ("gtk-ev" ,@base) + ("fix-demo" ,@user) + ("swat" ,@user) + ("swat-pole-zero" ,@user)))) \ No newline at end of file diff --git a/src/gtk/gtk-new.pkg b/src/gtk/gtk-new.pkg deleted file mode 100644 index c1bc66795..000000000 --- a/src/gtk/gtk-new.pkg +++ /dev/null @@ -1,359 +0,0 @@ -#| -*-Scheme-*- - -Copyright (C) 2007, 2008, 2009, 2010, 2011 Matthew Birkholz - -This file is part of MIT/GNU Scheme. - -MIT/GNU Scheme is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -MIT/GNU Scheme is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with MIT/GNU Scheme; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, -USA. - -|# - -;;;; Gtk System Packaging - -(global-definitions "../runtime/runtime") -(global-definitions "../ffi/ffi") -(global-definitions "../sos/sos") - -(define-package (gtk) - (parent ()) - (files "gtk")) - -(define-package (gtk gobject) - (parent (gtk)) - (files "gobject") - (depends-on "gtk-const.bin") - (export (gtk) - gobject-alien - gobject-live? gobject-unref! - g-signal-connect g-signal-disconnect - add-gc-cleanup punt-gc-cleanup - gobject-get-property gobject-set-properties - gquark-from-string gquark-to-string - make-pixbuf-loader - load-pixbuf-from-port load-pixbuf-from-file - pixbuf-loader-size-hook set-pixbuf-loader-size-hook! - pixbuf-loader-pixbuf-hook set-pixbuf-loader-pixbuf-hook! - pixbuf-loader-update-hook set-pixbuf-loader-update-hook! - pixbuf-loader-close-hook set-pixbuf-loader-close-hook! - pixbuf-loader-pixbuf pixbuf-loader-error-message - - gdk-window-process-updates)) - -(define-package (gtk pango) - (parent (gtk)) - (files "pango") - (depends-on "gtk-const.bin") - (export (gtk) - - pango-layout-get-context - pango-layout-context-changed - pango-layout-get-font-description - pango-layout-set-font-description - pango-layout-set-text - pango-layout-get-pixel-extents - pango-layout-index-to-pos - pango-font-description-from-string - pango-font-description-to-string - pango-font-description-free - pango-context-get-font-description - pango-context-set-font-description - pango-context-get-metrics - pango-context-spacing - pango-font-metrics-get-ascent - pango-font-metrics-get-descent - pango-font-metrics-get-approximate-char-width - pango-font-metrics-unref)) - -(define-package (gtk gtk-object) - (parent (gtk)) - (files "gtk-object") - (depends-on "gtk-const.bin") - (export (gtk) - gtk-object? guarantee-gtk-object - gtk-object-destroyed? gtk-object-destroy - gtk-adjustment? guarantee-gtk-adjustment - make-gtk-adjustment set-gtk-adjustment! - gtk-widget? guarantee-gtk-widget - gtk-widget-parent - gtk-widget-realized? - gtk-widget-drawable? gtk-widget-has-focus? - gtk-widget-grab-focus - gtk-widget-show - gtk-widget-show-all - gtk-widget-error-bell - gtk-widget-queue-draw - gtk-widget-get-colormap - gtk-widget-get-pango-context - gtk-widget-create-pango-layout - gtk-widget-set-size-request - ;;gtk-widget-set-can-focus - set-gtk-widget-size-allocate-callback! - set-gtk-widget-realize-callback! - set-gtk-widget-unrealize-callback! - set-gtk-widget-event-callback! - - gtk-widget-font set-gtk-widget-font! - gtk-widget-fg-color gtk-widget-bg-color - gtk-widget-text-color gtk-widget-base-color - set-gtk-widget-fg-color! set-gtk-widget-bg-color! - set-gtk-widget-text-color! set-gtk-widget-base-color! - gtk-widget-parse-color - - gtk-container? guarantee-gtk-container - gtk-container-children gtk-bin-child - gtk-container-add gtk-container-remove - gtk-container-set-border-width - ;;gtk-container-set-resize-mode - ;;gtk-container-check-resize - - gtk-window? guarantee-gtk-window - gtk-window-new gtk-window-set-title gtk-window-type - gtk-window-set-opacity - gtk-window-set-default-size gtk-window-get-default-size - gtk-window-parse-geometry - gtk-window-resize - gtk-window-present - set-gtk-window-delete-event-callback! - gtk-label? guarantee-gtk-label - gtk-label-new - gtk-label-get-text gtk-label-set-text - gtk-label-set-width-chars - gtk-button? guarantee-gtk-button - gtk-button-new - set-gtk-button-clicked-callback! - gtk-check-button? guarantee-gtk-check-button - gtk-check-button-new - gtk-check-button-get-active gtk-check-button-set-active - set-gtk-check-button-toggled-callback! - gtk-vbox? guarantee-gtk-vbox gtk-vbox-new - gtk-hbox? guarantee-gtk-hbox gtk-hbox-new - gtk-box-pack-start gtk-box-pack-end - gtk-frame? guarantee-gtk-frame gtk-frame-new - gtk-frame-set-shadow-type - gtk-scrolled-window? - guarantee-gtk-scrolled-window gtk-scrolled-window-new - gtk-scrolled-window-set-policy gtk-scrolled-window-set-placement) - (import (gtk pango) make-pango-layout guarantee-pango-font-description)) - -(define-package (gtk widget) - (parent (gtk)) - (files "scm-widget") - (depends-on "gtk-const.bin") - (import (gtk gtk-object) - set-gtk-object-destroy-callback!) - (export (gtk) - - set-scm-widget-set-scroll-adjustments-callback!)) - -(define-package (gtk fix-layout) - (parent (gtk)) - (files "fix-layout") - (depends-on "gtk.ext" "pango.ext" "gtk-const.bin") - (import (gtk pango) - make-pango-layout pango-rectangle pangos->pixels pixels->pangos) - (import (gtk gtk-object) - parse-gdkcolor set-gtk-object-destroy-callback!) - (export (gtk) - - fix-layout? make-fix-layout set-fix-layout-size! - fix-layout-drawing set-fix-layout-drawing! - fix-layout-scroll-step set-fix-layout-scroll-step! - fix-layout-view fix-layout-scroll-to! fix-layout-scroll-nw! - fix-layout-new-geometry-callback fix-layout-realize-callback - set-fix-layout-map-handler! - set-fix-layout-unmap-handler! - set-fix-layout-focus-change-handler! - set-fix-layout-visibility-notify-handler! - set-fix-layout-key-press-handler! - set-fix-layout-motion-handler! - set-fix-layout-button-handler! - - guarantee-fix-drawing - make-fix-drawing fix-drawing-widgets - set-fix-drawing-size! fix-drawing-pick-list - fix-drawing-add-ink! - - fix-ink? - fix-ink-drawing - fix-ink-widgets set-fix-ink-widgets! - fix-ink-move! fix-ink-remove! - - - line-ink? make-line-ink set-line-ink! - line-ink-width set-line-ink-width! - line-ink-color set-line-ink-color! - line-ink-dash-color set-line-ink-dash-color! - - rectangle-ink? make-rectangle-ink set-rectangle-ink! - rectangle-ink-color set-rectangle-ink-color! - rectangle-ink-width set-rectangle-ink-width! - rectangle-ink-fill-color set-rectangle-ink-fill-color! - - arc-ink? make-arc-ink set-arc-ink! - arc-ink-start-angle set-arc-ink-start-angle! - arc-ink-sweep-angle set-arc-ink-sweep-angle! - arc-ink-color set-arc-ink-color! - arc-ink-width set-arc-ink-width! - arc-ink-fill-color set-arc-ink-fill-color! - - text-ink? - set-text-ink-position! - text-ink-xy-to-index - with-text-ink-grapheme-rect - text-ink-color set-text-ink-color! - - simple-text-ink? make-simple-text-ink - simple-text-ink-text set-simple-text-ink-text! - simple-text-ink-font set-simple-text-ink-font! - - make-image-ink-from-file set-image-ink! - - box-ink? make-box-ink - set-box-ink! set-box-ink-position! - box-ink-shadow set-box-ink-shadow! - - ;; make-hline-ink set-hline-ink-size! - ;; make-vline-ink set-vline-ink-size! - )) - -(define-package (gtk keys) - (parent (gtk)) - (files "keys") - (depends-on "gtk-const.bin") - (export (gtk) - gdk-key-state->char-bits - gdk-keyval->name)) - -(define-package (gtk thread) - (parent (runtime thread)) - (files "thread") - (depends-on "gtk.ext" "pango.ext") - (export () - stop-gtk-thread) - (import (gtk gobject) - run-gc-cleanups) - (import (runtime primitive-io) - select-registry-handle)) - -(define-package (gtk main) - (parent (gtk)) - (files "main") - (depends-on "gtk-const.bin") - (import (runtime load) - *unused-command-line* - hook/process-command-line - default/process-command-line) - (import (runtime) - ucode-primitive) - (import (runtime subprocess) - hook/subprocess-wait nonblocking/subprocess-wait) - (import (gtk thread) - create-gtk-thread exit-gtk-thread) - (export () - gtk-time-slice-window? - gtk-time-slice-window! - gtk-select-trace? - gtk-select-trace!)) - -(define-package (gtk event-viewer) - (parent (gtk)) - (files "gtk-ev") - (depends-on "gtk.ext" "pango.ext" "gtk-const.bin") - (import (gtk fix-layout) - gdk-rectangle gdk-rectangle-from-rect - make-fix-rect - fix-rect-x fix-rect-y fix-rect-width fix-rect-height - fix-rect-max-y set-fix-rect! fix-rect-union!) - (import (gtk pango) - pango-rectangle pangos->pixels) - (export () - make-gtk-event-viewer-demo)) - -(define-package (gtk fix-layout demo) - (parent (gtk fix-layout)) - (files "fix-demo") - (depends-on "gtk.ext" "pango.ext") - (import (gtk fix-layout) - fix-layout-view) - (export () - make-fix-layout-demo)) - -(define-package (gtk swat) - (parent (gtk)) - (files "swat") - (depends-on "gtk.ext" "pango.ext") - (import (gtk gtk-object) - gtk-object-destroy-callback) - (import (gtk fix-layout) - fix-layout-view fix-ink-extent fix-ink-expose-callback - fix-drawing-display-list set-fix-drawing-display-list! - set-fix-ink-drawing! fix-ink-in-widget? fix-ink-in? - fix-rect-x fix-rect-y with-fix-rect - set-fix-rect-size! fix-rect-move! copy-fix-rect! - point-in-fix-rect? fix-rect-union!) - (export (swat) - add-child! remove-child! ask-widget - add-event-handler! set-callback! - after-delay on-death! - swat-open swat-close - make-active-variable set-active-variable! - make-hbox make-vbox box-children - make-button make-label - make-checkbutton checkbutton-variable-on? - make-canvas make-canvas-item-group - make-line-on-canvas make-rectangle-on-canvas - make-oval-on-canvas make-text-on-canvas)) - -(define-package (swat) - (parent ())) - -#;(define-package (swat examples) - (parent (swat)) - (files "swat-examples")) - -(define-package (swat pole-zero) - (parent (swat)) - (files "swat-pole-zero") - (export () - make-pole-zero)) - -#;(define-package (swat plotter) - (parent (swat)) - (files "swat-plotter") - (export () - plotter - plot - set-plotter-params - reset-plotter-params - make-vals - change-color - change-pt-style - change-num-pts - clear-curve - plot-curve - delete-curve - add-show-vals - clear-show-vals - draw-show-vals - delete-show-vals - add-xticks - add-yticks - clear-ticks - draw-ticks - delete-ticks - clear-plotter - replot - reset-plotter)) \ No newline at end of file diff --git a/src/gtk/gtk.pkg b/src/gtk/gtk.pkg index 8983e1742..58ba9e67f 100644 --- a/src/gtk/gtk.pkg +++ b/src/gtk/gtk.pkg @@ -29,12 +29,14 @@ USA. (define-package (gtk) (parent ()) - (files "gtk")) + (files "gtk") + ;;(depends-on "gtk-const.bin") + ) (define-package (gtk gobject) (parent (gtk)) (files "gobject") - ;;(depends-on "gtk-const.bin") + ;;(depends-on "gtk.bin" "gtk" "../runtime/ffi") (export (gtk) gobject-alien gobject-live? gobject-unref! @@ -55,7 +57,7 @@ USA. (define-package (gtk gio) (parent (gtk)) (files "gio") - ;;(depends-on "gtk-const.bin") + ;;(depends-on "gtk.bin" "gtk" "../runtime/ffi") (import (runtime ffi) %set-alien/address!) (import (runtime generic-i/o-port) @@ -67,7 +69,7 @@ USA. (define-package (gtk pango) (parent (gtk)) (files "pango") - ;;(depends-on "gtk-const.bin") + ;;(depends-on "gtk.bin" "gtk" "../runtime/ffi") (export (gtk) pango-layout-get-context @@ -92,7 +94,7 @@ USA. (define-package (gtk gtk-object) (parent (gtk)) (files "gtk-object") - ;;(depends-on "gtk-const.bin") + ;;(depends-on "gtk.bin" "gtk" "../runtime/ffi") (export (gtk) gtk-object? guarantee-gtk-object gtk-object-destroyed? gtk-object-destroy @@ -163,7 +165,7 @@ USA. (define-package (gtk widget) (parent (gtk)) (files "scm-widget") - ;;(depends-on "gtk-const.bin") + ;;(depends-on "gtk.bin" "gtk" "../runtime/ffi") (import (gtk gtk-object) set-gtk-object-destroy-callback!) (export (gtk) @@ -173,7 +175,7 @@ USA. (define-package (gtk fix-layout) (parent (gtk)) (files "fix-layout") - ;;(depends-on "gtk.ext" "pango.ext" "gtk-const.bin") + ;;(depends-on "pango" "gtk.bin" "gtk" "../runtime/ffi") (import (gtk pango) make-pango-layout pango-rectangle pangos->pixels pixels->pangos) (import (gtk gtk-object) @@ -244,7 +246,7 @@ USA. (define-package (gtk keys) (parent (gtk)) (files "keys") - ;;(depends-on "gtk-const.bin") + ;;(depends-on "gtk.bin" "gtk" "../runtime/ffi") (export (gtk) gdk-key-state->char-bits gdk-keyval->name) @@ -255,7 +257,7 @@ USA. (define-package (gtk thread) (parent (runtime thread)) (files "thread") - ;;(depends-on "gtk.ext" "pango.ext") + ;;(depends-on) (export () stop-gtk-thread) (import (gtk gobject) @@ -268,7 +270,7 @@ USA. (define-package (gtk main) (parent (gtk)) (files "main") - ;;(depends-on "gtk-const.bin") + ;;(depends-on "gtk.bin" "gtk" "../runtime/ffi") (import (runtime load) *unused-command-line* hook/process-command-line @@ -288,7 +290,7 @@ USA. (define-package (gtk event-viewer) (parent (gtk)) (files "gtk-ev") - ;;(depends-on "gtk.ext" "pango.ext" "gtk-const.bin") + ;;(depends-on "gtk.bin" "gtk" "../runtime/ffi") (import (gtk fix-layout) gdk-rectangle gdk-rectangle-from-rect make-fix-rect @@ -302,7 +304,6 @@ USA. (define-package (gtk fix-layout demo) (parent (gtk fix-layout)) (files "fix-demo") - ;;(depends-on "gtk.ext" "pango.ext") (import (gtk fix-layout) fix-layout-view) (export () @@ -311,7 +312,6 @@ USA. (define-package (gtk swat) (parent (gtk)) (files "swat") - ;;(depends-on "gtk.ext" "pango.ext") (import (gtk gtk-object) gtk-object-destroy-callback) (import (gtk fix-layout) -- 2.25.1