[gegl] add GEGL_RECTANGLE macro using a compound literal
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] add GEGL_RECTANGLE macro using a compound literal
- Date: Mon, 2 Apr 2012 13:22:35 +0000 (UTC)
commit 3fc013cf80c6f07afabec476240fc751501f97be
Author: Ãyvind KolÃs <pippin gimp org>
Date: Mon Apr 2 14:12:19 2012 +0100
add GEGL_RECTANGLE macro using a compound literal
A utility macro to specify a pointer to a GeglRectangle inline, permits
more concicse
gegl/gegl-types.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gegl/gegl-types.h b/gegl/gegl-types.h
index 8ff5048..f3d10b8 100644
--- a/gegl/gegl-types.h
+++ b/gegl/gegl-types.h
@@ -54,6 +54,9 @@ typedef struct _GeglRectangle
GType gegl_rectangle_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_RECTANGLE (gegl_rectangle_get_type())
+#define GEGL_RECTANGLE(x,y,w,h) (&((GeglRectangle){(x), (y), (w), (h)}))
+
+
typedef struct _GeglNode GeglNode;
GType gegl_node_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_NODE (gegl_node_get_type())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]