[cluttermm] Actor: Add most remaining vfuncs.



commit 8eaceefbe428c87f0cc46053630962b9a65ab97c
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Apr 10 09:56:56 2014 +0200

    Actor: Add most remaining vfuncs.
    
    * clutter/src/clutter_vfuncs.defs: Hand-write the ClutterActor vfunc
      definitions.
    * clutter/src/actor.hg: Add most missing vfuncs, and remove the
      quotes from the vfunc names.
    
      Wrongly wrapped vfuncs can cause fundamental problems, so be
      ready to comment these out to investigate strangeness.

 clutter/src/actor.hg            |   29 +++++++++++----
 clutter/src/clutter_vfuncs.defs |   76 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+), 7 deletions(-)
---
diff --git a/clutter/src/actor.hg b/clutter/src/actor.hg
index b86e68b..09ad905 100644
--- a/clutter/src/actor.hg
+++ b/clutter/src/actor.hg
@@ -538,19 +538,34 @@ protected:
   _WRAP_METHOD(void set_shader_param_value(const Glib::ustring& param, const Glib::ValueBase& value),
                clutter_actor_set_shader_param, deprecated "Use ShaderEffect::set_uniform_value() instead.")
 
-  //TODO: Add new vfuncs.
-  _WRAP_VFUNC(void show_all(), "show_all")
-  _WRAP_VFUNC(void hide_all(), "hide_all")
+  //TODO: These are deprecated. Remove them when we can break ABI:
+  _WRAP_VFUNC(void show_all(), show_all)
+  _WRAP_VFUNC(void hide_all(), hide_all)
+
+  //The realize and unrealize vfuncs are deprecated.
+
+  _WRAP_VFUNC(void map(), map)
+  _WRAP_VFUNC(void unmap(), unmap)
+  _WRAP_VFUNC(void paint(), paint)
 
   // TODO: I think we need to hand-code the vfuncs if we need to handle
   // the float* being NULL.
   #m4 _CONVERSION(`float*', `float&', `*($3)')
   #m4 _CONVERSION(`const ClutterActorBox*', `const ActorBox&', `Glib::wrap($3)')
-  _WRAP_VFUNC(void pick(const Color& color), "pick")
-  _WRAP_VFUNC(void get_preferred_width(float for_height, float& min_width_p, float& natural_width_p) const, 
"get_preferred_width")
-  _WRAP_VFUNC(void get_preferred_height(float for_width, float& min_height_p, float& natural_height_p) 
const, "get_preferred_height")
-  _WRAP_VFUNC(void allocate(const ActorBox& box, AllocationFlags absolute_origin_changed), "allocate")
+  _WRAP_VFUNC(void get_preferred_width(float for_height, float& min_width_p, float& natural_width_p) const, 
get_preferred_width)
+  _WRAP_VFUNC(void get_preferred_height(float for_width, float& min_height_p, float& natural_height_p) 
const, get_preferred_height)
+  _WRAP_VFUNC(void allocate(const ActorBox& box, AllocationFlags absolute_origin_changed), allocate)
+
+  _WRAP_VFUNC(void pick(const Color& color), pick)
+
+  //TODO: _WRAP_VFUNC(Glib::RefPtr<Gtk::Object> get_accessible(), get_accessible)
+  //TODO: Wrap ClutterPaintVolume?
+  _WRAP_VFUNC(bool get_paint_volume(ClutterPaintVolume* volume), get_paint_volume)
+
+  _WRAP_VFUNC(bool has_overlaps() const, has_overlaps)
 
+  //TODO: Wrap ClutterPaintNode*?
+  _WRAP_VFUNC(void paint_node(ClutterPaintNode* root), paint_node)
 };
 
 _DEPRECATE_IFDEF_START
diff --git a/clutter/src/clutter_vfuncs.defs b/clutter/src/clutter_vfuncs.defs
index 33a0921..766f591 100644
--- a/clutter/src/clutter_vfuncs.defs
+++ b/clutter/src/clutter_vfuncs.defs
@@ -1,3 +1,79 @@
+; ClutterActor
+
+(define-vfunc map
+  (of-object "ClutterActor")
+  (return-type "void")
+)
+
+(define-vfunc unmap
+  (of-object "ClutterActor")
+  (return-type "void")
+)
+
+(define-vfunc paint
+  (of-object "ClutterActor")
+  (return-type "void")
+)
+
+(define-vfunc get_preferred_width
+  (of-object "ClutterActor")
+  (return-type "void")
+  (parameters
+    '("gfloat" "for_height")
+    '("gfloat*" "min_width_p")
+    '("gfloat*" "natural_width_p")
+  )
+)
+
+(define-vfunc get_preferred_height
+  (of-object "ClutterActor")
+  (return-type "void")
+  (parameters
+    '("gfloat" "for_width")
+    '("gfloat*" "min_height_p")
+    '("gfloat*" "natural_height_p")
+  )
+)
+
+(define-vfunc allocate
+  (of-object "ClutterActor")
+  (return-type "void")
+  (parameters
+    '("ClutterActorBox*" "box")
+    '("ClutterAllocationFlags" "absolute_origin_changed")
+  )
+)
+
+(define-vfunc pick
+  (of-object "ClutterActor")
+  (return-type "void")
+  (parameters
+    '("ClutterColor*" "color")
+  )
+)
+
+(define-vfunc get_paint_volume
+  (of-object "ClutterActor")
+  (return-type "gboolean")
+  (parameters
+    '("ClutterPaintVolume*" "volume")
+  )
+)
+
+(define-vfunc has_overlaps
+  (of-object "ClutterActor")
+  (return-type "gboolean")
+)
+
+(define-vfunc paint_node
+  (of-object "ClutterActor")
+  (return-type "void")
+  (parameters
+    '("ClutterPaintNode*" "root")
+  )
+)
+
+
 ; ClutterActorMeta
 
 (define-vfunc set_actor


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