Update of /project/cells-gtk/cvsroot/root/gtk-ffi In directory clnet:/tmp/cvs-serv16532/root/gtk-ffi
Modified Files: gtk-ffi.lisp Log Message: Use cffi-features.
--- /project/cells-gtk/cvsroot/root/gtk-ffi/gtk-ffi.lisp 2006/06/07 17:00:25 1.21 +++ /project/cells-gtk/cvsroot/root/gtk-ffi/gtk-ffi.lisp 2006/06/30 15:26:54 1.22 @@ -82,63 +82,57 @@ (setf (cffi:mem-aref (cffi:foreign-slot-value obj obj-type slot) :int index) new-value))
-(cffi:define-foreign-library 'gobject - (:linux "libgobject-2.0.so") - (:win32 "libgobject-2.0-0.dll") - (:macosx "libgobject-2.0-0.dylib")) +(eval-when (:compile-toplevel :load-toplevel :execute) +(cffi:define-foreign-library :gobject + (cffi-features:unix "libgobject-2.0.so") + (cffi-features:windows "libgobject-2.0-0.dll") + (cffi-features:darwin "libgobject-2.0-0.dylib"))
(cffi:define-foreign-library :glib - (:linux "libglib-2.0.so") - (:win32 "libglib-2.0-0.dll") - (:macosx "libglib-2.0-0.dylib")) + (cffi-features:unix "libglib-2.0.so") + (cffi-features:windows "libglib-2.0-0.dll") + (cffi-features:darwin "libglib-2.0-0.dylib"))
(cffi:define-foreign-library :gthread - (:linux "libgthread-2.0.so") - (:win32 "libgthread-2.0-0.dll") - (:macosx "libgthread-2.0-0.dylib")) + (cffi-features:unix "libgthread-2.0.so") + (cffi-features:windows "libgthread-2.0-0.dll") + (cffi-features:darwin "libgthread-2.0-0.dylib"))
(cffi:define-foreign-library :gdk - (:linux "libgdk-x11-2.0.so") - (:win32 "libgdk-win32-2.0-0.dll") - (:macosx "libgdk-win32-2.0-0.dylib")) ; pod ??? + (cffi-features:unix "libgdk-x11-2.0.so") + (cffi-features:windows "libgdk-win32-2.0-0.dll") + (cffi-features:darwin "libgdk-win32-2.0-0.dylib")) ; pod ???
(cffi:define-foreign-library :gtk - (:linux "libgtk-x11-2.0.so") - (:win32 "libgtk-win32-2.0-0.dll") - (:macosx "libgtk-win32-2.0-0.dylib")) ; pod ??? + (cffi-features:unix "libgtk-x11-2.0.so") + (cffi-features:windows "libgtk-win32-2.0-0.dll") + (cffi-features:darwin "libgtk-win32-2.0-0.dylib")) ; pod ???
#+libcellsgtk (cffi:define-foreign-library :cgtk - (:linux "libcellsgtk.so") - (:win32 "libcellsgtk.dll") - (:macosx "libcellsgtk.dylib")) + (cffi-features:unix "libcellsgtk.so") + (cffi-features:windows "libcellsgtk.dll") + (cffi-features:darwin "libcellsgtk.dylib")) +) ;eval-when
;;; After doing this, should be able to do (g-thread-init c-null) ;;; The above define-foreigh-library appears to be useless (doesn't ;;; work through the symbols) use the names. + +;;; LW Win32 is hanging on POD's machine only: +;;; (fli:register-module "libgdk-win32-2.0-0.dll" :connection-style :immediate) +;;; (fli:register-module "c:\Program Files\Common Files\GTK\2.0\bin\libgdk-win32-2.0-0.dll" +;;; :connection-style :immediate) (eval-when (:compile-toplevel :load-toplevel :execute) (defun load-gtk-libs () (handler-bind ((style-warning #'muffle-warning)) - (cffi:load-foreign-library #+cffi-features:unix "libgobject-2.0.so" - #+win32 "libgobject-2.0-0.dll" - #+macosx "libgobject-2.0-0.dylib") - (cffi:load-foreign-library #+cffi-features:unix "libglib-2.0.so" - #+win32 "libglib-2.0-0.dll" - #+macosx "libglib-2.0-0.dylib") - (cffi:load-foreign-library #+cffi-features:unix "libgthread-2.0.so" - #+win32 "libgthread-2.0-0.dll" - #+macosx "libgthread-2.0-0.dylib") - (cffi:load-foreign-library #+cffi-features:unix "libgdk-x11-2.0.so" - #+win32 "libgdk-win32-2.0-0.dll" - #+macosx "libgdk-win32-2.0-0.dylib") - (cffi:load-foreign-library #+cffi-features:unix "libgtk-x11-2.0.so" - #+win32 "libgtk-win32-2.0-0.dll" - #+macosx "libgtk-win32-2.0-0.dylib") + (cffi:load-foreign-library :gobject) + (cffi:load-foreign-library :glib) + (cffi:load-foreign-library :gthread) + (cffi:load-foreign-library :gdk) + (cffi:load-foreign-library :gtk) #+libcellsgtk - (cffi:load-foreign-library #+cffi-features:unix - (merge-pathnames "libcellsgtk.so" #.*compile-file-pathname*) - #+win32 "libcellsgtk.dll" - #+macosx "libcellsgtk.dylib"))) + (cffi:load-foreign-library :cgtk))) ) ; eval
(eval-when (:compile-toplevel :load-toplevel :execute)