This package provides an interface to the type system in Glib. These types provide an object-oriented framework (through inheritance and interfaces), as well as reference-counting, signals and properties on these types.
Most of the time, you DO NOT need to use this package, only when you are working with the introspection capabilities of glib.
See the other glib packages for more subprograms to manipulate these types. In particular, Glib.Properties describes the properties system, that provide the base for dynamic introspection. See also Glib itself, which contains several general subprograms, and Glib.Object that provides the root object for any type hierarchy based on glib.
<group>Glib, the general-purpose library</group>
function Class_Peek (T : GType) return Glib.Object.GObject_Class
Return the class structure encapsulated in T. Class_Ref will create the class on-demand if it doesn't exist yet, but Class_Peek might return null if the class hasn't been referenced before. Class_Ref also increments the reference counting for the returned value
function Class_Ref (T : GType) return Glib.Object.GObject_Class
Return the class structure encapsulated in T. Class_Ref will create the class on-demand if it doesn't exist yet, but Class_Peek might return null if the class hasn't been referenced before. Class_Ref also increments the reference counting for the returned value
procedure Class_Unref (T : GType)
Decrement the reference counting on the associated class. When it reaches 0, the class may be finalized by the type system.
function Default_Interface_Peek
(T : GType) return Glib.Object.Interface_Vtable
If the interface type T is currently in use, returns its default interface vtable. Default_Interface_Ref will create the default vtable for the type if the type is not currently in use. This is useful when you want to make sure that signals and properties for an interface have been installed.
function Default_Interface_Ref
(T : GType) return Glib.Object.Interface_Vtable
If the interface type T is currently in use, returns its default interface vtable. Default_Interface_Ref will create the default vtable for the type if the type is not currently in use. This is useful when you want to make sure that signals and properties for an interface have been installed.
function Depth (T : GType) return Guint
Returns the length of the ancestry of the passed in type. This includes the type itself, so that e.g. a fundamental type has depth 1.
type GType_Interface is new System.Address;
function Interfaces (T : GType) return GType_Array
Return the list of interfaces implemented by objects of a given type.
function Is_A (T : GType; Is_A_Type : GType) return Boolean
If Is_A_Type is a derivable type, check whether type is a descendant of Is_A_Type. If Is_A_Type is an interface, check whether type conforms to it.
function Is_Interface (T : GType) return Boolean
Whether T represents an interface type description
Null_Interface : constant GType_Interface;
function To_Object
(Interf : GType_Interface) return Glib.Object.GObject
Return the object that the interface represents. This is slightly different from using Implements.To_Object, in the case when the object wasn't created through Ada. In such a case, GtkAda needs to create an Ada wrapper around the object, and will choose a different tagged type: - Implements.To_Object creates a tagged type of type Object_Type. - This function creates a GObject, which you cannot cast easily to some other tagged type afterward. Both behave the same when the object was created from Ada.