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 * Defines the position and size of a rectangle. It is identical to 33 * #cairo_rectangle_int_t. 34 */ 35 /** 36 */ 37 38 /** 39 * Calculates the intersection of two rectangles. It is allowed for 40 * @dest to be the same as either @src1 or @src2. If the rectangles 41 * do not intersect, @dest’s width and height is set to 0 and its x 42 * and y values are undefined. If you are only interested in whether 43 * the rectangles intersect, but not in the intersecting area itself, 44 * pass %NULL for @dest. 45 * 46 * Params: 47 * src2 = a #GdkRectangle 48 * dest = return location for the 49 * intersection of @src1 and @src2, or %NULL 50 * 51 * Return: %TRUE if the rectangles intersect. 52 */ 53 public bool intersect(GdkRectangle* src1, GdkRectangle* src2, out GdkRectangle dest) 54 { 55 return gdk_rectangle_intersect(src1, src2, &dest) != 0; 56 } 57 58 /** 59 * Calculates the union of two rectangles. 60 * The union of rectangles @src1 and @src2 is the smallest rectangle which 61 * includes both @src1 and @src2 within it. 62 * It is allowed for @dest to be the same as either @src1 or @src2. 63 * 64 * Params: 65 * src2 = a #GdkRectangle 66 * dest = return location for the union of @src1 and @src2 67 */ 68 public void unio(GdkRectangle* src1, GdkRectangle* src2, out GdkRectangle dest) 69 { 70 gdk_rectangle_union(src1, src2, &dest); 71 }