1/* GTK - The GIMP Toolkit
2 * Copyright (C) 2012, One Laptop Per Child.
3 * Copyright (C) 2014, Red Hat, Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * Author(s): Carlos Garnacho <carlosg@gnome.org>
19 */
20#ifndef __GTK_GESTURE_H__
21#define __GTK_GESTURE_H__
22
23#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24#error "Only <gtk/gtk.h> can be included directly."
25#endif
26
27#include <gtk/gtkeventcontroller.h>
28#include <gtk/gtkenums.h>
29
30G_BEGIN_DECLS
31
32#define GTK_TYPE_GESTURE (gtk_gesture_get_type ())
33#define GTK_GESTURE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_GESTURE, GtkGesture))
34#define GTK_GESTURE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_GESTURE, GtkGestureClass))
35#define GTK_IS_GESTURE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_GESTURE))
36#define GTK_IS_GESTURE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_GESTURE))
37#define GTK_GESTURE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_GESTURE, GtkGestureClass))
38
39typedef struct _GtkGesture GtkGesture;
40typedef struct _GtkGestureClass GtkGestureClass;
41
42GDK_AVAILABLE_IN_3_14
43GType gtk_gesture_get_type (void) G_GNUC_CONST;
44
45GDK_AVAILABLE_IN_3_14
46GdkDevice * gtk_gesture_get_device (GtkGesture *gesture);
47
48GDK_AVAILABLE_IN_3_14
49gboolean gtk_gesture_set_state (GtkGesture *gesture,
50 GtkEventSequenceState state);
51GDK_AVAILABLE_IN_3_14
52GtkEventSequenceState
53 gtk_gesture_get_sequence_state (GtkGesture *gesture,
54 GdkEventSequence *sequence);
55GDK_AVAILABLE_IN_3_14
56gboolean gtk_gesture_set_sequence_state (GtkGesture *gesture,
57 GdkEventSequence *sequence,
58 GtkEventSequenceState state);
59GDK_AVAILABLE_IN_3_14
60GList * gtk_gesture_get_sequences (GtkGesture *gesture);
61
62GDK_AVAILABLE_IN_3_14
63GdkEventSequence * gtk_gesture_get_last_updated_sequence
64 (GtkGesture *gesture);
65
66GDK_AVAILABLE_IN_3_14
67gboolean gtk_gesture_handles_sequence (GtkGesture *gesture,
68 GdkEventSequence *sequence);
69GDK_AVAILABLE_IN_3_14
70const GdkEvent *
71 gtk_gesture_get_last_event (GtkGesture *gesture,
72 GdkEventSequence *sequence);
73GDK_AVAILABLE_IN_3_14
74gboolean gtk_gesture_get_point (GtkGesture *gesture,
75 GdkEventSequence *sequence,
76 gdouble *x,
77 gdouble *y);
78GDK_AVAILABLE_IN_3_14
79gboolean gtk_gesture_get_bounding_box (GtkGesture *gesture,
80 GdkRectangle *rect);
81GDK_AVAILABLE_IN_3_14
82gboolean gtk_gesture_get_bounding_box_center
83 (GtkGesture *gesture,
84 gdouble *x,
85 gdouble *y);
86GDK_AVAILABLE_IN_3_14
87gboolean gtk_gesture_is_active (GtkGesture *gesture);
88
89GDK_AVAILABLE_IN_3_14
90gboolean gtk_gesture_is_recognized (GtkGesture *gesture);
91
92GDK_AVAILABLE_IN_3_14
93GdkWindow * gtk_gesture_get_window (GtkGesture *gesture);
94
95GDK_AVAILABLE_IN_3_14
96void gtk_gesture_set_window (GtkGesture *gesture,
97 GdkWindow *window);
98
99GDK_AVAILABLE_IN_3_14
100void gtk_gesture_group (GtkGesture *group_gesture,
101 GtkGesture *gesture);
102GDK_AVAILABLE_IN_3_14
103void gtk_gesture_ungroup (GtkGesture *gesture);
104
105GDK_AVAILABLE_IN_3_14
106GList * gtk_gesture_get_group (GtkGesture *gesture);
107
108GDK_AVAILABLE_IN_3_14
109gboolean gtk_gesture_is_grouped_with (GtkGesture *gesture,
110 GtkGesture *other);
111
112G_END_DECLS
113
114#endif /* __GTK_GESTURE_H__ */
115

source code of include/gtk-3.0/gtk/gtkgesture.h