[cluttermm] Content: Corrections.



commit b63c817ca3f418fda009ae8b8d06aaa078aa4936
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 25 12:34:08 2014 +0100

    Content: Corrections.
    
    * clutter/src/clutter_vfuncs.defs: Hand-code the vfunc definition.
    * clutter/src/content.hg: Correct the vfunc names, add the
      get_preferred_size() method. Avoid unnecessary {>>} syntax for
      the simple float type (hopefully).

 clutter/src/clutter_vfuncs.defs |   41 +++++++++++++++++++++++++++++++++++++++
 clutter/src/content.hg          |   10 ++++----
 2 files changed, 46 insertions(+), 5 deletions(-)
---
diff --git a/clutter/src/clutter_vfuncs.defs b/clutter/src/clutter_vfuncs.defs
index 079e588..33a0921 100644
--- a/clutter/src/clutter_vfuncs.defs
+++ b/clutter/src/clutter_vfuncs.defs
@@ -47,6 +47,47 @@
   )
 )
 
+; ClutterContent
+
+(define-vfunc get_preferred_size
+  (of-object "ClutterContent")
+  (return-type "gboolean")
+  (parameters
+    '("gfloat*" "width")
+    '("gfloat*" "height")
+  )
+)
+
+(define-vfunc paint_content
+  (of-object "ClutterContent")
+  (return-type "void")
+  (parameters
+    '("ClutterActor*" "actor")
+    '("ClutterPaintNode*" "node")
+  )
+)
+
+(define-vfunc attached
+  (of-object "ClutterContent")
+  (return-type "void")
+  (parameters
+    '("ClutterActor*" "actor")
+  )
+)
+
+(define-vfunc detached
+  (of-object "ClutterContent")
+  (return-type "void")
+  (parameters
+    '("ClutterActor*" "actor")
+  )
+)
+
+(define-vfunc invalidate
+  (of-object "ClutterContent")
+  (return-type "void")
+)
+
 ; ClutterLayout
 
 (define-vfunc get_layout_flags
diff --git a/clutter/src/content.hg b/clutter/src/content.hg
index 29ff431..7d3913d 100644
--- a/clutter/src/content.hg
+++ b/clutter/src/content.hg
@@ -43,18 +43,18 @@ class Content : public Glib::Interface
   _CLASS_INTERFACE(Content, ClutterContent, CLUTTER_CONTENT, ClutterContentIface)
 public:
 
+  _WRAP_METHOD(bool get_preferred_size(float& width, float& height) const, 
clutter_content_get_preferred_size)
 
 protected:
   _WRAP_METHOD(void invalidate(), clutter_content_invalidate)
 
-
-  #m4 _CONVERSION(`float&',`gfloat*',`&($3)')
-  #m4 _INITIALIZATION(`float&',`gfloat',`&($3)')
-  _WRAP_VFUNC(bool get_preferred_size(float& width{>>}, float& height{>>}) const, 
clutter_content_get_preferred_size)
+#m4 _CONVERSION(`gfloat*',`float&',`*($3)')
+  _WRAP_VFUNC(bool get_preferred_size(float& width, float& height) const, get_preferred_size)
 
   //TODO: Wrap ClutterPaintNode? _WRAP_VFUNC(void paint_content(const Glib::RefPtr<Actor>& actor, 
ClutterPaintNode* node), paint_content)
 
-  _WRAP_VFUNC(void attached(const Glib::RefPtr<Actor>& actor), detached)
+#m4 _CONVERSION(`ClutterActor*',`const Glib::RefPtr<Actor>&',`Glib::wrap($3, true)')
+  _WRAP_VFUNC(void attached(const Glib::RefPtr<Actor>& actor), attached)
   _WRAP_VFUNC(void detached(const Glib::RefPtr<Actor>& actor), detached)
   _WRAP_VFUNC(void invalidate(), invalidate)
 };


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