From mmommer at common-lisp.net Thu May 13 17:38:53 2004 From: mmommer at common-lisp.net (Mario Mommer) Date: Thu, 13 May 2004 13:38:53 -0400 Subject: [lgtk-cvs] CVS update: lgtk/INSTALL.txt Message-ID: Update of /project/lgtk/cvsroot/lgtk In directory common-lisp.net:/tmp/cvs-serv32142 Modified Files: INSTALL.txt Log Message: Updated the callback.lisp address Date: Thu May 13 13:38:53 2004 Author: mmommer Index: lgtk/INSTALL.txt diff -u lgtk/INSTALL.txt:1.3 lgtk/INSTALL.txt:1.4 --- lgtk/INSTALL.txt:1.3 Thu Dec 11 05:47:59 2003 +++ lgtk/INSTALL.txt Thu May 13 13:38:52 2004 @@ -17,7 +17,7 @@ support. You should grab a copy of Helmut Eller's callback.lisp file from the message - http://article.gmane.org/gmane.lisp.cmucl.devel/2472 + http://www.common-lisp.net/project/lgtk/callback.lisp * ASDF, see http://www.cliki.net/asdf.html From mmommer at common-lisp.net Thu May 13 19:31:37 2004 From: mmommer at common-lisp.net (Mario Mommer) Date: Thu, 13 May 2004 15:31:37 -0400 Subject: [lgtk-cvs] CVS update: lgtk/src/wrappers.c lgtk/src/libhandle.c Message-ID: Update of /project/lgtk/cvsroot/lgtk/src In directory common-lisp.net:/tmp/cvs-serv30529 Added Files: wrappers.c Removed Files: libhandle.c Log Message: This is a rename + a change of contents. Some stuff is just easier to wrap and call from C. wrappers.c now contains lgtk_object_type, a C func to find out the type of an object. Date: Thu May 13 15:31:36 2004 Author: mmommer From mmommer at common-lisp.net Thu May 13 19:33:50 2004 From: mmommer at common-lisp.net (Mario Mommer) Date: Thu, 13 May 2004 15:33:50 -0400 Subject: [lgtk-cvs] CVS update: lgtk/lgtk.asd Message-ID: Update of /project/lgtk/cvsroot/lgtk In directory common-lisp.net:/tmp/cvs-serv12192 Modified Files: lgtk.asd Log Message: gtk libs now loaded with wrappers.o instead of with libhandle.o Date: Thu May 13 15:33:49 2004 Author: mmommer Index: lgtk/lgtk.asd diff -u lgtk/lgtk.asd:1.9 lgtk/lgtk.asd:1.10 --- lgtk/lgtk.asd:1.9 Mon Mar 1 13:04:34 2004 +++ lgtk/lgtk.asd Thu May 13 15:33:49 2004 @@ -61,7 +61,7 @@ #+cmu (ext:run-program "pkg-config" '("--cflags" "gtk+-2.0") :output :stream)) -(defun get-gtk-cflags-list () +(defun get-gtk-cflags () (let ((prc (pkg-config-cflags-string))) (if (not prc) (error "Could not run #\"pckg-config!") @@ -72,7 +72,7 @@ (read-line str)))))) (defparameter *gtklibs* (get-gtk-libs-list)) -(defparameter *gtkcflags* (get-gtk-cflags-list)) +(defparameter *gtkcflags* (get-gtk-cflags)) (defvar *source-dir* nil) (defclass gtk-libs-handle (c-source-file) ()) @@ -83,10 +83,11 @@ :defaults (component-pathname c)))) (defmethod perform ((o compile-op) (c gtk-libs-handle)) - (unless (zerop (run-shell-command "~A ~A -c -o ~A" + (unless (zerop (run-shell-command "~A ~A -c -o ~A ~A" *ccompiler* (namestring (component-pathname c)) - (namestring (car (output-files o c))))) + (namestring (car (output-files o c))) + *gtkcflags*)) (error 'operation-error :component c :operation o))) (defmethod perform ((o load-op) (c gtk-libs-handle)) @@ -113,7 +114,7 @@ (:file "bindings" :depends-on ("port")) - (:gtk-libs-handle "libhandle") + (:gtk-libs-handle "wrappers") (:file "gtkpackage" :depends-on ("widgets" "nexus" @@ -124,7 +125,7 @@ (:file "gtkclasshierarchy" :depends-on ("gtkpackage")) (:file "gtkbindings" :depends-on ("gtkenums" "gtkclasshierarchy" - "libhandle")) + "wrappers")) (:file "gtknexus" :depends-on ("gtkbindings")) (:file "gtklisp" :depends-on ("gtknexus")) From mmommer at common-lisp.net Thu May 13 20:05:13 2004 From: mmommer at common-lisp.net (Mario Mommer) Date: Thu, 13 May 2004 16:05:13 -0400 Subject: [lgtk-cvs] CVS update: lgtk/src/gtkclasshierarchy.lisp Message-ID: Update of /project/lgtk/cvsroot/lgtk/src In directory common-lisp.net:/tmp/cvs-serv8875 Modified Files: gtkclasshierarchy.lisp Log Message: Classnames are now given by strings. This is a preparation for using the lgtk_object_type function. Date: Thu May 13 16:05:12 2004 Author: mmommer Index: lgtk/src/gtkclasshierarchy.lisp diff -u lgtk/src/gtkclasshierarchy.lisp:1.4 lgtk/src/gtkclasshierarchy.lisp:1.5 --- lgtk/src/gtkclasshierarchy.lisp:1.4 Mon Nov 10 15:44:47 2003 +++ lgtk/src/gtkclasshierarchy.lisp Thu May 13 16:05:12 2004 @@ -64,115 +64,119 @@ (defun generate-class-hierarchy (base h) (let ((buf nil)) (labels ((aux (h base) - (push `(defclass ,(car h) (,base) ()) buf) - (push `(def-capsule-filter ,(car h)) buf) - (push `(export ',(car h)) buf) - (push `(def-encapsulator ,(gencap (car h)) ,(car h)) buf) - (push `(def-binding-type ,(car h) - :in ',(car h) - :out ',(gencap (car h)) - :alien '(* t)) buf) - (mapcar #'(lambda (x) (aux x (car h))) (cdr h)))) + (let ((name-symbol (read-from-string (car h)))) + (push `(defclass ,name-symbol (,base) ()) buf) + (push `(def-capsule-filter ,name-symbol) buf) + (push `(export ',name-symbol) buf) + (push `(def-encapsulator + ,(gencap name-symbol) + ,name-symbol) buf) + (push `(def-binding-type ,name-symbol + :in ',name-symbol + :out ',(gencap name-symbol) + :alien '(* t)) buf) + (mapcar #'(lambda (x) (aux x name-symbol)) (cdr h))))) (aux h base) (let ((xxx (reverse buf))) xxx)))) + ;; We got this information as it is from the tutorial. (defmacro make-gtk-object-hierarchy () `(progn ;(eval-when (:compile-toplevel :load-toplevel :execute) ,@(generate-class-hierarchy 'gtk-objcapsule - '(GtkObject - (GtkWidget - (GtkMisc - (GtkLabel - (GtkAccelLabel)) - (GtkArrow) - (GtkImage)) - (GtkContainer - (GtkBin - (GtkAlignment) - (GtkFrame - (GtkAspectFrame)) - (GtkButton - (GtkToggleButton - (GtkCheckButton - (GtkRadioButton))) - (GtkOptionMenu)) - (GtkItem - (GtkMenuItem - (GtkCheckMenuItem - (GtkRadioMenuItem)) - (GtkImageMenuItem) - (GtkSeparatorMenuItem) - (GtkTearoffMenuItem))) - (GtkWindow - (GtkDialog - (GtkColorSelectionDialog) - (GtkFileSelection) - (GtkFontSelectionDialog) - (GtkInputDialog) - (GtkMessageDialog)) - (GtkPlug)) - (GtkEventBox) - (GtkHandleBox) - (GtkScrolledWindow) - (GtkViewport)) - (GtkBox - (GtkButtonBox - (GtkHButtonBox) - (GtkVButtonBox)) - (GtkVBox - (GtkColorSelection) - (GtkFontSelection) - (GtkGammaCurve)) - (GtkHBox - (GtkCombo) - (GtkStatusbar))) - (GtkFixed) - (GtkPaned - (GtkHPaned) - (GtkVPaned)) - (GtkLayout) - (GtkMenuShell - (GtkMenuBar) - (GtkMenu)) - (GtkNotebook) - (GtkSocket) - (GtkTable) - (GtkTextView) - (GtkToolbar) - (GtkTreeView)) - (GtkCalendar) - (GtkDrawingArea - (GtkCurve)) - (GtkEditable - (GtkEntry - (GtkSpinButton))) - (GtkRuler - (GtkHRuler) - (GtkVRuler)) - (GtkRange - (GtkScale - (GtkHScale) - (GtkVScale)) - (GtkScrollbar - (GtkHScrollbar) - (GtkVScrollbar))) - (GtkSeparator - (GtkHSeparator) - (GtkVSeparator)) - (GtkInvisible) - (GtkPreview) - (GtkProgressBar)) - (GtkAdjustment) - (GtkCellRenderer - (GtkCellRendererPixbuf) - (GtkCellRendererText) - (GtkCellRendererToggle)) - (GtkItemFactory) - (GtkTooltips) - (GtkTreeViewColumn))))) + '("GtkObject" + ("GtkWidget" + ("GtkMisc" + ("GtkLabel" + ("GtkAccelLabel")) + ("GtkArrow") + ("GtkImage")) + ("GtkContainer" + ("GtkBin" + ("GtkAlignment") + ("GtkFrame" + ("GtkAspectFrame")) + ("GtkButton" + ("GtkToggleButton" + ("GtkCheckButton" + ("GtkRadioButton"))) + ("GtkOptionMenu")) + ("GtkItem" + ("GtkMenuItem" + ("GtkCheckMenuItem" + ("GtkRadioMenuItem")) + ("GtkImageMenuItem") + ("GtkSeparatorMenuItem") + ("GtkTearoffMenuItem"))) + ("GtkWindow" + ("GtkDialog" + ("GtkColorSelectionDialog") + ("GtkFileSelection") + ("GtkFontSelectionDialog") + ("GtkInputDialog") + ("GtkMessageDialog")) + ("GtkPlug")) + ("GtkEventBox") + ("GtkHandleBox") + ("GtkScrolledWindow") + ("GtkViewport")) + ("GtkBox" + ("GtkButtonBox" + ("GtkHButtonBox") + ("GtkVButtonBox")) + ("GtkVBox" + ("GtkColorSelection") + ("GtkFontSelection") + ("GtkGammaCurve")) + ("GtkHBox" + ("GtkCombo") + ("GtkStatusbar"))) + ("GtkFixed") + ("GtkPaned" + ("GtkHPaned") + ("GtkVPaned")) + ("GtkLayout") + ("GtkMenuShell" + ("GtkMenuBar") + ("GtkMenu")) + ("GtkNotebook") + ("GtkSocket") + ("GtkTable") + ("GtkTextView") + ("GtkToolbar") + ("GtkTreeView")) + ("GtkCalendar") + ("GtkDrawingArea" + ("GtkCurve")) + ("GtkEditable" + ("GtkEntry" + ("GtkSpinButton"))) + ("GtkRuler" + ("GtkHRuler") + ("GtkVRuler")) + ("GtkRange" + ("GtkScale" + ("GtkHScale") + ("GtkVScale")) + ("GtkScrollbar" + ("GtkHScrollbar") + ("GtkVScrollbar"))) + ("GtkSeparator" + ("GtkHSeparator") + ("GtkVSeparator")) + ("GtkInvisible") + ("GtkPreview") + ("GtkProgressBar")) + ("GtkAdjustment") + ("GtkCellRenderer" + ("GtkCellRendererPixbuf") + ("GtkCellRendererText") + ("GtkCellRendererToggle")) + ("GtkItemFactory") + ("GtkTooltips") + ("GtkTreeViewColumn"))))) ;; engage. (make-gtk-object-hierarchy))