From: espen Date: Thu, 11 Jan 2007 19:39:08 +0000 (+0000) Subject: Added a package CLG that could be used by applications instead of GTK X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/commitdiff_plain/c30cbffb140ef1c983f4d9e1e9cf17c1a37ecacd?hp=f7f58f900d15c703dde92bb493e1764ab01ad5f5 Added a package CLG that could be used by applications instead of GTK --- diff --git a/gtk/defpackage.lisp b/gtk/defpackage.lisp index 5badf41..074d373 100644 --- a/gtk/defpackage.lisp +++ b/gtk/defpackage.lisp @@ -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")) diff --git a/gtk/export.lisp b/gtk/export.lisp index df5d23a..232406d 100644 --- a/gtk/export.lisp +++ b/gtk/export.lisp @@ -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"))