## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                    Copyright (C) 2011-2013, AdaCore               --

5.     --                                                                   --

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

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

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

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

10.     --                                                                   --

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

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

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

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

15.     --                                                                   --

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

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

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

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

20.     --                                                                   --

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

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

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

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

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

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

27.     -----------------------------------------------------------------------

29.     --  Regions -- Representing a pixel-aligned area

30.     --  <description>

31.     --  Bindings to the Cairo 2D graphics library.

32.     --  Regions are a simple graphical data type representing an area of integer-

33.     --  aligned rectangles. Thay are often used on raster surfaces to track areas

34.     --  of interest, such as change or clip areas.

35.     --  </description>

36.     --

37.     --  <c_version>1.10</c_version>

38.     --  <group>Cairo</group>

40.     package Cairo.RegionTo API docTo specTo body is

42.        type Cairo_Region is private;

43.        --  A Cairo_Region represents a set of integer-aligned rectangles.

44.        --

45.        --  It allows set-theoretical operations like Union and Intersect to be

46.        --  performed on them.

47.        --

48.        --  Memory management of Cairo_Region is done with Reference and

49.        --  Destroy.

50.        --

51.        --  Since: 1.10

53.        Null_Region : constant Cairo_RegionTo API docTo spec;

55.        type Cairo_Rectangle_Int is record

56.           X, Y, Width, Height : aliased GintTo API docTo spec;

57.        end record;

59.        type Cairo_Region_Overlap is

60.          (Cairo_Region_Overlap_In,    --  Completely inside region

61.           Cairo_Region_Overlap_Out,   --  Completely outside region

62.           Cairo_Region_Overlap_Part   --  Partly inside region

63.          );

64.        --  Used as the return value for Contains_Rectangle.

65.        pragma Convention (C, Cairo_Region_OverlapTo API docTo spec);

67.        function CreateTo API docTo body return Cairo_RegionTo API docTo spec;

68.        --  Allocates a new empty region object.

69.        --

70.        --  Returns: A newly allocated Cairo_Region. Free with Destroy. This

71.        --  function always returns a valid Cairo_Region; if memory cannot be

72.        --  allocated, then a special error object is returned where all operations

73.        --  on the object do nothing. You can check for this with Status.

75.        function Create_RectangleTo API docTo body

76.          (Rectangle : access Cairo_Rectangle_IntTo API docTo spec) return Cairo_RegionTo API docTo spec;

77.        --  Allocates a new region object containing Rectangle.

78.        --

79.        --  Returns: A newly allocated Cairo_Region. Free with Destroy. This

80.        --  function always returns a valid Cairo_Region; if memory cannot be

81.        --  allocated, then a special error object is returned where all operations

82.        --  on the object do nothing. You can check for this with Status.

84.        function CopyTo API docTo body (Original : Cairo_RegionTo API docTo spec) return Cairo_RegionTo API docTo spec;

85.        --  Allocates a new Cairo_Region object copying the area from Original.

86.        --

87.        --  Returns: A newly allocated Cairo_Region. Free with Destroy. This

88.        --  function always returns a valid Cairo_Region; if memory cannot be

89.        --  allocated, then a special error object is returned where all operations

90.        --  on the object do nothing. You can check for this with Status.

92.        function ReferenceTo API docTo body (Region : Cairo_RegionTo API docTo spec) return Cairo_RegionTo API docTo spec;

93.        --  Increases the reference count on Region by one. This prefents Region

94.        --  from being destroyed until a matching call to Destroy is made.

96.        procedure DestroyTo API docTo body (Region : Cairo_RegionTo API docTo spec);

97.        --  Destroys a Cairo_Region object created with Create, Copy or

98.        --  Create_Rectangle.

100.        function "="To API docTo body (A, B : Cairo_RegionTo API docTo spec) return Boolean;

101.        --  Compares whether A is equivalent to B. Null_Region as an argument is

