## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --               GtkAda - Ada95 binding for Gtk+/Gnome               --

3.     --                                                                   --

4.     --                Copyright (C) 2001-2003, ACT-Europe                --

5.     --                    Copyright (C) 2010-2013, AdaCore               --

6.     --                                                                   --

7.     -- This library is free software; you can redistribute it and/or     --

8.     -- modify it under the terms of the GNU General Public               --

9.     -- License as published by the Free Software Foundation; either      --

10.     -- version 2 of the License, or (at your option) any later version.  --

11.     --                                                                   --

12.     -- This library is distributed in the hope that it will be useful,   --

13.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

14.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

15.     -- General Public License for more details.                          --

16.     --                                                                   --

17.     -- You should have received a copy of the GNU General Public         --

18.     -- License along with this library; if not, write to the             --

19.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

20.     -- Boston, MA 02111-1307, USA.                                       --

21.     --                                                                   --

22.     -- As a special exception, if other files instantiate generics from  --

23.     -- this unit, or you link this unit with other files to produce an   --

24.     -- executable, this  unit  does not  by itself cause  the resulting  --

25.     -- executable to be covered by the GNU General Public License. This  --

26.     -- exception does not however invalidate any other reasons why the   --

27.     -- executable file  might be covered by the  GNU Public License.     --

28.     -----------------------------------------------------------------------

30.     --  <description>

31.     --  Properties are a fully general way to modify the appareance or behavior

32.     --  of widgets. Most of the time, there exists a faster way to modify the

33.     --  widget in the same fashion (for instance a direct call to a primitive

34.     --  subprogram). However, the properties provide a general scheme to modify

35.     --  these attributes.

36.     --  For instance, they can be used to provide introspection on the widget

37.     --  (to automatically retrieve the attributes that can be modified), or if

38.     --  you need to implement a tool like a GUI-Builder that is able to

39.     --  manipulate any widget, even those that didn't exist when the tool was

40.     --  written.

41.     --

42.     --  Two functions are provided for each type of property: Set_Property and

43.     --  Get_Property, which allow easy modification of specific widget

44.     --  properties. For instance, you could do the following:

45.     --      declare

46.     --          Button : Gtk_Button;

47.     --      begin

48.     --          Gtk_New (Button, "old label");

49.     --          Set_Property (Button, Label_Property, "new label");

50.     --      end;

51.     --  to modify the label of a button.

52.     --

53.     --  Likewise, you can retrieve the current label with:

54.     --      Current : String := Get_Property (Button, Label_Property);

55.     --

56.     --  Dispatching is used ensure type-safety while using properties. The

57.     --  appropriate Set_Property/Get_Property functions are called depending

58.     --  on the type of the property you are trying to use. This is checked

59.     --  statically by the compiler, which provides additional type-safety

60.     --  compared to the C library.

61.     --

62.     --  Note that some properties are read-only, and thus do not have the

63.     --  Set_Property subprogram defined.

64.     --

65.     --  When a property is modified, the signal "notify::<property>" is emitted,

66.     --  for instance, "notify::label" for a gtk_button. This is a standard gtk+

67.     --  signal to which you can connect with the subprograms in gtk-handlers.ads

69.     --  </description>

70.     --  <c_version>1.3.4</c_version>

71.     --  <group>Glib, the general-purpose library</group>

73.     with Glib.ObjectTo API docTo specTo body;

74.     with Glib.Generic_PropertiesTo API docTo specTo body; use Glib.Generic_PropertiesTo API docTo specTo body;

75.     pragma Elaborate_All (Glib.Generic_PropertiesTo API docTo specTo body);

76.     with System;

77.     with Glib.ValuesTo API docTo specTo body;

79.     package Glib.PropertiesTo API docTo specTo body is

81.        --  <doc_ignore>

83.        --  Definition of the types and subprograms.

84.        --  You can ignore this section.

86.        package Char_Properties is new

87.          Generic_Internal_Discrete_PropertyTo API docTo specTo body (Glib.GcharTo API docTo spec);

88.        package Uchar_Properties is new

89.          Generic_Internal_Discrete_PropertyTo API docTo specTo body (Glib.GucharTo API docTo spec);

90.        package Int_Properties is new

91.          Generic_Internal_Discrete_PropertyTo API docTo specTo body (Glib.GintTo API docTo spec);

92.        package Uint_Properties is new

93.          Generic_Internal_Discrete_PropertyTo API docTo specTo body (Glib.GuintTo API docTo spec);

94.        package Long_Properties is new

95.          Generic_Internal_Discrete_PropertyTo API docTo specTo body (Glib.GlongTo API docTo spec);

96.        package Ulong_Properties is new

97.          Generic_Internal_Discrete_PropertyTo API docTo specTo body (Glib.GulongTo API docTo spec);

98.        package Unichar_Properties is new

99.          Generic_Internal_Discrete_PropertyTo API docTo specTo body (Glib.GunicharTo API docTo spec);

101.        --  </doc_ignore>

103.        --  Predefined types of properties. Additional types are available

104.        --  for most of the standard enumeration types, and you can create

105.        --  your own types (see Glib.Properties).

107.        type Property_Char      is new Char_Properties.PropertyTo API docTo spec;

108.        type Property_Char_RO   is new Char_Properties.Property_ROTo API docTo spec;

109.        type Property_Uchar     is new Uchar_Properties.PropertyTo API docTo spec;

110.        type Property_Uchar_RO  is new Uchar_Properties.Property_ROTo API docTo spec;

111.        type Property_Int       is new Int_Properties.PropertyTo API docTo spec;

