_
PropertiesNote: this package need only be used and understood by people who want to create their own new widgets and their associated properties. Normal usage of properties doesn't require any deep understanding of this package.
This package provides two generic subpackages that make it easy to declare properties. Each of these packages define two types:
Each of these two types is associated with one or two primitive operations Get_Property and Set_Property, that allows the modification of properties of this type.
As a user and creator of new widgets, you should always use the Generic_Enumeration_Property package, since it also registers the enumeration type with gtk+ for a full compatibility with C.
Types |
---|
type Discrete_Type is (<>); | |
| |
type Enumeration is (<>); | |
| |
type Property is new Properties.Property; | |
| |
type Property_RO is new Properties.Property_RO; | |
|
Subprograms |
---|
Generic package for discrete type properties | ||
This package should be used to implement the | ||
procedure Set_Property (Object : access Glib.Object.GObject_Record'Class; Name : Property; Value : Discrete_Type); | ||
Set a property of Object based on Enumeration_Type.
| ||
function Get_Property (Object : access Glib.Object.GObject_Record'Class; Name : Property) return Discrete_Type; | ||
| ||
function Get_Property (Object : access Glib.Object.GObject_Record'Class; Name : Property_RO) return Discrete_Type; | ||
Get a property from Object
| ||
Types | ||
function Get_Type return Glib.GType; | ||
Return the internal gtk+ type associated with the Ada enumeration | ||
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 | ||
Values | ||
function Get_Enum (Value : Glib.Values.GValue) return Enumeration; | ||
Return the enumeration contained in Value, assuming it is of type | ||
procedure Set_Enum (Value : in out Glib.Values.GValue; Enum : Enumeration); | ||
Set the enumeration value for Value. This properly initializes the | ||
Generic package for record types properties | ||
This package should be used to implement the | ||
procedure Set_Property (Object : access Glib.Object.GObject_Record'Class; Name : Property; Value : Boxed_Type); | ||
Set a property of Object based on Enumeration_Type.
| ||
function Get_Property (Object : access Glib.Object.GObject_Record'Class; Name : Property) return Boxed_Type; | ||
| ||
function Get_Property (Object : access Glib.Object.GObject_Record'Class; Name : Property_RO) return Boxed_Type; | ||
Get a property from Object
|