1 | /* GDK - The GIMP Drawing Kit |
2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Lesser General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Lesser General Public |
15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
16 | */ |
17 | |
18 | /* |
19 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS |
20 | * file for a list of people on the GTK+ Team. See the ChangeLog |
21 | * files for a list of changes. These files are distributed with |
22 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
23 | */ |
24 | |
25 | #ifndef __GDK_EVENTS_H__ |
26 | #define __GDK_EVENTS_H__ |
27 | |
28 | #if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION) |
29 | #error "Only <gdk/gdk.h> can be included directly." |
30 | #endif |
31 | |
32 | #include <gdk/gdkdevice.h> |
33 | #include <gdk/gdkdevicetool.h> |
34 | #include <gdk/gdkdrag.h> |
35 | #include <gdk/gdkenums.h> |
36 | #include <gdk/gdktypes.h> |
37 | #include <gdk/gdkversionmacros.h> |
38 | |
39 | G_BEGIN_DECLS |
40 | |
41 | |
42 | #define GDK_TYPE_EVENT (gdk_event_get_type ()) |
43 | #define GDK_TYPE_EVENT_SEQUENCE (gdk_event_sequence_get_type ()) |
44 | |
45 | #define GDK_IS_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_EVENT)) |
46 | #define GDK_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_EVENT, GdkEvent)) |
47 | |
48 | #define GDK_IS_EVENT_TYPE(event, type) (gdk_event_get_event_type ((event)) == (type)) |
49 | |
50 | /** |
51 | * GDK_PRIORITY_EVENTS: (value 0) |
52 | * |
53 | * This is the priority that events from the X server are given in the main loop. |
54 | */ |
55 | #define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT) |
56 | |
57 | /** |
58 | * GDK_PRIORITY_REDRAW: (value 120) |
59 | * |
60 | * This is the priority that the idle handler processing surface updates |
61 | * is given in the main loop. |
62 | */ |
63 | #define GDK_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 20) |
64 | |
65 | /** |
66 | * GDK_EVENT_PROPAGATE: |
67 | * |
68 | * Use this macro as the return value for continuing the propagation of |
69 | * an event handler. |
70 | */ |
71 | #define GDK_EVENT_PROPAGATE (FALSE) |
72 | |
73 | /** |
74 | * GDK_EVENT_STOP: |
75 | * |
76 | * Use this macro as the return value for stopping the propagation of |
77 | * an event handler. |
78 | */ |
79 | #define GDK_EVENT_STOP (TRUE) |
80 | |
81 | /** |
82 | * GDK_BUTTON_PRIMARY: |
83 | * |
84 | * The primary button. This is typically the left mouse button, or the |
85 | * right button in a left-handed setup. |
86 | */ |
87 | #define GDK_BUTTON_PRIMARY (1) |
88 | |
89 | /** |
90 | * GDK_BUTTON_MIDDLE: |
91 | * |
92 | * The middle button. |
93 | */ |
94 | #define GDK_BUTTON_MIDDLE (2) |
95 | |
96 | /** |
97 | * GDK_BUTTON_SECONDARY: |
98 | * |
99 | * The secondary button. This is typically the right mouse button, or the |
100 | * left button in a left-handed setup. |
101 | */ |
102 | #define GDK_BUTTON_SECONDARY (3) |
103 | |
104 | typedef struct _GdkEventSequence GdkEventSequence; |
105 | typedef struct _GdkEvent GdkEvent; |
106 | |
107 | #define GDK_TYPE_BUTTON_EVENT (gdk_button_event_get_type()) |
108 | #define GDK_TYPE_CROSSING_EVENT (gdk_crossing_event_get_type()) |
109 | #define GDK_TYPE_DELETE_EVENT (gdk_delete_event_get_type()) |
110 | #define GDK_TYPE_DND_EVENT (gdk_dnd_event_get_type()) |
111 | #define GDK_TYPE_FOCUS_EVENT (gdk_focus_event_get_type()) |
112 | #define GDK_TYPE_GRAB_BROKEN_EVENT (gdk_grab_broken_event_get_type()) |
113 | #define GDK_TYPE_KEY_EVENT (gdk_key_event_get_type()) |
114 | #define GDK_TYPE_MOTION_EVENT (gdk_motion_event_get_type()) |
115 | #define GDK_TYPE_PAD_EVENT (gdk_pad_event_get_type()) |
116 | #define GDK_TYPE_PROXIMITY_EVENT (gdk_proximity_event_get_type()) |
117 | #define GDK_TYPE_SCROLL_EVENT (gdk_scroll_event_get_type()) |
118 | #define GDK_TYPE_TOUCH_EVENT (gdk_touch_event_get_type()) |
119 | #define GDK_TYPE_TOUCHPAD_EVENT (gdk_touchpad_event_get_type()) |
120 | |
121 | typedef struct _GdkButtonEvent GdkButtonEvent; |
122 | typedef struct _GdkCrossingEvent GdkCrossingEvent; |
123 | typedef struct _GdkDeleteEvent GdkDeleteEvent; |
124 | typedef struct _GdkDNDEvent GdkDNDEvent; |
125 | typedef struct _GdkFocusEvent GdkFocusEvent; |
126 | typedef struct _GdkGrabBrokenEvent GdkGrabBrokenEvent; |
127 | typedef struct _GdkKeyEvent GdkKeyEvent; |
128 | typedef struct _GdkMotionEvent GdkMotionEvent; |
129 | typedef struct _GdkPadEvent GdkPadEvent; |
130 | typedef struct _GdkProximityEvent GdkProximityEvent; |
131 | typedef struct _GdkScrollEvent GdkScrollEvent; |
132 | typedef struct _GdkTouchEvent GdkTouchEvent; |
133 | typedef struct _GdkTouchpadEvent GdkTouchpadEvent; |
134 | |
135 | /** |
136 | * GdkEventType: |
137 | * @GDK_DELETE: the window manager has requested that the toplevel surface be |
138 | * hidden or destroyed, usually when the user clicks on a special icon in the |
139 | * title bar. |
140 | * @GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved. |
141 | * @GDK_BUTTON_PRESS: a mouse button has been pressed. |
142 | * @GDK_BUTTON_RELEASE: a mouse button has been released. |
143 | * @GDK_KEY_PRESS: a key has been pressed. |
144 | * @GDK_KEY_RELEASE: a key has been released. |
145 | * @GDK_ENTER_NOTIFY: the pointer has entered the surface. |
146 | * @GDK_LEAVE_NOTIFY: the pointer has left the surface. |
147 | * @GDK_FOCUS_CHANGE: the keyboard focus has entered or left the surface. |
148 | * @GDK_PROXIMITY_IN: an input device has moved into contact with a sensing |
149 | * surface (e.g. a touchscreen or graphics tablet). |
150 | * @GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing |
151 | * surface. |
152 | * @GDK_DRAG_ENTER: the mouse has entered the surface while a drag is in progress. |
153 | * @GDK_DRAG_LEAVE: the mouse has left the surface while a drag is in progress. |
154 | * @GDK_DRAG_MOTION: the mouse has moved in the surface while a drag is in |
155 | * progress. |
156 | * @GDK_DROP_START: a drop operation onto the surface has started. |
157 | * @GDK_SCROLL: the scroll wheel was turned |
158 | * @GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. |
159 | * @GDK_TOUCH_BEGIN: A new touch event sequence has just started. |
160 | * @GDK_TOUCH_UPDATE: A touch event sequence has been updated. |
161 | * @GDK_TOUCH_END: A touch event sequence has finished. |
162 | * @GDK_TOUCH_CANCEL: A touch event sequence has been canceled. |
163 | * @GDK_TOUCHPAD_SWIPE: A touchpad swipe gesture event, the current state |
164 | * is determined by its phase field. |
165 | * @GDK_TOUCHPAD_PINCH: A touchpad pinch gesture event, the current state |
166 | * is determined by its phase field. |
167 | * @GDK_PAD_BUTTON_PRESS: A tablet pad button press event. |
168 | * @GDK_PAD_BUTTON_RELEASE: A tablet pad button release event. |
169 | * @GDK_PAD_RING: A tablet pad axis event from a "ring". |
170 | * @GDK_PAD_STRIP: A tablet pad axis event from a "strip". |
171 | * @GDK_PAD_GROUP_MODE: A tablet pad group mode change. |
172 | * @GDK_TOUCHPAD_HOLD: A touchpad hold gesture event, the current state |
173 | * is determined by its phase field. Since: 4.6 |
174 | * @GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. |
175 | * |
176 | * Specifies the type of the event. |
177 | */ |
178 | typedef enum |
179 | { |
180 | GDK_DELETE, |
181 | GDK_MOTION_NOTIFY, |
182 | GDK_BUTTON_PRESS, |
183 | GDK_BUTTON_RELEASE, |
184 | GDK_KEY_PRESS, |
185 | GDK_KEY_RELEASE, |
186 | GDK_ENTER_NOTIFY, |
187 | GDK_LEAVE_NOTIFY, |
188 | GDK_FOCUS_CHANGE, |
189 | GDK_PROXIMITY_IN, |
190 | GDK_PROXIMITY_OUT, |
191 | GDK_DRAG_ENTER, |
192 | GDK_DRAG_LEAVE, |
193 | GDK_DRAG_MOTION, |
194 | GDK_DROP_START, |
195 | GDK_SCROLL, |
196 | GDK_GRAB_BROKEN, |
197 | GDK_TOUCH_BEGIN, |
198 | GDK_TOUCH_UPDATE, |
199 | GDK_TOUCH_END, |
200 | GDK_TOUCH_CANCEL, |
201 | GDK_TOUCHPAD_SWIPE, |
202 | GDK_TOUCHPAD_PINCH, |
203 | GDK_PAD_BUTTON_PRESS, |
204 | GDK_PAD_BUTTON_RELEASE, |
205 | GDK_PAD_RING, |
206 | GDK_PAD_STRIP, |
207 | GDK_PAD_GROUP_MODE, |
208 | GDK_TOUCHPAD_HOLD, |
209 | GDK_EVENT_LAST /* helper variable for decls */ |
210 | } GdkEventType; |
211 | |
212 | /** |
213 | * GdkTouchpadGesturePhase: |
214 | * @GDK_TOUCHPAD_GESTURE_PHASE_BEGIN: The gesture has begun. |
215 | * @GDK_TOUCHPAD_GESTURE_PHASE_UPDATE: The gesture has been updated. |
216 | * @GDK_TOUCHPAD_GESTURE_PHASE_END: The gesture was finished, changes |
217 | * should be permanently applied. |
218 | * @GDK_TOUCHPAD_GESTURE_PHASE_CANCEL: The gesture was cancelled, all |
219 | * changes should be undone. |
220 | * |
221 | * Specifies the current state of a touchpad gesture. |
222 | * |
223 | * All gestures are guaranteed to begin with an event with phase |
224 | * %GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, followed by 0 or several events |
225 | * with phase %GDK_TOUCHPAD_GESTURE_PHASE_UPDATE. |
226 | * |
227 | * A finished gesture may have 2 possible outcomes, an event with phase |
228 | * %GDK_TOUCHPAD_GESTURE_PHASE_END will be emitted when the gesture is |
229 | * considered successful, this should be used as the hint to perform any |
230 | * permanent changes. |
231 | |
232 | * Cancelled gestures may be so for a variety of reasons, due to hardware |
233 | * or the compositor, or due to the gesture recognition layers hinting the |
234 | * gesture did not finish resolutely (eg. a 3rd finger being added during |
235 | * a pinch gesture). In these cases, the last event will report the phase |
236 | * %GDK_TOUCHPAD_GESTURE_PHASE_CANCEL, this should be used as a hint |
237 | * to undo any visible/permanent changes that were done throughout the |
238 | * progress of the gesture. |
239 | */ |
240 | typedef enum |
241 | { |
242 | GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, |
243 | GDK_TOUCHPAD_GESTURE_PHASE_UPDATE, |
244 | GDK_TOUCHPAD_GESTURE_PHASE_END, |
245 | GDK_TOUCHPAD_GESTURE_PHASE_CANCEL |
246 | } GdkTouchpadGesturePhase; |
247 | |
248 | /** |
249 | * GdkScrollDirection: |
250 | * @GDK_SCROLL_UP: the surface is scrolled up. |
251 | * @GDK_SCROLL_DOWN: the surface is scrolled down. |
252 | * @GDK_SCROLL_LEFT: the surface is scrolled to the left. |
253 | * @GDK_SCROLL_RIGHT: the surface is scrolled to the right. |
254 | * @GDK_SCROLL_SMOOTH: the scrolling is determined by the delta values |
255 | * in scroll events. See gdk_scroll_event_get_deltas() |
256 | * |
257 | * Specifies the direction for scroll events. |
258 | */ |
259 | typedef enum |
260 | { |
261 | GDK_SCROLL_UP, |
262 | GDK_SCROLL_DOWN, |
263 | GDK_SCROLL_LEFT, |
264 | GDK_SCROLL_RIGHT, |
265 | GDK_SCROLL_SMOOTH |
266 | } GdkScrollDirection; |
267 | |
268 | /** |
269 | * GdkNotifyType: |
270 | * @GDK_NOTIFY_ANCESTOR: the surface is entered from an ancestor or |
271 | * left towards an ancestor. |
272 | * @GDK_NOTIFY_VIRTUAL: the pointer moves between an ancestor and an |
273 | * inferior of the surface. |
274 | * @GDK_NOTIFY_INFERIOR: the surface is entered from an inferior or |
275 | * left towards an inferior. |
276 | * @GDK_NOTIFY_NONLINEAR: the surface is entered from or left towards |
277 | * a surface which is neither an ancestor nor an inferior. |
278 | * @GDK_NOTIFY_NONLINEAR_VIRTUAL: the pointer moves between two surfaces |
279 | * which are not ancestors of each other and the surface is part of |
280 | * the ancestor chain between one of these surfaces and their least |
281 | * common ancestor. |
282 | * @GDK_NOTIFY_UNKNOWN: an unknown type of enter/leave event occurred. |
283 | * |
284 | * Specifies the kind of crossing for enter and leave events. |
285 | * |
286 | * See the X11 protocol specification of LeaveNotify for |
287 | * full details of crossing event generation. |
288 | */ |
289 | typedef enum |
290 | { |
291 | GDK_NOTIFY_ANCESTOR = 0, |
292 | GDK_NOTIFY_VIRTUAL = 1, |
293 | GDK_NOTIFY_INFERIOR = 2, |
294 | GDK_NOTIFY_NONLINEAR = 3, |
295 | GDK_NOTIFY_NONLINEAR_VIRTUAL = 4, |
296 | GDK_NOTIFY_UNKNOWN = 5 |
297 | } GdkNotifyType; |
298 | |
299 | /** |
300 | * GdkCrossingMode: |
301 | * @GDK_CROSSING_NORMAL: crossing because of pointer motion. |
302 | * @GDK_CROSSING_GRAB: crossing because a grab is activated. |
303 | * @GDK_CROSSING_UNGRAB: crossing because a grab is deactivated. |
304 | * @GDK_CROSSING_GTK_GRAB: crossing because a GTK grab is activated. |
305 | * @GDK_CROSSING_GTK_UNGRAB: crossing because a GTK grab is deactivated. |
306 | * @GDK_CROSSING_STATE_CHANGED: crossing because a GTK widget changed |
307 | * state (e.g. sensitivity). |
308 | * @GDK_CROSSING_TOUCH_BEGIN: crossing because a touch sequence has begun, |
309 | * this event is synthetic as the pointer might have not left the surface. |
310 | * @GDK_CROSSING_TOUCH_END: crossing because a touch sequence has ended, |
311 | * this event is synthetic as the pointer might have not left the surface. |
312 | * @GDK_CROSSING_DEVICE_SWITCH: crossing because of a device switch (i.e. |
313 | * a mouse taking control of the pointer after a touch device), this event |
314 | * is synthetic as the pointer didn’t leave the surface. |
315 | * |
316 | * Specifies the crossing mode for enter and leave events. |
317 | */ |
318 | typedef enum |
319 | { |
320 | GDK_CROSSING_NORMAL, |
321 | GDK_CROSSING_GRAB, |
322 | GDK_CROSSING_UNGRAB, |
323 | GDK_CROSSING_GTK_GRAB, |
324 | GDK_CROSSING_GTK_UNGRAB, |
325 | GDK_CROSSING_STATE_CHANGED, |
326 | GDK_CROSSING_TOUCH_BEGIN, |
327 | GDK_CROSSING_TOUCH_END, |
328 | GDK_CROSSING_DEVICE_SWITCH |
329 | } GdkCrossingMode; |
330 | |
331 | GDK_AVAILABLE_IN_ALL |
332 | GType gdk_event_get_type (void) G_GNUC_CONST; |
333 | GDK_AVAILABLE_IN_ALL |
334 | GType gdk_event_sequence_get_type (void) G_GNUC_CONST; |
335 | |
336 | GDK_AVAILABLE_IN_ALL |
337 | GdkEvent * gdk_event_ref (GdkEvent *event); |
338 | GDK_AVAILABLE_IN_ALL |
339 | void gdk_event_unref (GdkEvent *event); |
340 | |
341 | GDK_AVAILABLE_IN_ALL |
342 | GdkEventType gdk_event_get_event_type (GdkEvent *event); |
343 | |
344 | GDK_AVAILABLE_IN_ALL |
345 | GdkSurface * gdk_event_get_surface (GdkEvent *event); |
346 | |
347 | GDK_AVAILABLE_IN_ALL |
348 | GdkSeat * gdk_event_get_seat (GdkEvent *event); |
349 | |
350 | GDK_AVAILABLE_IN_ALL |
351 | GdkDevice * gdk_event_get_device (GdkEvent *event); |
352 | |
353 | GDK_AVAILABLE_IN_ALL |
354 | GdkDeviceTool * gdk_event_get_device_tool (GdkEvent *event); |
355 | |
356 | GDK_AVAILABLE_IN_ALL |
357 | guint32 gdk_event_get_time (GdkEvent *event); |
358 | |
359 | GDK_AVAILABLE_IN_ALL |
360 | GdkDisplay * gdk_event_get_display (GdkEvent *event); |
361 | |
362 | GDK_AVAILABLE_IN_ALL |
363 | GdkEventSequence * gdk_event_get_event_sequence (GdkEvent *event); |
364 | |
365 | GDK_AVAILABLE_IN_ALL |
366 | GdkModifierType gdk_event_get_modifier_state (GdkEvent *event); |
367 | |
368 | GDK_AVAILABLE_IN_ALL |
369 | gboolean gdk_event_get_position (GdkEvent *event, |
370 | double *x, |
371 | double *y); |
372 | GDK_AVAILABLE_IN_ALL |
373 | gboolean gdk_event_get_axes (GdkEvent *event, |
374 | double **axes, |
375 | guint *n_axes); |
376 | GDK_AVAILABLE_IN_ALL |
377 | gboolean gdk_event_get_axis (GdkEvent *event, |
378 | GdkAxisUse axis_use, |
379 | double *value); |
380 | GDK_AVAILABLE_IN_ALL |
381 | GdkTimeCoord * gdk_event_get_history (GdkEvent *event, |
382 | guint *out_n_coords); |
383 | GDK_AVAILABLE_IN_ALL |
384 | gboolean gdk_event_get_pointer_emulated (GdkEvent *event); |
385 | |
386 | GDK_AVAILABLE_IN_ALL |
387 | GType gdk_button_event_get_type (void) G_GNUC_CONST; |
388 | GDK_AVAILABLE_IN_ALL |
389 | guint gdk_button_event_get_button (GdkEvent *event); |
390 | GDK_AVAILABLE_IN_ALL |
391 | GType gdk_scroll_event_get_type (void) G_GNUC_CONST; |
392 | GDK_AVAILABLE_IN_ALL |
393 | GdkScrollDirection gdk_scroll_event_get_direction (GdkEvent *event); |
394 | GDK_AVAILABLE_IN_ALL |
395 | void gdk_scroll_event_get_deltas (GdkEvent *event, |
396 | double *delta_x, |
397 | double *delta_y); |
398 | |
399 | GDK_AVAILABLE_IN_ALL |
400 | gboolean gdk_scroll_event_is_stop (GdkEvent *event); |
401 | GDK_AVAILABLE_IN_ALL |
402 | GType gdk_key_event_get_type (void) G_GNUC_CONST; |
403 | GDK_AVAILABLE_IN_ALL |
404 | guint gdk_key_event_get_keyval (GdkEvent *event); |
405 | GDK_AVAILABLE_IN_ALL |
406 | guint gdk_key_event_get_keycode (GdkEvent *event); |
407 | GDK_AVAILABLE_IN_ALL |
408 | GdkModifierType gdk_key_event_get_consumed_modifiers (GdkEvent *event); |
409 | GDK_AVAILABLE_IN_ALL |
410 | guint gdk_key_event_get_layout (GdkEvent *event); |
411 | GDK_AVAILABLE_IN_ALL |
412 | guint gdk_key_event_get_level (GdkEvent *event); |
413 | GDK_AVAILABLE_IN_ALL |
414 | gboolean gdk_key_event_is_modifier (GdkEvent *event); |
415 | GDK_AVAILABLE_IN_ALL |
416 | GType gdk_focus_event_get_type (void) G_GNUC_CONST; |
417 | GDK_AVAILABLE_IN_ALL |
418 | gboolean gdk_focus_event_get_in (GdkEvent *event); |
419 | GDK_AVAILABLE_IN_ALL |
420 | GType gdk_touch_event_get_type (void) G_GNUC_CONST; |
421 | GDK_AVAILABLE_IN_ALL |
422 | gboolean gdk_touch_event_get_emulating_pointer (GdkEvent *event); |
423 | GDK_AVAILABLE_IN_ALL |
424 | GType gdk_crossing_event_get_type (void) G_GNUC_CONST; |
425 | GDK_AVAILABLE_IN_ALL |
426 | GdkCrossingMode gdk_crossing_event_get_mode (GdkEvent *event); |
427 | GDK_AVAILABLE_IN_ALL |
428 | GdkNotifyType gdk_crossing_event_get_detail (GdkEvent *event); |
429 | GDK_AVAILABLE_IN_ALL |
430 | gboolean gdk_crossing_event_get_focus (GdkEvent *event); |
431 | GDK_AVAILABLE_IN_ALL |
432 | GType gdk_touchpad_event_get_type (void) G_GNUC_CONST; |
433 | GDK_AVAILABLE_IN_ALL |
434 | GdkTouchpadGesturePhase |
435 | gdk_touchpad_event_get_gesture_phase (GdkEvent *event); |
436 | GDK_AVAILABLE_IN_ALL |
437 | guint gdk_touchpad_event_get_n_fingers (GdkEvent *event); |
438 | GDK_AVAILABLE_IN_ALL |
439 | void gdk_touchpad_event_get_deltas (GdkEvent *event, |
440 | double *dx, |
441 | double *dy); |
442 | GDK_AVAILABLE_IN_ALL |
443 | double gdk_touchpad_event_get_pinch_angle_delta (GdkEvent *event); |
444 | GDK_AVAILABLE_IN_ALL |
445 | double gdk_touchpad_event_get_pinch_scale (GdkEvent *event); |
446 | GDK_AVAILABLE_IN_ALL |
447 | GType gdk_pad_event_get_type (void) G_GNUC_CONST; |
448 | GDK_AVAILABLE_IN_ALL |
449 | guint gdk_pad_event_get_button (GdkEvent *event); |
450 | GDK_AVAILABLE_IN_ALL |
451 | void gdk_pad_event_get_axis_value (GdkEvent *event, |
452 | guint *index, |
453 | double *value); |
454 | GDK_AVAILABLE_IN_ALL |
455 | void gdk_pad_event_get_group_mode (GdkEvent *event, |
456 | guint *group, |
457 | guint *mode); |
458 | GDK_AVAILABLE_IN_ALL |
459 | GType gdk_dnd_event_get_type (void) G_GNUC_CONST; |
460 | GDK_AVAILABLE_IN_ALL |
461 | GdkDrop * gdk_dnd_event_get_drop (GdkEvent *event); |
462 | GDK_AVAILABLE_IN_ALL |
463 | GType gdk_grab_broken_event_get_type (void) G_GNUC_CONST; |
464 | GDK_AVAILABLE_IN_ALL |
465 | GdkSurface * gdk_grab_broken_event_get_grab_surface (GdkEvent *event); |
466 | GDK_AVAILABLE_IN_ALL |
467 | gboolean gdk_grab_broken_event_get_implicit (GdkEvent *event); |
468 | |
469 | GDK_AVAILABLE_IN_ALL |
470 | GType gdk_motion_event_get_type (void) G_GNUC_CONST; |
471 | |
472 | GDK_AVAILABLE_IN_ALL |
473 | GType gdk_delete_event_get_type (void) G_GNUC_CONST; |
474 | GDK_AVAILABLE_IN_ALL |
475 | GType gdk_proximity_event_get_type (void) G_GNUC_CONST; |
476 | |
477 | GDK_AVAILABLE_IN_ALL |
478 | gboolean (GdkEvent *event); |
479 | |
480 | GDK_AVAILABLE_IN_ALL |
481 | gboolean gdk_events_get_distance (GdkEvent *event1, |
482 | GdkEvent *event2, |
483 | double *distance); |
484 | GDK_AVAILABLE_IN_ALL |
485 | gboolean gdk_events_get_angle (GdkEvent *event1, |
486 | GdkEvent *event2, |
487 | double *angle); |
488 | GDK_AVAILABLE_IN_ALL |
489 | gboolean gdk_events_get_center (GdkEvent *event1, |
490 | GdkEvent *event2, |
491 | double *x, |
492 | double *y); |
493 | |
494 | /** |
495 | * GdkKeyMatch: |
496 | * @GDK_KEY_MATCH_NONE: The key event does not match |
497 | * @GDK_KEY_MATCH_PARTIAL: The key event matches if keyboard state |
498 | * (specifically, the currently active group) is ignored |
499 | * @GDK_KEY_MATCH_EXACT: The key event matches |
500 | * |
501 | * Describes how well an event matches a given keyval and modifiers. |
502 | * |
503 | * `GdkKeyMatch` values are returned by [method@Gdk.KeyEvent.matches]. |
504 | */ |
505 | typedef enum { |
506 | GDK_KEY_MATCH_NONE, |
507 | GDK_KEY_MATCH_PARTIAL, |
508 | GDK_KEY_MATCH_EXACT |
509 | } GdkKeyMatch; |
510 | |
511 | GDK_AVAILABLE_IN_ALL |
512 | GdkKeyMatch gdk_key_event_matches (GdkEvent *event, |
513 | guint keyval, |
514 | GdkModifierType modifiers); |
515 | |
516 | GDK_AVAILABLE_IN_ALL |
517 | gboolean gdk_key_event_get_match (GdkEvent *event, |
518 | guint *keyval, |
519 | GdkModifierType *modifiers); |
520 | |
521 | G_END_DECLS |
522 | |
523 | #endif /* __GDK_EVENTS_H__ */ |
524 | |