("main" "gtk-const.bin")
("gtk-ev" "gtk.ext" "pango.ext" "gtk-const.bin")
("fix-demo" "gtk.ext" "pango.ext")
- ("swat" "gtk.ext" "pango.ext"))
- ;;
- ;; Compile-time imports that needn't (shouldn't) exist
- ;; at run-time.
- 'imports
- '(((gtk keys) (ffi) find-c-includes c-enum-constant-values)))
\ No newline at end of file
+ ("swat" "gtk.ext" "pango.ext")))
\ No newline at end of file
;;;; <fix-layout>: A fixnum-centric canvas.
;;; package: (gtk fix-layout)
-(c-include "gtk")
-
(define-class (<fix-layout> (constructor () (width height)))
(<scm-widget>)
;;;; GObjects
;;; package: (gtk gobject)
-(c-include "gtk")
-
(define-class <gobject> ()
;; The address of the toolkit object. A null alien if the GObject
#| -*-Scheme-*-
-Copyright (C) 2007, 2008, 2009 Matthew Birkholz
+Copyright (C) 2007, 2008, 2009, 2011 Matthew Birkholz
This file is part of MIT/GNU Scheme.
;;;; An event viewer, a translation of Havoc Pennington's GtkEv example.
;;; package: (gtk event-viewer)
-(c-include "gtk")
-
(define (make-gtk-event-viewer-demo)
(let ((window (gtk-window-new 'toplevel))
(gtk-ev (make-gtk-event-viewer)))
#| -*-Scheme-*-
-Copyright (C) 2007, 2008, 2009, 2010 Matthew Birkholz
+Copyright (C) 2007, 2008, 2009, 2010, 2011 Matthew Birkholz
This file is part of MIT/GNU Scheme.
;;;; GtkObjects/GtkWidgets/GtkContainers
;;; package: (gtk gtk-object)
-(c-include "gtk")
-
(define-class <gtk-object> (<gobject>)
(destroyed? define standard initial-value #f))
<gtk-widget> gtk-widget? guarantee-gtk-widget
gtk-widget-parent
gtk-widget-realized?
- gtk-widget-drawable? gtk-widget-has-focus?
+ gtk-widget-drawable? gtk-widget-has-focus?
gtk-widget-grab-focus
gtk-widget-show
gtk-widget-show-all
(export (gtk)
gdk-key-state->char-bits
gdk-keyval->name)
- ;; Needed (only) at compile-time.
- ;; Positively NOT needed at run-time.
- #;(import (ffi)
+ (import (ffi)
find-c-includes
c-enum-constant-values))
stop-gtk-thread)
(import (gtk gobject)
run-gc-cleanups)
+ (import (gtk main)
+ run-gtk)
(import (runtime primitive-io)
select-registry-handle))
;;;; Core utilities.
;;; package: (gtk)
+(define c-includes (load-c-includes "gtk"))
+
(define-syntax define-integrable-operator
(er-macro-transformer
(lambda (form rename compare)
;;;; Gtk Keys
;;; Package: (gtk keys)
-(c-include "gtk")
-
(define (gdk-key-state->char-bits modifier-state)
(fix:+
(if (bit? modifier-state (C-enum "GDK_CONTROL_MASK")) char-bit:control 0)
;;;; Main Loop Hack
;;; package: (gtk main)
-(c-include "gtk")
-
(define (gtk-start)
;; Called from gtk/make.scm, from a (load-option 'Gtk).
(set! hook/subprocess-wait nonblocking/subprocess-wait)
(create-gtk-thread)
(cdr new-args)))))))
+(define (run-gtk select-registry-handle time)
+ (C-call "run_gtk" select-registry-handle time))
+
(define (stop-gtk)
;; Sortof does the opposite of gtk-start.
(without-interrupts
Load the Gtk option. |#
(load-option 'SOS)
+(load-option 'FFI) ;; (ffi) package referenced in gtk.pkg!
(with-loader-base-uri (system-library-uri "gtk/")
(lambda ()
(load-package-set "gtk")))
#| -*-Scheme-*-
-Copyright (C) 2009, 2010 Matthew Birkholz
+Copyright (C) 2009, 2010, 2011 Matthew Birkholz
This file is part of MIT/GNU Scheme.
;;;; Pango interface.
;;; package: (gtk pango)
-(c-include "gtk")
-
(define-class (<pango-layout> (constructor ()))
(<gobject>))
#| -*-Scheme-*-
-Copyright (C) 2007, 2008, 2009, 2010 Matthew Birkholz
+Copyright (C) 2007, 2008, 2009, 2010, 2011 Matthew Birkholz
This file is part of MIT/GNU Scheme.
;;;; A <gtk-widget> representing a ScmWidget.
;;; package: (gtk widget)
-(c-include "gtk")
-
(define-class <scm-widget> (<gtk-widget>))
(define-guarantee scm-widget "a <scm-widget>")
;;; package: (gtk thread)
;;; parent: (runtime thread)
-(c-include "gtk")
-
(define gtk-thread #f)
;; Number of GCs between applications of trigger-secondary-gc-daemons!
(or next-scheduled-timeout
(no-threads-nor-timers)))))
(%trace ";run-gtk until "time"\n")
- (C-call "run_gtk"
- (select-registry-handle io-registry)
- time)
+ (run-gtk (select-registry-handle io-registry) time)
(%trace ";run-gtk done at "(real-time-clock)"\n"))
(maybe-signal-io-thread-events)))
(yield-current-thread)