102.        --  equal to itself, but not to any non-Null_Region region.

104.        function StatusTo API docTo body (Region : Cairo_RegionTo API docTo spec) return Cairo_StatusTo API docTo spec;

105.        --  Checks whether an error has occured for this region object.

106.        --

107.        --  Returns: Cairo_Status_Success or Cairo_Status_No_Memory

109.        procedure Get_ExtentsTo API docTo body

110.          (Region  : Cairo_RegionTo API docTo spec;

111.           Extents : out Cairo_Rectangle_IntTo API docTo spec);

112.        --  Gets the bounding rectangle of Region as a Cairo_Rectangle_Int

114.        function Num_RectanglesTo API docTo body (Region : Cairo_RegionTo API docTo spec) return GintTo API docTo spec;

115.        --  Returns the number of rectangle contained in Region

117.        procedure Get_RectangleTo API docTo body

118.          (Region    : Cairo_RegionTo API docTo spec;

119.           Nth       : GintTo API docTo spec;

120.           Rectangle : out Cairo_Rectangle_IntTo API docTo spec);

121.        --  Stores the Nth rectangle from the region in Rectangle.

123.        function Is_EmptyTo API docTo body (Region : Cairo_RegionTo API docTo spec) return Boolean;

124.        --  Checks whether Region is empty.

126.        function Contains_RectangleTo API docTo body

127.          (Region    : Cairo_RegionTo API docTo spec;

128.           Rectangle : access Cairo_Rectangle_IntTo API docTo spec) return Cairo_Region_OverlapTo API docTo spec;

129.        --  Checks whether Rectangle is inside, outside or partially contained in

130.        --  Region

132.        function Contains_PointTo API docTo body

133.          (Region : Cairo_RegionTo API docTo spec;

134.           X      : GintTo API docTo spec;

135.           Y      : GintTo API docTo spec) return Boolean;

136.        --  Checks whether (X,Y) is contained in Region.

138.        procedure TranslateTo API docTo body

139.          (Region : Cairo_RegionTo API docTo spec;

140.           dX     : GintTo API docTo spec;

141.           dY     : GintTo API docTo spec);

142.        --  Translates Region by (dX,dY).

144.        function SubtractTo API docTo body

145.          (Dst   : Cairo_RegionTo API docTo spec;

146.           Other : Cairo_RegionTo API docTo spec) return Cairo_StatusTo API docTo spec;

147.        --  Subtracts Other from Dst and places the result in Dst.

148.        --

149.        --  Returns: Cairo_Status_Success or Cairo_Status_No_Memory.

151.        function Subtract_RectangleTo API docTo body

152.          (Dst       : Cairo_RegionTo API docTo spec;

153.           Rectangle : access Cairo_Rectangle_IntTo API docTo spec) return Cairo_StatusTo API docTo spec;

154.        --  Subtracts Rectangle from Dst and places the result in Dst.

155.        --

156.        --  Returns: Cairo_Status_Success or Cairo_Status_No_Memory.

158.        function IntersectTo API docTo body

159.          (Dst   : Cairo_RegionTo API docTo spec;

160.           Other : Cairo_RegionTo API docTo spec) return Cairo_StatusTo API docTo spec;

161.        --  Computes the intersection of Dst with Other and places the result in Dst

162.        --

163.        --  Returns: Cairo_Status_Success or Cairo_Status_No_Memory.

165.        function Intersect_RectangleTo API docTo body

166.          (Dst       : Cairo_RegionTo API docTo spec;

167.           Rectangle : access Cairo_Rectangle_IntTo API docTo spec) return Cairo_StatusTo API docTo spec;

168.        --  Computes the intersection of Dst with Rectangle and places the result in

169.        --  Dst.

170.        --

171.        --  Returns: Cairo_Status_Success or Cairo_Status_No_Memory.

173.        function UnionTo API docTo body

