Description
This package provides definitions for the basic types used in
Glib,
Gdk and
Gtk.
Types
-
type Allocation_Int is Gint;
-
type Boxed_Copy is access
function (Boxed : System.Address) return System.Address;
-
type Boxed_Free is access procedure (Boxed : System.Address);
-
type C_Proxy is access C_Dummy;
-
type GQuark is new Guint32;
-
type GTime_Val is record
TV_Sec : Glong;
-
type GTime_Val_Access is access all GTime_Val;
-
type GType is new Gsize;
-
type GType_Array is array (Guint range <>) of Glib.GType;
-
type GType_Class is private;
-
type G_Destroy_Notify
is access procedure (Data :
Glib.C_Proxy);
-
type G_Destroy_Notify_Address is
access procedure (Data : System.Address);
-
type Gboolean is new Gint;
-
type Gboolean_Array is array (Natural range <>) of Gboolean;
-
type Gcolor_Int is Guint16;
-
type Gdouble is new C.double;
-
type Gint16 is range -(2 ** 15) .. (2 ** 15 - 1);
-
type Gint32 is range -(2 ** 31) .. (2 ** 31 - 1);
-
type Gint64 is range -(2 ** 63) .. (2 ** 63 - 1);
-
type Grange_Float is Gdouble;
-
type Gshort is new C.short;
-
type Gsize is new C.size_t;
-
type Guchar_Array_Access is access Guchar_Array;
-
type Guint16 is mod 2 ** 16;
-
type Guint32 is mod 2 ** 32;
-
type Guint64 is mod 2 ** 64;
-
type Gunichar is new Guint32;
-
type Gushort is new C.unsigned_short;
-
type Param_Flags is mod 2 ** 6;
-
-
type Param_Spec_Array is array (Natural range <>) of Param_Spec;
-
type Signal_Id is private;
-
type String_Ptr is access all String;
-
type UTF8_String is String;
Subprograms
Conversion services
-
function To_Boolean_Array (A : in Gboolean_Array) return Boolean_Array;
-
function To_Gint (Bool : in Boolean) return Gint;
Quarks
-
function Quark_From_String (Id : in String) return GQuark;
-
function Quark_Try_String (Id : in String) return GQuark;
Properties
-
function Build (Name : String) return Property;
-
function Property_Name (Prop : Property) return String;
GType
-
function Parent (Typ : GType) return GType;
-
function Fundamental (Typ : GType) return GType;
-
function Type_Name (Type_Num : in GType) return String;
-
function Type_From_Name (Name : in String) return GType;
-
function Get_Qdata (Typ : GType; Quark : GQuark)
return Glib.C_Proxy;
-
procedure Set_Qdata
(Typ : GType;
Quark : GQuark;
Data :
Glib.C_Proxy);
Boxed types
Boxed types are a convenient way to encapsulate Ada types through a C
layer. An initialization and a finalization function can be provided.
The most frequent usage of such types is in argument to signals and
handlers (See the functions in
Glib.Values), or to store such types
in a Gtk_Tree_Model. This allows you for instance to store reference
counted types where you want to be able to control what should happen
when the cell is removed from the tree.
-
function Boxed_Type_Register_Static
(Name : String;
Copy : Boxed_Copy;
Free : Boxed_Free) return GType;