Toc Gallery Index Tree Glib.Types

Description

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.

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.

Types

  • type GType_Interface is private;

Subprograms

    Interfaces

    Interfaces are similar, in concept, to those found in Ada 2005 or in Java. They define a set of subprograms that any type implementing the interface must also define. They are different from standard inheritance since no implementation of these subprograms can be provided in the interface itself.
  • 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.

Alphabetical Index