What type should the literal xpm data be for a call to gdk::pixmap-create-from-xpm-d.
The data in c is shown below. Looking at the types defined with defalien-type in gtkffi-cmusbcl.lisp, the closest I see is:
(defalien-type gchararray (* t))
How would this need to be altered to represent an array of character arrays?
How then would the literal data appear in the lisp file?
Is there any more documentation for sbcl-af other than the comments in the source distribution?
Thanks for any help.
Todd.
/* XPM */ static char * plus_xpm[] = { "64 64 3 1", " c None", ". c #FFFFFF", "+ c #000000", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................", ".......................+++++++++++++++++++......................"};
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.
lambda-gtk-devel@common-lisp.net