[cells-gtk-cvs] CVS update: root/gtk-ffi/gtk-ffi.lisp
Peter Denno
pdenno at common-lisp.net
Sat Oct 8 14:48:03 UTC 2005
Update of /project/cells-gtk/cvsroot/root/gtk-ffi
In directory common-lisp.net:/tmp/cvs-serv16190/root/gtk-ffi
Modified Files:
gtk-ffi.lisp
Log Message:
Added motion and expose event structures (useful for DrawingArea). A few defines for SBCL port.
Date: Sat Oct 8 16:48:03 2005
Author: pdenno
Index: root/gtk-ffi/gtk-ffi.lisp
diff -u root/gtk-ffi/gtk-ffi.lisp:1.12 root/gtk-ffi/gtk-ffi.lisp:1.13
--- root/gtk-ffi/gtk-ffi.lisp:1.12 Sun May 29 23:19:58 2005
+++ root/gtk-ffi/gtk-ffi.lisp Sat Oct 8 16:48:03 2005
@@ -17,8 +17,7 @@
|#
-(defpackage :gtk-ffi (:use :lisp #-clisp :ffx
- #+clisp :ffi #-clisp :uffi))
+(defpackage :gtk-ffi (:use #-sbcl :lisp #+sbcl :cl :utils-kt #-clisp :ffx #+clisp :ffi #-clisp :uffi))
(in-package :gtk-ffi)
@@ -80,7 +79,7 @@
(loadit "libgdk-x11-2.0.so" :gdk)
(loadit "libgtk-x11-2.0.so" :gtk)
#+libcellsgtk(loadit "libcellsgtk.so" :cgtk))))
- #+cmu(load-gtk-libs)
+ #+(or cmu sbcl)(load-gtk-libs)
(defun ffi-to-uffi-type (clisp-type)
#+clisp clisp-type
#-clisp (if (consp clisp-type)
@@ -256,13 +255,39 @@
(hardware-keycode uint16)
(group uint8))
+(def-c-struct gdk-event-expose
+ (type int)
+ (window c-pointer)
+ (send-event uint8)
+ ;; This is probably wrong. alignment issues...
+ (area-x int)
+ (area-y int)
+ (area-width int)
+ (area-height int)
+ (region c-pointer)
+ (count int))
+
+(def-c-struct gdk-event-motion
+ (type int)
+ (window c-pointer)
+ (send-event uint8)
+ (time int)
+ (x double-float)
+ (y double-float)
+ (axes c-pointer)
+ (state int)
+ (is-hint uint16)
+ (device c-pointer)
+ (x-root double-float)
+ (y-root double-float))
+
(defun event-type (event)
(ecase event
(-1 :nothing)
(0 :delete)
(1 :destroy)
(2 :expose)
- (3 :notify)
+ (3 :notify) ; that is, pointer motion notify
(4 :button_press)
(5 :2button_press)
(6 :3button_press)
More information about the Cells-gtk-cvs
mailing list