[cluttermm] Added ScrollActor.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm] Added ScrollActor.
- Date: Thu, 10 Apr 2014 18:19:39 +0000 (UTC)
commit 0330b11495ace9f28671755926183943431fabba
Author: Ian Martin <martin_id vodafone co nz>
Date: Thu Apr 10 20:18:55 2014 +0200
Added ScrollActor.
This is based on changes in this patch:
https://bugzilla.gnome.org/show_bug.cgi?id=725125#c7
clutter/cluttermm.h | 1 +
clutter/src/filelist.am | 1 +
clutter/src/scroll-actor.ccg | 23 +++++++++++++++++
clutter/src/scroll-actor.hg | 53 +++++++++++++++++++++++++++++++++++++++++
codegen/m4/convert_clutter.m4 | 2 +
5 files changed, 80 insertions(+), 0 deletions(-)
---
diff --git a/clutter/cluttermm.h b/clutter/cluttermm.h
index 695e7e9..664fdf2 100644
--- a/clutter/cluttermm.h
+++ b/clutter/cluttermm.h
@@ -113,6 +113,7 @@
#include <cluttermm/rectangle.h>
#include <cluttermm/score.h>
#include <cluttermm/script.h>
+#include <cluttermm/scroll-actor.h>
#include <cluttermm/shader.h>
#include <cluttermm/shader-effect.h>
#include <cluttermm/size.h>
diff --git a/clutter/src/filelist.am b/clutter/src/filelist.am
index b4789c1..9907dd1 100644
--- a/clutter/src/filelist.am
+++ b/clutter/src/filelist.am
@@ -67,6 +67,7 @@ files_hg = \
path-constraint.hg \
property-transition.hg \
rectangle.hg \
+ scroll-actor.hg \
score.hg \
script.hg \
scriptable.hg \
diff --git a/clutter/src/scroll-actor.ccg b/clutter/src/scroll-actor.ccg
new file mode 100644
index 0000000..66c2098
--- /dev/null
+++ b/clutter/src/scroll-actor.ccg
@@ -0,0 +1,23 @@
+/* Copyright (C) 2014 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/scroll-actor.hg b/clutter/src/scroll-actor.hg
new file mode 100644
index 0000000..c3c798c
--- /dev/null
+++ b/clutter/src/scroll-actor.hg
@@ -0,0 +1,53 @@
+/* Copyright (C) 2014 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 <cluttermm/types.h>
+#include <cluttermm/container.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/actor_p.h)
+
+namespace Clutter
+{
+
+_WRAP_ENUM(ScrollMode, ClutterScrollMode)
+
+class ScrollActor :
+ public Actor,
+ public Container
+{
+ _CLASS_GOBJECT(ScrollActor, ClutterScrollActor, CLUTTER_SCROLL_ACTOR, Actor, ClutterActor)
+ _IMPLEMENTS_INTERFACE(Container)
+ //TODO: _IMPLEMENTS_INTERFACE(Atk::Implementor)
+
+protected:
+ _CTOR_DEFAULT()
+
+public:
+ _WRAP_CREATE()
+
+ _WRAP_METHOD(void set_scroll_mode(ScrollMode mode), clutter_scroll_actor_set_scroll_mode)
+ _WRAP_METHOD(ScrollMode get_scroll_mode() const, clutter_scroll_actor_get_scroll_mode)
+ _WRAP_METHOD(void scroll_to_point(const Point& point), clutter_scroll_actor_scroll_to_point)
+ _WRAP_METHOD(void scroll_to_rect(const Rect& rect), clutter_scroll_actor_scroll_to_rect)
+
+ _WRAP_PROPERTY("scroll-mode", ScrollMode)
+};
+
+} // namespace Clutter
+
diff --git a/codegen/m4/convert_clutter.m4 b/codegen/m4/convert_clutter.m4
index 3af297a..3fa556f 100644
--- a/codegen/m4/convert_clutter.m4
+++ b/codegen/m4/convert_clutter.m4
@@ -117,6 +117,7 @@ _CONVERSION(`const Point&',`ClutterPoint*',`const_cast<ClutterPoint*>(($3).gobj(
#_CONVERSION(`ClutterRect*',`Rect&',`Rect($3)')
_CONVERSION(`ClutterRect*',`Rect',`Glib::wrap($3)')
_CONVERSION(`const Rect&',`ClutterRect*',`const_cast<ClutterRect*>(($3).gobj())')
+_CONVERSION(`const Rect&',`const ClutterRect*',`($3).gobj()')
_CONVERSION(`const Glib::RefPtr<Shader>&',`ClutterShader*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`ClutterShader*',`Glib::RefPtr<Shader>', `Glib::wrap($3)')
@@ -202,6 +203,7 @@ _CONV_ENUM(Clutter,PickMode)
_CONV_ENUM(Clutter,RequestMode)
_CONV_ENUM(Clutter,RotateAxis)
_CONV_ENUM(Clutter,RotateDirection)
+_CONV_ENUM(Clutter,ScrollMode)
_CONV_ENUM(Clutter,ScalingFilter)
_CONV_ENUM(Clutter,ShaderType)
_CONV_ENUM(Clutter,SnapEdge)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]