Next: , Previous: GBoxed foreign type, Up: GBoxed


4.12.8 copy-boxed-slots-to-foreign

— Function: copy-boxed-slots-to-foreign
     (copy-boxed-slots-to-foreign structure native-ptr &optional (type (and structure (type-of structure))))
structure
A Lisp structure corresponding to some GBoxed type
native-ptr
A foreign pointer
type
Name of the GBoxed type. It is optional but may be included for optimization purposes

Copies the contents of structure to C structure pointed to by native-ptr. type is used to determine which slots and which cstruct definition should be used.

Examples:

     (cffi:with-foreign-object (point-ptr 'gdk::point-cstruct)
       (gobject:copy-boxed-slots-to-foreign (gdk:make-point :x 10 :y 10) point-ptr 'gdk:point))