[lambda-gtk-devel] gdk::pixmap-create-from-xpm-d argument type

Rick Taube taube at uiuc.edu
Fri May 20 17:29:22 UTC 2005


>
> What type should the literal xpm data be for
> a call to gdk::pixmap-create-from-xpm-d.

hi it would need to be a foreign vector of c strings. Im not sure how 
this is done in sbcl but is possible, the gtkffi-cmusbcl.lisp file 
defines the function string->cstring which gets you partway there.

> How then would the literal data appear in the lisp file?

In Lisp it could be simply a list of strings:

(defvar *myxpm*
   (list "64 64 3 1"
        [...]
        
".......................+++++++++++++++++++......................"))

then write a function that takes the list of strings and allocates the 
vector w/ cstrings:

  (defun lisp-strings-to-string-vector  (strs)
     (do-whatever strs))


> Is there any more documentation for sbcl-af other than the
> comments in the source distribution?

the sbcl manual has a pretty good section on their ffi.




More information about the Lambda-gtk-devel mailing list