[cluttermm] Adds Constraint methods to Actor class.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm] Adds Constraint methods to Actor class.
- Date: Fri, 4 Apr 2014 06:53:16 +0000 (UTC)
commit 6ff7b11c6213b3a70a20aa94a8625889e46490c1
Author: Ian Martin <martin_id vodafone co nz>
Date: Fri Mar 28 15:52:36 2014 +1300
Adds Constraint methods to Actor class.
clutter/src/actor.ccg | 1 +
clutter/src/actor.hg | 20 ++++++++++++++++++++
codegen/m4/convert_clutter.m4 | 4 ++++
3 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/clutter/src/actor.ccg b/clutter/src/actor.ccg
index 3ca0695..c519b61 100644
--- a/clutter/src/actor.ccg
+++ b/clutter/src/actor.ccg
@@ -16,6 +16,7 @@
*/
#include <cluttermm/layout-manager.h>
+#include <cluttermm/constraint.h>
#include <cluttermm/content.h>
#include <clutter/clutter.h>
#include <iterator>
diff --git a/clutter/src/actor.hg b/clutter/src/actor.hg
index 034552e..c7148e2 100644
--- a/clutter/src/actor.hg
+++ b/clutter/src/actor.hg
@@ -45,6 +45,7 @@ namespace Clutter
typedef ClutterMatrix Matrix;
class Animation;
+class Constraint;
class Content;
class LayoutManager;
@@ -437,6 +438,23 @@ _DEPRECATE_IFDEF_END
_WRAP_METHOD(void remove_transition(const Glib::ustring& name), clutter_actor_remove_transition)
_WRAP_METHOD(void remove_all_transitions(), clutter_actor_remove_all_transitions)
+ //Constraints.
+ _WRAP_METHOD(void add_constraint(const Glib::RefPtr<Constraint>& constraint), clutter_actor_add_constraint)
+ _WRAP_METHOD(void add_constraint(const Glib::ustring& name, const Glib::RefPtr<Constraint>& constraint),
clutter_actor_add_constraint_with_name )
+ _WRAP_METHOD(void remove_constraint(const Glib::RefPtr<Constraint>& constraint),
clutter_actor_remove_constraint)
+ _WRAP_METHOD(void remove_constraint(const Glib::ustring& name), clutter_actor_remove_constraint_by_name)
+ _WRAP_METHOD(bool has_constraints() const, clutter_actor_has_constraints)
+
+ // Clutter docs: Use g_list_free() when done.
+ #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<Clutter::Constraint> >',`Glib::ListHandler<
Glib::RefPtr<Clutter::Constraint> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
+ _WRAP_METHOD( std::vector< Glib::RefPtr<Clutter::Constraint> > get_constraints(),
clutter_actor_get_constraints )
+ #m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr< const Clutter::Constraint > >',`Glib::ListHandler<
Glib::RefPtr< const Clutter::Constraint > >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
+ _WRAP_METHOD( std::vector< Glib::RefPtr< const Clutter::Constraint > > get_constraints() const,
clutter_actor_get_constraints)
+
+ _WRAP_METHOD(Glib::RefPtr<const Constraint> get_constraint(const Glib::ustring& name) const,
clutter_actor_get_constraint, refreturn, constversion)
+ _WRAP_METHOD(Glib::RefPtr< Constraint > get_constraint(const Glib::ustring& name),
clutter_actor_get_constraint, refreturn)
+ _WRAP_METHOD(void clear_constraints(), clutter_actor_clear_constraints)
+
// signals
_WRAP_SIGNAL(bool button_press_event(ButtonEvent* event), "button_press_event")
_WRAP_SIGNAL(bool button_release_event(ButtonEvent* event), "button_release_event")
@@ -473,6 +491,8 @@ _DEPRECATE_IFDEF_END
_WRAP_PROPERTY("anchor-gravity", Gravity)
_WRAP_PROPERTY("clip", Geometry)
_WRAP_PROPERTY("clip-to-allocation", bool)
+ // This property is not wrapped: documented in Clutter as adding a Constraint when set.
+ //_WRAP_PROPERTY("constraints", Glib::RefPtr<Constraint>)
_WRAP_PROPERTY("depth", float)
_WRAP_PROPERTY("fixed-position-set", bool)
_WRAP_PROPERTY("fixed-x", float)
diff --git a/codegen/m4/convert_clutter.m4 b/codegen/m4/convert_clutter.m4
index c2a1397..71997e1 100644
--- a/codegen/m4/convert_clutter.m4
+++ b/codegen/m4/convert_clutter.m4
@@ -44,6 +44,10 @@ _CONVERSION(`ClutterChildMeta*',`Glib::RefPtr<const ChildMeta>',`Glib::wrap($3)'
_CONVERSION(`const Color&',`ClutterColor*',`($3).gobj()')
_CONVERSION(`const Color&',`const ClutterColor*',`($3).gobj()')
+_CONVERSION(`ClutterConstraint*',`Glib::RefPtr<const Constraint>',`Glib::wrap($3)')
+_CONVERSION(`ClutterConstraint*',`Glib::RefPtr< Constraint >',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<Constraint>&',`ClutterConstraint*',__CONVERT_REFPTR_TO_P)
+
_CONVERSION(`const Glib::RefPtr<Container>&',`ClutterContainer*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`ClutterContainer*',`Glib::RefPtr<Container>',`Glib::wrap($3)')
_CONVERSION(`ClutterContainer*',`Glib::RefPtr<const Container>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]