[cluttermm] Added Effect and related Actor methods.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm] Added Effect and related Actor methods.
- Date: Mon, 2 Aug 2010 17:12:44 +0000 (UTC)
commit 62a0c3bdaff275a21ab4cb2baa0bed7cbaba9e39
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Aug 2 17:01:36 2010 +0200
Added Effect and related Actor methods.
* clutter/src/filelist.am:
* clutter/src/effect.[hg|ccg]: Added Effect.
* clutter/src/actor.hg: Added add_effect(), remove_effect(), get_effect().
ChangeLog | 10 ++++-
clutter/src/actor.hg | 14 +++++++
clutter/src/effect.ccg | 26 ++++++++++++
clutter/src/effect.hg | 46 ++++++++++++++++++++++
clutter/src/filelist.am | 1 +
codegen/extradefs/generate_extra_defs_clutter.cc | 1 +
codegen/m4/convert_clutter.m4 | 6 +++
7 files changed, 103 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2525b76..61464d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2010-08-02 Murray Cumming <murrayc murrayc com>
+ Added Effect and related Actor methods.
+
+ * clutter/src/filelist.am:
+ * clutter/src/effect.[hg|ccg]: Added Effect.
+ * clutter/src/actor.hg: Added add_effect(), remove_effect(), get_effect().
+
+2010-08-02 Murray Cumming <murrayc murrayc com>
+
Wrapped some new functions.
* configure.ac: Depend on atkmm, so we can use Atk::Object in the API.
@@ -9,7 +17,7 @@
* clutter/src/filelist.am:
* clutter/src/actor-meta.[hg|ccg]:
* clutter/src/action.[hg|ccg]: Added new ActorMeta and Action classes.
- * clutter/src/action.[hg|ccg]: Added get/set_clip_to_allocation(), contains(),
+ * clutter/src/actor.[hg|ccg]: Added get/set_clip_to_allocation(), contains(),
get_has_allocation(), get_accessible(), add_action(), remove_action(),
get_action(), clear_actions().
* clutter/src/animation.hg: set_duration(): Correct the parameter type to
diff --git a/clutter/src/actor.hg b/clutter/src/actor.hg
index 6b107e1..db30e03 100644
--- a/clutter/src/actor.hg
+++ b/clutter/src/actor.hg
@@ -22,6 +22,7 @@
#include <cluttermm/action.h>
#include <cluttermm/animation.h>
#include <cluttermm/color.h>
+#include <cluttermm/effect.h>
#include <cluttermm/scriptable.h>
#include <cluttermm/shader.h>
#include <cluttermm/types.h> // For Event*
@@ -279,6 +280,19 @@ public:
//TODO: _WRAP_METHOD(GLis* get_actions(), clutter_actor_get_actions)
_WRAP_METHOD(void clear_actions(), clutter_actor_clear_actions)
+
+
+ _WRAP_METHOD(void add_effect(const Glib::RefPtr<Effect>& effect), clutter_actor_add_effect)
+ _WRAP_METHOD(void add_effect_with_name(const Glib::ustring& name,
+ const Glib::RefPtr<Effect>& effect), clutter_actor_add_effect_with_name)
+ _WRAP_METHOD(void remove_effect(const Glib::RefPtr<Effect>& effect), clutter_actor_remove_effect)
+ _WRAP_METHOD(void remove_effect(const Glib::ustring& name), clutter_actor_remove_effect_by_name )
+ //TODO: GList * clutter_actor_get_effects (ClutterActor *self);
+ _WRAP_METHOD(Glib::RefPtr<Effect> get_effect(const Glib::ustring& name), clutter_actor_get_effect, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Effect> get_effect(const Glib::ustring& name) const, clutter_actor_get_effect, refreturn, constversion)
+ _WRAP_METHOD(void clear_effects(), clutter_actor_clear_effects)
+
+
// signals
_WRAP_SIGNAL(bool button_press_event(ButtonEvent* event), "button_press_event")
diff --git a/clutter/src/effect.ccg b/clutter/src/effect.ccg
new file mode 100644
index 0000000..1a3a58f
--- /dev/null
+++ b/clutter/src/effect.ccg
@@ -0,0 +1,26 @@
+/* Copyright (C) 2010 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <cluttermm/actor.h>
+#include <clutter/clutter.h>
+
+namespace Clutter
+{
+
+
+} //namespace Clutter
+
diff --git a/clutter/src/effect.hg b/clutter/src/effect.hg
new file mode 100644
index 0000000..3d6f269
--- /dev/null
+++ b/clutter/src/effect.hg
@@ -0,0 +1,46 @@
+/* Copyright (C) 2010 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <cluttermm/actor-meta.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/actor-meta_p.h)
+
+
+namespace Clutter
+{
+
+//TODO: Write a version of the large description from here: http://clutter-project.org/docs/clutter/stable/ClutterEffect.html#ClutterEffect.description
+class Effect : public ActorMeta
+{
+ _CLASS_GOBJECT(Effect, ClutterEffect, CLUTTER_EFFECT, ActorMeta, ClutterActorMeta)
+ _DERIVES_INITIALLY_UNOWNED()
+
+protected:
+ _CTOR_DEFAULT()
+
+public:
+ //There is no create() because this is an abstract base class.
+ //_WRAP_CREATE()
+
+ //There are no functions.
+
+ //TODO: Signals, properties, vfuncs
+};
+
+} // namespace Clutter
diff --git a/clutter/src/filelist.am b/clutter/src/filelist.am
index a49a5f1..101fa88 100644
--- a/clutter/src/filelist.am
+++ b/clutter/src/filelist.am
@@ -29,6 +29,7 @@ files_hg = \
clone.hg \
color.hg \
container.hg \
+ effect.hg \
group.hg \
interval.hg \
media.hg \
diff --git a/codegen/extradefs/generate_extra_defs_clutter.cc b/codegen/extradefs/generate_extra_defs_clutter.cc
index 9ce0f45..065d0c4 100644
--- a/codegen/extradefs/generate_extra_defs_clutter.cc
+++ b/codegen/extradefs/generate_extra_defs_clutter.cc
@@ -44,6 +44,7 @@ int main(int argc, char** argv)
<< get_defs(CLUTTER_TYPE_CLONE)
<< get_defs(CLUTTER_TYPE_COLOR)
<< get_defs(CLUTTER_TYPE_CONTAINER)
+ << get_defs(CLUTTER_TYPE_EFFECT)
<< get_defs(CLUTTER_TYPE_EVENT)
// << get_defs(CLUTTER_TYPE_FIXED)
<< get_defs(CLUTTER_TYPE_GROUP)
diff --git a/codegen/m4/convert_clutter.m4 b/codegen/m4/convert_clutter.m4
index fc39210..c8fc9a5 100644
--- a/codegen/m4/convert_clutter.m4
+++ b/codegen/m4/convert_clutter.m4
@@ -31,6 +31,12 @@ _CONVERSION(`ClutterAnimation*',`Glib::RefPtr<const Animation>',`Glib::wrap($3)'
_CONVERSION(`const Glib::RefPtr<Backend>&',`ClutterBackend*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`ClutterBackend*',`Glib::RefPtr<Backend>',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<Effect>&',`ClutterEffect*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<const Effect>&',`ClutterEffect*',__CONVERT_CONST_REFPTR_TO_P)
+
+_CONVERSION(`ClutterEffect*',`Glib::RefPtr<Effect>',`Glib::wrap($3)')
+_CONVERSION(`ClutterEffect*',`Glib::RefPtr<const Effect>',`Glib::wrap($3)')
+
_CONVERSION(`const Glib::RefPtr<Interval>&',`ClutterInterval*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`ClutterInterval*',`Glib::RefPtr<Interval>',`Glib::wrap($3)')
_CONVERSION(`ClutterInterval*',`Glib::RefPtr<const Interval>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]