Next: GObject__, Up: G-Golf High Level API [Contents][Index]
G-Golf GType high level API.
The base of the GObject type system.
<gtype-class>
<gtype-instance>
!info
!namespace
!g-type
!g-name___
!g-class
!derived
!g-inst
unref
The metaclass
of all GType classes. Ensures that GType classes
have an info
slot, holding a pointer to a
GIObjectInfo
. Its slots are:
info
#:accessor !info
#:init-keyword #:info
namespace
#:accessor !namespace
g-type
#:accessor !g-type
g-name
#:accessor !g-name
g-class
#:accessor !g-class
derived
#:accessor !derived
#:init-keyword #:derived
#:init-value #fA class is derived when it is user defined (not imported), and inherit a GObject subclass.
The #:info #:init-keyword is mandatory, other slots are initialized automatically. All slots are immutable (to be precise, they are not meant to be mutated, see GOOPS Notes and Conventions, ’Slots are not Immutable’).
Returns the content of their respective slot for class.
The root class of all instantiatable GType classes. Adds a slot,
g-inst
, to instances, which holds a pointer to the C value
g-inst
#:accessor !g-inst
The g-inst slot is initialized automatically and immutable (to be precise, it is not meant to be mutated, see GOOPS Notes and Conventions, ’Slots are not Immutable’).
Returns the content of the g-inst slot for instance.
Returns nothing.
This method calls g-object-unref on the g-inst
of
instance.
When the reference count for the g-inst
reaches 0 (zero), it sets
the g-inst
slot value for instance to #f and removes
instance from the %g-inst-cache
.
This method must be called upon instances that are not referenced anywhere anymore, so that their memory can be freed by the next gc occurrence.
Next: GObject__, Up: G-Golf High Level API [Contents][Index]