[cluttermm] Effect branch added.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm] Effect branch added.
- Date: Tue, 25 Mar 2014 12:27:26 +0000 (UTC)
commit 92b7cc9bcaa87469b1eea2e63b3b4e8a9ec01660
Author: Ian Martin <martin_id vodafone co nz>
Date: Tue Feb 25 20:51:35 2014 +1300
Effect branch added.
The effect branch added. This includes the following classes:
Effect; blur-, brightness-contrast-, colorise-, deform-,
desaturate-, offscreen-, page-turn-, and shader-effect.
flatten-effect is included, but is not currently wrapped as
it is not included in the clutter library as yet.
clutter/src/blur-effect.ccg | 23 ++++++++++
clutter/src/blur-effect.hg | 36 ++++++++++++++++
clutter/src/brightness-contrast-effect.ccg | 23 ++++++++++
clutter/src/brightness-contrast-effect.hg | 50 ++++++++++++++++++++++
clutter/src/colorize-effect.ccg | 30 +++++++++++++
clutter/src/colorize-effect.hg | 45 ++++++++++++++++++++
clutter/src/deform-effect.ccg | 23 ++++++++++
clutter/src/deform-effect.hg | 61 +++++++++++++++++++++++++++
clutter/src/desaturate-effect.ccg | 23 ++++++++++
clutter/src/desaturate-effect.hg | 43 +++++++++++++++++++
clutter/src/effect.ccg | 4 +-
clutter/src/effect.hg | 18 +++++++-
clutter/src/filelist.am | 8 ++++
clutter/src/offscreen-effect.ccg | 24 +++++++++++
clutter/src/offscreen-effect.hg | 59 ++++++++++++++++++++++++++
clutter/src/page-turn-effect.ccg | 23 ++++++++++
clutter/src/page-turn-effect.hg | 47 +++++++++++++++++++++
clutter/src/shader-effect.ccg | 23 ++++++++++
clutter/src/shader-effect.hg | 63 ++++++++++++++++++++++++++++
codegen/m4/convert_clutter.m4 | 3 +-
20 files changed, 623 insertions(+), 6 deletions(-)
---
diff --git a/clutter/src/blur-effect.ccg b/clutter/src/blur-effect.ccg
new file mode 100644
index 0000000..91e31b1
--- /dev/null
+++ b/clutter/src/blur-effect.ccg
@@ -0,0 +1,23 @@
+/* Copyright (C) 2009 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 <clutter/clutter.h>
+
+namespace Clutter
+{
+
+} //namespace Clutter
diff --git a/clutter/src/blur-effect.hg b/clutter/src/blur-effect.hg
new file mode 100644
index 0000000..2843e95
--- /dev/null
+++ b/clutter/src/blur-effect.hg
@@ -0,0 +1,36 @@
+/* Copyright (C) 2011-14 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/offscreen-effect.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/offscreen-effect_p.h)
+
+namespace Clutter
+{
+class BlurEffect : public OffscreenEffect
+{
+ _CLASS_GOBJECT(BlurEffect, ClutterBlurEffect, CLUTTER_BLUR_EFFECT, OffscreenEffect, ClutterOffscreenEffect)
+protected:
+ _WRAP_CTOR(BlurEffect(), clutter_blur_effect_new)
+
+public:
+ _WRAP_CREATE()
+
+};
+
+}//namespace Clutter
diff --git a/clutter/src/brightness-contrast-effect.ccg b/clutter/src/brightness-contrast-effect.ccg
new file mode 100644
index 0000000..91e31b1
--- /dev/null
+++ b/clutter/src/brightness-contrast-effect.ccg
@@ -0,0 +1,23 @@
+/* Copyright (C) 2009 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 <clutter/clutter.h>
+
+namespace Clutter
+{
+
+} //namespace Clutter
diff --git a/clutter/src/brightness-contrast-effect.hg b/clutter/src/brightness-contrast-effect.hg
new file mode 100644
index 0000000..25f82ae
--- /dev/null
+++ b/clutter/src/brightness-contrast-effect.hg
@@ -0,0 +1,50 @@
+/* Copyright (C) 2013 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/offscreen-effect.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/offscreen-effect_p.h)
+
+namespace Clutter
+{
+
+class Color;
+
+class BrightnessContrastEffect :
+ public OffscreenEffect
+{
+ _CLASS_GOBJECT(BrightnessContrastEffect, ClutterBrightnessContrastEffect,
CLUTTER_BRIGHTNESS_CONTRAST_EFFECT, OffscreenEffect, ClutterOffscreenEffect)
+protected:
+ _CTOR_DEFAULT
+
+public:
+ _WRAP_CREATE()
+
+ _WRAP_METHOD(void set_brightness(float brightness), clutter_brightness_contrast_effect_set_brightness)
+ _WRAP_METHOD(void set_brightness(float red, float green, float blue),
clutter_brightness_contrast_effect_set_brightness_full)
+ _WRAP_METHOD(void get_brightness(float& red, float& green, float& blue) const,
clutter_brightness_contrast_effect_get_brightness)
+
+ _WRAP_METHOD(void set_contrast(float contrast), clutter_brightness_contrast_effect_set_contrast)
+ _WRAP_METHOD(void set_contrast(float red, float green, float blue),
clutter_brightness_contrast_effect_set_contrast_full)
+ _WRAP_METHOD(void get_contrast(float& red, float& green, float& blue) const,
clutter_brightness_contrast_effect_get_contrast)
+
+ _WRAP_PROPERTY("brightness", Color)
+ _WRAP_PROPERTY("contrast", Color)
+};
+
+}//namespace Clutter
diff --git a/clutter/src/colorize-effect.ccg b/clutter/src/colorize-effect.ccg
new file mode 100644
index 0000000..f9f9240
--- /dev/null
+++ b/clutter/src/colorize-effect.ccg
@@ -0,0 +1,30 @@
+/* Copyright (C) 2009 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 <clutter/clutter.h>
+
+namespace Clutter
+{
+
+Color ColorizeEffect::get_tint() const
+{
+ Color color;
+ clutter_colorize_effect_get_tint(const_cast<ClutterColorizeEffect*>(gobj()), color.gobj());
+ return color;
+}
+
+} //namespace Clutter
diff --git a/clutter/src/colorize-effect.hg b/clutter/src/colorize-effect.hg
new file mode 100644
index 0000000..8d40bb5
--- /dev/null
+++ b/clutter/src/colorize-effect.hg
@@ -0,0 +1,45 @@
+/* Copyright (C) 2011 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/offscreen-effect.h>
+#include <cluttermm/color.h>
+
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/offscreen-effect_p.h)
+
+namespace Clutter
+{
+class ColorizeEffect : public Clutter::OffscreenEffect
+{
+ _CLASS_GOBJECT(ColorizeEffect, ClutterColorizeEffect, CLUTTER_COLORIZE_EFFECT, Clutter::OffscreenEffect,
ClutterOffscreenEffect)
+protected:
+ _WRAP_CTOR(ColorizeEffect(const Color& tint), clutter_colorize_effect_new)
+
+public:
+
+ _WRAP_CREATE(const Color& tint)
+
+ _WRAP_METHOD(void set_tint(const Color& tint), clutter_colorize_effect_set_tint)
+
+ _WRAP_METHOD_DOCS_ONLY(clutter_colorize_effect_get_tint)
+ Color get_tint() const;
+
+ _WRAP_PROPERTY("tint", Color)
+};
+
+}//namespace Clutter
diff --git a/clutter/src/deform-effect.ccg b/clutter/src/deform-effect.ccg
new file mode 100644
index 0000000..91e31b1
--- /dev/null
+++ b/clutter/src/deform-effect.ccg
@@ -0,0 +1,23 @@
+/* Copyright (C) 2009 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 <clutter/clutter.h>
+
+namespace Clutter
+{
+
+} //namespace Clutter
diff --git a/clutter/src/deform-effect.hg b/clutter/src/deform-effect.hg
new file mode 100644
index 0000000..7e84972
--- /dev/null
+++ b/clutter/src/deform-effect.hg
@@ -0,0 +1,61 @@
+/* Copyright (C) 2011 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/offscreen-effect.h>
+#include <cogl/cogl.h>
+
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/offscreen-effect_p.h)
+
+namespace Clutter
+{
+class DeformEffect :
+ public Clutter::OffscreenEffect
+{
+ _CLASS_GOBJECT(DeformEffect, ClutterDeformEffect, CLUTTER_DEFORM_EFFECT, Clutter::OffscreenEffect,
ClutterOffscreenEffect)
+protected:
+ _CTOR_DEFAULT()
+
+public:
+ _WRAP_CREATE()
+
+ //TODO IM: Cant see anywhere the Cogl stuff is wrapped.
+ _WRAP_METHOD(void set_back_material(CoglHandle material), clutter_deform_effect_set_back_material)
+
+ //TODO IM: compile error
+ /*deform-effect.cc: In member function 'void* Clutter::DeformEffect::get_back_material()':
+ error: 'CoglHandle {aka void*}' is not a pointer-to-object type
+ retvalue->reference(); //The function does not do a ref for us.
+ */
+ //_WRAP_METHOD(CoglHandle get_back_material(),
+
+ _WRAP_METHOD(void set_n_tiles(guint x_tiles, guint y_tiles), clutter_deform_effect_set_n_tiles)
+ _WRAP_METHOD(void get_n_tiles(guint& x_tiles, guint& y_tiles) const, clutter_deform_effect_get_n_tiles)
+
+ _WRAP_METHOD(void invalidate(), clutter_deform_effect_invalidate)
+
+ _WRAP_PROPERTY("back-material", CoglHandle*)
+ _WRAP_PROPERTY("x-tiles", guint)
+ _WRAP_PROPERTY("y-tiles", guint)
+
+protected:
+ _WRAP_VFUNC(void deform_vertex(float width, float height, CoglTextureVertex *vertex), deform_vertex)
+
+
+};
+}//namespace Clutter
diff --git a/clutter/src/desaturate-effect.ccg b/clutter/src/desaturate-effect.ccg
new file mode 100644
index 0000000..91e31b1
--- /dev/null
+++ b/clutter/src/desaturate-effect.ccg
@@ -0,0 +1,23 @@
+/* Copyright (C) 2009 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 <clutter/clutter.h>
+
+namespace Clutter
+{
+
+} //namespace Clutter
diff --git a/clutter/src/desaturate-effect.hg b/clutter/src/desaturate-effect.hg
new file mode 100644
index 0000000..bb93580
--- /dev/null
+++ b/clutter/src/desaturate-effect.hg
@@ -0,0 +1,43 @@
+/* Copyright (C) 2011 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/offscreen-effect.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/offscreen-effect_p.h)
+
+namespace Clutter
+{
+
+class DesaturateEffect : public OffscreenEffect
+{
+ _CLASS_GOBJECT(DesaturateEffect, ClutterDesaturateEffect, CLUTTER_DESATURATE_EFFECT,
Clutter::OffscreenEffect, ClutterOffscreenEffect)
+
+protected:
+ _WRAP_CTOR(DesaturateEffect(double factor), clutter_desaturate_effect_new)
+
+public:
+ _WRAP_CREATE(double factor)
+ _WRAP_METHOD(void set_factor(double factor), clutter_desaturate_effect_set_factor)
+
+ _WRAP_METHOD(double get_factor() const, clutter_desaturate_effect_get_factor)
+
+protected:
+ _WRAP_PROPERTY("factor", double)
+};
+
+}//namespace Clutter
diff --git a/clutter/src/effect.ccg b/clutter/src/effect.ccg
index 1a3a58f..d2997e6 100644
--- a/clutter/src/effect.ccg
+++ b/clutter/src/effect.ccg
@@ -15,12 +15,12 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <cluttermm/actor.h>
+#include <cluttermm/actor-meta.h>
#include <clutter/clutter.h>
+#include <cluttermm/types.h>
namespace Clutter
{
} //namespace Clutter
-
diff --git a/clutter/src/effect.hg b/clutter/src/effect.hg
index 3d6f269..ab43459 100644
--- a/clutter/src/effect.hg
+++ b/clutter/src/effect.hg
@@ -17,14 +17,19 @@
#include <glibmm/object.h>
#include <cluttermm/actor-meta.h>
-
+
_DEFS(cluttermm,clutter)
_PINCLUDE(cluttermm/private/actor-meta_p.h)
+// TODO IM: added in 1.4 ???
namespace Clutter
{
+//TODO IM: wrap this class and enable the vfunc.
+// class PaintVolume;
+//_WRAP_ENUM(EffectPaintFlags, ClutterEffectPaintFlags)
+
//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
{
@@ -38,9 +43,16 @@ public:
//There is no create() because this is an abstract base class.
//_WRAP_CREATE()
- //There are no functions.
+ _WRAP_METHOD(void queue_repaint(), clutter_effect_queue_repaint)
+
+protected:
+ //TODO: Signals, properties, vfuncs
+ _WRAP_VFUNC(void paint(EffectPaintFlags flags), paint)
+ _WRAP_VFUNC(void pick(EffectPaintFlags flags), pick)
+ _WRAP_VFUNC(void pre_paint(EffectPaintFlags flags), pre_paint, deprecated)
+ _WRAP_VFUNC(void post_paint(EffectPaintFlags flags), post_paint, deprecated)
- //TODO: Signals, properties, vfuncs
+ _WRAP_VFUNC(bool get_paint_volume(PaintVolume volume), get_paint_volume)
};
} // namespace Clutter
diff --git a/clutter/src/filelist.am b/clutter/src/filelist.am
index 54c8e02..148ad8a 100644
--- a/clutter/src/filelist.am
+++ b/clutter/src/filelist.am
@@ -30,13 +30,18 @@ files_hg = \
bin-layout.hg \
box.hg \
box-layout.hg \
+ blur-effect.hg \
+ brightness-contrast-effect.hg \
cairo-texture.hg \
childmeta.hg \
clone.hg \
color.hg \
+ colorize-effect.hg \
container.hg \
content.hg \
+ deform-effect.hg \
device-manager.hg \
+ desaturate-effect.hg \
effect.hg \
fixed-layout.hg \
flow-layout.hg \
@@ -47,12 +52,15 @@ files_hg = \
layoutmeta.hg \
layout-manager.hg \
media.hg \
+ offscreen-effect.hg \
+ page-turn-effect.hg \
path.hg \
rectangle.hg \
score.hg \
script.hg \
scriptable.hg \
shader.hg \
+ shader-effect.hg \
size.hg \
stage.hg \
text.hg \
diff --git a/clutter/src/offscreen-effect.ccg b/clutter/src/offscreen-effect.ccg
new file mode 100644
index 0000000..56eabac
--- /dev/null
+++ b/clutter/src/offscreen-effect.ccg
@@ -0,0 +1,24 @@
+/* Copyright (C) 2009 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 <clutter/clutter.h>
+#include <cluttermm/types.h>
+
+namespace Clutter
+{
+
+} //namespace Clutter
diff --git a/clutter/src/offscreen-effect.hg b/clutter/src/offscreen-effect.hg
new file mode 100644
index 0000000..1c1b1ae
--- /dev/null
+++ b/clutter/src/offscreen-effect.hg
@@ -0,0 +1,59 @@
+/* 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/effect.h>
+#include <cluttermm/types.h>
+
+#include <cogl/cogl.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/effect_p.h)
+
+namespace Clutter
+{
+
+class Rect;
+
+class OffscreenEffect : public Effect
+{
+ _CLASS_GOBJECT(OffscreenEffect, ClutterOffscreenEffect, CLUTTER_OFFSCREEN_EFFECT, Effect, ClutterEffect)
+
+protected:
+ _CTOR_DEFAULT()
+
+public:
+ //There is no create() because this is an abstract base class.
+ //_WRAP_CREATE()
+
+
+ // TODO IM: this is likely to be deprecated, as CoglMaterial is
+ // deprecated for CoglPipeline.
+ //_WRAP_METHOD(CoglMaterial* get_target(), clutter_offscreen_effect_get_target)
+
+ _WRAP_METHOD(CoglHandle get_texture(), clutter_offscreen_effect_get_texture)
+ _WRAP_METHOD(CoglHandle create_texture(float width, float height), clutter_offscreen_effect_create_texture)
+ _WRAP_METHOD(void paint_target(), clutter_offscreen_effect_paint_target)
+
+ //TODO: _WRAP_METHOD(bool get_target_rect(Rect& rect{>>}), clutter_offscreen_effect_get_target_rect)
+
+protected:
+ //TODO: Signals, properties, vfuncs
+ _WRAP_VFUNC(CoglHandle* create_texture(float width, float height), create_texture)
+ _WRAP_VFUNC(void paint_target(), paint_target)
+};
+
+} // namespace Clutter
diff --git a/clutter/src/page-turn-effect.ccg b/clutter/src/page-turn-effect.ccg
new file mode 100644
index 0000000..91e31b1
--- /dev/null
+++ b/clutter/src/page-turn-effect.ccg
@@ -0,0 +1,23 @@
+/* Copyright (C) 2009 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 <clutter/clutter.h>
+
+namespace Clutter
+{
+
+} //namespace Clutter
diff --git a/clutter/src/page-turn-effect.hg b/clutter/src/page-turn-effect.hg
new file mode 100644
index 0000000..1e3072c
--- /dev/null
+++ b/clutter/src/page-turn-effect.hg
@@ -0,0 +1,47 @@
+/* Copyright (C) 2011 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/deform-effect.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/deform-effect_p.h)
+
+namespace Clutter
+{
+
+class PageTurnEffect : public Clutter::DeformEffect
+{
+ _CLASS_GOBJECT(PageTurnEffect, ClutterPageTurnEffect, CLUTTER_PAGE_TURN_EFFECT, Clutter::DeformEffect,
ClutterDeformEffect)
+protected:
+ _WRAP_CTOR(PageTurnEffect(double period, double angle, float radius), clutter_page_turn_effect_new)
+
+public:
+ _WRAP_CREATE(double period, double angle, float radius)
+
+ _WRAP_METHOD(void set_period(double period), clutter_page_turn_effect_set_period )
+ _WRAP_METHOD(double get_period() const, clutter_page_turn_effect_get_period )
+ _WRAP_METHOD(void set_angle(double angle), clutter_page_turn_effect_set_angle)
+ _WRAP_METHOD(double get_angle() const, clutter_page_turn_effect_get_angle)
+ _WRAP_METHOD(void set_radius(float radius), clutter_page_turn_effect_set_radius)
+ _WRAP_METHOD(float get_radius() const, clutter_page_turn_effect_get_radius)
+
+ _WRAP_PROPERTY("angle", double)
+ _WRAP_PROPERTY("period", double)
+ _WRAP_PROPERTY("radius", float)
+};
+
+}//namespace Clutter
diff --git a/clutter/src/shader-effect.ccg b/clutter/src/shader-effect.ccg
new file mode 100644
index 0000000..91e31b1
--- /dev/null
+++ b/clutter/src/shader-effect.ccg
@@ -0,0 +1,23 @@
+/* Copyright (C) 2009 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 <clutter/clutter.h>
+
+namespace Clutter
+{
+
+} //namespace Clutter
diff --git a/clutter/src/shader-effect.hg b/clutter/src/shader-effect.hg
new file mode 100644
index 0000000..660fd6c
--- /dev/null
+++ b/clutter/src/shader-effect.hg
@@ -0,0 +1,63 @@
+/* Copyright (C) 2011 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/offscreen-effect.h>
+#include <cluttermm/types.h>
+#include <glibmm/value.h>
+#include <glibmm/object.h>
+#include <cogl/cogl.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/offscreen-effect_p.h)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Clutter
+{
+
+_WRAP_ENUM(ShaderType, ClutterShaderType)
+
+class ShaderEffect :
+ public Clutter::OffscreenEffect
+{
+ _CLASS_GOBJECT(ShaderEffect, ClutterShaderEffect, CLUTTER_SHADER_EFFECT, Clutter::OffscreenEffect,
ClutterOffscreenEffect)
+
+protected:
+ _WRAP_CTOR(ShaderEffect(ShaderType shader_type), clutter_shader_effect_new)
+
+public:
+ _WRAP_CREATE(ShaderType shader_type)
+
+ //TODO: #m4 _CONVERSION(`const GValue*',`const Glib::Value&',`Glib::wrap($3)')
+ // #m4 _CONVERSION(`const Glib::ValueBase&',`const GValue*',__CONVERT_REFPTR_TO_P)
+ // _WRAP_METHOD(void set_uniform_value(const Glib::ustring& name, const Glib::ValueBase& value),
clutter_shader_effect_set_uniform_value)
+
+ _WRAP_METHOD(bool set_shader_source(const Glib::ustring& source), clutter_shader_effect_set_shader_source)
+
+ //TODO: Should these be const?
+ _WRAP_METHOD(CoglHandle get_program(), clutter_shader_effect_get_program)
+ _WRAP_METHOD(CoglHandle get_shader(), clutter_shader_effect_get_shader )
+
+ // Write only and construct-only property:
+ //_WRAP_PROPERTY("shader-type", ShaderType)
+
+protected:
+ _WRAP_VFUNC(Glib::ustring get_static_shader_source() const, get_static_shader_source)
+};
+
+
+
+}//namespace Clutter
diff --git a/codegen/m4/convert_clutter.m4 b/codegen/m4/convert_clutter.m4
index 663fece..88717e2 100644
--- a/codegen/m4/convert_clutter.m4
+++ b/codegen/m4/convert_clutter.m4
@@ -38,7 +38,7 @@ _CONVERSION(`Glib::RefPtr<ChildMeta>',`ClutterChildMeta*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`ClutterChildMeta*',`Glib::RefPtr<ChildMeta>',`Glib::wrap($3)')
_CONVERSION(`ClutterChildMeta*',`Glib::RefPtr<const ChildMeta>',`Glib::wrap($3)')
-_CONVERSION(`Color&',`ClutterColor*',`($3).gobj()')
+_CONVERSION(`const Color&',`ClutterColor*',`($3).gobj()')
_CONVERSION(`const Color&',`const ClutterColor*',`($3).gobj()')
_CONVERSION(`const Glib::RefPtr<Container>&',`ClutterContainer*',__CONVERT_REFPTR_TO_P)
@@ -163,6 +163,7 @@ _CONV_ENUM(Clutter,PickMode)
_CONV_ENUM(Clutter,RequestMode)
_CONV_ENUM(Clutter,RotateAxis)
_CONV_ENUM(Clutter,RotateDirection)
+_CONV_ENUM(Clutter,ShaderType)
_CONV_ENUM(Clutter,TextDirection)
_CONV_ENUM(Clutter,TextureFlags)
_CONV_ENUM(Clutter,TextureQuality)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]