Index

Package: Hook_Registrator (generic)

Description

generic
      Get_GType : Get_GType_Func;
      --  This function returns the GType assiciated with the type we want to
      --  convert to. Usually, all widgets have a class-wide Get_Type that can
      --  directly be used here.

      type Handled_Type is new GObject_Record with private;
      --  The type we want to convert to.

   package Hook_Registrator is
This package is used to allow automatic conversion from a C gtk object to Ada. To allow GtkAda to automatically bind an incoming externally created widget to the correct Ada type, you just need to instantiate this package, that will then automatically register the appropriate conversion methods.

Types

Handled_Type

type Handled_Type is new GObject_Record with private;
The type we want to convert to.

Constants & Global variables

Get_GType (Get_GType_Func)

Get_GType : Get_GType_Func;
This function returns the GType assiciated with the type we want to convert to. Usually, all widgets have a class-wide Get_Type that can directly be used here.

Subprograms & Entries

Creator

function Creator 
(Expected_Object: GObject_Record'Class) return GObject;
This function will create an Ada type corresponding to Handled_Type. In case Expected_Object is a child type of Handled_Type, an Ada object of type Expected_Object is returned instead. This allows convertion of types we know are expected, but don't have registered conversion hook functions.