Commit 0330b114 authored by Ian Martin's avatar Ian Martin Committed by Murray Cumming

Added ScrollActor.

This is based on changes in this patch:
https://bugzilla.gnome.org/show_bug.cgi?id=725125#c7
parent 26c59eeb
......@@ -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>
......
......@@ -67,6 +67,7 @@ files_hg = \
path-constraint.hg \
property-transition.hg \
rectangle.hg \
scroll-actor.hg \
score.hg \
script.hg \
scriptable.hg \
......
/* 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
/* 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
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment