4 * An OpenGL based 'interactive canvas' library.
6 * Copyright (C) 2010 Intel Corporation.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 * Emmanuele Bassi <ebassi@linux.intel.com>
25 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
26 #error "Only <clutter/clutter.h> can be included directly."
29 #ifndef __CLUTTER_DRAG_ACTION_H__
30 #define __CLUTTER_DRAG_ACTION_H__
32 #include <clutter/clutter-action.h>
33 #include <clutter/clutter-event.h>
37 #define CLUTTER_TYPE_DRAG_ACTION (clutter_drag_action_get_type ())
38 #define CLUTTER_DRAG_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_DRAG_ACTION, ClutterDragAction))
39 #define CLUTTER_IS_DRAG_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_DRAG_ACTION))
40 #define CLUTTER_DRAG_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_DRAG_ACTION, ClutterDragActionClass))
41 #define CLUTTER_IS_DRAG_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_DRAG_ACTION))
42 #define CLUTTER_DRAG_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_DRAG_ACTION, ClutterDragActionClass))
44 typedef struct _ClutterDragAction ClutterDragAction;
45 typedef struct _ClutterDragActionPrivate ClutterDragActionPrivate;
46 typedef struct _ClutterDragActionClass ClutterDragActionClass;
51 * The <structname>ClutterDragAction</structname> structure contains only
52 * private data and should be accessed using the provided API
56 struct _ClutterDragAction
59 ClutterAction parent_instance;
61 ClutterDragActionPrivate *priv;
65 * ClutterDragActionClass:
66 * @drag_begin: class handler of the #ClutterDragAction::drag-begin signal
67 * @drag_motion: class handler of the #ClutterDragAction::drag-motion signal
68 * @drag_end: class handler of the #ClutterDragAction::drag-end signal
70 * The <structname>ClutterDragActionClass</structname> structure contains
75 struct _ClutterDragActionClass
78 ClutterActionClass parent_class;
81 void (* drag_begin) (ClutterDragAction *action,
85 ClutterModifierType modifiers);
86 void (* drag_motion) (ClutterDragAction *action,
90 void (* drag_end) (ClutterDragAction *action,
94 ClutterModifierType modifiers);
97 void (* _clutter_drag_action1) (void);
98 void (* _clutter_drag_action2) (void);
99 void (* _clutter_drag_action3) (void);
100 void (* _clutter_drag_action4) (void);
101 void (* _clutter_drag_action5) (void);
104 GType clutter_drag_action_get_type (void) G_GNUC_CONST;
106 ClutterAction * clutter_drag_action_new (void);
108 void clutter_drag_action_set_drag_threshold (ClutterDragAction *action,
111 void clutter_drag_action_get_drag_threshold (ClutterDragAction *action,
114 void clutter_drag_action_set_drag_handle (ClutterDragAction *action,
115 ClutterActor *handle);
116 ClutterActor * clutter_drag_action_get_drag_handle (ClutterDragAction *action);
117 void clutter_drag_action_set_drag_axis (ClutterDragAction *action,
118 ClutterDragAxis axis);
119 ClutterDragAxis clutter_drag_action_get_drag_axis (ClutterDragAction *action);
121 void clutter_drag_action_get_press_coords (ClutterDragAction *action,
124 void clutter_drag_action_get_motion_coords (ClutterDragAction *action,
130 #endif /* __CLUTTER_DRAG_ACTION_H__ */