Compilation Units
Tagged Types
----------------------------------------------- Generic package for enumerations properties -- ----------------------------------------------- This package should be used to implement the Get_Property and Set_Property subprograms for all properties related to enumeration types and simple types in users' applications. Name is the name registered in gtk+ for the type. This is also the name that appears in all the tools that use introspection to get information about the widgets and their properties, like GUI builders for instance
!!IMPORTANT!!: For proper usage of properties based on enumeration types, you must specify the Convention C on the type: pragma Convention (C, Enumeration_Type);
type Enumeration is (<>);
function Get_Enum (Value : Glib.Values.GValue) return Enumeration
Return the enumeration contained in Value, assuming it is of type Enumeration
function Get_Type return Glib.GType
Return the internal gtk+ type associated with the Ada enumeration Enumeration. You don't need to use such a function for the types defined in standard in GtkAda. Use Glib.Type_From_Name instead.
function Gnew_Enum
(Name, Nick, Blurb : String;
Default : Enumeration := Enumeration'First;
Flags : Param_Flags := Param_Readable or Param_Writable)
return Param_Spec
Create a new param_spec (to describe properties), based on the Ada enumeration type Enumeration. This function is used when creating the property with Install_Property on an object. Name, Nick and Blurb should describe the property, not its type.
Name : String;
package Properties is new Generic_Internal_Discrete_Property
(Enumeration);
type Property is new Properties.Property;
type Property_RO is new Properties.Property_RO;
procedure Set_Enum
(Value : in out Glib.Values.GValue; Enum : Enumeration)
Set the enumeration value for Value. This properly initializes the type of Value, so you don't need to call Init yourself.