## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --

5.     --                Copyright (C) 2000-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.     --  <group>Gdk, the low-level API</group>

32.     with GlibTo API docTo specTo body; use GlibTo API docTo specTo body;

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

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

36.     package Gdk.TypesTo API docTo spec is

38.        Current_Time : constant Guint32To API docTo spec := 0;

39.        --  Represents the current time in timestamps stored in events

41.        type Gdk_Point is record

42.           X : GintTo API docTo spec;

43.           Y : GintTo API docTo spec;

44.        end record;

45.        pragma Convention (C, Gdk_PointTo API docTo spec);

47.        type Gdk_Points_Array is array (Positive range <>) of Gdk_PointTo API docTo spec;

48.        pragma Pack (Gdk_Points_ArrayTo API docTo spec);

50.        type Gdk_Segment is record

51.           X1 : GintTo API docTo spec;

52.           Y1 : GintTo API docTo spec;

53.           X2 : GintTo API docTo spec;

54.           Y2 : GintTo API docTo spec;

55.        end record;

56.        pragma Convention (C, Gdk_SegmentTo API docTo spec);

58.        type Gdk_Segments_Array is array (Positive range <>) of Gdk_SegmentTo API docTo spec;

59.        pragma Pack (Gdk_Segments_ArrayTo API docTo spec);

61.        --  See at the end of the package a list of all the types that

62.        --  have not been "bound".

64.        type Gdk_Atom is new C_ProxyTo API docTo spec;

65.        --  This type represents a property of the X-server, that can be

66.        --  manipulated through functions in Gdk.Property. They have an associated

67.        --  name, that can be printed, as well as a value whose type may vary.

68.        --  See the program xlsatoms on any X-Window machine to list all the atoms

69.        --  known by the Xserver.

71.        Gdk_None : constant Gdk_AtomTo API docTo spec := null;

72.        --  No atom constant.

74.        type Gdk_Atom_Array is array (Natural range <>) of Gdk_AtomTo API docTo spec;

76.        type Gdk_Axis_Use is

77.          (Axis_Ignore,

78.           Axis_X,

79.           Axis_Y,

80.           Axis_Pressure,

81.           Axis_X_Tilt,

82.           Axis_Y_Tilt,

83.           Axis_Last);

84.        pragma Convention (C, Gdk_Axis_UseTo API docTo spec);

86.        type Gdk_Byte_Order is (Lsb_First, Msb_First);

87.        pragma Convention (C, Gdk_Byte_OrderTo API docTo spec);

89.        type Gdk_Extension_Mode is

90.          (Extension_Events_None, Extension_Events_All, Extension_Events_Cursor);

91.        pragma Convention (C, Gdk_Extension_ModeTo API docTo spec);

93.        type Gdk_IC_Attributes_Type is new GuintTo API docTo spec;

94.        Ic_Style                : constant Gdk_IC_Attributes_TypeTo API docTo spec;

95.        Ic_Client_Window        : constant Gdk_IC_Attributes_TypeTo API docTo spec;

96.        Ic_Focus_Window         : constant Gdk_IC_Attributes_TypeTo API docTo spec;

97.        Ic_Filter_Events        : constant Gdk_IC_Attributes_TypeTo API docTo spec;

98.        Ic_Spot_Location        : constant Gdk_IC_Attributes_TypeTo API docTo spec;

99.        Ic_Line_Spacing         : constant Gdk_IC_Attributes_TypeTo API docTo spec;

100.        Ic_Cursor               : constant Gdk_IC_Attributes_TypeTo API docTo spec;

101.        Ic_Preedit_Fontset      : constant Gdk_IC_Attributes_TypeTo API docTo spec;

102.        Ic_Preedit_Area         : constant Gdk_IC_Attributes_TypeTo API docTo spec;

103.        Ic_Preedit_Area_Needed  : constant Gdk_IC_Attributes_TypeTo API docTo spec;

104.        Ic_Preedit_Foreground   : constant Gdk_IC_Attributes_TypeTo API docTo spec;

105.        Ic_Preedit_Background   : constant Gdk_IC_Attributes_TypeTo API docTo spec;

