Next: , Up: GObject low-level


9.1 g-object-call-constructor

— Function: g-object-call-constructor
     (g-object-call-constructor object-type args-names args-values &optional args-types) => object-ptr
object-type
A GType designator that specifies the object type that is to be created
args-names
A list of strings naming the arguments to constructor
args-value
A list of arguments values (in the same order as args-names)
args-types
Optional list of arguments types (in the same order as args-names). If not specified, it is detected automatically
object-ptr
A foreign pointer to newly created instance

Creates the object of type object-type by calling its constructors with arguments specified by args-names, args-values, args-types.

Example:

     (g-object-call-constructor "GtkButton" '("label" "use-underline") '("Hello" t) '("gchararray" "gboolean"))
     =>
     #.(SB-SYS:INT-SAP #X006D8900)
     
     (g-object-call-get-property * "label")
     =>
     "Hello"
     
     (g-object-call-get-property ** "use-underline")
     =>
     T