[cells-gtk-cvs] CVS root/cells-gtk

pdenno pdenno at common-lisp.net
Sun Feb 19 20:14:26 UTC 2006


Update of /project/cells-gtk/cvsroot/root/cells-gtk
In directory common-lisp:/tmp/cvs-serv14819/root/cells-gtk

Modified Files:
	widgets.lisp 
Log Message:
uffi --> cffi 

--- /project/cells-gtk/cvsroot/root/cells-gtk/widgets.lisp	2006/02/16 18:18:56	1.17
+++ /project/cells-gtk/cvsroot/root/cells-gtk/widgets.lisp	2006/02/19 20:14:26	1.18
@@ -52,7 +52,7 @@
 (defun gtk-objects-init ()
   (setf *gtk-objects* (make-hash-table :size 100 :rehash-size 100)))
 
-(defun gtk-object-store (gtk-id gtk-object &aux (hash-id (pointer-address gtk-id)))
+(defun gtk-object-store (gtk-id gtk-object &aux (hash-id (cffi:pointer-address gtk-id)))
   (unless *gtk-objects*
     (gtk-objects-init))
   (let ((known (gethash hash-id *gtk-objects*)))
@@ -68,10 +68,10 @@
 (defun gtk-object-forget (gtk-id gtk-object)
   (when gtk-id
     (assert *gtk-objects*)
-    (remhash (pointer-address gtk-id) *gtk-objects*)
+    (remhash (cffi:pointer-address gtk-id) *gtk-objects*)
     (mapc #'(lambda (k) (gtk-object-forget (id k) k)) (kids gtk-object))))
 
-(defun gtk-object-find (gtk-id &optional must-find-p &aux (hash-id (pointer-address gtk-id)))
+(defun gtk-object-find (gtk-id &optional must-find-p &aux (hash-id (cffi:pointer-address gtk-id)))
   (when *gtk-objects*
     (let ((clos-widget (gethash hash-id *gtk-objects*)))
       (when (and must-find-p (not clos-widget))
@@ -115,7 +115,7 @@
 (defmacro def-gtk-event-handler (event)
   `(cffi:defcallback ,(intern (format nil "~a-HANDLER" event)) :int
      ((widget :pointer) (event :pointer) (data :pointer))
-     (bif (self (gtk-object-find widget))
+     (if-bind (self (gtk-object-find widget))
 	  (let ((cb (callback-recover self ,(intern (string event) :keyword))))
 	    (funcall cb self widget event data))
 	  (trc nil "Unknown widget from prior run. Clean up on errors" widget))))




More information about the Cells-gtk-cvs mailing list