[cluttermm] Updates ActorMeta.



commit fa93333dcf27e9c715fc292e65553c2c62cbd785
Author: Ian Martin <martin_id vodafone co nz>
Date:   Sun Mar 23 12:16:39 2014 +1300

    Updates ActorMeta.
    
    Properties added.

 clutter/src/actor-meta.hg       |   22 ++++++++++++++++++++--
 clutter/src/clutter_vfuncs.defs |   10 ++++++++++
 codegen/m4/convert_clutter.m4   |    3 +++
 3 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/clutter/src/actor-meta.hg b/clutter/src/actor-meta.hg
index 97a3796..1fe09c6 100644
--- a/clutter/src/actor-meta.hg
+++ b/clutter/src/actor-meta.hg
@@ -25,7 +25,17 @@ namespace Clutter
 
 class Actor;
 
-//TODO: Write a version of the large description from here: 
http://clutter-project.org/docs/clutter/stable/ClutterActorMeta.html#ClutterActorMetaMeta.description
+/**
+ * Clutter::ActorMeta is an abstract class providing a common API for modifiers
+ *  of Clutter::Actor activity, appearance or layout.
+ *
+ * A Clutter::ActorMeta can only be owned by a single Clutter::Actor at any time.
+ *
+ * Every sub-class of Clutter::ActorMeta should check if the “enabled” property
+ * is set to true before applying any kind of modification.
+ *
+ * Clutter::ActorMeta is available since Clutter 1.4
+ */
 class ActorMeta : public Glib::Object
 {
   _CLASS_GOBJECT(ActorMeta, ClutterActorMeta, CLUTTER_ACTOR_META, Glib::Object, GObject)
@@ -46,7 +56,15 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Actor> get_actor(), clutter_actor_meta_get_actor, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Actor> get_actor() const, clutter_actor_meta_get_actor, refreturn, 
constversion)
 
-  //TODO: Signals, properties, vfuncs
+protected:
+ //vfuncs:
+ //
+  //_WRAP_VFUNC(void set_actor(const Glib::RefPtr<const Actor>& actor), set_actor)
+
+  //properties:
+  _WRAP_PROPERTY("actor", Glib::RefPtr<Actor>)
+  _WRAP_PROPERTY("enabled", bool)
+  _WRAP_PROPERTY("name", Glib::ustring)
 };
 
 } // namespace Clutter
diff --git a/clutter/src/clutter_vfuncs.defs b/clutter/src/clutter_vfuncs.defs
index d355e12..079e588 100644
--- a/clutter/src/clutter_vfuncs.defs
+++ b/clutter/src/clutter_vfuncs.defs
@@ -1,3 +1,13 @@
+; ClutterActorMeta
+
+(define-vfunc set_actor
+  (of-object "ClutterActorMeta")
+  (return-type "void")
+  (parameters
+    '("ClutterActor*" "actor")
+  )
+)
+
 ;ClutterAnimatable
 
 (define-vfunc find_property
diff --git a/codegen/m4/convert_clutter.m4 b/codegen/m4/convert_clutter.m4
index a1b84a8..de18143 100644
--- a/codegen/m4/convert_clutter.m4
+++ b/codegen/m4/convert_clutter.m4
@@ -5,10 +5,13 @@ _CONVERSION(`ClutterAction*',`Glib::RefPtr<Action>',`Glib::wrap($3)')
 _CONVERSION(`ClutterAction*',`Glib::RefPtr<const Action>',`Glib::wrap($3)')
 
 _CONVERSION(`const Glib::RefPtr<Actor>&',`ClutterActor*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<Actor>',`ClutterActor*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`const Glib::RefPtr<const Actor>&',`ClutterActor*',__CONVERT_CONST_REFPTR_TO_P)
 
+_CONVERSION(`ClutterActor*',`const Glib::RefPtr<Actor>',`Glib::wrap($3)')
 _CONVERSION(`ClutterActor*',`Glib::RefPtr<Actor>',`Glib::wrap($3)')
 _CONVERSION(`ClutterActor*',`Glib::RefPtr<const Actor>',`Glib::wrap($3)')
+_CONVERSION(`ClutterActor*',`const Glib::RefPtr<const Actor>&',`Glib::wrap($3)')
 
 _CONVERSION(`const ActorBox&', `const ClutterActorBox*',`($3).gobj()')
 


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