Description
Note: 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:
- Property_RO : this type should be used for a read-only property
of the given type.
- Property : This is for read-write properties
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 Boxed_Type is private;
-
type Discrete_Type is (<>);
-
type Enumeration is (<>);
-
type Property is new Glib.Property;
-
type Property_RO is new Glib.Property;
Subprograms
Generic package for discrete type 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.
This should be used only for types defined in GtkAda
or gtk+ themselves, not for types that you define
yourself. Use Generic_Discrete_Type instead.
-
-
-
Types
-
-
function Gnew_Enum
(Name, Nick, Blurb : String;
Default : Enumeration := Enumeration'First;
Flags : Param_Flags := Param_Readable or Param_Writable)
return Param_Spec;
Values
-
function Get_Enum (Value : Glib.Values.GValue) return Enumeration;
-
procedure Set_Enum
(Value : in out Glib.Values.GValue; Enum : Enumeration);
Generic package for record types properties
This package should be used to implement the
Get_Property and
Set_Property subprograms for all
properties related to record type, like Gdk_Color and
Gdk_Rectangle.
This should be used only for types defined in GtkAda
or gtk+ themselves, not for types that you define
yourself.
-
-
-
-
procedure Set_Value
(Value : out Glib.Values.GValue;
Val : Boxed_Type);
-
function Get_Value (Value : Glib.Values.GValue) return Boxed_Type;