[gtk+] docs: Move documentation to inline comments: regions
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] docs: Move documentation to inline comments: regions
- Date: Mon, 4 Oct 2010 02:39:54 +0000 (UTC)
commit a4c20184524fd874e64ce2fcd3f05a97cb34155d
Author: Javier Jardón <jjardon gnome org>
Date: Mon Oct 4 03:19:43 2010 +0200
docs: Move documentation to inline comments: regions
docs/reference/gdk/tmpl/.gitignore | 1 +
docs/reference/gdk/tmpl/regions.sgml | 72 ----------------------------------
gdk/gdkrectangle.c | 20 +++++++++
gdk/gdktypes.h | 14 +++++++
4 files changed, 35 insertions(+), 72 deletions(-)
---
diff --git a/docs/reference/gdk/tmpl/.gitignore b/docs/reference/gdk/tmpl/.gitignore
index ae9a982..905a6f2 100644
--- a/docs/reference/gdk/tmpl/.gitignore
+++ b/docs/reference/gdk/tmpl/.gitignore
@@ -1,3 +1,4 @@
cairo_interaction.sgml
dnd.sgml
+regions.sgml
windows.sgml
diff --git a/gdk/gdkrectangle.c b/gdk/gdkrectangle.c
index 1b28247..03ce78c 100644
--- a/gdk/gdkrectangle.c
+++ b/gdk/gdkrectangle.c
@@ -29,6 +29,26 @@
/**
+ * 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
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index a5543d9..aaa17b5 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -64,6 +64,13 @@ G_BEGIN_DECLS
/* Type definitions for the basic structures.
*/
typedef struct _GdkPoint GdkPoint;
+
+/**
+ * GdkRectangle:
+ *
+ * Defines the position and size of a rectangle. It is identical to
+ * #cairo_rectangle_int_t.
+ */
typedef cairo_rectangle_int_t GdkRectangle;
typedef struct _GdkAtom *GdkAtom;
@@ -245,6 +252,13 @@ typedef enum
GDK_ALL_EVENTS_MASK = 0x3FFFFE
} GdkEventMask;
+/**
+ * GdkPoint:
+ * @x: the x coordinate of the point.
+ * @y: the y coordinate of the point.
+ *
+ * Defines the x and y coordinates of a point.
+ */
struct _GdkPoint
{
gint x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]