Next: , Up: G-Golf High Level API   [Contents][Index]


GType

G-Golf GType high level API.
The base of the GObject type system.

Classes

<gtype-class>
<gtype-instance>

Accessors and Methods

!info
!namespace
!g-type
!g-name___
!g-class
!derived
!g-inst
unref
Class: <gtype-class>

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 #f

A 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’).

Accessor: !info class
Accessor: !namespace class
Accessor: !g-type class
Accessor: !g-name class
Accessor: !g-class class
Accessor: !derived class

Returns the content of their respective slot for class.

Class: <gtype-instance>

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’).

Accessor: !g-inst instance

Returns the content of the g-inst slot for instance.

Method: unref 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: , Up: G-Golf High Level API   [Contents][Index]