2011-03-09 04:06:44 -05:00
|
|
|
/*
|
|
|
|
* Clutter.
|
|
|
|
*
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Intel Corporation.
|
|
|
|
* Copyright (C) 2011 Robert Bosch Car Multimedia GmbH.
|
|
|
|
*
|
|
|
|
* 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 along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Author:
|
|
|
|
* Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>
|
|
|
|
*/
|
|
|
|
|
2015-07-07 10:51:13 -04:00
|
|
|
#ifndef __CLUTTER_GESTURE_ACTION_H__
|
|
|
|
#define __CLUTTER_GESTURE_ACTION_H__
|
|
|
|
|
2011-03-09 04:06:44 -05:00
|
|
|
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
|
|
|
#error "Only <clutter/clutter.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <clutter/clutter-action.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define CLUTTER_TYPE_GESTURE_ACTION (clutter_gesture_action_get_type ())
|
|
|
|
#define CLUTTER_GESTURE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_GESTURE_ACTION, ClutterGestureAction))
|
|
|
|
#define CLUTTER_IS_GESTURE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_GESTURE_ACTION))
|
|
|
|
#define CLUTTER_GESTURE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_GESTURE_ACTION, ClutterGestureActionClass))
|
|
|
|
#define CLUTTER_IS_GESTURE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_GESTURE_ACTION))
|
2012-09-05 11:21:14 -04:00
|
|
|
#define CLUTTER_GESTURE_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_GESTURE_ACTION, ClutterGestureActionClass))
|
2011-03-09 04:06:44 -05:00
|
|
|
|
|
|
|
typedef struct _ClutterGestureAction ClutterGestureAction;
|
|
|
|
typedef struct _ClutterGestureActionPrivate ClutterGestureActionPrivate;
|
|
|
|
typedef struct _ClutterGestureActionClass ClutterGestureActionClass;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ClutterGestureAction:
|
|
|
|
*
|
2014-03-18 10:14:22 -04:00
|
|
|
* The #ClutterGestureAction structure contains
|
2011-03-09 04:06:44 -05:00
|
|
|
* only private data and should be accessed using the provided API
|
|
|
|
*
|
|
|
|
* Since: 1.8
|
|
|
|
*/
|
|
|
|
struct _ClutterGestureAction
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
ClutterAction parent_instance;
|
|
|
|
|
|
|
|
ClutterGestureActionPrivate *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ClutterGestureActionClass:
|
|
|
|
* @gesture_begin: class handler for the #ClutterGestureAction::gesture-begin signal
|
2012-04-19 11:00:23 -04:00
|
|
|
* @gesture_progress: class handler for the #ClutterGestureAction::gesture-progress signal
|
2011-06-13 10:36:07 -04:00
|
|
|
* @gesture_end: class handler for the #ClutterGestureAction::gesture-end signal
|
|
|
|
* @gesture_cancel: class handler for the #ClutterGestureAction::gesture-cancel signal
|
2012-09-05 10:47:25 -04:00
|
|
|
* @gesture_prepare: virtual function called before emitting the
|
|
|
|
* #ClutterGestureAction::gesture-cancel signal
|
2011-06-13 10:36:07 -04:00
|
|
|
*
|
2014-03-18 10:14:22 -04:00
|
|
|
* The #ClutterGestureClass structure contains only
|
2011-06-13 10:36:07 -04:00
|
|
|
* private data.
|
2011-03-09 04:06:44 -05:00
|
|
|
*
|
|
|
|
* Since: 1.8
|
|
|
|
*/
|
|
|
|
struct _ClutterGestureActionClass
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
ClutterActionClass parent_class;
|
|
|
|
|
|
|
|
/*< public >*/
|
|
|
|
gboolean (* gesture_begin) (ClutterGestureAction *action,
|
|
|
|
ClutterActor *actor);
|
|
|
|
gboolean (* gesture_progress) (ClutterGestureAction *action,
|
|
|
|
ClutterActor *actor);
|
2011-06-10 09:32:00 -04:00
|
|
|
void (* gesture_end) (ClutterGestureAction *action,
|
2011-03-09 04:06:44 -05:00
|
|
|
ClutterActor *actor);
|
2011-06-10 09:32:00 -04:00
|
|
|
void (* gesture_cancel) (ClutterGestureAction *action,
|
2011-03-09 04:06:44 -05:00
|
|
|
ClutterActor *actor);
|
2012-09-05 10:47:25 -04:00
|
|
|
gboolean (* gesture_prepare) (ClutterGestureAction *action,
|
|
|
|
ClutterActor *actor);
|
2011-03-09 04:06:44 -05:00
|
|
|
|
|
|
|
/*< private >*/
|
|
|
|
void (* _clutter_gesture_action1) (void);
|
|
|
|
void (* _clutter_gesture_action2) (void);
|
|
|
|
void (* _clutter_gesture_action3) (void);
|
|
|
|
void (* _clutter_gesture_action4) (void);
|
|
|
|
void (* _clutter_gesture_action5) (void);
|
|
|
|
void (* _clutter_gesture_action6) (void);
|
|
|
|
};
|
|
|
|
|
2014-03-17 14:19:52 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_8
|
2011-06-10 09:32:00 -04:00
|
|
|
GType clutter_gesture_action_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2014-03-17 14:19:52 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_8
|
2012-08-31 06:50:12 -04:00
|
|
|
ClutterAction * clutter_gesture_action_new (void);
|
|
|
|
|
2014-03-17 14:19:52 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_8
|
2012-08-31 06:50:12 -04:00
|
|
|
gint clutter_gesture_action_get_n_touch_points (ClutterGestureAction *action);
|
2014-03-17 14:19:52 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_8
|
2012-08-31 06:50:12 -04:00
|
|
|
void clutter_gesture_action_set_n_touch_points (ClutterGestureAction *action,
|
|
|
|
gint nb_points);
|
2014-03-17 14:19:52 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_8
|
2012-08-31 06:50:12 -04:00
|
|
|
void clutter_gesture_action_get_press_coords (ClutterGestureAction *action,
|
2012-11-28 16:25:55 -05:00
|
|
|
guint point,
|
2012-08-31 06:50:12 -04:00
|
|
|
gfloat *press_x,
|
|
|
|
gfloat *press_y);
|
2014-03-17 14:19:52 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_8
|
2012-08-31 06:50:12 -04:00
|
|
|
void clutter_gesture_action_get_motion_coords (ClutterGestureAction *action,
|
2012-11-28 16:25:55 -05:00
|
|
|
guint point,
|
2012-08-31 06:50:12 -04:00
|
|
|
gfloat *motion_x,
|
|
|
|
gfloat *motion_y);
|
2012-08-25 10:04:24 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_12
|
2012-08-31 06:50:12 -04:00
|
|
|
gfloat clutter_gesture_action_get_motion_delta (ClutterGestureAction *action,
|
2012-11-28 16:25:55 -05:00
|
|
|
guint point,
|
2012-08-31 06:50:12 -04:00
|
|
|
gfloat *delta_x,
|
|
|
|
gfloat *delta_y);
|
2014-03-17 14:19:52 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_8
|
2012-08-31 06:50:12 -04:00
|
|
|
void clutter_gesture_action_get_release_coords (ClutterGestureAction *action,
|
2012-11-28 16:25:55 -05:00
|
|
|
guint point,
|
2012-08-31 06:50:12 -04:00
|
|
|
gfloat *release_x,
|
|
|
|
gfloat *release_y);
|
2012-08-25 10:04:24 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_12
|
2012-08-31 06:50:12 -04:00
|
|
|
gfloat clutter_gesture_action_get_velocity (ClutterGestureAction *action,
|
2012-11-28 16:25:55 -05:00
|
|
|
guint point,
|
2012-08-31 06:50:12 -04:00
|
|
|
gfloat *velocity_x,
|
|
|
|
gfloat *velocity_y);
|
|
|
|
|
|
|
|
CLUTTER_AVAILABLE_IN_1_12
|
|
|
|
guint clutter_gesture_action_get_n_current_points (ClutterGestureAction *action);
|
|
|
|
|
|
|
|
CLUTTER_AVAILABLE_IN_1_12
|
|
|
|
ClutterEventSequence * clutter_gesture_action_get_sequence (ClutterGestureAction *action,
|
|
|
|
guint point);
|
|
|
|
|
|
|
|
CLUTTER_AVAILABLE_IN_1_12
|
|
|
|
ClutterInputDevice * clutter_gesture_action_get_device (ClutterGestureAction *action,
|
|
|
|
guint point);
|
|
|
|
|
2012-10-08 11:44:13 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_14
|
|
|
|
const ClutterEvent * clutter_gesture_action_get_last_event (ClutterGestureAction *action,
|
|
|
|
guint point);
|
|
|
|
|
2012-08-31 06:50:12 -04:00
|
|
|
CLUTTER_AVAILABLE_IN_1_12
|
|
|
|
void clutter_gesture_action_cancel (ClutterGestureAction *action);
|
2011-06-10 09:32:00 -04:00
|
|
|
|
2013-12-05 09:04:10 -05:00
|
|
|
CLUTTER_AVAILABLE_IN_1_18
|
|
|
|
void clutter_gesture_action_set_threshold_trigger_edge (ClutterGestureAction *action,
|
|
|
|
ClutterGestureTriggerEdge edge);
|
2014-09-03 09:16:31 -04:00
|
|
|
CLUTTER_DEPRECATED_IN_1_20_FOR(clutter_gesture_action_get_threshold_trigger_edge)
|
|
|
|
ClutterGestureTriggerEdge clutter_gesture_action_get_threshold_trigger_egde (ClutterGestureAction *action);
|
|
|
|
CLUTTER_AVAILABLE_IN_1_20
|
2014-05-21 09:15:01 -04:00
|
|
|
ClutterGestureTriggerEdge clutter_gesture_action_get_threshold_trigger_edge (ClutterGestureAction *action);
|
2013-12-05 09:04:10 -05:00
|
|
|
|
2014-02-12 11:41:03 -05:00
|
|
|
CLUTTER_AVAILABLE_IN_1_18
|
|
|
|
void clutter_gesture_action_set_threshold_trigger_distance (ClutterGestureAction *action,
|
|
|
|
float x,
|
|
|
|
float y);
|
|
|
|
|
|
|
|
CLUTTER_AVAILABLE_IN_1_18
|
|
|
|
void clutter_gesture_action_get_threshold_trigger_distance (ClutterGestureAction *action,
|
|
|
|
float *x,
|
|
|
|
float *y);
|
|
|
|
|
2011-03-09 04:06:44 -05:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __CLUTTER_GESTURE_ACTION_H__ */
|