]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkrectangle.c
Change FSF Address
[~andy/gtk] / gdk / gdkrectangle.c
index 1f06f7daf676823d2901889f8812de7a983069e0..2224413a51c2af72d47a56ad336fc67e8d3d49f8 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
  */
 
 #include "config.h"
-#include <gdk/gdk.h>
-#include "gdkalias.h"
+
+#include "gdkrectangle.h"
+
+
+/**
+ * SECTION:regions
+ * @Short_description: Simple graphical data types
+ * @Title: Points and Rectangles
+ *
+ * GDK provides the #GdkPoint and #GdkRectangle data types for representing pixels
+ * and sets of pixels on the screen. Together with Cairo's #cairo_region_t data
+ * type, they make up the central types for representing graphical data.
+ *
+ * #GdkPoint is a simple structure containing an x and y coordinate of a point.
+ *
+ * #GdkRectangle is a structure holding the position and size of a rectangle.
+ * The intersection of two rectangles can be computed with
+ * gdk_rectangle_intersect(). To find the union of two rectangles use
+ * gdk_rectangle_union().
+ *
+ * #cairo_region_t is usually used for managing clipping of graphical operations.
+ */
+
 
 /**
  * gdk_rectangle_union:
  * @src1: a #GdkRectangle
  * @src2: a #GdkRectangle
- * @dest: return location for the union of @src1 and @src2
+ * @dest: (out): return location for the union of @src1 and @src2
  *
  * Calculates the union of two rectangles.
  * The union of rectangles @src1 and @src2 is the smallest rectangle which
@@ -62,7 +81,8 @@ gdk_rectangle_union (const GdkRectangle *src1,
  * gdk_rectangle_intersect:
  * @src1: a #GdkRectangle
  * @src2: a #GdkRectangle
- * @dest: return location for the intersection of @src1 and @src2, or %NULL
+ * @dest: (out caller-allocates) (allow-none): return location for the
+ * intersection of @src1 and @src2, or %NULL
  *
  * Calculates the intersection of two rectangles. It is allowed for
  * @dest to be the same as either @src1 or @src2. If the rectangles 
@@ -121,18 +141,6 @@ gdk_rectangle_copy (const GdkRectangle *rectangle)
   return result;
 }
 
-GType
-gdk_rectangle_get_type (void)
-{
-  static GType our_type = 0;
-  
-  if (our_type == 0)
-    our_type = g_boxed_type_register_static (g_intern_static_string ("GdkRectangle"),
-                                            (GBoxedCopyFunc)gdk_rectangle_copy,
-                                            (GBoxedFreeFunc)g_free);
-  return our_type;
-}
-
-
-#define __GDK_RECTANGLE_C__
-#include "gdkaliasdef.c"
+G_DEFINE_BOXED_TYPE (GdkRectangle, gdk_rectangle,
+                     gdk_rectangle_copy,
+                     g_free)