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_TABLET_PAD_MASK: receive tablet pad events. Since 3.22
398 * @GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
399 *
400 * A set of bit-flags to indicate which events a window is to receive.
401 * Most of these masks map onto one or more of the #GdkEventType event types
402 * above.
403 *
404 * See the [input handling overview][chap-input-handling] for details of
405 * [event masks][event-masks] and [event propagation][event-propagation].
406 *
407 * %GDK_POINTER_MOTION_HINT_MASK is deprecated. It is a special mask
408 * to reduce the number of %GDK_MOTION_NOTIFY events received. When using
409 * %GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will
410 * be sent, some of which are marked as a hint (the is_hint member is
411 * %TRUE). To receive more motion events after a motion hint event,
412 * the application needs to asks for more, by calling
413 * gdk_event_request_motions().
414 *
415 * Since GTK 3.8, motion events are already compressed by default, independent
416 * of this mechanism. This compression can be disabled with
417 * gdk_window_set_event_compression(). See the documentation of that function
418 * for details.
419 *
420 * If %GDK_TOUCH_MASK is enabled, the window will receive touch events
421 * from touch-enabled devices. Those will come as sequences of #GdkEventTouch
422 * with type %GDK_TOUCH_UPDATE, enclosed by two events with
423 * type %GDK_TOUCH_BEGIN and %GDK_TOUCH_END (or %GDK_TOUCH_CANCEL).
424 * gdk_event_get_event_sequence() returns the event sequence for these
425 * events, so different sequences may be distinguished.
426 */
427typedef enum
428{
429 GDK_EXPOSURE_MASK = 1 << 1,
430 GDK_POINTER_MOTION_MASK = 1 << 2,
431 GDK_POINTER_MOTION_HINT_MASK = 1 << 3,
432 GDK_BUTTON_MOTION_MASK = 1 << 4,
433 GDK_BUTTON1_MOTION_MASK = 1 << 5,
434 GDK_BUTTON2_MOTION_MASK = 1 << 6,
435 GDK_BUTTON3_MOTION_MASK = 1 << 7,
436 GDK_BUTTON_PRESS_MASK = 1 << 8,
437 GDK_BUTTON_RELEASE_MASK = 1 << 9,
438 GDK_KEY_PRESS_MASK = 1 << 10,
439 GDK_KEY_RELEASE_MASK = 1 << 11,
440 GDK_ENTER_NOTIFY_MASK = 1 << 12,
441 GDK_LEAVE_NOTIFY_MASK = 1 << 13,
442 GDK_FOCUS_CHANGE_MASK = 1 << 14,
443 GDK_STRUCTURE_MASK = 1 << 15,
444 GDK_PROPERTY_CHANGE_MASK = 1 << 16,
445 GDK_VISIBILITY_NOTIFY_MASK = 1 << 17,
446 GDK_PROXIMITY_IN_MASK = 1 << 18,
447 GDK_PROXIMITY_OUT_MASK = 1 << 19,
448 GDK_SUBSTRUCTURE_MASK = 1 << 20,
449 GDK_SCROLL_MASK = 1 << 21,
450 GDK_TOUCH_MASK = 1 << 22,
451 GDK_SMOOTH_SCROLL_MASK = 1 << 23,
452 GDK_TOUCHPAD_GESTURE_MASK = 1 << 24,
453 GDK_TABLET_PAD_MASK = 1 << 25,
454 GDK_ALL_EVENTS_MASK = 0x3FFFFFE
455} GdkEventMask;
456
457/**
458 * GdkPoint:
459 * @x: the x coordinate of the point.
460 * @y: the y coordinate of the point.
461 *
462 * Defines the x and y coordinates of a point.
463 */
464struct _GdkPoint
465{
466 gint x;
467 gint y;
468};
469
470/**
471 * GdkGLError:
472 * @GDK_GL_ERROR_NOT_AVAILABLE: OpenGL support is not available
473 * @GDK_GL_ERROR_UNSUPPORTED_FORMAT: The requested visual format is not supported
474 * @GDK_GL_ERROR_UNSUPPORTED_PROFILE: The requested profile is not supported
475 *
476 * Error enumeration for #GdkGLContext.
477 *
478 * Since: 3.16
479 */
480typedef enum {
481 GDK_GL_ERROR_NOT_AVAILABLE,
482 GDK_GL_ERROR_UNSUPPORTED_FORMAT,
483 GDK_GL_ERROR_UNSUPPORTED_PROFILE
484} GdkGLError;
485
486/**
487 * GdkWindowTypeHint:
488 * @GDK_WINDOW_TYPE_HINT_NORMAL: Normal toplevel window.
489 * @GDK_WINDOW_TYPE_HINT_DIALOG: Dialog window.
490 * @GDK_WINDOW_TYPE_HINT_MENU: Window used to implement a menu; GTK+ uses
491 * this hint only for torn-off menus, see #GtkTearoffMenuItem.
492 * @GDK_WINDOW_TYPE_HINT_TOOLBAR: Window used to implement toolbars.
493 * @GDK_WINDOW_TYPE_HINT_SPLASHSCREEN: Window used to display a splash
494 * screen during application startup.
495 * @GDK_WINDOW_TYPE_HINT_UTILITY: Utility windows which are not detached
496 * toolbars or dialogs.
497 * @GDK_WINDOW_TYPE_HINT_DOCK: Used for creating dock or panel windows.
498 * @GDK_WINDOW_TYPE_HINT_DESKTOP: Used for creating the desktop background
499 * window.
500 * @GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: A menu that belongs to a menubar.
501 * @GDK_WINDOW_TYPE_HINT_POPUP_MENU: A menu that does not belong to a menubar,
502 * e.g. a context menu.
503 * @GDK_WINDOW_TYPE_HINT_TOOLTIP: A tooltip.
504 * @GDK_WINDOW_TYPE_HINT_NOTIFICATION: A notification - typically a “bubble”
505 * that belongs to a status icon.
506 * @GDK_WINDOW_TYPE_HINT_COMBO: A popup from a combo box.
507 * @GDK_WINDOW_TYPE_HINT_DND: A window that is used to implement a DND cursor.
508 *
509 * These are hints for the window manager that indicate what type of function
510 * the window has. The window manager can use this when determining decoration
511 * and behaviour of the window. The hint must be set before mapping the window.
512 *
513 * See the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec)
514 * specification for more details about window types.
515 */
516typedef enum
517{
518 GDK_WINDOW_TYPE_HINT_NORMAL,
519 GDK_WINDOW_TYPE_HINT_DIALOG,
520 GDK_WINDOW_TYPE_HINT_MENU, /* Torn off menu */
521 GDK_WINDOW_TYPE_HINT_TOOLBAR,
522 GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
523 GDK_WINDOW_TYPE_HINT_UTILITY,
524 GDK_WINDOW_TYPE_HINT_DOCK,
525 GDK_WINDOW_TYPE_HINT_DESKTOP,
526 GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU, /* A drop down menu (from a menubar) */
527 GDK_WINDOW_TYPE_HINT_POPUP_MENU, /* A popup menu (from right-click) */
528 GDK_WINDOW_TYPE_HINT_TOOLTIP,
529 GDK_WINDOW_TYPE_HINT_NOTIFICATION,
530 GDK_WINDOW_TYPE_HINT_COMBO,
531 GDK_WINDOW_TYPE_HINT_DND
532} GdkWindowTypeHint;
533
534/**
535 * GdkAxisUse:
536 * @GDK_AXIS_IGNORE: the axis is ignored.
537 * @GDK_AXIS_X: the axis is used as the x axis.
538 * @GDK_AXIS_Y: the axis is used as the y axis.
539 * @GDK_AXIS_PRESSURE: the axis is used for pressure information.
540 * @GDK_AXIS_XTILT: the axis is used for x tilt information.
541 * @GDK_AXIS_YTILT: the axis is used for y tilt information.
542 * @GDK_AXIS_WHEEL: the axis is used for wheel information.
543 * @GDK_AXIS_DISTANCE: the axis is used for pen/tablet distance information. (Since: 3.22)
544 * @GDK_AXIS_ROTATION: the axis is used for pen rotation information. (Since: 3.22)
545 * @GDK_AXIS_SLIDER: the axis is used for pen slider information. (Since: 3.22)
546 * @GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
547 *
548 * An enumeration describing the way in which a device
549 * axis (valuator) maps onto the predefined valuator
550 * types that GTK+ understands.
551 *
552 * Note that the X and Y axes are not really needed; pointer devices
553 * report their location via the x/y members of events regardless. Whether
554 * X and Y are present as axes depends on the GDK backend.
555 */
556typedef enum
557{
558 GDK_AXIS_IGNORE,
559 GDK_AXIS_X,
560 GDK_AXIS_Y,
561 GDK_AXIS_PRESSURE,
562 GDK_AXIS_XTILT,
563 GDK_AXIS_YTILT,
564 GDK_AXIS_WHEEL,
565 GDK_AXIS_DISTANCE,
566 GDK_AXIS_ROTATION,
567 GDK_AXIS_SLIDER,
568 GDK_AXIS_LAST
569} GdkAxisUse;
570
571/**
572 * GdkAxisFlags:
573 * @GDK_AXIS_FLAG_X: X axis is present
574 * @GDK_AXIS_FLAG_Y: Y axis is present
575 * @GDK_AXIS_FLAG_PRESSURE: Pressure axis is present
576 * @GDK_AXIS_FLAG_XTILT: X tilt axis is present
577 * @GDK_AXIS_FLAG_YTILT: Y tilt axis is present
578 * @GDK_AXIS_FLAG_WHEEL: Wheel axis is present
579 * @GDK_AXIS_FLAG_DISTANCE: Distance axis is present
580 * @GDK_AXIS_FLAG_ROTATION: Z-axis rotation is present
581 * @GDK_AXIS_FLAG_SLIDER: Slider axis is present
582 *
583 * Flags describing the current capabilities of a device/tool.
584 *
585 * Since: 3.22
586 */
587typedef enum
588{
589 GDK_AXIS_FLAG_X = 1 << GDK_AXIS_X,
590 GDK_AXIS_FLAG_Y = 1 << GDK_AXIS_Y,
591 GDK_AXIS_FLAG_PRESSURE = 1 << GDK_AXIS_PRESSURE,
592 GDK_AXIS_FLAG_XTILT = 1 << GDK_AXIS_XTILT,
593 GDK_AXIS_FLAG_YTILT = 1 << GDK_AXIS_YTILT,
594 GDK_AXIS_FLAG_WHEEL = 1 << GDK_AXIS_WHEEL,
595 GDK_AXIS_FLAG_DISTANCE = 1 << GDK_AXIS_DISTANCE,
596 GDK_AXIS_FLAG_ROTATION = 1 << GDK_AXIS_ROTATION,
597 GDK_AXIS_FLAG_SLIDER = 1 << GDK_AXIS_SLIDER,
598} GdkAxisFlags;
599
600G_END_DECLS
601
602#endif /* __GDK_TYPES_H__ */
603