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 | |
30 | G_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 | |
39 | typedef struct _GtkGesture GtkGesture; |
40 | typedef struct _GtkGestureClass GtkGestureClass; |
41 | |
42 | GDK_AVAILABLE_IN_3_14 |
43 | GType gtk_gesture_get_type (void) G_GNUC_CONST; |
44 | |
45 | GDK_AVAILABLE_IN_3_14 |
46 | GdkDevice * gtk_gesture_get_device (GtkGesture *gesture); |
47 | |
48 | GDK_AVAILABLE_IN_3_14 |
49 | gboolean gtk_gesture_set_state (GtkGesture *gesture, |
50 | GtkEventSequenceState state); |
51 | GDK_AVAILABLE_IN_3_14 |
52 | GtkEventSequenceState |
53 | gtk_gesture_get_sequence_state (GtkGesture *gesture, |
54 | GdkEventSequence *sequence); |
55 | GDK_AVAILABLE_IN_3_14 |
56 | gboolean gtk_gesture_set_sequence_state (GtkGesture *gesture, |
57 | GdkEventSequence *sequence, |
58 | GtkEventSequenceState state); |
59 | GDK_AVAILABLE_IN_3_14 |
60 | GList * gtk_gesture_get_sequences (GtkGesture *gesture); |
61 | |
62 | GDK_AVAILABLE_IN_3_14 |
63 | GdkEventSequence * gtk_gesture_get_last_updated_sequence |
64 | (GtkGesture *gesture); |
65 | |
66 | GDK_AVAILABLE_IN_3_14 |
67 | gboolean gtk_gesture_handles_sequence (GtkGesture *gesture, |
68 | GdkEventSequence *sequence); |
69 | GDK_AVAILABLE_IN_3_14 |
70 | const GdkEvent * |
71 | gtk_gesture_get_last_event (GtkGesture *gesture, |
72 | GdkEventSequence *sequence); |
73 | GDK_AVAILABLE_IN_3_14 |
74 | gboolean gtk_gesture_get_point (GtkGesture *gesture, |
75 | GdkEventSequence *sequence, |
76 | gdouble *x, |
77 | gdouble *y); |
78 | GDK_AVAILABLE_IN_3_14 |
79 | gboolean gtk_gesture_get_bounding_box (GtkGesture *gesture, |
80 | GdkRectangle *rect); |
81 | GDK_AVAILABLE_IN_3_14 |
82 | gboolean gtk_gesture_get_bounding_box_center |
83 | (GtkGesture *gesture, |
84 | gdouble *x, |
85 | gdouble *y); |
86 | GDK_AVAILABLE_IN_3_14 |
87 | gboolean gtk_gesture_is_active (GtkGesture *gesture); |
88 | |
89 | GDK_AVAILABLE_IN_3_14 |
90 | gboolean gtk_gesture_is_recognized (GtkGesture *gesture); |
91 | |
92 | GDK_AVAILABLE_IN_3_14 |
93 | GdkWindow * gtk_gesture_get_window (GtkGesture *gesture); |
94 | |
95 | GDK_AVAILABLE_IN_3_14 |
96 | void gtk_gesture_set_window (GtkGesture *gesture, |
97 | GdkWindow *window); |
98 | |
99 | GDK_AVAILABLE_IN_3_14 |
100 | void gtk_gesture_group (GtkGesture *group_gesture, |
101 | GtkGesture *gesture); |
102 | GDK_AVAILABLE_IN_3_14 |
103 | void gtk_gesture_ungroup (GtkGesture *gesture); |
104 | |
105 | GDK_AVAILABLE_IN_3_14 |
106 | GList * gtk_gesture_get_group (GtkGesture *gesture); |
107 | |
108 | GDK_AVAILABLE_IN_3_14 |
109 | gboolean gtk_gesture_is_grouped_with (GtkGesture *gesture, |
110 | GtkGesture *other); |
111 | |
112 | G_END_DECLS |
113 | |
114 | #endif /* __GTK_GESTURE_H__ */ |
115 | |