Package: gobject

Function gobject:object-new

Lambda List

gobject:object-new (gtype &rest args)

Arguments

gtype -- a g:type-t type ID of the g:object subtype to instantiate
args -- pairs of a property keyword and value

Details

Creates a new instance of a g:object subtype and sets its properties. Construction parameters which are not explicitly specified are set to their default values.

Note

In the Lisp implementation this function calls the make-instance method to create the new instance.

Examples

(g:object-new "GtkButton" :label "text" :margin 6)
=> #<GTK:BUTTON {D941381}>    
This is equivalent to:
(make-instance 'gtk:button :label "text" :margin 6)
=> #<GTK:BUTTON {D947381}>    
 

See also

2024-12-14