106.        Ic_Preedit_Pixmap       : constant Gdk_IC_Attributes_TypeTo API docTo spec;

107.        Ic_Preedit_Colormap     : constant Gdk_IC_Attributes_TypeTo API docTo spec;

108.        Ic_Status_Fontset       : constant Gdk_IC_Attributes_TypeTo API docTo spec;

109.        Ic_Status_Area          : constant Gdk_IC_Attributes_TypeTo API docTo spec;

110.        Ic_Status_Area_Needed   : constant Gdk_IC_Attributes_TypeTo API docTo spec;

111.        Ic_Status_Foreground    : constant Gdk_IC_Attributes_TypeTo API docTo spec;

112.        Ic_Status_Background    : constant Gdk_IC_Attributes_TypeTo API docTo spec;

113.        Ic_Status_Pixmap        : constant Gdk_IC_Attributes_TypeTo API docTo spec;

114.        Ic_Status_Colormap      : constant Gdk_IC_Attributes_TypeTo API docTo spec;

115.        Ic_All_Req              : constant Gdk_IC_Attributes_TypeTo API docTo spec;

116.        Ic_Preedit_Area_Req     : constant Gdk_IC_Attributes_TypeTo API docTo spec;

117.        Ic_Preedit_Position_Req : constant Gdk_IC_Attributes_TypeTo API docTo spec;

118.        Ic_Status_Area_Req      : constant Gdk_IC_Attributes_TypeTo API docTo spec;

120.        type Gdk_IM_Style is new GuintTo API docTo spec;

121.        Im_Preedit_Area      : constant Gdk_IM_StyleTo API docTo spec;

122.        Im_Preedit_Callbacks : constant Gdk_IM_StyleTo API docTo spec;

123.        Im_Preedit_Position  : constant Gdk_IM_StyleTo API docTo spec;

124.        Im_Preedit_Nothing   : constant Gdk_IM_StyleTo API docTo spec;

125.        Im_Preedit_None      : constant Gdk_IM_StyleTo API docTo spec;

126.        Im_Preedit_Mask      : constant Gdk_IM_StyleTo API docTo spec;

127.        Im_Status_Area       : constant Gdk_IM_StyleTo API docTo spec;

128.        Im_Status_Callbacks  : constant Gdk_IM_StyleTo API docTo spec;

129.        Im_Status_Nothing    : constant Gdk_IM_StyleTo API docTo spec;

130.        Im_Status_None       : constant Gdk_IM_StyleTo API docTo spec;

131.        Im_Status_Mask       : constant Gdk_IM_StyleTo API docTo spec;

133.        type Gdk_Input_Condition is (Input_Read, Input_Write, Input_Exception);

134.        pragma Convention (C, Gdk_Input_ConditionTo API docTo spec);

136.        type Gdk_Input_Mode is (Mode_Disabled, Mode_Screen, Mode_Window);

137.        pragma Convention (C, Gdk_Input_ModeTo API docTo spec);

139.        type Gdk_Input_Source is

140.          (Source_Mouse,

141.           Source_Pen,

142.           Source_Eraser,

143.           Source_Cursor);

144.        pragma Convention (C, Gdk_Input_SourceTo API docTo spec);

146.        type Gdk_Key_Type is new GuintTo API docTo spec;

147.        --  see Gdk.Types.Keysyms for key type constants

149.        type Gdk_Modifier_Type is new GuintTo API docTo spec;

150.        Shift_Mask    : constant Gdk_Modifier_TypeTo API docTo spec;

151.        Lock_Mask     : constant Gdk_Modifier_TypeTo API docTo spec;

152.        Control_Mask  : constant Gdk_Modifier_TypeTo API docTo spec;

153.        Mod1_Mask     : constant Gdk_Modifier_TypeTo API docTo spec;

154.        Mod2_Mask     : constant Gdk_Modifier_TypeTo API docTo spec;

155.        Mod3_Mask     : constant Gdk_Modifier_TypeTo API docTo spec;

156.        Mod4_Mask     : constant Gdk_Modifier_TypeTo API docTo spec;

