[cluttermm] ActorBox class updated.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm] ActorBox class updated.
- Date: Fri, 21 Mar 2014 09:39:19 +0000 (UTC)
commit 61abca2a3dbc2c9ff964fe8bb180db87b213d6f5
Author: Ian Martin <martin_id vodafone co nz>
Date: Thu Mar 20 15:35:58 2014 +1300
ActorBox class updated.
Wrap some more methods and let the constructor take parameters.
clutter/src/actor.hg | 41 ++++++++++++++++++++++++++++++-----------
1 files changed, 30 insertions(+), 11 deletions(-)
---
diff --git a/clutter/src/actor.hg b/clutter/src/actor.hg
index 187c986..1f7c739 100644
--- a/clutter/src/actor.hg
+++ b/clutter/src/actor.hg
@@ -38,26 +38,45 @@ class Animation;
class ActorBox
{
- _CLASS_BOXEDTYPE_STATIC(ActorBox, ClutterActorBox)
+ _CLASS_BOXEDTYPE_STATIC(ActorBox, ClutterActorBox, NONE, clutter_actor_box_copy, clutter_actor_box_free)
+ _IGNORE(clutter_actor_box_init, clutter_actor_box_copy, clutter_actor_box_free)
public:
- ActorBox(float x1, float y1, float x2, float y2);
+ _CUSTOM_DEFAULT_CTOR
-#m4 _CONVERSION(`float&',`float*',`&($3)')
+ //hand-coded constructor to allow default values:
+ ActorBox(float x1 = 0, float y1 = 0, float x2 = 0, float y2 = 0);
+
+ // Convenience constructor that would be difficult to wrap - it's got 4
+ // floats (origin x and y and the width and height) so will conflict with the
+ // other constructor.
+ _IGNORE(clutter_actor_box_init_rect)
+
+ _WRAP_EQUAL(clutter_actor_box_equal)
+
+ _WRAP_METHOD(float get_x() const, clutter_actor_box_get_x)
+ _WRAP_METHOD(float get_y() const, clutter_actor_box_get_y)
+ _WRAP_METHOD(float get_width() const, clutter_actor_box_get_width)
+ _WRAP_METHOD(float get_height() const, clutter_actor_box_get_height)
+ _WRAP_METHOD(void set_origin(float x, float y), clutter_actor_box_set_origin)
+
+ #m4 _INITIALIZATION(`float&',`gfloat',`&($3)')
_WRAP_METHOD(void get_origin(float& x, float& y) const, clutter_actor_box_get_origin)
+ _WRAP_METHOD(void set_size(float width, float height), clutter_actor_box_set_size)
_WRAP_METHOD(void get_size(float& width, float& height) const, clutter_actor_box_get_size)
+
_WRAP_METHOD(float get_area() const, clutter_actor_box_get_area)
_WRAP_METHOD(bool contains(float x, float y) const, clutter_actor_box_contains)
+ // wrap if need be- what would be the use case?
+ _IGNORE(clutter_actor_box_from_vertices)
+ //_WRAP_METHOD(bool from_vertices(const ClutterVertex verts[]) const, clutter_actor_box_from_vertices
_WRAP_METHOD(void clamp_to_pixel(), clutter_actor_box_clamp_to_pixel)
- _MEMBER_GET(x1, x1, float, float)
- _MEMBER_SET(x1, x1, float, float)
- _MEMBER_GET(y1, y1, float, float)
- _MEMBER_SET(y1, y1, float, float)
- _MEMBER_GET(x2, x2, float, float)
- _MEMBER_SET(x2, x2, float, float)
- _MEMBER_GET(y2, y2, float, float)
- _MEMBER_SET(y2, y2, float, float)
+#m4 _INITIALIZATION(`ActorBox&',`ClutterActorBox', `$3 = Glib::wrap(&($4))')
+ _WRAP_METHOD(void interpolate(const ActorBox& final_, double progress, ActorBox& result{>>}),
clutter_actor_box_interpolate)
+
+ _WRAP_METHOD(void unite(const ActorBox& b, ActorBox& result{>>}), clutter_actor_box_union)
+
};
_WRAP_ENUM(ActorFlags, ClutterActorFlags)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]