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_TYPES_H__
26#define __GDK_TYPES_H__
27
28#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
29#error "Only <gdk/gdk.h> can be included directly."
30#endif
31
32/* GDK uses "glib". (And so does GTK).
33 */
34#include <glib.h>
35#include <pango/pango.h>
36#include <glib-object.h>
37#include <cairo.h>
38
39/* The system specific file gdkconfig.h contains such configuration
40 * settings that are needed not only when compiling GDK (or GTK)
41 * itself, but also occasionally when compiling programs that use GDK
42 * (or GTK). One such setting is what windowing API backend is in use.
43 */
44#include <gdk/gdkconfig.h>
45
46/* some common magic values */
47
48/**
49 * GDK_CURRENT_TIME:
50 *
51 * Represents the current time, and can be used anywhere a time is expected.
52 */
53#define GDK_CURRENT_TIME 0L
54
55/**
56 * GDK_PARENT_RELATIVE:
57 *
58 * A special value, indicating that the background
59 * for a window should be inherited from the parent window.
60 */
61#define GDK_PARENT_RELATIVE 1L
62
63
64
65G_BEGIN_DECLS
66
67
68/* Type definitions for the basic structures.
69 */
70typedef struct _GdkPoint GdkPoint;
71
72/**
73 * GdkRectangle:
74 *
75 * Defines the position and size of a rectangle. It is identical to
76 * #cairo_rectangle_int_t.
77 */
78#ifdef __GI_SCANNER__
79/* The introspection scanner is currently unable to lookup how
80 * cairo_rectangle_int_t is actually defined. This prevents
81 * introspection data for the GdkRectangle type to include fields
82 * descriptions. To workaround this issue, we define it with the same
83 * content as cairo_rectangle_int_t, but only under the introspection
84 * define.
85 */
86struct _GdkRectangle
87{
88 int x, y;
89 int width, height;
90};
91typedef struct _GdkRectangle GdkRectangle;
92#else
93typedef cairo_rectangle_int_t GdkRectangle;
94#endif
95
96/**
97 * GdkAtom:
98 *
99 * An opaque type representing a string as an index into a table
100 * of strings on the X server.
101 */
102typedef struct _GdkAtom *GdkAtom;
103
104/**
105 * GDK_ATOM_TO_POINTER:
106 * @atom: a #GdkAtom.
107 *
108 * Converts a #GdkAtom into a pointer type.
109 */
110#define GDK_ATOM_TO_POINTER(atom) (atom)
111
112/**
113 * GDK_POINTER_TO_ATOM:
114 * @ptr: a pointer containing a #GdkAtom.
115 *
116 * Extracts a #GdkAtom from a pointer. The #GdkAtom must have been
117 * stored in the pointer with GDK_ATOM_TO_POINTER().
118 */
119#define GDK_POINTER_TO_ATOM(ptr) ((GdkAtom)(ptr))
120
121#define _GDK_MAKE_ATOM(val) ((GdkAtom)GUINT_TO_POINTER(val))
122
123/**
124 * GDK_NONE:
125 *
126 * A null value for #GdkAtom, used in a similar way as
127 * `None` in the Xlib API.
128 */
129#define GDK_NONE _GDK_MAKE_ATOM (0)
130
131/* Forward declarations of commonly used types */
132typedef struct _GdkColor GdkColor;
133typedef struct _GdkRGBA GdkRGBA;
134typedef struct _GdkCursor GdkCursor;
135typedef struct _GdkVisual GdkVisual;
136typedef struct _GdkDevice GdkDevice;
137typedef struct _GdkDragContext GdkDragContext;
138
139typedef struct _GdkDisplayManager GdkDisplayManager;
140typedef struct _GdkDeviceManager GdkDeviceManager;
141typedef struct _GdkDisplay GdkDisplay;
142typedef struct _GdkScreen GdkScreen;
143typedef struct _GdkWindow GdkWindow;
144typedef struct _GdkKeymap GdkKeymap;
145typedef struct _GdkAppLaunchContext GdkAppLaunchContext;
146typedef struct _GdkSeat GdkSeat;
147
148typedef struct _GdkGLContext GdkGLContext;
149
150/**
151 * GdkByteOrder:
152 * @GDK_LSB_FIRST: The values are stored with the least-significant byte
153 * first. For instance, the 32-bit value 0xffeecc would be stored
154 * in memory as 0xcc, 0xee, 0xff, 0x00.
155 * @GDK_MSB_FIRST: The values are stored with the most-significant byte
156 * first. For instance, the 32-bit value 0xffeecc would be stored
157 * in memory as 0x00, 0xff, 0xee, 0xcc.
158 *
159 * A set of values describing the possible byte-orders
160 * for storing pixel values in memory.
161 */
162typedef enum
163{
164 GDK_LSB_FIRST,
165 GDK_MSB_FIRST
166} GdkByteOrder;
167
168/* Types of modifiers.
169 */
170/**
171 * GdkModifierType:
172 * @GDK_SHIFT_MASK: the Shift key.
173 * @GDK_LOCK_MASK: a Lock key (depending on the modifier mapping of the
174 * X server this may either be CapsLock or ShiftLock).
175 * @GDK_CONTROL_MASK: the Control key.
176 * @GDK_MOD1_MASK: the fourth modifier key (it depends on the modifier
177 * mapping of the X server which key is interpreted as this modifier, but
178 * normally it is the Alt key).
179 * @GDK_MOD2_MASK: the fifth modifier key (it depends on the modifier
180 * mapping of the X server which key is interpreted as this modifier).
181 * @GDK_MOD3_MASK: the sixth modifier key (it depends on the modifier
182 * mapping of the X server which key is interpreted as this modifier).
183 * @GDK_MOD4_MASK: the seventh modifier key (it depends on the modifier
184 * mapping of the X server which key is interpreted as this modifier).
185 * @GDK_MOD5_MASK: the eighth modifier key (it depends on the modifier
186 * mapping of the X server which key is interpreted as this modifier).
187 * @GDK_BUTTON1_MASK: the first mouse button.
188 * @GDK_BUTTON2_MASK: the second mouse button.
189 * @GDK_BUTTON3_MASK: the third mouse button.
190 * @GDK_BUTTON4_MASK: the fourth mouse button.
191 * @GDK_BUTTON5_MASK: the fifth mouse button.
192 * @GDK_MODIFIER_RESERVED_13_MASK: A reserved bit flag; do not use in your own code
193 * @GDK_MODIFIER_RESERVED_14_MASK: A reserved bit flag; do not use in your own code
194 * @GDK_MODIFIER_RESERVED_15_MASK: A reserved bit flag; do not use in your own code
195 * @GDK_MODIFIER_RESERVED_16_MASK: A reserved bit flag; do not use in your own code
196 * @GDK_MODIFIER_RESERVED_17_MASK: A reserved bit flag; do not use in your own code
197 * @GDK_MODIFIER_RESERVED_18_MASK: A reserved bit flag; do not use in your own code
198 * @GDK_MODIFIER_RESERVED_19_MASK: A reserved bit flag; do not use in your own code
199 * @GDK_MODIFIER_RESERVED_20_MASK: A reserved bit flag; do not use in your own code
200 * @GDK_MODIFIER_RESERVED_21_MASK: A reserved bit flag; do not use in your own code
201 * @GDK_MODIFIER_RESERVED_22_MASK: A reserved bit flag; do not use in your own code
202 * @GDK_MODIFIER_RESERVED_23_MASK: A reserved bit flag; do not use in your own code
203 * @GDK_MODIFIER_RESERVED_24_MASK: A reserved bit flag; do not use in your own code
204 * @GDK_MODIFIER_RESERVED_25_MASK: A reserved bit flag; do not use in your own code
205 * @GDK_SUPER_MASK: the Super modifier. Since 2.10
206 * @GDK_HYPER_MASK: the Hyper modifier. Since 2.10
207 * @GDK_META_MASK: the Meta modifier. Since 2.10
208 * @GDK_MODIFIER_RESERVED_29_MASK: A reserved bit flag; do not use in your own code
209 * @GDK_RELEASE_MASK: not used in GDK itself. GTK+ uses it to differentiate
210 * between (keyval, modifiers) pairs from key press and release events.
211 * @GDK_MODIFIER_MASK: a mask covering all modifier types.
212 *
213 * A set of bit-flags to indicate the state of modifier keys and mouse buttons
214 * in various event types. Typical modifier keys are Shift, Control, Meta,
215 * Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
216 *
217 * Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.
218 *
219 * Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped
220 * to Mod2 - Mod5, and indicates this by setting %GDK_SUPER_MASK,
221 * %GDK_HYPER_MASK or %GDK_META_MASK in the state field of key events.
222 *
223 * Note that GDK may add internal values to events which include
224 * reserved values such as %GDK_MODIFIER_RESERVED_13_MASK. Your code
225 * should preserve and ignore them. You can use %GDK_MODIFIER_MASK to
226 * remove all reserved values.
227 *
228 * Also note that the GDK X backend interprets button press events for button
229 * 4-7 as scroll events, so %GDK_BUTTON4_MASK and %GDK_BUTTON5_MASK will never
230 * be set.
231 */
232typedef enum
233{
234 GDK_SHIFT_MASK = 1 << 0,
235 GDK_LOCK_MASK = 1 << 1,
236 GDK_CONTROL_MASK = 1 << 2,
237 GDK_MOD1_MASK = 1 << 3,
238 GDK_MOD2_MASK = 1 << 4,
239 GDK_MOD3_MASK = 1 << 5,
240 GDK_MOD4_MASK = 1 << 6,
241 GDK_MOD5_MASK = 1 << 7,
242 GDK_BUTTON1_MASK = 1 << 8,
243 GDK_BUTTON2_MASK = 1 << 9,
244 GDK_BUTTON3_MASK = 1 << 10,
245 GDK_BUTTON4_MASK = 1 << 11,
246 GDK_BUTTON5_MASK = 1 << 12,
247
248 GDK_MODIFIER_RESERVED_13_MASK = 1 << 13,
249 GDK_MODIFIER_RESERVED_14_MASK = 1 << 14,
250 GDK_MODIFIER_RESERVED_15_MASK = 1 << 15,
251 GDK_MODIFIER_RESERVED_16_MASK = 1 << 16,
252 GDK_MODIFIER_RESERVED_17_MASK = 1 << 17,
253 GDK_MODIFIER_RESERVED_18_MASK = 1 << 18,
254 GDK_MODIFIER_RESERVED_19_MASK = 1 << 19,
255 GDK_MODIFIER_RESERVED_20_MASK = 1 << 20,
256 GDK_MODIFIER_RESERVED_21_MASK = 1 << 21,
257 GDK_MODIFIER_RESERVED_22_MASK = 1 << 22,
258 GDK_MODIFIER_RESERVED_23_MASK = 1 << 23,
259 GDK_MODIFIER_RESERVED_24_MASK = 1 << 24,
260 GDK_MODIFIER_RESERVED_25_MASK = 1 << 25,
261
262 /* The next few modifiers are used by XKB, so we skip to the end.
263 * Bits 15 - 25 are currently unused. Bit 29 is used internally.
264 */
265
266 GDK_SUPER_MASK = 1 << 26,
267 GDK_HYPER_MASK = 1 << 27,
268 GDK_META_MASK = 1 << 28,
269
270 GDK_MODIFIER_RESERVED_29_MASK = 1 << 29,
271
272 GDK_RELEASE_MASK = 1 << 30,
273
274 /* Combination of GDK_SHIFT_MASK..GDK_BUTTON5_MASK + GDK_SUPER_MASK
275 + GDK_HYPER_MASK + GDK_META_MASK + GDK_RELEASE_MASK */
276 GDK_MODIFIER_MASK = 0x5c001fff
277} GdkModifierType;
278
279/**
280 * GdkModifierIntent:
281 * @GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR: the primary modifier used to invoke
282 * menu accelerators.
283 * @GDK_MODIFIER_INTENT_CONTEXT_MENU: the modifier used to invoke context menus.
284 * Note that mouse button 3 always triggers context menus. When this modifier
285 * is not 0, it additionally triggers context menus when used with mouse button 1.
286 * @GDK_MODIFIER_INTENT_EXTEND_SELECTION: the modifier used to extend selections
287 * using `modifier`-click or `modifier`-cursor-key
288 * @GDK_MODIFIER_INTENT_MODIFY_SELECTION: the modifier used to modify selections,
289 * which in most cases means toggling the clicked item into or out of the selection.
290 * @GDK_MODIFIER_INTENT_NO_TEXT_INPUT: when any of these modifiers is pressed, the
291 * key event cannot produce a symbol directly. This is meant to be used for
292 * input methods, and for use cases like typeahead search.
293 * @GDK_MODIFIER_INTENT_SHIFT_GROUP: the modifier that switches between keyboard
294 * groups (AltGr on X11/Windows and Option/Alt on OS X).
295 * @GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK: The set of modifier masks accepted
296 * as modifiers in accelerators. Needed because Command is mapped to MOD2 on
297 * OSX, which is widely used, but on X11 MOD2 is NumLock and using that for a
298 * mod key is problematic at best.
299 * Ref: https://bugzilla.gnome.org/show_bug.cgi?id=736125.
300 *
301 * This enum is used with gdk_keymap_get_modifier_mask()
302 * in order to determine what modifiers the
303 * currently used windowing system backend uses for particular
304 * purposes. For example, on X11/Windows, the Control key is used for
305 * invoking menu shortcuts (accelerators), whereas on Apple computers
306 * it’s the Command key (which correspond to %GDK_CONTROL_MASK and
307 * %GDK_MOD2_MASK, respectively).
308 *
309 * Since: 3.4
310 **/
311typedef enum
312{
313 GDK_MODIFIER_INTENT_PRIMARY_ACCELERATOR,
314 GDK_MODIFIER_INTENT_CONTEXT_MENU,
315 GDK_MODIFIER_INTENT_EXTEND_SELECTION,
316 GDK_MODIFIER_INTENT_MODIFY_SELECTION,
317 GDK_MODIFIER_INTENT_NO_TEXT_INPUT,
318 GDK_MODIFIER_INTENT_SHIFT_GROUP,
319 GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK,
320} GdkModifierIntent;
321
322typedef enum
323{
324 GDK_OK = 0,
325 GDK_ERROR = -1,
326 GDK_ERROR_PARAM = -2,
327 GDK_ERROR_FILE = -3,
328 GDK_ERROR_MEM = -4
329} GdkStatus;
330
331/**
332 * GdkGrabStatus:
333 * @GDK_GRAB_SUCCESS: the resource was successfully grabbed.
334 * @GDK_GRAB_ALREADY_GRABBED: the resource is actively grabbed by another client.
335 * @GDK_GRAB_INVALID_TIME: the resource was grabbed more recently than the
336 * specified time.
337 * @GDK_GRAB_NOT_VIEWABLE: the grab window or the @confine_to window are not
338 * viewable.
339 * @GDK_GRAB_FROZEN: the resource is frozen by an active grab of another client.
340 * @GDK_GRAB_FAILED: the grab failed for some other reason. Since 3.16
341 *
342 * Returned by gdk_device_grab(), gdk_pointer_grab() and gdk_keyboard_grab() to
343 * indicate success or the reason for the failure of the grab attempt.
344 */
345typedef enum
346{
347 GDK_GRAB_SUCCESS = 0,
348 GDK_GRAB_ALREADY_GRABBED = 1,
349 GDK_GRAB_INVALID_TIME = 2,
350 GDK_GRAB_NOT_VIEWABLE = 3,
351 GDK_GRAB_FROZEN = 4,
352 GDK_GRAB_FAILED = 5
353} GdkGrabStatus;
354
355/**
356 * GdkGrabOwnership:
357 * @GDK_OWNERSHIP_NONE: All other devices’ events are allowed.
358 * @GDK_OWNERSHIP_WINDOW: Other devices’ events are blocked for the grab window.
359 * @GDK_OWNERSHIP_APPLICATION: Other devices’ events are blocked for the whole application.
360 *
361 * Defines how device grabs interact with other devices.
362 */
363typedef enum
364{
365 GDK_OWNERSHIP_NONE,
366 GDK_OWNERSHIP_WINDOW,
367 GDK_OWNERSHIP_APPLICATION
368} GdkGrabOwnership;
369
370/**
371 * GdkEventMask:
372 * @GDK_EXPOSURE_MASK: receive expose events
373 * @GDK_POINTER_MOTION_MASK: receive all pointer motion events
374 * @GDK_POINTER_MOTION_HINT_MASK: deprecated. see the explanation above
375 * @GDK_BUTTON_MOTION_MASK: receive pointer motion events while any button is pressed
376 * @GDK_BUTTON1_MOTION_MASK: receive pointer motion events while 1 button is pressed
377 * @GDK_BUTTON2_MOTION_MASK: receive pointer motion events while 2 button is pressed
378 * @GDK_BUTTON3_MOTION_MASK: receive pointer motion events while 3 button is pressed
379 * @GDK_BUTTON_PRESS_MASK: receive button press events
380 * @GDK_BUTTON_RELEASE_MASK: receive button release events
381 * @GDK_KEY_PRESS_MASK: receive key press events
382 * @GDK_KEY_RELEASE_MASK: receive key release events
383 * @GDK_ENTER_NOTIFY_MASK: receive window enter events
384 * @GDK_LEAVE_NOTIFY_MASK: receive window leave events
385 * @GDK_FOCUS_CHANGE_MASK: receive focus change events
386 * @GDK_STRUCTURE_MASK: receive events about window configuration change
387 * @GDK_PROPERTY_CHANGE_MASK: receive property change events
388 * @GDK_VISIBILITY_NOTIFY_MASK: receive visibility change events
389 * @GDK_PROXIMITY_IN_MASK: receive proximity in events
390 * @GDK_PROXIMITY_OUT_MASK: receive proximity out events
391 * @GDK_SUBSTRUCTURE_MASK: receive events about window configuration changes of
392 * child windows
393 * @GDK_SCROLL_MASK: receive scroll events
394 * @GDK_TOUCH_MASK: receive touch events. Since 3.4
395 * @GDK_SMOOTH_SCROLL_MASK: receive smooth scrolling events. Since 3.4
396 @GDK_TOUCHPAD_GESTURE_MASK: receive touchpad gesture events. Since 3.18
397 * @GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
398 *
399 * A set of bit-flags to indicate which events a window is to receive.
400 * Most of these masks map onto one or more of the #GdkEventType event types
401 * above.
402 *
403 * See the [input handling overview][chap-input-handling] for details of
404 * [event masks][event-masks] and [event propagation][event-propagation].
405 *
406 * %GDK_POINTER_MOTION_HINT_MASK is deprecated. It is a special mask
407 * to reduce the number of %GDK_MOTION_NOTIFY events received. When using
408 * %GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will
409 * be sent, some of which are marked as a hint (the is_hint member is
410 * %TRUE). To receive more motion events after a motion hint event,
411 * the application needs to asks for more, by calling
412 * gdk_event_request_motions().
413 *
414 * Since GTK 3.8, motion events are already compressed by default, independent
415 * of this mechanism. This compression can be disabled with
416 * gdk_window_set_event_compression(). See the documentation of that function
417 * for details.
418 *
419 * If %GDK_TOUCH_MASK is enabled, the window will receive touch events
420 * from touch-enabled devices. Those will come as sequences of #GdkEventTouch
421 * with type %GDK_TOUCH_UPDATE, enclosed by two events with
422 * type %GDK_TOUCH_BEGIN and %GDK_TOUCH_END (or %GDK_TOUCH_CANCEL).
423 * gdk_event_get_event_sequence() returns the event sequence for these
424 * events, so different sequences may be distinguished.
425 */
426typedef enum
427{
428 GDK_EXPOSURE_MASK = 1 << 1,
429 GDK_POINTER_MOTION_MASK = 1 << 2,
430 GDK_POINTER_MOTION_HINT_MASK = 1 << 3,
431 GDK_BUTTON_MOTION_MASK = 1 << 4,
432 GDK_BUTTON1_MOTION_MASK = 1 << 5,
433 GDK_BUTTON2_MOTION_MASK = 1 << 6,
434 GDK_BUTTON3_MOTION_MASK = 1 << 7,
435 GDK_BUTTON_PRESS_MASK = 1 << 8,
436 GDK_BUTTON_RELEASE_MASK = 1 << 9,
437 GDK_KEY_PRESS_MASK = 1 << 10,
438 GDK_KEY_RELEASE_MASK = 1 << 11,
439 GDK_ENTER_NOTIFY_MASK = 1 << 12,
440 GDK_LEAVE_NOTIFY_MASK = 1 << 13,
441 GDK_FOCUS_CHANGE_MASK = 1 << 14,
442 GDK_STRUCTURE_MASK = 1 << 15,
443 GDK_PROPERTY_CHANGE_MASK = 1 << 16,
444 GDK_VISIBILITY_NOTIFY_MASK = 1 << 17,
445 GDK_PROXIMITY_IN_MASK = 1 << 18,
446 GDK_PROXIMITY_OUT_MASK = 1 << 19,
447 GDK_SUBSTRUCTURE_MASK = 1 << 20,
448 GDK_SCROLL_MASK = 1 << 21,
449 GDK_TOUCH_MASK = 1 << 22,
450 GDK_SMOOTH_SCROLL_MASK = 1 << 23,
451 GDK_TOUCHPAD_GESTURE_MASK = 1 << 24,
452 GDK_ALL_EVENTS_MASK = 0xFFFFFE
453} GdkEventMask;
454
455/**
456 * GdkPoint:
457 * @x: the x coordinate of the point.
458 * @y: the y coordinate of the point.
459 *
460 * Defines the x and y coordinates of a point.
461 */
462struct _GdkPoint
463{
464 gint x;
465 gint y;
466};
467
468/**
469 * GdkGLError:
470 * @GDK_GL_ERROR_NOT_AVAILABLE: OpenGL support is not available
471 * @GDK_GL_ERROR_UNSUPPORTED_FORMAT: The requested visual format is not supported
472 * @GDK_GL_ERROR_UNSUPPORTED_PROFILE: The requested profile is not supported
473 *
474 * Error enumeration for #GdkGLContext.
475 *
476 * Since: 3.16
477 */
478typedef enum {
479 GDK_GL_ERROR_NOT_AVAILABLE,
480 GDK_GL_ERROR_UNSUPPORTED_FORMAT,
481 GDK_GL_ERROR_UNSUPPORTED_PROFILE
482} GdkGLError;
483
484/**
485 * GdkWindowTypeHint:
486 * @GDK_WINDOW_TYPE_HINT_NORMAL: Normal toplevel window.
487 * @GDK_WINDOW_TYPE_HINT_DIALOG: Dialog window.
488 * @GDK_WINDOW_TYPE_HINT_MENU: Window used to implement a menu; GTK+ uses
489 * this hint only for torn-off menus, see #GtkTearoffMenuItem.
490 * @GDK_WINDOW_TYPE_HINT_TOOLBAR: Window used to implement toolbars.
491 * @GDK_WINDOW_TYPE_HINT_SPLASHSCREEN: Window used to display a splash
492 * screen during application startup.
493 * @GDK_WINDOW_TYPE_HINT_UTILITY: Utility windows which are not detached
494 * toolbars or dialogs.
495 * @GDK_WINDOW_TYPE_HINT_DOCK: Used for creating dock or panel windows.
496 * @GDK_WINDOW_TYPE_HINT_DESKTOP: Used for creating the desktop background
497 * window.
498 * @GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: A menu that belongs to a menubar.
499 * @GDK_WINDOW_TYPE_HINT_POPUP_MENU: A menu that does not belong to a menubar,
500 * e.g. a context menu.
501 * @GDK_WINDOW_TYPE_HINT_TOOLTIP: A tooltip.
502 * @GDK_WINDOW_TYPE_HINT_NOTIFICATION: A notification - typically a “bubble”
503 * that belongs to a status icon.
504 * @GDK_WINDOW_TYPE_HINT_COMBO: A popup from a combo box.
505 * @GDK_WINDOW_TYPE_HINT_DND: A window that is used to implement a DND cursor.
506 *
507 * These are hints for the window manager that indicate what type of function
508 * the window has. The window manager can use this when determining decoration
509 * and behaviour of the window. The hint must be set before mapping the window.
510 *
511 * See the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
512 * specification for more details about window types.
513 */
514typedef enum
515{
516 GDK_WINDOW_TYPE_HINT_NORMAL,
517 GDK_WINDOW_TYPE_HINT_DIALOG,
518 GDK_WINDOW_TYPE_HINT_MENU, /* Torn off menu */
519 GDK_WINDOW_TYPE_HINT_TOOLBAR,
520 GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
521 GDK_WINDOW_TYPE_HINT_UTILITY,
522 GDK_WINDOW_TYPE_HINT_DOCK,
523 GDK_WINDOW_TYPE_HINT_DESKTOP,
524 GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU, /* A drop down menu (from a menubar) */
525 GDK_WINDOW_TYPE_HINT_POPUP_MENU, /* A popup menu (from right-click) */
526 GDK_WINDOW_TYPE_HINT_TOOLTIP,
527 GDK_WINDOW_TYPE_HINT_NOTIFICATION,
528 GDK_WINDOW_TYPE_HINT_COMBO,
529 GDK_WINDOW_TYPE_HINT_DND
530} GdkWindowTypeHint;
531
532/**
533 * GdkAxisUse:
534 * @GDK_AXIS_IGNORE: the axis is ignored.
535 * @GDK_AXIS_X: the axis is used as the x axis.
536 * @GDK_AXIS_Y: the axis is used as the y axis.
537 * @GDK_AXIS_PRESSURE: the axis is used for pressure information.
538 * @GDK_AXIS_XTILT: the axis is used for x tilt information.
539 * @GDK_AXIS_YTILT: the axis is used for y tilt information.
540 * @GDK_AXIS_WHEEL: the axis is used for wheel information.
541 * @GDK_AXIS_DISTANCE: the axis is used for pen/tablet distance information. (Since: 3.22)
542 * @GDK_AXIS_ROTATION: the axis is used for pen rotation information. (Since: 3.22)
543 * @GDK_AXIS_SLIDER: the axis is used for pen slider information. (Since: 3.22)
544 * @GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
545 *
546 * An enumeration describing the way in which a device
547 * axis (valuator) maps onto the predefined valuator
548 * types that GTK+ understands.
549 *
550 * Note that the X and Y axes are not really needed; pointer devices
551 * report their location via the x/y members of events regardless. Whether
552 * X and Y are present as axes depends on the GDK backend.
553 */
554typedef enum
555{
556 GDK_AXIS_IGNORE,
557 GDK_AXIS_X,
558 GDK_AXIS_Y,
559 GDK_AXIS_PRESSURE,
560 GDK_AXIS_XTILT,
561 GDK_AXIS_YTILT,
562 GDK_AXIS_WHEEL,
563 GDK_AXIS_DISTANCE,
564 GDK_AXIS_ROTATION,
565 GDK_AXIS_SLIDER,
566 GDK_AXIS_LAST
567} GdkAxisUse;
568
569/**
570 * GdkAxisFlags:
571 * @GDK_AXIS_FLAG_X: X axis is present
572 * @GDK_AXIS_FLAG_Y: Y axis is present
573 * @GDK_AXIS_FLAG_PRESSURE: Pressure axis is present
574 * @GDK_AXIS_FLAG_XTILT: X tilt axis is present
575 * @GDK_AXIS_FLAG_YTILT: Y tilt axis is present
576 * @GDK_AXIS_FLAG_WHEEL: Wheel axis is present
577 * @GDK_AXIS_FLAG_DISTANCE: Distance axis is present
578 * @GDK_AXIS_FLAG_ROTATION: Z-axis rotation is present
579 * @GDK_AXIS_FLAG_SLIDER: Slider axis is present
580 *
581 * Flags describing the current capabilities of a device/tool.
582 *
583 * Since: 3.22
584 */
585typedef enum
586{
587 GDK_AXIS_FLAG_X = 1 << GDK_AXIS_X,
588 GDK_AXIS_FLAG_Y = 1 << GDK_AXIS_Y,
589 GDK_AXIS_FLAG_PRESSURE = 1 << GDK_AXIS_PRESSURE,
590 GDK_AXIS_FLAG_XTILT = 1 << GDK_AXIS_XTILT,
591 GDK_AXIS_FLAG_YTILT = 1 << GDK_AXIS_YTILT,
592 GDK_AXIS_FLAG_WHEEL = 1 << GDK_AXIS_WHEEL,
593 GDK_AXIS_FLAG_DISTANCE = 1 << GDK_AXIS_DISTANCE,
594 GDK_AXIS_FLAG_ROTATION = 1 << GDK_AXIS_ROTATION,
595 GDK_AXIS_FLAG_SLIDER = 1 << GDK_AXIS_SLIDER,
596} GdkAxisFlags;
597
598G_END_DECLS
599
600#endif /* __GDK_TYPES_H__ */
601