157.        Mod5_Mask     : constant Gdk_Modifier_TypeTo API docTo spec;

158.        Button1_Mask  : constant Gdk_Modifier_TypeTo API docTo spec;

159.        Button2_Mask  : constant Gdk_Modifier_TypeTo API docTo spec;

160.        Button3_Mask  : constant Gdk_Modifier_TypeTo API docTo spec;

161.        Button4_Mask  : constant Gdk_Modifier_TypeTo API docTo spec;

162.        Button5_Mask  : constant Gdk_Modifier_TypeTo API docTo spec;

163.        Release_Mask  : constant Gdk_Modifier_TypeTo API docTo spec;

164.        Modifier_Mask : constant Gdk_Modifier_TypeTo API docTo spec;

165.        Meta_Mask     : constant Gdk_Modifier_TypeTo API docTo spec;

167.        Default_Modifier_Mask : constant Gdk_Modifier_TypeTo API docTo spec;

169.        subtype Gdk_WChar is Standard.Wide_Character;

170.        subtype Gdk_WString is Standard.Wide_String;

171.        --  Gdk does not define a Gdk_WString type, but uses pointers

172.        --  to Gdk_WChar instead.

174.        ----------------

175.        -- Properties --

176.        ----------------

177.        --  The following packages and types are used to represent properties of

178.        --  the given type. They are used in the packages that use these properties

180.        package Extension_Mode_Properties is new Generic_Internal_Discrete_PropertyTo API docTo specTo body

181.          (Gdk_Extension_ModeTo API docTo spec);

183.        type Property_Gdk_Extension_Mode is new Extension_Mode_Properties.PropertyTo API docTo spec;

185.     private

187.        -------------------------

188.        --  Private constants  --

189.        -------------------------

191.        Ic_StyleTo API docTo spec                : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 0;

192.        Ic_Client_WindowTo API docTo spec        : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 1;

193.        Ic_Focus_WindowTo API docTo spec         : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 2;

194.        Ic_Filter_EventsTo API docTo spec        : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 3;

195.        Ic_Spot_LocationTo API docTo spec        : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 4;

196.        Ic_Line_SpacingTo API docTo spec         : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 5;

197.        Ic_CursorTo API docTo spec               : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 6;

198.        Ic_Preedit_FontsetTo API docTo spec      : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 10;

199.        Ic_Preedit_AreaTo API docTo spec         : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 11;

200.        Ic_Preedit_Area_NeededTo API docTo spec  : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 12;

201.        Ic_Preedit_ForegroundTo API docTo spec   : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 13;

202.        Ic_Preedit_BackgroundTo API docTo spec   : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 14;

203.        Ic_Preedit_PixmapTo API docTo spec       : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 15;

204.        Ic_Preedit_ColormapTo API docTo spec     : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 16;

205.        Ic_Status_FontsetTo API docTo spec       : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 21;

206.        Ic_Status_AreaTo API docTo spec          : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 22;

207.        Ic_Status_Area_NeededTo API docTo spec   : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 23;

208.        Ic_Status_ForegroundTo API docTo spec    : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 24;

209.        Ic_Status_BackgroundTo API docTo spec    : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 25;

210.        Ic_Status_PixmapTo API docTo spec        : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 26;

211.        Ic_Status_ColormapTo API docTo spec      : constant Gdk_IC_Attributes_TypeTo API docTo spec := 2 ** 27;

212.        Ic_All_ReqTo API docTo spec              : constant Gdk_IC_Attributes_TypeTo API docTo spec :=

213.          Ic_StyleTo API docTo spec or Ic_Client_WindowTo API docTo spec;

214.        Ic_Preedit_Area_ReqTo API docTo spec     : constant Gdk_IC_Attributes_TypeTo API docTo spec :=

215.          Ic_Preedit_AreaTo API docTo spec or Ic_Preedit_FontsetTo API docTo spec;

216.        Ic_Preedit_Position_ReqTo API docTo spec : constant Gdk_IC_Attributes_TypeTo API docTo spec :=

