[cluttermm] Actor: Add get/set_x/y_align() and get/set_x/y_expand() and properties.



commit 422ac681abaddf02ccf19a746009416f50ed6aa1
Author: Ian Martin <martin_id vodafone co nz>
Date:   Mon Mar 24 09:41:20 2014 +0100

    Actor: Add get/set_x/y_align() and get/set_x/y_expand() and properties.
    
    Based on part of a patch in bug #725125 .

 clutter/src/actor.hg          |   17 +++++++++++++++++
 codegen/m4/convert_clutter.m4 |    2 ++
 2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/clutter/src/actor.hg b/clutter/src/actor.hg
index 3041e38..31b8a93 100644
--- a/clutter/src/actor.hg
+++ b/clutter/src/actor.hg
@@ -40,8 +40,10 @@ namespace Clutter
 
 class Animation;
 
+_WRAP_ENUM(ActorAlign, ClutterActorAlign)
 _WRAP_ENUM(ActorFlags, ClutterActorFlags)
 _WRAP_ENUM(AllocationFlags, ClutterAllocationFlags)
+_WRAP_ENUM(Orientation, ClutterOrientation)
 
 //TODO: Write a version of the large description from here: 
http://clutter-project.org/docs/clutter/stable/ClutterActor.html#ClutterActor.description
 class Actor : public Glib::Object, public Scriptable
@@ -134,6 +136,17 @@ _DEPRECATE_IFDEF_END
   _WRAP_METHOD(float get_x() const, clutter_actor_get_x)
   _WRAP_METHOD(void set_y(float y), clutter_actor_set_y)
   _WRAP_METHOD(float get_y() const, clutter_actor_get_y)
+
+ _WRAP_METHOD(void set_x_align(ActorAlign x_align), clutter_actor_set_x_align)
+ _WRAP_METHOD(ActorAlign get_x_align() const, clutter_actor_get_x_align)
+ _WRAP_METHOD(void set_y_align(ActorAlign y_align), clutter_actor_set_y_align)
+ _WRAP_METHOD(ActorAlign get_y_align() const,clutter_actor_get_y_align)
+
+  _WRAP_METHOD(bool get_x_expand() const, clutter_actor_get_x_expand)
+  _WRAP_METHOD(void set_x_expand(bool expand = true), clutter_actor_set_x_expand)
+  _WRAP_METHOD(bool get_y_expand() const, clutter_actor_get_y_expand)
+  _WRAP_METHOD(void set_y_expand(bool expand = true), clutter_actor_set_y_expand)
+
   _WRAP_METHOD(void set_reactive(bool reactive = true), clutter_actor_set_reactive)
   _WRAP_METHOD(bool get_reactive() const, clutter_actor_get_reactive)
 
@@ -367,7 +380,11 @@ _DEPRECATE_IFDEF_END
   _WRAP_PROPERTY("visible", bool)
   _WRAP_PROPERTY("width", float)
   _WRAP_PROPERTY("x", float)
+  _WRAP_PROPERTY("x-align", ActorAlign )
+  _WRAP_PROPERTY("x-expand", bool)
   _WRAP_PROPERTY("y", float)
+  _WRAP_PROPERTY("y-align", ActorAlign )
+  _WRAP_PROPERTY("y-expand", bool)
 
 protected:
   //TODO: Wrap ClutterShaderEffect.
diff --git a/codegen/m4/convert_clutter.m4 b/codegen/m4/convert_clutter.m4
index de18143..7123ac6 100644
--- a/codegen/m4/convert_clutter.m4
+++ b/codegen/m4/convert_clutter.m4
@@ -143,6 +143,7 @@ _EQUAL(ClutterKeyEvent*,KeyEvent*)
 _EQUAL(ClutterMotionEvent*,MotionEvent*)
 _EQUAL(ClutterScrollEvent*,ScrollEvent*)
 
+_CONV_ENUM(Clutter,ActorAlign)
 _CONV_ENUM(Clutter,ActorFlags)
 _CONV_ENUM(Clutter,AllocationFlags)
 _CONV_ENUM(Clutter,AnimationMode)
@@ -153,6 +154,7 @@ _CONV_ENUM(Clutter,Gravity)
 _CONV_ENUM(Clutter,InputDeviceType)
 _CONV_ENUM(Clutter,Interpolation)
 _CONV_ENUM(Clutter,LayoutFlags)
+_CONV_ENUM(Clutter,Orientation)
 _CONV_ENUM(Clutter,PackType)
 _CONV_ENUM(Clutter,PickMode)
 _CONV_ENUM(Clutter,RequestMode)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]