Commit dcd15274 authored by Jiří Techet's avatar Jiří Techet

Replace tidy with mx

Replace the outdated tidy library with its successor - mx. This will
help us to use fixes and updates from the mainline.
parent 91eed6ae
......@@ -86,12 +86,12 @@ libtool
ltmain.sh
missing
stamp-h1
tidy/tidy-enum-types.c
tidy/tidy-enum-types.h
tidy/stamp-enum-types
tidy/tidy-marshal.c
tidy/tidy-marshal.h
tidy/stamp-marshal
mx/mx-enum-types.c
mx/mx-enum-types.h
mx/stamp-enum-types
mx/mx-marshal.c
mx/mx-marshal.h
mx/stamp-marshal
bindings/python/update-binding.sh
bindings/python/champlain-gtk/pychamplaingtk.c
bindings/python/champlain/pychamplain.c
......
SUBDIRS = build tidy champlain
SUBDIRS = build mx champlain
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
......
......@@ -111,7 +111,7 @@ nodist_libchamplain_@CHAMPLAIN_API_VERSION@_la_SOURCES = \
$(libchamplain_headers_built) \
$(libchamplain_sources_built)
libchamplain_@CHAMPLAIN_API_VERSION@_la_LIBADD = $(DEPS_LIBS) $(SOUP_LIBS) $(MEMPHIS_LIBS) $(top_builddir)/tidy/libtidy-1.0.la
libchamplain_@CHAMPLAIN_API_VERSION@_la_LIBADD = $(DEPS_LIBS) $(SOUP_LIBS) $(MEMPHIS_LIBS) $(top_builddir)/mx/libchamplainmx-1.0.la
libchamplain_@CHAMPLAIN_API_VERSION@_la_LDFLAGS = \
-version-info $(LIBRARY_VERSION)\
......@@ -123,7 +123,7 @@ AM_CPPFLAGS = \
$(SOUP_CFLAGS) \
$(MEMPHIS_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-I$(top_srcdir)/tidy \
-I$(top_srcdir)/mx \
-I$(top_srcdir) \
-DCHAMPLAIN_COMPILATION \
$(WARN_CFLAGS)
......@@ -160,7 +160,7 @@ Champlain_@CHAMPLAIN_API_VERSION_NORM@_gir_FILES = $(introspection_sources)
Champlain_@CHAMPLAIN_API_VERSION_NORM@_gir_INCLUDES = Clutter-1.0 Gtk-3.0 $(memphis_gir_include)
Champlain_@CHAMPLAIN_API_VERSION_NORM@_gir_CFLAGS = \
$(DEPS_CFLAGS) $(SOUP_CFLAGS) $(MEMPHIS_CFLAGS) \
-I$(top_srcdir)/tidy -I$(top_srcdir) -I$(top_builddir) \
-I$(top_srcdir)/mx -I$(top_srcdir) -I$(top_builddir) \
-DCHAMPLAIN_COMPILATION
INTROSPECTION_GIRS += Champlain-@CHAMPLAIN_API_VERSION@.gir
......
......@@ -657,7 +657,7 @@ button_release_cb (G_GNUC_UNUSED ClutterActor *actor,
ChamplainLayer *layer)
{
gboolean found = FALSE;
printf("FOOOOOO\n");
if (clutter_event_get_button (event) != 1)
return FALSE;
......
......@@ -67,10 +67,10 @@
#include <glib.h>
#include <glib-object.h>
#include <math.h>
#include <tidy-adjustment.h>
#include <tidy-finger-scroll.h>
#include <tidy-scrollable.h>
#include <tidy-viewport.h>
#include <mx-kinetic-scroll-view.h>
#include <mx-viewport.h>
#include <mx-adjustment.h>
#include <mx-scrollable.h>
//#define VIEW_LOG
#ifdef VIEW_LOG
......@@ -176,6 +176,7 @@ struct _ChamplainViewPrivate
ClutterActor *viewport; /* Contains the map_layer, license and markers */
ClutterActor *map_layer; /* Contains tiles actors (grouped by zoom level) */
ChamplainRectangle viewport_size;
ClutterActor *viewport_container;
ClutterActor *user_layers; /* Contains the markers */
......@@ -280,7 +281,7 @@ update_viewport (ChamplainView *view,
if (relocate || force)
{
g_signal_handlers_block_by_func (priv->viewport, G_CALLBACK (viewport_pos_changed_cb), view);
tidy_viewport_set_origin (TIDY_VIEWPORT (priv->viewport),
mx_viewport_set_origin (MX_VIEWPORT (priv->viewport),
priv->viewport_size.x,
priv->viewport_size.y,
0);
......@@ -305,7 +306,7 @@ update_viewport (ChamplainView *view,
static void
panning_completed (G_GNUC_UNUSED TidyFingerScroll *scroll,
panning_completed (G_GNUC_UNUSED MxKineticScrollView *scroll,
ChamplainView *view)
{
DEBUG_LOG ()
......@@ -314,7 +315,7 @@ panning_completed (G_GNUC_UNUSED TidyFingerScroll *scroll,
ChamplainFloatPoint absolute;
gfloat x, y;
tidy_viewport_get_origin (TIDY_VIEWPORT (priv->viewport), &x, &y, NULL);
mx_viewport_get_origin (MX_VIEWPORT (priv->viewport), &x, &y, NULL);
absolute.x = x + priv->anchor.x + priv->viewport_size.width / 2.0;
absolute.y = y + priv->anchor.y + priv->viewport_size.height / 2.0;
......@@ -393,11 +394,11 @@ resize_viewport (ChamplainView *view)
gdouble lower_y = 0;
gdouble upper_x = G_MAXINT16;
gdouble upper_y = G_MAXINT16;
TidyAdjustment *hadjust, *vadjust;
MxAdjustment *hadjust, *vadjust;
ChamplainViewPrivate *priv = view->priv;
tidy_scrollable_get_adjustments (TIDY_SCROLLABLE (priv->viewport), &hadjust,
mx_scrollable_get_adjustments (MX_SCROLLABLE (priv->viewport), &hadjust,
&vadjust);
if (priv->zoom_level < 8)
......@@ -414,7 +415,7 @@ resize_viewport (ChamplainView *view)
/*
* block emmision of signal by priv->viewport with viewport_pos_changed_cb()
* callback - the signal can be emitted by updating TidyAdjustment, but
* callback - the signal can be emitted by updating MxAdjustment, but
* calling the callback now would be a disaster since we don't have updated
* anchor yet
*/
......@@ -488,7 +489,7 @@ champlain_view_get_property (GObject *object,
case PROP_DECEL_RATE:
{
gdouble decel = 0.0;
g_object_get (priv->finger_scroll, "decel-rate", &decel, NULL);
g_object_get (priv->finger_scroll, "deceleration", &decel, NULL);
g_value_set_double (value, decel);
break;
}
......@@ -640,14 +641,14 @@ champlain_view_dispose (GObject *object)
if (priv->finger_scroll != NULL)
{
tidy_finger_scroll_stop (TIDY_FINGER_SCROLL (priv->finger_scroll));
mx_kinetic_scroll_view_stop (MX_KINETIC_SCROLL_VIEW (priv->finger_scroll));
g_object_unref (priv->finger_scroll);
priv->finger_scroll = NULL;
}
if (priv->viewport != NULL)
{
tidy_viewport_stop (TIDY_VIEWPORT (priv->viewport));
// mx_viewport_stop (MX_VIEWPORT (priv->viewport));
g_object_unref (priv->viewport);
priv->viewport = NULL;
}
......@@ -1385,8 +1386,21 @@ champlain_view_init (ChamplainView *view)
priv->user_layers = g_object_ref (clutter_group_new ());
clutter_actor_show (priv->user_layers);
priv->viewport_container = g_object_ref (clutter_group_new ());
clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport_container),
priv->map_layer);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport_container),
priv->polygon_layer);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport_container),
priv->user_layers);
clutter_actor_show (priv->viewport_container);
/* Setup viewport */
priv->viewport = g_object_ref (tidy_viewport_new ());
priv->viewport = g_object_ref (mx_viewport_new ());
mx_bin_set_child (MX_BIN (priv->viewport), priv->viewport_container);
g_object_set (G_OBJECT (priv->viewport), "sync-adjustments", FALSE, NULL);
g_signal_connect (priv->viewport, "notify::x-origin",
......@@ -1394,18 +1408,11 @@ champlain_view_init (ChamplainView *view)
g_signal_connect (priv->viewport, "notify::y-origin",
G_CALLBACK (viewport_pos_changed_cb), view);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport),
priv->map_layer);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport),
priv->polygon_layer);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->viewport),
priv->user_layers);
clutter_actor_raise (priv->polygon_layer, priv->map_layer);
clutter_actor_raise (priv->user_layers, priv->map_layer);
/* Setup finger scroll */
priv->finger_scroll = g_object_ref (tidy_finger_scroll_new (priv->scroll_mode));
priv->finger_scroll = g_object_ref (mx_kinetic_scroll_view_new ());
g_signal_connect (priv->finger_scroll, "scroll-event",
G_CALLBACK (scroll_event), view);
......@@ -1455,7 +1462,7 @@ viewport_pos_changed_cb (G_GNUC_UNUSED GObject *gobject,
ChamplainViewPrivate *priv = view->priv;
gfloat x, y;
tidy_viewport_get_origin (TIDY_VIEWPORT (priv->viewport), &x, &y, NULL);
mx_viewport_get_origin (MX_VIEWPORT (priv->viewport), &x, &y, NULL);
if (fabs (x - priv->viewport_size.x) > 100 ||
fabs (y - priv->viewport_size.y) > 100 ||
......@@ -2624,7 +2631,7 @@ champlain_view_set_decel_rate (ChamplainView *view,
g_return_if_fail (CHAMPLAIN_IS_VIEW (view) &&
rate < 2.0 && rate > 1.0001);
g_object_set (view->priv->finger_scroll, "decel-rate", rate, NULL);
g_object_set (view->priv->finger_scroll, "deceleration", rate, NULL);
}
......@@ -2649,8 +2656,8 @@ champlain_view_set_scroll_mode (ChamplainView *view,
priv->scroll_mode = mode;
g_object_set (G_OBJECT (priv->finger_scroll), "mode",
priv->scroll_mode, NULL);
// g_object_set (G_OBJECT (priv->finger_scroll), "mode",
// priv->scroll_mode, NULL);
}
......@@ -3062,7 +3069,7 @@ champlain_view_get_decel_rate (ChamplainView *view)
g_return_val_if_fail (CHAMPLAIN_IS_VIEW (view), 0.0);
gdouble decel = 0.0;
g_object_get (view->priv->finger_scroll, "decel-rate", &decel, NULL);
g_object_get (view->priv->finger_scroll, "deceleration", &decel, NULL);
return decel;
}
......
......@@ -214,7 +214,7 @@ AC_CONFIG_FILES([build/Makefile
champlain/Makefile
champlain/champlain-version.h
demos/Makefile
tidy/Makefile
mx/Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/version.xml
......
BUILT_SOURCES =
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
mx_headers_public = \
$(srcdir)/mx-draggable.h \
$(srcdir)/mx-viewport.h \
$(srcdir)/mx-kinetic-scroll-view.h \
$(srcdir)/mx-types.h \
$(srcdir)/mx-adjustment.h \
$(srcdir)/mx-bin.h \
$(srcdir)/mx-scrollable.h \
$(srcdir)/mx-private.h
mx_sources = \
$(srcdir)/mx-draggable.c \
$(srcdir)/mx-viewport.c \
$(srcdir)/mx-kinetic-scroll-view.c \
$(srcdir)/mx-adjustment.c \
$(srcdir)/mx-bin.c \
$(srcdir)/mx-scrollable.c
# glib-genmarshal rules
glib_marshal_list = mx-marshal.list
glib_marshal_prefix = _mx_marshal
include $(top_srcdir)/build/Makefile.am.marshal
# glib-mkenums rules
glib_enum_h = mx-enum-types.h
glib_enum_c = mx-enum-types.c
glib_enum_headers = $(mx_headers_public)
include $(top_srcdir)/build/Makefile.am.enums
mx_headers_built = \
mx-enum-types.h \
mx-marshal.h
mx_sources_built = \
mx-enum-types.c \
mx-marshal.c
libchamplainmx_1_0_la_SOURCES = \
$(mx_headers_public) \
$(mx_sources)
nodist_libchamplainmx_1_0_la_SOURCES = \
$(mx_headers_built) \
$(mx_sources_built)
libchamplainmx_1_0_la_LIBADD = $(DEPS_LIBS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
-DPREFIX=\""$(prefix)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DG_DISABLE_DEPRECATED \
-DG_LOG_DOMAIN=\"Mx\" \
$(DEPS_CFLAGS) \
$(MX_DEBUG_CFLAGS) \
$(WARN_CFLAGS)
noinst_LTLIBRARIES = libchamplainmx-1.0.la
This diff is collapsed.
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* mx-adjustment.h: Adjustment object
*
* Copyright 2008 OpenedHand
* Copyright 2009, 2010 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
*
* This program is distributed in the hope 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 program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Chris Lord <chris@openedhand.com>, inspired by GtkAdjustment
* Port to Mx by: Robert Staudinger <robsta@openedhand.com>
*
*/
#ifndef __MX_ADJUSTMENT_H__
#define __MX_ADJUSTMENT_H__
#include <glib-object.h>
#include <clutter/clutter.h>
G_BEGIN_DECLS
#define MX_TYPE_ADJUSTMENT (mx_adjustment_get_type())
#define MX_ADJUSTMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MX_TYPE_ADJUSTMENT, MxAdjustment))
#define MX_IS_ADJUSTMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MX_TYPE_ADJUSTMENT))
#define MX_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MX_TYPE_ADJUSTMENT, MxAdjustmentClass))
#define MX_IS_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MX_TYPE_ADJUSTMENT))
#define MX_ADJUSTMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MX_TYPE_ADJUSTMENT, MxAdjustmentClass))
typedef struct _MxAdjustment MxAdjustment;
typedef struct _MxAdjustmentPrivate MxAdjustmentPrivate;
typedef struct _MxAdjustmentClass MxAdjustmentClass;
/**
* MxAdjustment:
*
* Class for handling an interval between to values. The contents of
* the #MxAdjustment are private and should be accessed using the
* public API.
*/
struct _MxAdjustment
{
/*< private >*/
GObject parent_instance;
MxAdjustmentPrivate *priv;
};
/**
* MxAdjustmentClass
* @changed: Class handler for the ::changed signal.
*
* Base class for #MxAdjustment.
*/
struct _MxAdjustmentClass
{
/*< private >*/
GObjectClass parent_class;
/*< public >*/
void (* changed) (MxAdjustment *adjustment);
/* padding for future expansion */
void (*_padding_0) (void);
void (*_padding_1) (void);
void (*_padding_2) (void);
void (*_padding_3) (void);
void (*_padding_4) (void);
};
GType mx_adjustment_get_type (void) G_GNUC_CONST;
MxAdjustment *mx_adjustment_new (void);
MxAdjustment *mx_adjustment_new_with_values (gdouble value,
gdouble lower,
gdouble upper,
gdouble step_increment,
gdouble page_increment,
gdouble page_size);
gdouble mx_adjustment_get_value (MxAdjustment *adjustment);
void mx_adjustment_set_value (MxAdjustment *adjustment,
gdouble value);
gdouble mx_adjustment_get_lower (MxAdjustment *adjustment);
void mx_adjustment_set_lower (MxAdjustment *adjustment,
gdouble lower);
gdouble mx_adjustment_get_upper (MxAdjustment *adjustment);
void mx_adjustment_set_upper (MxAdjustment *adjustment,
gdouble upper);
gdouble mx_adjustment_get_step_increment (MxAdjustment *adjustment);
void mx_adjustment_set_step_increment (MxAdjustment *adjustment,
gdouble increment);
gdouble mx_adjustment_get_page_increment (MxAdjustment *adjustment);
void mx_adjustment_set_page_increment (MxAdjustment *adjustment,
gdouble increment);
gdouble mx_adjustment_get_page_size (MxAdjustment *adjustment);
void mx_adjustment_set_page_size (MxAdjustment *adjustment,
gdouble page_size);
void mx_adjustment_set_values (MxAdjustment *adjustment,
gdouble value,
gdouble lower,
gdouble upper,
gdouble step_increment,
gdouble page_increment,
gdouble page_size);
void mx_adjustment_get_values (MxAdjustment *adjustment,
gdouble *value,
gdouble *lower,
gdouble *upper,
gdouble *step_increment,
gdouble *page_increment,
gdouble *page_size);
void mx_adjustment_interpolate (MxAdjustment *adjustment,
gdouble value,
guint duration,
gulong mode);
void mx_adjustment_interpolate_relative (MxAdjustment *adjustment,
gdouble offset,
guint duration,
gulong mode);
gboolean mx_adjustment_get_elastic (MxAdjustment *adjustment);
void mx_adjustment_set_elastic (MxAdjustment *adjustment,
gboolean elastic);
gboolean mx_adjustment_get_clamp_value (MxAdjustment *adjustment);
void mx_adjustment_set_clamp_value (MxAdjustment *adjustment,
gboolean clamp);
G_END_DECLS
#endif /* __MX_ADJUSTMENT_H__ */
This diff is collapsed.
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* mx-bin.h: Basic container actor
*
* Copyright 2009, 2008 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
*
* This program is distributed in the hope 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 program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
* Boston, MA 02111-1307, USA.
*
* Written by: Emmanuele Bassi <ebassi@linux.intel.com>
*
*/
#ifndef __MX_BIN_H__
#define __MX_BIN_H__
#include "mx-types.h"
#include <clutter/clutter.h>
G_BEGIN_DECLS
#define MX_TYPE_BIN (mx_bin_get_type ())
#define MX_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MX_TYPE_BIN, MxBin))
#define MX_IS_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MX_TYPE_BIN))
#define MX_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MX_TYPE_BIN, MxBinClass))
#define MX_IS_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MX_TYPE_BIN))
#define MX_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MX_TYPE_BIN, MxBinClass))
typedef struct _MxBin MxBin;
typedef struct _MxBinPrivate MxBinPrivate;
typedef struct _MxBinClass MxBinClass;
/**
* MxBin:
*
* The #MxBin struct contains only private data
*/
struct _MxBin
{
/*< private >*/
ClutterGroup parent_instance;
MxBinPrivate *priv;
};
/**
* MxBinClass:
*
* The #MxBinClass struct contains only private data
*/
struct _MxBinClass
{
/*< private >*/
ClutterGroupClass parent_class;
/* padding for future expansion */
void (*_padding_0) (void);
void (*_padding_1) (void);
void (*_padding_2) (void);
void (*_padding_3) (void);
void (*_padding_4) (void);
};
GType mx_bin_get_type (void) G_GNUC_CONST;
void mx_bin_allocate_child (MxBin *bin,
const ClutterActorBox *box,
ClutterAllocationFlags flags);
void mx_bin_set_child (MxBin *bin,
ClutterActor *child);
ClutterActor *mx_bin_get_child (MxBin *bin);
void mx_bin_set_alignment (MxBin *bin,
MxAlign x_align,
MxAlign y_align);
void mx_bin_get_alignment (MxBin *bin,
MxAlign *x_align,
MxAlign *y_align);
void mx_bin_set_fill (MxBin *bin,
gboolean x_fill,
gboolean y_fill);
void mx_bin_get_fill (MxBin *bin,
gboolean *x_fill,
gboolean *y_fill);
G_END_DECLS
#endif /* __MX_BIN_H__ */
This diff is collapsed.
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* mx-draggable.h: draggable interface
*
* Copyright 2009 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
*
* This program is distributed in the hope 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 program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Written by: Emmanuele Bassi <ebassi@linux.intel.com>
*
*/
#ifndef __MX_DRAGGABLE_H__
#define __MX_DRAGGABLE_H__
#include <glib-object.h>
#include <clutter/clutter.h>
G_BEGIN_DECLS
#define MX_TYPE_DRAGGABLE (mx_draggable_get_type ())
#define MX_DRAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MX_TYPE_DRAGGABLE, MxDraggable))
#define MX_IS_DRAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MX_TYPE_DRAGGABLE))
#define MX_DRAGGABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MX_TYPE_DRAGGABLE, MxDraggableIface))
/**
* MxDraggable:
*
* This is an opaque structure whose members cannot be directly accessed.
*/
typedef struct _MxDraggable MxDraggable; /* dummy typedef */
typedef struct _MxDraggableIface MxDraggableIface;
typedef enum {
MX_DRAG_AXIS_NONE,
MX_DRAG_AXIS_X,
MX_DRAG_AXIS_Y
} MxDragAxis;
#if 0
/*
typedef enum {
MX_DISABLE_CONTAINMENT,
MX_CONTAIN_IN_STAGE,
MX_CONTAIN_IN_PARENT,
MX_CONTAIN_IN_AREA
} MxDragContainment;
*/
#endif
/**
* MxDraggableIface:
* @enable: virtual function called when enabling a #MxDraggable; MX
* already provides a default implementation
* @disable: virtual function called when disabling a #MxDraggable; MX
* already provides a default implementation
* @drag_begin: class handler for the #MxDraggable::drag-begin signal
* @drag_motion: class handler for the #MxDraggable::drag-motion signal
* @drag_end: class handler for the #MxDraggable::drag-end signal
*
* Interface for draggable #ClutterActor<!-- -->s.
*/
struct _MxDraggableIface
{
/*< private >*/
GTypeInterface g_iface;
/*< public >*/
/* vfuncs, not signals */
void (* enable) (MxDraggable *draggable);
void (* disable) (MxDraggable *draggable);
/* signals */
void (* drag_begin) (MxDraggable *draggable,
gfloat event_x,
gfloat event_y,
gint event_button,
ClutterModifierType modifiers);
void (* drag_motion) (MxDraggable *draggable,
gfloat delta_x,
gfloat delta_y);
void (* drag_end) (MxDraggable *draggable,
gfloat event_x,
gfloat event_y);
};
GType mx_draggable_get_type (void) G_GNUC_CONST;
void mx_draggable_set_axis (MxDraggable *draggable,
MxDragAxis axis);
MxDragAxis mx_draggable_get_axis (MxDraggable *draggable);
void mx_draggable_set_drag_threshold (MxDraggable *draggable,
guint threshold);
guint mx_draggable_get_drag_threshold (MxDraggable *draggable);
#if 0
void mx_draggable_set_containment_type (MxDraggable *draggable,
MxDragContainment containment);
MxDragContainment mx_draggable_get_containment_type (MxDraggable *draggable);
void mx_draggable_set_containment_area (MxDraggable *draggable,
gfloat x_1,
gfloat y_1,
gfloat x_2,
gfloat y_2);
void mx_draggable_get_containment_area (MxDraggable *draggable,
gfloat *x_1,
gfloat *y_1,
gfloat *x_2,
gfloat *y_2);
#endif
void mx_draggable_set_drag_actor (MxDraggable *draggable,
ClutterActor *actor);
ClutterActor * mx_draggable_get_drag_actor (MxDraggable *draggable);
void mx_draggable_disable (MxDraggable *draggable);
void mx_draggable_enable (MxDraggable *draggable);
gboolean mx_draggable_is_enabled (MxDraggable *draggable);
G_END_DECLS
#endif /* __MX_DRAGGABLE_H__ */
/*** BEGIN file-header ***/
#include "tidy-enum-types.h"
#include "mx-enum-types.h"
/*** END file-header ***/
/*** BEGIN file-production ***/
......
/*** BEGIN file-header ***/
#ifndef __TIDY_ENUM_TYPES_H__
#define __TIDY_ENUM_TYPES_H__
#ifndef __MX_ENUM_TYPES_H__
#define __MX_ENUM_TYPES_H__
#include <glib-object.h>
......@@ -15,11 +15,11 @@ G_BEGIN_DECLS
/*** BEGIN file-tail ***/
G_END_DECLS
#endif /* !__TIDY_ENUM_TYPES_H__ */
#endif /* !__MX_ENUM_TYPES_H__ */
/*** END file-tail ***/
/*** BEGIN value-header ***/
GType @enum_name@_get_type (void) G_GNUC_CONST;
#define TIDY_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
#define MX_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
/*** END value-header ***/
This diff is collapsed.
/* mx-kinetic-scroll-view.h: Kinetic scrolling container actor
*
* Copyright (C) 2008 OpenedHand
* Copyright (C) 2010 Intel Corporation.
*
* 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 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