type GValue is private;
type GValues is private;
procedure Free
( | Val | : in out GValues); |
generic type T is private;function Unsafe_Proxy_Nth
( Values : C_GValues; Num : Guint) return T; Init
procedure Init
( Value : in out GValue; G_Type : Glib.GType); Set the type of Value to G_Type. This limits the operations you can then apply to Value. For instance, Value must have been initialized with a GType_Int before you can use Set_Int (see below). Note that for enumeration types, you shouldn't use GType_Enum, but rather the exact GType corresponding to the enumeration. If you need to store a reference-counted type in a GValue, it is recommanded that you use a type derived from Boxed (see Set_Boxed below)Unset
procedure Unset
( Value : in out GValue); Set_Boolean
procedure Set_Boolean
( Value : in out GValue; V_Boolean : Boolean); Get_Boolean
function Get_Boolean
( Value : GValue) return Boolean; Set_String
procedure Set_String
( Value : in out GValue; V_String : String); Get_String
function Get_String
( Value : GValue) return String; Get_Chars
function Get_Chars
( Value : GValue) return Interfaces.C.Strings.chars_ptr; Set_Address
procedure Set_Address
( Value : in out GValue; V_Address : System.Address); Get_Address
function Get_Address
( Value : GValue) return System.Address; Set_Boxed
procedure Set_Boxed
( Value : in out GValue; V_Address : System.Address); Get_Boxed
function Get_Boxed
( Value : GValue) return System.Address; This is similar to Set_Address and Get_Address, except that the boxed type might have been associated with some specific initialization and finalization functions through Glib.Boxed_Type_Register_Static For instance: declare Typ : Glib.GType; Value : GValue; function To_Ref_Counted_Value is new Ada.Unchecked_Conversion (System.Address, My_Ref_Counted_Type); begin Typ := Boxed_Typed_Register_Static ("FOO", Copy'Access, Free'Access); Init (Value, Typ); Set_Boxed (Value, my_ref_counted_value.all'address); Val := To_Ref_Counted_Value (Get_Boxed (Value)); Unset (Value); end; See also Glib.Generic_Properties.Generic_Internal_Boxed_Property.Get_Enum
These are used to manipulate the standard GtkAda enumeration types. For types that you have redefined yourself, you have access to more suitable functions directly in the package Generic_Enumeration_Property.Get_Flags
function Get_Flags
( Value : GValue) return Glib.Guint; ??? Should really manipulate Glib.Properties.Creation.Flags_Int_ValueSet_Object
procedure Set_Object
( Value : in out GValue; To : access Glib.Object.GObject_Record'Class); Get_Object
function Get_Object
( Value : GValue) return Glib.Object.GObject; These are used to manipulate GObject instances.
This package provides an interface to generic values as used in the Glib object model.
The main type in this package is GValues, which is the equivalent of the C's (GValue*) array, i.e an array of unions. This package provides functions to extract the values from this type.
Binding from C File version 1.3.15