1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gdk.Rectangle;
26 
27 private import gtkc.gdk;
28 public  import gtkc.gdktypes;
29 
30 
31 /**
32  */
33 
34 /**
35  * Calculates the intersection of two rectangles. It is allowed for
36  * @dest to be the same as either @src1 or @src2. If the rectangles
37  * do not intersect, @dest’s width and height is set to 0 and its x
38  * and y values are undefined. If you are only interested in whether
39  * the rectangles intersect, but not in the intersecting area itself,
40  * pass %NULL for @dest.
41  *
42  * Params:
43  *     src1 = a #GdkRectangle
44  *     src2 = a #GdkRectangle
45  *     dest = return location for the
46  *         intersection of @src1 and @src2, or %NULL
47  *
48  * Return: %TRUE if the rectangles intersect.
49  */
50 public bool intersect(GdkRectangle* src1, GdkRectangle* src2, out GdkRectangle dest)
51 {
52 	return gdk_rectangle_intersect(src1, src2, &dest) != 0;
53 }
54 
55 /**
56  * Calculates the union of two rectangles.
57  * The union of rectangles @src1 and @src2 is the smallest rectangle which
58  * includes both @src1 and @src2 within it.
59  * It is allowed for @dest to be the same as either @src1 or @src2.
60  *
61  * Params:
62  *     src1 = a #GdkRectangle
63  *     src2 = a #GdkRectangle
64  *     dest = return location for the union of @src1 and @src2
65  */
66 public void unio(GdkRectangle* src1, GdkRectangle* src2, out GdkRectangle dest)
67 {
68 	gdk_rectangle_union(src1, src2, &dest);
69 }