## 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-2007 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.     --  This package provides the capability to create predefined mouse cursors

32.     --  as well as user defined ones.

33.     --  </description>

34.     --  <c_version>1.3.6</c_version>

35.     --  <group>Gdk, the low-level API</group>

36.     --  <testgtk>create_cursors.adb</testgtk>

38.     with GlibTo API docTo specTo body;

39.     with Gdk.ColorTo API docTo specTo body;

41.     package Gdk.CursorTo API docTo specTo body is

43.        type Gdk_Cursor is new Gdk.C_ProxyTo API docTo spec;

44.        Null_Cursor : constant Gdk_CursorTo API docTo spec;

46.        type Gdk_Cursor_Type is

47.          (X_Cursor,

48.           Arrow,

49.           Based_Arrow_Down,

50.           Based_Arrow_Up,

51.           Boat,

52.           Bogosity,

53.           Bottom_Left_Corner,

54.           Bottom_Right_Corner,

55.           Bottom_Side,

56.           Bottom_Tee,

57.           Box_Spiral,

58.           Center_Ptr,

59.           Circle,

60.           Clock,

61.           Coffee_Mug,

62.           Cross,

63.           Cross_Reverse,

64.           Crosshair,

65.           Diamond_Cross,

66.           Dot,

67.           Dotbox,

68.           Double_Arrow,

69.           Draft_Large,

70.           Draft_Small,

71.           Draped_Box,

72.           Exchange,

73.           Fleur,

74.           Gobbler,

75.           Gumby,

76.           Hand1,

77.           Hand2,

78.           Heart,

79.           Icon,

80.           Iron_Cross,

81.           Left_Ptr,

82.           Left_Side,

83.           Left_Tee,

84.           Leftbutton,

85.           Ll_Angle,

86.           Lr_Angle,

87.           Man,

88.           Middlebutton,

89.           Mouse,

90.           Pencil,

91.           Pirate,

92.           Plus,

93.           Question_Arrow,

94.           Right_Ptr,

95.           Right_Side,

96.           Right_Tee,

97.           Rightbutton,

98.           Rtl_Logo,

99.           Sailboat,

100.           Sb_Down_Arrow,

101.           Sb_H_Double_Arrow,

102.           Sb_Left_Arrow,

103.           Sb_Right_Arrow,

104.           Sb_Up_Arrow,

105.           Sb_V_Double_Arrow,

106.           Shuttle,

107.           Sizing,

108.           Spider,

109.           Spraycan,

110.           Star,

111.           Target,

112.           Tcross,

113.           Top_Left_Arrow,

114.           Top_Left_Corner,

115.           Top_Right_Corner,

116.           Top_Side,

117.           Top_Tee,

118.           Trek,

119.           Ul_Angle,

120.           Umbrella,

121.           Ur_Angle,

122.           Watch,

123.           Xterm);

125.        procedure Gdk_NewTo API docTo body

126.          (Widget      : out Gdk_CursorTo API docTo spec;

127.           Cursor_TypeTo API docTo body : Gdk_Cursor_TypeTo API docTo spec);

128.        --  Create a new standard cursor.

130.        procedure Gdk_NewTo API docTo body

131.          (Widget : out Gdk_CursorTo API docTo spec;

132.           Source : Gdk.Gdk_PixmapTo API docTo spec;

133.           Mask   : Gdk.Gdk_PixmapTo API docTo spec;

134.           FgTo API docTo body     : Gdk.Color.Gdk_ColorTo API docTo specTo body;

135.           BgTo API docTo body     : Gdk.Color.Gdk_ColorTo API docTo specTo body;

136.           X      : Glib.GintTo API docTo spec;

137.           Y      : Glib.GintTo API docTo spec);

138.        --  Create a new cursor from a given pixmap and mask.

139.        --  See also Gdk.Pixbuf.Gdk_New_From_Pixbuf.

140.        --  Both the pixmap and mask must have a depth of 1 (i.e. each pixel has

141.        --  only 2 values - on or off). The standard cursor size is 16 by 16 pixels.

142.        --   - Source is the pixmap specifying the cursor.

143.        --   - Mask is the pixmap specifying the mask, which must be the same size

144.        --   as source.

145.        --   - Fg is the foreground color, used for the bits in the source which are

146.        --   enabled. The color does not have to be allocated first.

147.        --   - Bg is the background color, used for the bits in the source which are

148.        --   disabled. The color does not have to be allocated first.

149.        --   - X is the horizontal offset of the 'hotspot' of the cursor.

