Next: , Previous: GObject metaclass, Up: GObject high-level


4.10.4 Using objects

Instances are created with make-instance. If initargs of GObject properties are supplied, they are passed to constructor. Some slots (properties) may only be set at construction time (e.g., type property of GtkWindow). Properties may be accessed (read or assigned) with defined :accessor, :reader or :writer functions.

Example:

     (make-instance 'gtk:dialog :has-separator t)
     =>
     #<GTK:DIALOG {10036C5A71}>
     
     (defvar *d* (make-instance 'gtk:dialog :has-separator t))
     =>
     *D*
     
     (gtk:dialog-has-separator *d*)
     =>
     T
     
     (setf (gtk:dialog-has-separator *d*) nil)
     =>
     NIL
     
     (gtk:dialog-has-separator *d*)
     =>
     NIL