217.          Ic_Preedit_AreaTo API docTo spec or Ic_Spot_LocationTo API docTo spec or Ic_Preedit_FontsetTo API docTo spec;

218.        Ic_Status_Area_ReqTo API docTo spec      : constant Gdk_IC_Attributes_TypeTo API docTo spec :=

219.          Ic_Status_AreaTo API docTo spec or Ic_Status_FontsetTo API docTo spec;

221.        Im_Preedit_AreaTo API docTo spec      : constant Gdk_IM_StyleTo API docTo spec := 16#0001#;

222.        Im_Preedit_CallbacksTo API docTo spec : constant Gdk_IM_StyleTo API docTo spec := 16#0002#;

223.        Im_Preedit_PositionTo API docTo spec  : constant Gdk_IM_StyleTo API docTo spec := 16#0004#;

224.        Im_Preedit_NothingTo API docTo spec   : constant Gdk_IM_StyleTo API docTo spec := 16#0008#;

225.        Im_Preedit_NoneTo API docTo spec      : constant Gdk_IM_StyleTo API docTo spec := 16#0010#;

226.        Im_Preedit_MaskTo API docTo spec      : constant Gdk_IM_StyleTo API docTo spec := 16#001F#;

227.        Im_Status_AreaTo API docTo spec       : constant Gdk_IM_StyleTo API docTo spec := 16#0100#;

228.        Im_Status_CallbacksTo API docTo spec  : constant Gdk_IM_StyleTo API docTo spec := 16#0200#;

229.        Im_Status_NothingTo API docTo spec    : constant Gdk_IM_StyleTo API docTo spec := 16#0400#;

230.        Im_Status_NoneTo API docTo spec       : constant Gdk_IM_StyleTo API docTo spec := 16#0800#;

231.        Im_Status_MaskTo API docTo spec       : constant Gdk_IM_StyleTo API docTo spec := 16#0F00#;

233.        Shift_MaskTo API docTo spec   : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 0;

234.        Lock_MaskTo API docTo spec    : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 1;

235.        Control_MaskTo API docTo spec : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 2;

236.        Mod1_MaskTo API docTo spec    : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 3;

237.        Mod2_MaskTo API docTo spec    : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 4;

238.        Mod3_MaskTo API docTo spec    : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 5;

239.        Mod4_MaskTo API docTo spec    : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 6;

240.        Mod5_MaskTo API docTo spec    : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 7;

241.        Button1_MaskTo API docTo spec : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 8;

242.        Button2_MaskTo API docTo spec : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 9;

243.        Button3_MaskTo API docTo spec : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 10;

244.        Button4_MaskTo API docTo spec : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 11;

245.        Button5_MaskTo API docTo spec : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 12;

246.        Release_MaskTo API docTo spec  : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 13;

247.        Meta_MaskTo API docTo spec     : constant Gdk_Modifier_TypeTo API docTo spec := 2 ** 28;

248.        Modifier_MaskTo API docTo spec : constant Gdk_Modifier_TypeTo API docTo spec := 16#3FFF#;

250.        function Internal_Defaut_Modifier_Mask return Gdk_Modifier_TypeTo API docTo spec;

251.        pragma Import

252.          (C, Internal_Defaut_Modifier_Mask, "ada_gdk_get_default_modifier");

253.        Default_Modifier_MaskTo API docTo spec : constant Gdk_Modifier_TypeTo API docTo spec :=

254.                                  Internal_Defaut_Modifier_Mask;

256.        ------------------------------

257.        --  Representation clauses  --

258.        ------------------------------

260.        for Gdk_Input_ConditionTo API docTo spec use

261.          (Input_Read      => 2 ** 0,

262.           Input_Write     => 2 ** 1,

263.           Input_Exception => 2 ** 2);

264.     end Gdk.TypesTo API docTo spec;

266.     --  The following types were not bound because it did not seem

267.     --  to be necessary (yet).

268.     --

269.     --  + GdkColorContextMode

270.     --  + GdkCrossingMode

271.     --  + GdkFilterReturn

272.     --  + GdkFontType

273.     --  + GdkNotifyType

274.     --  + GdkPropertyState

275.     --  + GdkStatus