150.        --   - Y is the vertical offset of the 'hotspot' of the cursor.

152.        --  procedure Gdk_New_From_Pixbuf (...)

153.        --  This function is declared in Gdk.Pixbuf, for dependency circularity

154.        --  reasons. It can be used to create a cursor directly from a pixbuf.

156.        procedure Gdk_NewTo API docTo body

157.          (Cursor  : out Gdk_CursorTo API docTo spec;

158.           Name    : String);

159.        --  Create a cursor from a name

161.        procedure DestroyTo API docTo body (Cursor : Gdk_CursorTo API docTo spec);

162.        pragma Obsolescent;  --  Destroy

163.        --  Destroy a cursor, freeing any resources allocated for it.

164.        --  Deprecated, use Unref instead.

166.        procedure RefTo API docTo body (Cursor : Gdk_CursorTo API docTo spec);

167.        --  Increment the reference counting for the cursor.

169.        procedure UnrefTo API docTo body (Cursor : Gdk_CursorTo API docTo spec);

170.        --  Decrement the reference counting for the cursor.

171.        --  When this reaches 0, the cursor is destroyed.

173.     private

174.        Null_CursorTo API docTo spec : constant Gdk_CursorTo API docTo spec := null;

175.        pragma Import (C, DestroyTo API docTo spec, "gdk_cursor_unref");

176.        pragma Import (C, RefTo API docTo spec, "gdk_cursor_ref");

177.        pragma Import (C, UnrefTo API docTo spec, "gdk_cursor_unref");

179.        for Gdk_Cursor_TypeTo API docTo spec'Size use Glib.GintTo API docTo spec'Size;

180.        for Gdk_Cursor_TypeTo API docTo spec use

181.          (X_Cursor => 0,

182.           Arrow    => 2,

183.           Based_Arrow_Down => 4,

184.           Based_Arrow_Up => 6,

185.           Boat => 8,

186.           Bogosity => 10,

187.           Bottom_Left_Corner => 12,

188.           Bottom_Right_Corner => 14,

189.           Bottom_Side => 16,

190.           Bottom_Tee => 18,

191.           Box_Spiral => 20,

192.           Center_Ptr => 22,

193.           Circle => 24,

194.           Clock => 26,

195.           Coffee_Mug => 28,

196.           Cross => 30,

197.           Cross_Reverse => 32,

198.           Crosshair => 34,

199.           Diamond_Cross => 36,

200.           Dot => 38,

201.           Dotbox => 40,

202.           Double_Arrow => 42,

203.           Draft_Large => 44,

204.           Draft_Small => 46,

205.           Draped_Box => 48,

206.           Exchange => 50,

207.           Fleur => 52,

208.           Gobbler => 54,

209.           Gumby => 56,

210.           Hand1 => 58,

211.           Hand2 => 60,

212.           Heart => 62,

213.           Icon => 64,

214.           Iron_Cross => 66,

215.           Left_Ptr => 68,

216.           Left_Side => 70,

217.           Left_Tee => 72,

218.           Leftbutton => 74,

219.           Ll_Angle => 76,

220.           Lr_Angle => 78,

221.           Man => 80,

222.           Middlebutton => 82,

223.           Mouse => 84,

224.           Pencil => 86,

225.           Pirate => 88,

226.           Plus => 90,

227.           Question_Arrow => 92,

228.           Right_Ptr => 94,

229.           Right_Side => 96,

230.           Right_Tee => 98,

231.           Rightbutton => 100,

232.           Rtl_Logo => 102,

233.           Sailboat => 104,

234.           Sb_Down_Arrow => 106,

235.           Sb_H_Double_Arrow => 108,

236.           Sb_Left_Arrow => 110,

237.           Sb_Right_Arrow => 112,

238.           Sb_Up_Arrow => 114,

239.           Sb_V_Double_Arrow => 116,

240.           Shuttle => 118,

241.           Sizing => 120,

242.           Spider => 122,

243.           Spraycan => 124,

244.           Star => 126,

245.           Target => 128,

246.           Tcross => 130,

247.           Top_Left_Arrow => 132,

248.           Top_Left_Corner => 134,

249.           Top_Right_Corner => 136,

250.           Top_Side => 138,

251.           Top_Tee => 140,

252.           Trek => 142,

253.           Ul_Angle => 144,

254.           Umbrella => 146,

255.           Ur_Angle => 148,

256.           Watch => 150,

257.           Xterm => 152);

259.     end Gdk.CursorTo API docTo specTo body;