chiark / gitweb /
Added a package CLG that could be used by applications instead of GTK
authorespen <espen>
Thu, 11 Jan 2007 19:39:08 +0000 (19:39 +0000)
committerespen <espen>
Thu, 11 Jan 2007 19:39:08 +0000 (19:39 +0000)
gtk/defpackage.lisp
gtk/export.lisp

index 5badf41c6fd510322dc244e7bb2c5dcef0998d79..074d373a4dc83971768d226d4feea251e7c03def 100644 (file)
@@ -18,7 +18,18 @@ (defpackage "GTK"
   (:export "CONTAINER-CHILD-CLASS" "CONTAINER-CHILD" "CONTAINER-CHILD-CLASS")
   ;; Signal names that need to be explicit exported
   (:export "TOGGLED")
-  ;; Symbols re-exported from glib
+  ;; Symbols re-exported from glib -- will not be exported from
+  ;; this package in the future
+  (:export "SIGNAL-EMIT-STOP" "SIGNAL-CONNECT" "SIGNAL-DISCONNECT"
+          "SIGNAL-HANDLER-BLOCK" "SIGNAL-HANDLER-UNBLOCK"
+          "TIMEOUT-ADD" "TIMEOUT-REMOVE" "IDLE-ADD" "IDLE-REMOVE"))
+
+
+(defpackage "CLG"
+  (:use "GLIB" "GTK")
+  ;; Symbols re-exported from the GTK package
+  (:export "TOGGLE" "CONTAINRE-CHILD")
+  ;; Symbols re-exported from GLIB package
   (:export "SIGNAL-EMIT-STOP" "SIGNAL-CONNECT" "SIGNAL-DISCONNECT"
           "SIGNAL-HANDLER-BLOCK" "SIGNAL-HANDLER-UNBLOCK"
           "TIMEOUT-ADD" "TIMEOUT-REMOVE" "IDLE-ADD" "IDLE-REMOVE"))
index df5d23a158a1af939fec150c095df8e9060bb118..232406d0e141c5a1025bca2b5b8b25831470d519 100644 (file)
@@ -1,13 +1,38 @@
 (in-package "GTK")
 
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (defvar *gtk-files* 
+    (list 
+     #p"clg:gtk;gtktypes.lisp"
+     #p"clg:gtk;gtkwidget.lisp"
+     #p"clg:gtk;gtkcontainer.lisp"
+     #p"clg:gtk;gtk.lisp"
+     #p"clg:gtk;gtktree.lisp"
+     #p"clg:gtk;gtktext.lisp"
+     #p"clg:gtk;gtkaction.lisp"
+     #p"clg:gtk;gtkselection.lisp"
+     #p"clg:gtk;gtkutils.lisp"
+     #p"clg:gtk;gtkstyle.lisp"))
+
+  (defexport define-style-color-accessor (name type)
+    (declare (ignore type))
+    name)
+
+  (defexport define-style-gc-reader (name type)
+    (declare (ignore type))
+    name))
+
 ;;; Autogenerating exported symbols
-(export-from-file #p"clg:gtk;gtktypes.lisp")
-(export-from-file #p"clg:gtk;gtkwidget.lisp")
-(export-from-file #p"clg:gtk;gtkcontainer.lisp")
-(export-from-file #p"clg:gtk;gtk.lisp")
-(export-from-file #p"clg:gtk;gtktree.lisp")
-(export-from-file #p"clg:gtk;gtktext.lisp")
-(export-from-file #p"clg:gtk;gtkaction.lisp")
-(export-from-file #p"clg:gtk;gtkselection.lisp")
-(export-from-file #p"clg:gtk;gtkutils.lisp")
-(export-from-file #p"clg:gtk;gtkstyle.lisp")
+(export-from-files #.*gtk-files*)
+
+
+;;; Now re-export some of the symbols from the CLG package
+(with-export-handlers 
+ (export-handler-makunbound 'defvar)
+ (export-handler-makunbound 'deftype)
+ (defexport defclass (class superclasses &optional slotdefs &rest options)
+   (declare (ignore superclasses options))
+   (export-defclass-form class slotdefs nil))
+
+ (export-from-files #.*gtk-files* "CLG"))