1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library 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.
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 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #ifndef __GDK_TYPES_H__
28 #define __GDK_TYPES_H__
31 /* GDK uses "glib". (And so does GTK).
36 # ifdef GDK_COMPILATION
37 # define GDKVAR __declspec(dllexport)
39 # define GDKVAR extern __declspec(dllimport)
42 # define GDKVAR extern
45 /* The system specific file gdkconfig.h contains such configuration
46 * settings that are needed not only when compiling GDK (or GTK)
47 * itself, but also occasionally when compiling programs that use GDK
48 * (or GTK). One such setting is what windowing API backend is in use.
50 #include <gdkconfig.h>
52 /* Windowing API alternatives. Note that these macros indicate just
53 * what windowing system is in use, not what operating system. It is
54 * possible to built GDK for X11 in a Win32 environment, for instance.
56 * gdkconfig.h defines GDK_WINDOWING as one of the following. In
57 * addition to the original X11 only the Win32 implementation exists
60 #define GDK_WINDOWING_X11 1 /* X11 */
61 #define GDK_WINDOWING_WIN32 2 /* Win32 GDI */
62 #define GDK_WINDOWING_BEOS 3 /* BeOS */
63 #define GDK_WINDOWING_MACOS 4 /* MacOS */
64 #define GDK_WINDOWING_GGI 5 /* Linux GGI */
66 /* some common magic values */
68 #define GDK_CURRENT_TIME 0L
69 #define GDK_PARENT_RELATIVE 1L
71 /* special deviceid for core pointer events */
72 #define GDK_CORE_POINTER 0xfedc
77 #endif /* __cplusplus */
80 /* Type definitions for the basic structures.
83 typedef gulong GdkAtom;
84 typedef struct _GdkColor GdkColor;
85 typedef struct _GdkColormap GdkColormap;
86 typedef struct _GdkVisual GdkVisual;
87 typedef struct _GdkWindowAttr GdkWindowAttr;
88 typedef struct _GdkWindow GdkWindow;
89 typedef struct _GdkWindow GdkPixmap;
90 typedef struct _GdkWindow GdkBitmap;
91 typedef struct _GdkWindow GdkDrawable;
92 typedef struct _GdkGeometry GdkGeometry;
93 typedef struct _GdkImage GdkImage;
94 typedef struct _GdkGCValues GdkGCValues;
95 typedef struct _GdkGC GdkGC;
96 typedef struct _GdkPoint GdkPoint;
97 typedef struct _GdkRectangle GdkRectangle;
98 typedef struct _GdkSegment GdkSegment;
99 typedef struct _GdkFont GdkFont;
100 typedef struct _GdkCursor GdkCursor;
101 typedef struct _GdkColorContextDither GdkColorContextDither;
102 typedef struct _GdkColorContext GdkColorContext;
103 typedef struct _GdkDragContext GdkDragContext;
105 typedef struct _GdkEventAny GdkEventAny;
106 typedef struct _GdkEventExpose GdkEventExpose;
107 typedef struct _GdkEventNoExpose GdkEventNoExpose;
108 typedef struct _GdkEventVisibility GdkEventVisibility;
109 typedef struct _GdkEventMotion GdkEventMotion;
110 typedef struct _GdkEventButton GdkEventButton;
111 typedef struct _GdkEventKey GdkEventKey;
112 typedef struct _GdkEventFocus GdkEventFocus;
113 typedef struct _GdkEventCrossing GdkEventCrossing;
114 typedef struct _GdkEventConfigure GdkEventConfigure;
115 typedef struct _GdkEventProperty GdkEventProperty;
116 typedef struct _GdkEventSelection GdkEventSelection;
117 typedef struct _GdkEventProximity GdkEventProximity;
118 typedef struct _GdkEventClient GdkEventClient;
120 typedef struct _GdkEventDND GdkEventDND;
122 typedef union _GdkEvent GdkEvent;
124 typedef struct _GdkDeviceKey GdkDeviceKey;
125 typedef struct _GdkDeviceInfo GdkDeviceInfo;
126 typedef struct _GdkTimeCoord GdkTimeCoord;
127 typedef struct _GdkRegion GdkRegion;
128 typedef void (*GdkEventFunc) (GdkEvent *event,
131 typedef struct _GdkIC GdkIC;
132 typedef struct _GdkICAttr GdkICAttr;
134 typedef guint32 GdkWChar;
138 * Root: There is only 1 root window and it is initialized
139 * at startup. Creating a window of type GDK_WINDOW_ROOT
141 * Toplevel: Windows which interact with the window manager.
142 * Child: Windows which are children of some other type of window.
143 * (Any other type of window). Most windows are child windows.
144 * Dialog: A special kind of toplevel window which interacts with
145 * the window manager slightly differently than a regular
146 * toplevel window. Dialog windows should be used for any
148 * Pixmap: Pixmaps are really just another kind of window which
149 * doesn't actually appear on the screen. It can't have
150 * children, either and is really just a convenience so
151 * that the drawing functions can work on both windows
152 * and pixmaps transparently. (ie. You shouldn't pass a
153 * pixmap to any procedure which accepts a window with the
154 * exception of the drawing functions).
155 * Foreign: A window that actually belongs to another application
168 /* Classes of windows.
169 * InputOutput: Almost every window should be of this type. Such windows
170 * receive events and are also displayed on screen.
171 * InputOnly: Used only in special circumstances when events need to be
172 * stolen from another window or windows. Input only windows
173 * have no visible output, so they are handy for placing over
174 * top of a group of windows in order to grab the events (or
175 * filter the events) from those windows.
184 * Normal: Normal X image type. These are slow as they involve passing
185 * the entire image through the X connection each time a draw
186 * request is required. On Win32, a bitmap.
187 * Shared: Shared memory X image type. These are fast as the X server
188 * and the program actually use the same piece of memory. They
189 * should be used with care though as there is the possibility
190 * for both the X server and the program to be reading/writing
191 * the image simultaneously and producing undesired results.
192 * On Win32, also a bitmap.
193 * Shared Pixmap: Also a shared memory image, which also has a
194 * pixmap using the same memory. Used by gdk_imlib with the
202 GDK_IMAGE_SHARED_PIXMAP
215 GDK_VISUAL_STATIC_GRAY,
216 GDK_VISUAL_GRAYSCALE,
217 GDK_VISUAL_STATIC_COLOR,
218 GDK_VISUAL_PSEUDO_COLOR,
219 GDK_VISUAL_TRUE_COLOR,
220 GDK_VISUAL_DIRECT_COLOR
224 * GDK_FONT_FONT: the font is an XFontStruct.
225 * GDK_FONT_FONTSET: the font is an XFontSet used for I18N.
233 /* Window attribute mask values.
234 * GDK_WA_TITLE: The "title" field is valid.
235 * GDK_WA_X: The "x" field is valid.
236 * GDK_WA_Y: The "y" field is valid.
237 * GDK_WA_CURSOR: The "cursor" field is valid.
238 * GDK_WA_COLORMAP: The "colormap" field is valid.
239 * GDK_WA_VISUAL: The "visual" field is valid.
243 GDK_WA_TITLE = 1 << 1,
246 GDK_WA_CURSOR = 1 << 4,
247 GDK_WA_COLORMAP = 1 << 5,
248 GDK_WA_VISUAL = 1 << 6,
249 GDK_WA_WMCLASS = 1 << 7,
250 GDK_WA_NOREDIR = 1 << 8
251 } GdkWindowAttributesType;
253 /* Size restriction enumeration.
257 GDK_HINT_POS = 1 << 0,
258 GDK_HINT_MIN_SIZE = 1 << 1,
259 GDK_HINT_MAX_SIZE = 1 << 2,
260 GDK_HINT_BASE_SIZE = 1 << 3,
261 GDK_HINT_ASPECT = 1 << 4,
262 GDK_HINT_RESIZE_INC = 1 << 5
265 /* GC function types.
266 * Copy: Overwrites destination pixels with the source pixels.
267 * Invert: Inverts the destination pixels.
268 * Xor: Xor's the destination pixels with the source pixels.
269 * Clear: set pixels to 0
270 * And: source AND destination
271 * And Reverse: source AND (NOT destination)
272 * And Invert: (NOT source) AND destination
274 * Or: source OR destination
275 * Nor: (NOT source) AND (NOT destination)
276 * Equiv: (NOT source) XOR destination
277 * Xor Reverse: source OR (NOT destination)
278 * Copy Inverted: NOT source
279 * Xor Inverted: (NOT source) OR destination
280 * Nand: (NOT source) OR (NOT destination)
281 * Set: set pixels to 1
316 /* GC fill rule for polygons
334 GDK_LINE_ON_OFF_DASH,
368 #include <gdk/gdkcursors.h>
370 GDK_CURSOR_IS_PIXMAP = -1
374 GDK_FILTER_CONTINUE, /* Event not handled, continue processesing */
375 GDK_FILTER_TRANSLATE, /* Translated event stored */
376 GDK_FILTER_REMOVE /* Terminate processing, removing event */
380 GDK_VISIBILITY_UNOBSCURED,
381 GDK_VISIBILITY_PARTIAL,
382 GDK_VISIBILITY_FULLY_OBSCURED
383 } GdkVisibilityState;
386 * Nothing: No event occurred.
387 * Delete: A window delete event was sent by the window manager.
388 * The specified window should be deleted.
389 * Destroy: A window has been destroyed.
390 * Expose: Part of a window has been uncovered.
391 * NoExpose: Same as expose, but no expose event was generated.
392 * VisibilityNotify: A window has become fully/partially/not obscured.
393 * MotionNotify: The mouse has moved.
394 * ButtonPress: A mouse button was pressed.
395 * ButtonRelease: A mouse button was release.
396 * KeyPress: A key was pressed.
397 * KeyRelease: A key was released.
398 * EnterNotify: A window was entered.
399 * LeaveNotify: A window was exited.
400 * FocusChange: The focus window has changed. (The focus window gets
402 * Resize: A window has been resized.
403 * Map: A window has been mapped. (It is now visible on the screen).
404 * Unmap: A window has been unmapped. (It is no longer visible on
413 GDK_MOTION_NOTIFY = 3,
414 GDK_BUTTON_PRESS = 4,
415 GDK_2BUTTON_PRESS = 5,
416 GDK_3BUTTON_PRESS = 6,
417 GDK_BUTTON_RELEASE = 7,
420 GDK_ENTER_NOTIFY = 10,
421 GDK_LEAVE_NOTIFY = 11,
422 GDK_FOCUS_CHANGE = 12,
426 GDK_PROPERTY_NOTIFY = 16,
427 GDK_SELECTION_CLEAR = 17,
428 GDK_SELECTION_REQUEST = 18,
429 GDK_SELECTION_NOTIFY = 19,
430 GDK_PROXIMITY_IN = 20,
431 GDK_PROXIMITY_OUT = 21,
434 GDK_DRAG_MOTION = 24,
435 GDK_DRAG_STATUS = 25,
437 GDK_DROP_FINISHED = 27,
438 GDK_CLIENT_EVENT = 28,
439 GDK_VISIBILITY_NOTIFY = 29,
443 /* Event masks. (Used to select what types of events a window
448 GDK_EXPOSURE_MASK = 1 << 1,
449 GDK_POINTER_MOTION_MASK = 1 << 2,
450 GDK_POINTER_MOTION_HINT_MASK = 1 << 3,
451 GDK_BUTTON_MOTION_MASK = 1 << 4,
452 GDK_BUTTON1_MOTION_MASK = 1 << 5,
453 GDK_BUTTON2_MOTION_MASK = 1 << 6,
454 GDK_BUTTON3_MOTION_MASK = 1 << 7,
455 GDK_BUTTON_PRESS_MASK = 1 << 8,
456 GDK_BUTTON_RELEASE_MASK = 1 << 9,
457 GDK_KEY_PRESS_MASK = 1 << 10,
458 GDK_KEY_RELEASE_MASK = 1 << 11,
459 GDK_ENTER_NOTIFY_MASK = 1 << 12,
460 GDK_LEAVE_NOTIFY_MASK = 1 << 13,
461 GDK_FOCUS_CHANGE_MASK = 1 << 14,
462 GDK_STRUCTURE_MASK = 1 << 15,
463 GDK_PROPERTY_CHANGE_MASK = 1 << 16,
464 GDK_VISIBILITY_NOTIFY_MASK = 1 << 17,
465 GDK_PROXIMITY_IN_MASK = 1 << 18,
466 GDK_PROXIMITY_OUT_MASK = 1 << 19,
467 GDK_SUBSTRUCTURE_MASK = 1 << 20,
468 GDK_ALL_EVENTS_MASK = 0x0FFFFF
471 /* Types of enter/leave notifications.
477 * Unknown: An unknown type of enter/leave event occurred.
481 GDK_NOTIFY_ANCESTOR = 0,
482 GDK_NOTIFY_VIRTUAL = 1,
483 GDK_NOTIFY_INFERIOR = 2,
484 GDK_NOTIFY_NONLINEAR = 3,
485 GDK_NOTIFY_NONLINEAR_VIRTUAL = 4,
486 GDK_NOTIFY_UNKNOWN = 5
489 /* Enter/leave event modes.
501 /* Types of modifiers.
505 GDK_SHIFT_MASK = 1 << 0,
506 GDK_LOCK_MASK = 1 << 1,
507 GDK_CONTROL_MASK = 1 << 2,
508 GDK_MOD1_MASK = 1 << 3,
509 GDK_MOD2_MASK = 1 << 4,
510 GDK_MOD3_MASK = 1 << 5,
511 GDK_MOD4_MASK = 1 << 6,
512 GDK_MOD5_MASK = 1 << 7,
513 GDK_BUTTON1_MASK = 1 << 8,
514 GDK_BUTTON2_MASK = 1 << 9,
515 GDK_BUTTON3_MASK = 1 << 10,
516 GDK_BUTTON4_MASK = 1 << 11,
517 GDK_BUTTON5_MASK = 1 << 12,
518 GDK_RELEASE_MASK = 1 << 13,
519 GDK_MODIFIER_MASK = 0x3fff
524 GDK_CLIP_BY_CHILDREN = 0,
525 GDK_INCLUDE_INFERIORS = 1
530 GDK_INPUT_READ = 1 << 0,
531 GDK_INPUT_WRITE = 1 << 1,
532 GDK_INPUT_EXCEPTION = 1 << 2
539 GDK_ERROR_PARAM = -2,
552 GDK_GC_FOREGROUND = 1 << 0,
553 GDK_GC_BACKGROUND = 1 << 1,
554 GDK_GC_FONT = 1 << 2,
555 GDK_GC_FUNCTION = 1 << 3,
556 GDK_GC_FILL = 1 << 4,
557 GDK_GC_TILE = 1 << 5,
558 GDK_GC_STIPPLE = 1 << 6,
559 GDK_GC_CLIP_MASK = 1 << 7,
560 GDK_GC_SUBWINDOW = 1 << 8,
561 GDK_GC_TS_X_ORIGIN = 1 << 9,
562 GDK_GC_TS_Y_ORIGIN = 1 << 10,
563 GDK_GC_CLIP_X_ORIGIN = 1 << 11,
564 GDK_GC_CLIP_Y_ORIGIN = 1 << 12,
565 GDK_GC_EXPOSURES = 1 << 13,
566 GDK_GC_LINE_WIDTH = 1 << 14,
567 GDK_GC_LINE_STYLE = 1 << 15,
568 GDK_GC_CAP_STYLE = 1 << 16,
569 GDK_GC_JOIN_STYLE = 1 << 17
574 GDK_SELECTION_PRIMARY = 1,
575 GDK_SELECTION_SECONDARY = 2
580 GDK_PROPERTY_NEW_VALUE,
586 GDK_PROP_MODE_REPLACE,
587 GDK_PROP_MODE_PREPEND,
591 /* Enums for XInput support */
619 /* The next two types define enums for predefined atoms relating
620 to selections. In general, one will need to use gdk_intern_atom */
624 GDK_TARGET_BITMAP = 5,
625 GDK_TARGET_COLORMAP = 7,
626 GDK_TARGET_DRAWABLE = 17,
627 GDK_TARGET_PIXMAP = 20,
628 GDK_TARGET_STRING = 31
633 GDK_SELECTION_TYPE_ATOM = 4,
634 GDK_SELECTION_TYPE_BITMAP = 5,
635 GDK_SELECTION_TYPE_COLORMAP = 7,
636 GDK_SELECTION_TYPE_DRAWABLE = 17,
637 GDK_SELECTION_TYPE_INTEGER = 19,
638 GDK_SELECTION_TYPE_PIXMAP = 20,
639 GDK_SELECTION_TYPE_WINDOW = 33,
640 GDK_SELECTION_TYPE_STRING = 31
645 GDK_EXTENSION_EVENTS_NONE,
646 GDK_EXTENSION_EVENTS_ALL,
647 GDK_EXTENSION_EVENTS_CURSOR
650 typedef enum /*< flags >*/
652 GDK_IM_PREEDIT_AREA = 0x0001,
653 GDK_IM_PREEDIT_CALLBACKS = 0x0002,
654 GDK_IM_PREEDIT_POSITION = 0x0004,
655 GDK_IM_PREEDIT_NOTHING = 0x0008,
656 GDK_IM_PREEDIT_NONE = 0x0010,
657 GDK_IM_PREEDIT_MASK = 0x001f,
659 GDK_IM_STATUS_AREA = 0x0100,
660 GDK_IM_STATUS_CALLBACKS = 0x0200,
661 GDK_IM_STATUS_NOTHING = 0x0400,
662 GDK_IM_STATUS_NONE = 0x0800,
663 GDK_IM_STATUS_MASK = 0x0f00
668 GDK_IC_STYLE = 1 << 0,
669 GDK_IC_CLIENT_WINDOW = 1 << 1,
670 GDK_IC_FOCUS_WINDOW = 1 << 2,
671 GDK_IC_FILTER_EVENTS = 1 << 3,
672 GDK_IC_SPOT_LOCATION = 1 << 4,
673 GDK_IC_LINE_SPACING = 1 << 5,
674 GDK_IC_CURSOR = 1 << 6,
676 GDK_IC_PREEDIT_FONTSET = 1 << 10,
677 GDK_IC_PREEDIT_AREA = 1 << 11,
678 GDK_IC_PREEDIT_AREA_NEEDED = 1 << 12,
679 GDK_IC_PREEDIT_FOREGROUND = 1 << 13,
680 GDK_IC_PREEDIT_BACKGROUND = 1 << 14,
681 GDK_IC_PREEDIT_PIXMAP = 1 << 15,
682 GDK_IC_PREEDIT_COLORMAP = 1 << 16,
684 GDK_IC_STATUS_FONTSET = 1 << 21,
685 GDK_IC_STATUS_AREA = 1 << 22,
686 GDK_IC_STATUS_AREA_NEEDED = 1 << 23,
687 GDK_IC_STATUS_FOREGROUND = 1 << 24,
688 GDK_IC_STATUS_BACKGROUND = 1 << 25,
689 GDK_IC_STATUS_PIXMAP = 1 << 26,
690 GDK_IC_STATUS_COLORMAP = 1 << 27,
692 GDK_IC_ALL_REQ = GDK_IC_STYLE |
693 GDK_IC_CLIENT_WINDOW,
695 GDK_IC_PREEDIT_AREA_REQ = GDK_IC_PREEDIT_AREA |
696 GDK_IC_PREEDIT_FONTSET,
697 GDK_IC_PREEDIT_POSITION_REQ = GDK_IC_PREEDIT_AREA | GDK_IC_SPOT_LOCATION |
698 GDK_IC_PREEDIT_FONTSET,
700 GDK_IC_STATUS_AREA_REQ = GDK_IC_STATUS_AREA |
701 GDK_IC_STATUS_FONTSET
702 } GdkICAttributesType;
704 /* The next two enumeration values current match the
705 * Motif constants. If this is changed, the implementation
706 * of gdk_window_set_decorations/gdk_window_set_functions
707 * will need to change as well.
711 GDK_DECOR_ALL = 1 << 0,
712 GDK_DECOR_BORDER = 1 << 1,
713 GDK_DECOR_RESIZEH = 1 << 2,
714 GDK_DECOR_TITLE = 1 << 3,
715 GDK_DECOR_MENU = 1 << 4,
716 GDK_DECOR_MINIMIZE = 1 << 5,
717 GDK_DECOR_MAXIMIZE = 1 << 6
722 GDK_FUNC_ALL = 1 << 0,
723 GDK_FUNC_RESIZE = 1 << 1,
724 GDK_FUNC_MOVE = 1 << 2,
725 GDK_FUNC_MINIMIZE = 1 << 3,
726 GDK_FUNC_MAXIMIZE = 1 << 4,
727 GDK_FUNC_CLOSE = 1 << 5
730 typedef void (*GdkInputFunction) (gpointer data,
732 GdkInputCondition condition);
734 typedef void (*GdkDestroyNotify) (gpointer data);
736 /* Color Context modes.
738 * GDK_CC_MODE_UNDEFINED - unknown
739 * GDK_CC_MODE_BW - default B/W
740 * GDK_CC_MODE_STD_CMAP - has a standard colormap
741 * GDK_CC_MODE_TRUE - is a TrueColor/DirectColor visual
742 * GDK_CC_MODE_MY_GRAY - my grayramp
743 * GDK_CC_MODE_PALETTE - has a pre-allocated palette
748 GDK_CC_MODE_UNDEFINED,
750 GDK_CC_MODE_STD_CMAP,
754 } GdkColorContextMode;
756 /* Types of overlapping between a rectangle and a region
757 * GDK_OVERLAP_RECTANGLE_IN: rectangle is in region
758 * GDK_OVERLAP_RECTANGLE_OUT: rectangle in not in region
759 * GDK_OVERLAP_RECTANGLE_PART: rectangle in partially in region
764 GDK_OVERLAP_RECTANGLE_IN,
765 GDK_OVERLAP_RECTANGLE_OUT,
766 GDK_OVERLAP_RECTANGLE_PART
770 GDK_ACTION_DEFAULT = 1 << 0,
771 GDK_ACTION_COPY = 1 << 1,
772 GDK_ACTION_MOVE = 1 << 2,
773 GDK_ACTION_LINK = 1 << 3,
774 GDK_ACTION_PRIVATE = 1 << 4,
775 GDK_ACTION_ASK = 1 << 5
779 GDK_DRAG_PROTO_MOTIF,
781 GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming
783 GDK_DRAG_PROTO_NONE, /* Not a valid drag window */
784 GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
785 GDK_DRAG_PROTO_OLE2, /* The complex OLE2 dnd (not implemented) */
789 * A color consists of red, green and blue values in the
790 * range 0-65535 and a pixel value. The pixel value is highly
791 * dependent on the depth and colormap which this color will
792 * be used to draw into. Therefore, sharing colors between
793 * colormaps is a bad idea.
803 /* The colormap type.
804 * Colormaps consist of 256 colors.
813 * "type" is the type of visual this is (PseudoColor, TrueColor, etc).
814 * "depth" is the bit depth of this visual.
815 * "colormap_size" is the size of a colormap for this visual.
816 * "bits_per_rgb" is the number of significant bits per red, green and blue.
817 * The red, green and blue masks, shifts and precisions refer
818 * to value needed to calculate pixel values in TrueColor and DirectColor
819 * visuals. The "mask" is the significant bits within the pixel. The
820 * "shift" is the number of bits left we must shift a primary for it
821 * to be in position (according to the "mask"). "prec" refers to how
822 * much precision the pixel value contains for a particular primary.
828 GdkByteOrder byte_order;
845 struct _GdkWindowAttr
852 GdkWindowClass wclass;
854 GdkColormap *colormap;
855 GdkWindowType window_type;
858 gchar *wmclass_class;
859 gboolean override_redirect;
867 struct _GdkGeometry {
878 /* GdkGravity gravity; */
884 GdkVisual *visual; /* visual used to create the image */
885 GdkByteOrder byte_order;
889 guint16 bpp; /* bytes per pixel */
890 guint16 bpl; /* bytes per line */
899 GdkFunction function;
903 GdkPixmap *clip_mask;
904 GdkSubwindowMode subwindow_mode;
909 gint graphics_exposures;
911 GdkLineStyle line_style;
912 GdkCapStyle cap_style;
913 GdkJoinStyle join_style;
956 struct _GdkColorContextDither
958 gint fast_rgb[32][32][32]; /* quick look-up table for faster rendering */
959 gint fast_err[32][32][32]; /* internal RGB error information */
960 gint fast_erg[32][32][32];
961 gint fast_erb[32][32][32];
964 struct _GdkColorContext
967 GdkColormap *colormap;
969 gint num_colors; /* available no. of colors in colormap */
970 gint max_colors; /* maximum no. of colors */
971 gint num_allocated; /* no. of allocated colors */
973 GdkColorContextMode mode;
974 gint need_to_free_colormap;
975 GdkAtom std_cmap_atom;
977 gulong *clut; /* color look-up table */
978 GdkColor *cmap; /* colormap */
980 GHashTable *color_hash; /* hash table of allocated colors */
981 GdkColor *palette; /* preallocated palette */
982 gint num_palette; /* size of palette */
984 GdkColorContextDither *fast_dither; /* fast dither matrix */
1013 /* Types for XInput support */
1015 struct _GdkDeviceKey
1018 GdkModifierType modifiers;
1021 struct _GdkDeviceInfo
1025 GdkInputSource source;
1027 gint has_cursor; /* TRUE if the X pointer follows device motion */
1029 GdkAxisUse *axes; /* Specifies use for each axis */
1034 struct _GdkTimeCoord
1044 /* Structure that holds information about a drag in progress.
1045 * this is used on both source and destination sides.
1047 struct _GdkDragContext {
1048 GdkDragProtocol protocol;
1052 GdkWindow *source_window;
1053 GdkWindow *dest_window;
1056 GdkDragAction actions;
1057 GdkDragAction suggested_action;
1058 GdkDragAction action;
1063 /* Event filtering */
1065 typedef void GdkXEvent; /* Can be cast to XEvent */
1067 typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
1078 struct _GdkEventExpose
1084 gint count; /* If non-zero, how many more events follow. */
1087 struct _GdkEventNoExpose
1092 /* XXX: does anyone need the X major_code or minor_code fields? */
1095 struct _GdkEventVisibility
1100 GdkVisibilityState state;
1103 struct _GdkEventMotion
1116 GdkInputSource source;
1118 gdouble x_root, y_root;
1121 struct _GdkEventButton
1134 GdkInputSource source;
1136 gdouble x_root, y_root;
1151 struct _GdkEventCrossing
1156 GdkWindow *subwindow;
1162 GdkCrossingMode mode;
1163 GdkNotifyType detail;
1168 struct _GdkEventFocus
1176 struct _GdkEventConfigure
1186 struct _GdkEventProperty
1196 struct _GdkEventSelection
1208 /* This event type will be used pretty rarely. It only is important
1209 for XInput aware programs that are drawing their own cursor */
1211 struct _GdkEventProximity
1217 GdkInputSource source;
1221 struct _GdkEventClient
1226 GdkAtom message_type;
1227 gushort data_format;
1235 /* Event types for DND */
1237 struct _GdkEventDND {
1241 GdkDragContext *context;
1244 gshort x_root, y_root;
1251 GdkEventExpose expose;
1252 GdkEventNoExpose no_expose;
1253 GdkEventVisibility visibility;
1254 GdkEventMotion motion;
1255 GdkEventButton button;
1257 GdkEventCrossing crossing;
1258 GdkEventFocus focus_change;
1259 GdkEventConfigure configure;
1260 GdkEventProperty property;
1261 GdkEventSelection selection;
1262 GdkEventProximity proximity;
1263 GdkEventClient client;
1275 GdkWindow *client_window;
1276 GdkWindow *focus_window;
1277 GdkEventMask filter_events;
1278 GdkPoint spot_location;
1282 GdkFont *preedit_fontset;
1283 GdkRectangle preedit_area;
1284 GdkRectangle preedit_area_needed;
1285 GdkColor preedit_foreground;
1286 GdkColor preedit_background;
1287 GdkPixmap *preedit_pixmap;
1288 GdkColormap *preedit_colormap;
1290 GdkFont *status_fontset;
1291 GdkRectangle status_area;
1292 GdkRectangle status_area_needed;
1293 GdkColor status_foreground;
1294 GdkColor status_background;
1295 GdkPixmap *status_pixmap;
1296 GdkColormap *status_colormap;
1301 #endif /* __cplusplus */
1304 #endif /* __GDK_TYPES_H__ */