Base support for the GLib type system.
The GLib runtime type system is broken into a number of modules, of which GType
is the base. A GType is a simply a named type. Some types are fundamental and
cannot be subclassed, such as integers. Others can form the root of complicated
object hierarchies, such as <gobject>
.
One can obtain the class for a type if you know its name. For example,
(gtype-name->class "guint64") ⇒ #<<gvalue-class> <guint64>>
A more detailed reference on the GLib type system may be had at http://library.gnome.org/devel/gobject/stable/.
The metaclass of all GType classes. Ensures that GType classes have a
gtype
slot, which records the primitive GType information for this class.
The root class of all instantiatable GType classes. Adds a slot,
gtype-instance
, to instances, which holds a pointer to the C value.
Convert the name of a class into a suitable name for a GType. For example:
(class-name->gtype-name '<foo-bar>) ⇒ "FooBar"
Signal a runtime error. The error will be thrown to the key
gruntime-error
.
Release all references that the Scheme wrapper instance has on the underlying C value, and release pointers associated with the C value that point back to Scheme.
Normally, you don't need to call this function, because garbage collection will take care of resource management. However some
<gtype-class>
instances have semantics that require this function. The canonical example is that when a<gtk-object>
emits thedestroy
signal, all code should drop their references to the object. This is, of course, handled internally in the(gnome gtk)
module.