summaryrefslogtreecommitdiff
path: root/clutter/clutter-types.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2012-03-17 15:27:26 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2012-03-17 15:27:26 +0000
commit5e9d6f72577c788c24049d8057f856a0f669fa59 (patch)
tree4472db27f610fa6249dd4c6c9bc5dea5452a673e /clutter/clutter-types.h
parente1a31bb587b7e5b18d169c2db1c910cf323a9186 (diff)
downloadclutter-5e9d6f72577c788c24049d8057f856a0f669fa59.tar.gz
Add some utility initializers to ClutterActorBox
Diffstat (limited to 'clutter/clutter-types.h')
-rw-r--r--clutter/clutter-types.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/clutter/clutter-types.h b/clutter/clutter-types.h
index 8b41f633a..f9cda7450 100644
--- a/clutter/clutter-types.h
+++ b/clutter/clutter-types.h
@@ -151,11 +151,39 @@ struct _ClutterActorBox
gfloat y2;
};
+/**
+ * CLUTTER_ACTOR_BOX_INIT:
+ * @x_1: the X coordinate of the top left corner
+ * @y_1: the Y coordinate of the top left corner
+ * @x_2: the X coordinate of the bottom right corner
+ * @y_2: the Y coordinate of the bottom right corner
+ *
+ * A simple macro for initializing a #ClutterActorBox when declaring
+ * it, e.g.:
+ *
+ * |[
+ * ClutterActorBox box = CLUTTER_ACTOR_BOX_INIT (0, 0, 400, 600);
+ * ]|
+ *
+ * Since: 1.10
+ */
+#define CLUTTER_ACTOR_BOX_INIT(x_1,y_1,x_2,y_2) { (x_1), (y_1), (x_2), (y_2) }
+
GType clutter_actor_box_get_type (void) G_GNUC_CONST;
ClutterActorBox *clutter_actor_box_new (gfloat x_1,
gfloat y_1,
gfloat x_2,
gfloat y_2);
+void clutter_actor_box_init (ClutterActorBox *box,
+ gfloat x_1,
+ gfloat y_1,
+ gfloat x_2,
+ gfloat y_2);
+void clutter_actor_box_init_rect (ClutterActorBox *box,
+ gfloat x,
+ gfloat y,
+ gfloat width,
+ gfloat height);
ClutterActorBox *clutter_actor_box_copy (const ClutterActorBox *box);
void clutter_actor_box_free (ClutterActorBox *box);
gboolean clutter_actor_box_equal (const ClutterActorBox *box_a,