112.        type Property_Uint_RO   is new Uint_Properties.Property_ROTo API docTo spec;

113.        type Property_Uint      is new Uint_Properties.PropertyTo API docTo spec;

114.        type Property_Long_RO   is new Long_Properties.Property_ROTo API docTo spec;

115.        type Property_Long      is new Long_Properties.PropertyTo API docTo spec;

116.        type Property_Ulong_RO  is new Ulong_Properties.Property_ROTo API docTo spec;

117.        type Property_Ulong     is new Ulong_Properties.PropertyTo API docTo spec;

118.        type Property_Unichar   is new Unichar_Properties.PropertyTo API docTo spec;

119.        type Property_C_Proxy   is new Glib.PropertyTo API docTo spec;

120.        type Property_String_RO is new Glib.PropertyTo API docTo spec;

121.        type Property_String_WO is new Glib.PropertyTo API docTo spec;

122.        type Property_String    is new Glib.PropertyTo API docTo spec;

123.        type Property_Boolean   is new Glib.PropertyTo API docTo spec;

124.        type Property_Object    is new Glib.PropertyTo API docTo spec;

125.        type Property_Object_WO is new Glib.PropertyTo API docTo spec;

126.        type Property_Address   is new Glib.PropertyTo API docTo spec;

127.        type Property_Float     is new Glib.PropertyTo API docTo spec;

128.        type Property_Double    is new Glib.PropertyTo API docTo spec;

129.        type Property_Enum      is new Glib.PropertyTo API docTo spec;

130.        type Property_Boxed     is new Glib.PropertyTo API docTo spec;

132.        --  General properties getter

134.        procedure Set_PropertyTo API docTo body

135.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

136.           Name   : String;

137.           ValueTo API docTo body  : in out Glib.Values.GValueTo API docTo specTo body);

138.        procedure Get_PropertyTo API docTo body

139.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

140.           Name   : String;

141.           ValueTo API docTo body  : in out Glib.Values.GValueTo API docTo specTo body);

142.        --  Get the property. Value must have been initialized first with the

143.        --  expected type for the property, as in:

144.        --      Value : GValue;

145.        --      Init (Value, Value_Type (Pspec));

146.        --      Get_Property (Object, Pspec_Name (Pspec), Value);

147.        --  If you do not have a Param_Spec, this can be replaced with:

148.        --      Init (Value, GType_Int);

149.        --      Get_Property (Object, Property_Name (Property), Value);

150.        --  Value must be Unset by the caller to free memory

152.        --  Special handling of string properties

154.        procedure Set_PropertyTo API docTo body

155.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

156.           Name : Property_StringTo API docTo spec;

157.           Value : String);

159.        procedure Set_PropertyTo API docTo body

160.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

161.           Name : Property_String_WOTo API docTo spec;

162.           Value : String);

164.        function Get_PropertyTo API docTo body

165.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

166.           Name : Property_StringTo API docTo spec) return String;

168.        function Get_PropertyTo API docTo body

169.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

170.           Name : Property_String_ROTo API docTo spec) return String;

172.        --  Special handling of boolean properties

174.        procedure Set_PropertyTo API docTo body

175.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

176.           Name   : Property_BooleanTo API docTo spec;

177.           Value  : Boolean);

179.        function Get_PropertyTo API docTo body

180.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

181.           Name : Property_BooleanTo API docTo spec) return Boolean;

183.        --  Special handling of object properties

185.        procedure Set_PropertyTo API docTo body

186.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

187.           Name   : Property_ObjectTo API docTo spec;

188.           Value  : access Glib.Object.GObject_RecordTo API docTo specTo body'Class);

190.        function Get_PropertyTo API docTo body

191.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

192.           Name : Property_ObjectTo API docTo spec) return Glib.Object.GObjectTo API docTo spec;

194.        procedure Set_PropertyTo API docTo body

195.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

196.           Name   : Property_Object_WOTo API docTo spec;

197.           Value  : access Glib.Object.GObject_RecordTo API docTo specTo body'Class);

199.        --  Special handling of address properties

201.        procedure Set_PropertyTo API docTo body

202.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

203.           Name   : Property_AddressTo API docTo spec;

204.           Value  : System.Address);

206.        function Get_PropertyTo API docTo body

207.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

208.           Name : Property_AddressTo API docTo spec) return System.Address;

210.        --  Special handling of float properties

212.        procedure Set_PropertyTo API docTo body

213.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

214.           Name   : Property_FloatTo API docTo spec;

215.           Value  : GfloatTo API docTo spec);

217.        function Get_PropertyTo API docTo body

218.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

219.           Name : Property_FloatTo API docTo spec) return GfloatTo API docTo spec;

221.        --  Special handling of double properties

223.        procedure Set_PropertyTo API docTo body

224.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

225.           Name   : Property_DoubleTo API docTo spec;

226.           Value  : GdoubleTo API docTo spec);

228.        function Get_PropertyTo API docTo body

229.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

230.           Name : Property_DoubleTo API docTo spec) return GdoubleTo API docTo spec;

232.        --  Special handling of c_proxy properties

234.        procedure Set_PropertyTo API docTo body

235.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

236.           Name   : Property_C_ProxyTo API docTo spec;

237.           Value  : C_ProxyTo API docTo spec);

239.        function Get_PropertyTo API docTo body

240.          (Object : access Glib.Object.GObject_RecordTo API docTo specTo body'Class;

241.           Name : Property_C_ProxyTo API docTo spec) return C_ProxyTo API docTo spec;

243.     end Glib.PropertiesTo API docTo specTo body;