This package provides definitions for the basic types used in Glib, Gdk and Gtk.
Types |
---|
| |
Provided for better compatibility between GtkAda 1.2 and 2.0
| |
| |
| |
| |
| |
General proxy for C structures.
This type is used instead of System.Address so that the variables are
automatically initialized to 'null'.
The value pointed to is irrelevant, and in fact should not be accessed.
It has thus been made limited private with no subprogram to access it.
C_Proxy is a public type so that one can compare directly the value
of the variables with 'null'.
| |
| |
Represents a string internally in GtkAda. Once you know the
equivalent for a string, you can always use it instead of the string,
which provides a faster access for all the functions that use htables
in GtkAda.
There is a global htable that contains all the quarks defined in
your application and GtkAda itself.
| |
| |
| |
| |
This type describes an internal type in Glib.
You shouldn't have to use it in your own applications, however it might
be useful sometimes.
Every object type is associated with a specific value, created
dynamically at run time the first time you instantiate an object of that
type (thus if you have never used e.g a Gtk_File_Selection, it won't
have any GType associated with it).
You can get the exact type value for each type by using the functions
Get_Type provided in all the packages in GtkAda.
You can get the specific value for an existing widget by using the
function Gtk.Object.Get_Type.
| |
| |
| |
| |
| |
| |
| |
Provided for better compatibility between GtkAda 1.2 and 2.0
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Needed for better compatibility between GtkAda 1.2 and 2.0
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
See Glib.Properties.Creation for more information on this type
| |
| |
| |
| |
This uniquely identifies a connection widget<->signal.
| |
| |
| |
A string that accepts only valid UTF8 sequences.
Most Gtk+ function expect valid UTF8 strings instead of regular strings.
|
Subprograms |
---|
Conversion services | ||
function To_Boolean_Array (A : in Gboolean_Array) return Boolean_Array; | ||
Convert a C-style boolean array into an Ada-style array. | ||
function To_Gint (Bool : in Boolean) return Gint; | ||
Convert an Ada boolean into a C int. | ||
Quarks | ||
function Quark_From_String (Id : in String) return GQuark; | ||
Return, or create the quark associated with the string. Note that if the quark does not already exist, an entry is created for it in the global htable for quarks. | ||
function Quark_Try_String (Id : in String) return GQuark; | ||
Return the quark associated with the string, if it exists. If it does not exist, return Unknown_Quark. | ||
Properties | ||
This is only the definition of the property types. See Glib.Properties on how to get and set the value of properties for specific objects, or the package Glib.Properties.Creation for information on how to create new properties in your own widgets. | ||
function Build (Name : String) return Property; | ||
You should use this function only if you are creating new widgets, and their properties. Normal usage of properties doesn't require the use of this function. An ASCII.NUL character is automatically appended if necessary | ||
function Property_Name (Prop : Property) return String; | ||
Return the name of the property. This name includes the trailing ASCII.Nul, and thus can be passed as is to C. | ||
GType | ||
function Parent (Typ : GType) return GType; | ||
Return the parent type of Typ (eg if Typ is associated with a Gtk widget, it returns the typ of its parent). | ||
function Fundamental (Typ : GType) return GType; | ||
Return the fundamental type for Type. In gtk+, the types are organized into several hierarchies, similar to what is done for widgets. All of these hierarchies are based on one of the fundamental types defined below. This function returns that fundamental type. For instance, each enumeration type in gtk+ has its own GType. However, Fundamental will return GType_Enum in all of these cases. | ||
function Type_Name (Type_Num : in GType) return String; | ||
Return the name of the type (enumeration,...) associated with Typ. If Fundamental (Typ) return GType_Enum, this returns the name of the enumeration type that Typ represents. This might be useful in debug messages. | ||
function Type_From_Name (Name : in String) return GType; | ||
Convert a string to the matching type. Name should be the C GObject name rather than the Ada name: thus, use names such as GtkScrollbar or GtkButton for widgets. | ||
function Get_Qdata (Typ : GType; Quark : GQuark) return Glib.C_Proxy; | ||
Return the user data set for Typ | ||
procedure Set_Qdata (Typ : GType; Quark : GQuark; Data : Glib.C_Proxy); | ||
Associate some named data with Typ. | ||
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. See an example with the subprogram Glib.Values.Set_Boxed | ||
function Boxed_Type_Register_Static (Name : String; Copy : Boxed_Copy; Free : Boxed_Free) return GType; | ||
Create a new boxed type |