174.          (Dst   : Cairo_RegionTo API docTo spec;

175.           Other : Cairo_RegionTo API docTo spec) return Cairo_StatusTo API docTo spec;

176.        --  Computes the union of Dst with Other and places the result in Dst.

177.        --

178.        --  Returns: Cairo_Status_Success or Cairo_Status_No_Memory.

180.        function Union_RectangleTo API docTo body

181.          (Dst       : Cairo_RegionTo API docTo spec;

182.           Rectangle : access Cairo_Rectangle_IntTo API docTo spec) return Cairo_StatusTo API docTo spec;

183.        --  Computes the union of Dst with Rectangle and places the result in Dst.

184.        --

185.        --  Returns: Cairo_Status_Success or Cairo_Status_No_Memory.

187.        function Do_XorTo API docTo body

188.          (Dst   : Cairo_RegionTo API docTo spec;

189.           Other : Cairo_RegionTo API docTo spec) return Cairo_StatusTo API docTo spec;

190.        --  Computes the exclusive difference of Dst with Other and places the

191.        --  result in Dst.

192.        --

193.        --  Returns: Cairo_Status_Success or Cairo_Status_No_Memory.

195.        function Xor_RectangleTo API docTo body

196.          (Dst       : Cairo_RegionTo API docTo spec;

197.           Rectangle : access Cairo_Rectangle_IntTo API docTo spec) return Cairo_StatusTo API docTo spec;

198.        --  Computes the exclusive difference of Dst with Rectangle and places the

199.        --  result in Dst.

200.        --

201.        --  Returns: Cairo_Status_Success or Cairo_Status_No_Memory.

203.     private

205.        pragma Convention (C, Cairo_Rectangle_IntTo API docTo spec);

207.        type Cairo_RegionTo API docTo spec is new System.Address;

208.        Null_RegionTo API docTo spec : constant Cairo_RegionTo API docTo spec := Cairo_RegionTo API docTo spec (System.Null_Address);

210.        pragma Import (C, CreateTo API docTo spec, "cairo_region_create");

211.        pragma Import (C, Create_RectangleTo API docTo spec, "cairo_region_create_rectangle");

212.        pragma Import (C, CopyTo API docTo spec, "cairo_region_copy");

213.        pragma Import (C, ReferenceTo API docTo spec, "cairo_region_reference");

214.        pragma Import (C, DestroyTo API docTo spec, "cairo_region_destroy");

215.        pragma Import (C, StatusTo API docTo spec, "cairo_region_status");

216.        pragma Import (C, Get_ExtentsTo API docTo spec, "cairo_region_get_extents");

217.        pragma Import (C, Num_RectanglesTo API docTo spec, "cairo_region_num_rectangles");

218.        pragma Import (C, Get_RectangleTo API docTo spec, "cairo_region_get_rectangle");

219.        pragma Import (C, Contains_RectangleTo API docTo spec, "cairo_region_contains_rectangle");

220.        pragma Import (C, TranslateTo API docTo spec, "cairo_region_translate");

221.        pragma Import (C, SubtractTo API docTo spec, "cairo_region_subtract");

222.        pragma Import (C, Subtract_RectangleTo API docTo spec, "cairo_region_subtract_rectangle");

223.        pragma Import (C, IntersectTo API docTo spec, "cairo_region_intersect");

224.        pragma Import (C, Intersect_RectangleTo API docTo spec, "cairo_region_intersect_rectangle");

225.        pragma Import (C, UnionTo API docTo spec, "cairo_region_union");

226.        pragma Import (C, Union_RectangleTo API docTo spec, "cairo_region_union_rectangle");

227.        pragma Import (C, Do_XorTo API docTo spec, "cairo_region_xor");

228.        pragma Import (C, Xor_RectangleTo API docTo spec, "cairo_region_xor_rectangle");

229.        pragma Inline ("=");

230.        pragma Inline (Is_EmptyTo API docTo specTo body);

232.     end Cairo.RegionTo API docTo specTo body;