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 /* some common magic values */
54 #define GDK_CURRENT_TIME 0L
55 #define GDK_PARENT_RELATIVE 1L
57 /* special deviceid for core pointer events */
58 #define GDK_CORE_POINTER 0xfedc
63 #endif /* __cplusplus */
66 /* Type definitions for the basic structures.
69 typedef gulong GdkAtom;
70 typedef struct _GdkColor GdkColor;
71 typedef struct _GdkColormap GdkColormap;
72 typedef struct _GdkVisual GdkVisual;
73 typedef struct _GdkWindowAttr GdkWindowAttr;
74 typedef struct _GdkWindow GdkWindow;
75 typedef struct _GdkWindow GdkPixmap;
76 typedef struct _GdkWindow GdkBitmap;
77 typedef struct _GdkWindow GdkDrawable;
78 typedef struct _GdkGeometry GdkGeometry;
79 typedef struct _GdkImage GdkImage;
80 typedef struct _GdkGCValues GdkGCValues;
81 typedef struct _GdkGC GdkGC;
82 typedef struct _GdkPoint GdkPoint;
83 typedef struct _GdkRectangle GdkRectangle;
84 typedef struct _GdkSegment GdkSegment;
85 typedef struct _GdkFont GdkFont;
86 typedef struct _GdkCursor GdkCursor;
87 typedef struct _GdkColorContextDither GdkColorContextDither;
88 typedef struct _GdkColorContext GdkColorContext;
89 typedef struct _GdkDragContext GdkDragContext;
91 typedef struct _GdkEventAny GdkEventAny;
92 typedef struct _GdkEventExpose GdkEventExpose;
93 typedef struct _GdkEventNoExpose GdkEventNoExpose;
94 typedef struct _GdkEventVisibility GdkEventVisibility;
95 typedef struct _GdkEventMotion GdkEventMotion;
96 typedef struct _GdkEventButton GdkEventButton;
97 typedef struct _GdkEventKey GdkEventKey;
98 typedef struct _GdkEventFocus GdkEventFocus;
99 typedef struct _GdkEventCrossing GdkEventCrossing;
100 typedef struct _GdkEventConfigure GdkEventConfigure;
101 typedef struct _GdkEventProperty GdkEventProperty;
102 typedef struct _GdkEventSelection GdkEventSelection;
103 typedef struct _GdkEventProximity GdkEventProximity;
104 typedef struct _GdkEventClient GdkEventClient;
106 typedef struct _GdkEventDND GdkEventDND;
108 typedef union _GdkEvent GdkEvent;
110 typedef struct _GdkDeviceKey GdkDeviceKey;
111 typedef struct _GdkDeviceInfo GdkDeviceInfo;
112 typedef struct _GdkTimeCoord GdkTimeCoord;
113 typedef struct _GdkRegion GdkRegion;
114 typedef void (*GdkEventFunc) (GdkEvent *event,
117 typedef struct _GdkIC GdkIC;
118 typedef struct _GdkICAttr GdkICAttr;
120 typedef guint32 GdkWChar;
124 * Root: There is only 1 root window and it is initialized
125 * at startup. Creating a window of type GDK_WINDOW_ROOT
127 * Toplevel: Windows which interact with the window manager.
128 * Child: Windows which are children of some other type of window.
129 * (Any other type of window). Most windows are child windows.
130 * Dialog: A special kind of toplevel window which interacts with
131 * the window manager slightly differently than a regular
132 * toplevel window. Dialog windows should be used for any
134 * Pixmap: Pixmaps are really just another kind of window which
135 * doesn't actually appear on the screen. It can't have
136 * children, either and is really just a convenience so
137 * that the drawing functions can work on both windows
138 * and pixmaps transparently. (ie. You shouldn't pass a
139 * pixmap to any procedure which accepts a window with the
140 * exception of the drawing functions).
141 * Foreign: A window that actually belongs to another application
154 /* Classes of windows.
155 * InputOutput: Almost every window should be of this type. Such windows
156 * receive events and are also displayed on screen.
157 * InputOnly: Used only in special circumstances when events need to be
158 * stolen from another window or windows. Input only windows
159 * have no visible output, so they are handy for placing over
160 * top of a group of windows in order to grab the events (or
161 * filter the events) from those windows.
170 * Normal: Normal X image type. These are slow as they involve passing
171 * the entire image through the X connection each time a draw
172 * request is required. On Win32, a bitmap.
173 * Shared: Shared memory X image type. These are fast as the X server
174 * and the program actually use the same piece of memory. They
175 * should be used with care though as there is the possibility
176 * for both the X server and the program to be reading/writing
177 * the image simultaneously and producing undesired results.
178 * On Win32, also a bitmap.
179 * Shared Pixmap: Also a shared memory image, which also has a
180 * pixmap using the same memory. Used by gdk_imlib with the
188 GDK_IMAGE_SHARED_PIXMAP
201 GDK_VISUAL_STATIC_GRAY,
202 GDK_VISUAL_GRAYSCALE,
203 GDK_VISUAL_STATIC_COLOR,
204 GDK_VISUAL_PSEUDO_COLOR,
205 GDK_VISUAL_TRUE_COLOR,
206 GDK_VISUAL_DIRECT_COLOR
210 * GDK_FONT_FONT: the font is an XFontStruct.
211 * GDK_FONT_FONTSET: the font is an XFontSet used for I18N.
219 /* Window attribute mask values.
220 * GDK_WA_TITLE: The "title" field is valid.
221 * GDK_WA_X: The "x" field is valid.
222 * GDK_WA_Y: The "y" field is valid.
223 * GDK_WA_CURSOR: The "cursor" field is valid.
224 * GDK_WA_COLORMAP: The "colormap" field is valid.
225 * GDK_WA_VISUAL: The "visual" field is valid.
229 GDK_WA_TITLE = 1 << 1,
232 GDK_WA_CURSOR = 1 << 4,
233 GDK_WA_COLORMAP = 1 << 5,
234 GDK_WA_VISUAL = 1 << 6,
235 GDK_WA_WMCLASS = 1 << 7,
236 GDK_WA_NOREDIR = 1 << 8
237 } GdkWindowAttributesType;
239 /* Size restriction enumeration.
243 GDK_HINT_POS = 1 << 0,
244 GDK_HINT_MIN_SIZE = 1 << 1,
245 GDK_HINT_MAX_SIZE = 1 << 2,
246 GDK_HINT_BASE_SIZE = 1 << 3,
247 GDK_HINT_ASPECT = 1 << 4,
248 GDK_HINT_RESIZE_INC = 1 << 5
251 /* GC function types.
252 * Copy: Overwrites destination pixels with the source pixels.
253 * Invert: Inverts the destination pixels.
254 * Xor: Xor's the destination pixels with the source pixels.
255 * Clear: set pixels to 0
256 * And: source AND destination
257 * And Reverse: source AND (NOT destination)
258 * And Invert: (NOT source) AND destination
260 * Or: source OR destination
261 * Nor: (NOT source) AND (NOT destination)
262 * Equiv: (NOT source) XOR destination
263 * Xor Reverse: source OR (NOT destination)
264 * Copy Inverted: NOT source
265 * Xor Inverted: (NOT source) OR destination
266 * Nand: (NOT source) OR (NOT destination)
267 * Set: set pixels to 1
302 /* GC fill rule for polygons
320 GDK_LINE_ON_OFF_DASH,
354 #include <gdk/gdkcursors.h>
356 GDK_CURSOR_IS_PIXMAP = -1
360 GDK_FILTER_CONTINUE, /* Event not handled, continue processesing */
361 GDK_FILTER_TRANSLATE, /* Translated event stored */
362 GDK_FILTER_REMOVE /* Terminate processing, removing event */
366 GDK_VISIBILITY_UNOBSCURED,
367 GDK_VISIBILITY_PARTIAL,
368 GDK_VISIBILITY_FULLY_OBSCURED
369 } GdkVisibilityState;
372 * Nothing: No event occurred.
373 * Delete: A window delete event was sent by the window manager.
374 * The specified window should be deleted.
375 * Destroy: A window has been destroyed.
376 * Expose: Part of a window has been uncovered.
377 * NoExpose: Same as expose, but no expose event was generated.
378 * VisibilityNotify: A window has become fully/partially/not obscured.
379 * MotionNotify: The mouse has moved.
380 * ButtonPress: A mouse button was pressed.
381 * ButtonRelease: A mouse button was release.
382 * KeyPress: A key was pressed.
383 * KeyRelease: A key was released.
384 * EnterNotify: A window was entered.
385 * LeaveNotify: A window was exited.
386 * FocusChange: The focus window has changed. (The focus window gets
388 * Resize: A window has been resized.
389 * Map: A window has been mapped. (It is now visible on the screen).
390 * Unmap: A window has been unmapped. (It is no longer visible on
399 GDK_MOTION_NOTIFY = 3,
400 GDK_BUTTON_PRESS = 4,
401 GDK_2BUTTON_PRESS = 5,
402 GDK_3BUTTON_PRESS = 6,
403 GDK_BUTTON_RELEASE = 7,
406 GDK_ENTER_NOTIFY = 10,
407 GDK_LEAVE_NOTIFY = 11,
408 GDK_FOCUS_CHANGE = 12,
412 GDK_PROPERTY_NOTIFY = 16,
413 GDK_SELECTION_CLEAR = 17,
414 GDK_SELECTION_REQUEST = 18,
415 GDK_SELECTION_NOTIFY = 19,
416 GDK_PROXIMITY_IN = 20,
417 GDK_PROXIMITY_OUT = 21,
420 GDK_DRAG_MOTION = 24,
421 GDK_DRAG_STATUS = 25,
423 GDK_DROP_FINISHED = 27,
424 GDK_CLIENT_EVENT = 28,
425 GDK_VISIBILITY_NOTIFY = 29,
429 /* Event masks. (Used to select what types of events a window
434 GDK_EXPOSURE_MASK = 1 << 1,
435 GDK_POINTER_MOTION_MASK = 1 << 2,
436 GDK_POINTER_MOTION_HINT_MASK = 1 << 3,
437 GDK_BUTTON_MOTION_MASK = 1 << 4,
438 GDK_BUTTON1_MOTION_MASK = 1 << 5,
439 GDK_BUTTON2_MOTION_MASK = 1 << 6,
440 GDK_BUTTON3_MOTION_MASK = 1 << 7,
441 GDK_BUTTON_PRESS_MASK = 1 << 8,
442 GDK_BUTTON_RELEASE_MASK = 1 << 9,
443 GDK_KEY_PRESS_MASK = 1 << 10,
444 GDK_KEY_RELEASE_MASK = 1 << 11,
445 GDK_ENTER_NOTIFY_MASK = 1 << 12,
446 GDK_LEAVE_NOTIFY_MASK = 1 << 13,
447 GDK_FOCUS_CHANGE_MASK = 1 << 14,
448 GDK_STRUCTURE_MASK = 1 << 15,
449 GDK_PROPERTY_CHANGE_MASK = 1 << 16,
450 GDK_VISIBILITY_NOTIFY_MASK = 1 << 17,
451 GDK_PROXIMITY_IN_MASK = 1 << 18,
452 GDK_PROXIMITY_OUT_MASK = 1 << 19,
453 GDK_SUBSTRUCTURE_MASK = 1 << 20,
454 GDK_ALL_EVENTS_MASK = 0x0FFFFF
457 /* Types of enter/leave notifications.
463 * Unknown: An unknown type of enter/leave event occurred.
467 GDK_NOTIFY_ANCESTOR = 0,
468 GDK_NOTIFY_VIRTUAL = 1,
469 GDK_NOTIFY_INFERIOR = 2,
470 GDK_NOTIFY_NONLINEAR = 3,
471 GDK_NOTIFY_NONLINEAR_VIRTUAL = 4,
472 GDK_NOTIFY_UNKNOWN = 5
475 /* Enter/leave event modes.
487 /* Types of modifiers.
491 GDK_SHIFT_MASK = 1 << 0,
492 GDK_LOCK_MASK = 1 << 1,
493 GDK_CONTROL_MASK = 1 << 2,
494 GDK_MOD1_MASK = 1 << 3,
495 GDK_MOD2_MASK = 1 << 4,
496 GDK_MOD3_MASK = 1 << 5,
497 GDK_MOD4_MASK = 1 << 6,
498 GDK_MOD5_MASK = 1 << 7,
499 GDK_BUTTON1_MASK = 1 << 8,
500 GDK_BUTTON2_MASK = 1 << 9,
501 GDK_BUTTON3_MASK = 1 << 10,
502 GDK_BUTTON4_MASK = 1 << 11,
503 GDK_BUTTON5_MASK = 1 << 12,
504 GDK_RELEASE_MASK = 1 << 13,
505 GDK_MODIFIER_MASK = 0x3fff
510 GDK_CLIP_BY_CHILDREN = 0,
511 GDK_INCLUDE_INFERIORS = 1
516 GDK_INPUT_READ = 1 << 0,
517 GDK_INPUT_WRITE = 1 << 1,
518 GDK_INPUT_EXCEPTION = 1 << 2
525 GDK_ERROR_PARAM = -2,
538 GDK_GC_FOREGROUND = 1 << 0,
539 GDK_GC_BACKGROUND = 1 << 1,
540 GDK_GC_FONT = 1 << 2,
541 GDK_GC_FUNCTION = 1 << 3,
542 GDK_GC_FILL = 1 << 4,
543 GDK_GC_TILE = 1 << 5,
544 GDK_GC_STIPPLE = 1 << 6,
545 GDK_GC_CLIP_MASK = 1 << 7,
546 GDK_GC_SUBWINDOW = 1 << 8,
547 GDK_GC_TS_X_ORIGIN = 1 << 9,
548 GDK_GC_TS_Y_ORIGIN = 1 << 10,
549 GDK_GC_CLIP_X_ORIGIN = 1 << 11,
550 GDK_GC_CLIP_Y_ORIGIN = 1 << 12,
551 GDK_GC_EXPOSURES = 1 << 13,
552 GDK_GC_LINE_WIDTH = 1 << 14,
553 GDK_GC_LINE_STYLE = 1 << 15,
554 GDK_GC_CAP_STYLE = 1 << 16,
555 GDK_GC_JOIN_STYLE = 1 << 17
560 GDK_SELECTION_PRIMARY = 1,
561 GDK_SELECTION_SECONDARY = 2
566 GDK_PROPERTY_NEW_VALUE,
572 GDK_PROP_MODE_REPLACE,
573 GDK_PROP_MODE_PREPEND,
577 /* Enums for XInput support */
605 /* The next two types define enums for predefined atoms relating
606 to selections. In general, one will need to use gdk_intern_atom */
610 GDK_TARGET_BITMAP = 5,
611 GDK_TARGET_COLORMAP = 7,
612 GDK_TARGET_DRAWABLE = 17,
613 GDK_TARGET_PIXMAP = 20,
614 GDK_TARGET_STRING = 31
619 GDK_SELECTION_TYPE_ATOM = 4,
620 GDK_SELECTION_TYPE_BITMAP = 5,
621 GDK_SELECTION_TYPE_COLORMAP = 7,
622 GDK_SELECTION_TYPE_DRAWABLE = 17,
623 GDK_SELECTION_TYPE_INTEGER = 19,
624 GDK_SELECTION_TYPE_PIXMAP = 20,
625 GDK_SELECTION_TYPE_WINDOW = 33,
626 GDK_SELECTION_TYPE_STRING = 31
631 GDK_EXTENSION_EVENTS_NONE,
632 GDK_EXTENSION_EVENTS_ALL,
633 GDK_EXTENSION_EVENTS_CURSOR
636 typedef enum /*< flags >*/
638 GDK_IM_PREEDIT_AREA = 0x0001,
639 GDK_IM_PREEDIT_CALLBACKS = 0x0002,
640 GDK_IM_PREEDIT_POSITION = 0x0004,
641 GDK_IM_PREEDIT_NOTHING = 0x0008,
642 GDK_IM_PREEDIT_NONE = 0x0010,
643 GDK_IM_PREEDIT_MASK = 0x001f,
645 GDK_IM_STATUS_AREA = 0x0100,
646 GDK_IM_STATUS_CALLBACKS = 0x0200,
647 GDK_IM_STATUS_NOTHING = 0x0400,
648 GDK_IM_STATUS_NONE = 0x0800,
649 GDK_IM_STATUS_MASK = 0x0f00
654 GDK_IC_STYLE = 1 << 0,
655 GDK_IC_CLIENT_WINDOW = 1 << 1,
656 GDK_IC_FOCUS_WINDOW = 1 << 2,
657 GDK_IC_FILTER_EVENTS = 1 << 3,
658 GDK_IC_SPOT_LOCATION = 1 << 4,
659 GDK_IC_LINE_SPACING = 1 << 5,
660 GDK_IC_CURSOR = 1 << 6,
662 GDK_IC_PREEDIT_FONTSET = 1 << 10,
663 GDK_IC_PREEDIT_AREA = 1 << 11,
664 GDK_IC_PREEDIT_AREA_NEEDED = 1 << 12,
665 GDK_IC_PREEDIT_FOREGROUND = 1 << 13,
666 GDK_IC_PREEDIT_BACKGROUND = 1 << 14,
667 GDK_IC_PREEDIT_PIXMAP = 1 << 15,
668 GDK_IC_PREEDIT_COLORMAP = 1 << 16,
670 GDK_IC_STATUS_FONTSET = 1 << 21,
671 GDK_IC_STATUS_AREA = 1 << 22,
672 GDK_IC_STATUS_AREA_NEEDED = 1 << 23,
673 GDK_IC_STATUS_FOREGROUND = 1 << 24,
674 GDK_IC_STATUS_BACKGROUND = 1 << 25,
675 GDK_IC_STATUS_PIXMAP = 1 << 26,
676 GDK_IC_STATUS_COLORMAP = 1 << 27,
678 GDK_IC_ALL_REQ = GDK_IC_STYLE |
679 GDK_IC_CLIENT_WINDOW,
681 GDK_IC_PREEDIT_AREA_REQ = GDK_IC_PREEDIT_AREA |
682 GDK_IC_PREEDIT_FONTSET,
683 GDK_IC_PREEDIT_POSITION_REQ = GDK_IC_PREEDIT_AREA | GDK_IC_SPOT_LOCATION |
684 GDK_IC_PREEDIT_FONTSET,
686 GDK_IC_STATUS_AREA_REQ = GDK_IC_STATUS_AREA |
687 GDK_IC_STATUS_FONTSET
688 } GdkICAttributesType;
690 /* The next two enumeration values current match the
691 * Motif constants. If this is changed, the implementation
692 * of gdk_window_set_decorations/gdk_window_set_functions
693 * will need to change as well.
697 GDK_DECOR_ALL = 1 << 0,
698 GDK_DECOR_BORDER = 1 << 1,
699 GDK_DECOR_RESIZEH = 1 << 2,
700 GDK_DECOR_TITLE = 1 << 3,
701 GDK_DECOR_MENU = 1 << 4,
702 GDK_DECOR_MINIMIZE = 1 << 5,
703 GDK_DECOR_MAXIMIZE = 1 << 6
708 GDK_FUNC_ALL = 1 << 0,
709 GDK_FUNC_RESIZE = 1 << 1,
710 GDK_FUNC_MOVE = 1 << 2,
711 GDK_FUNC_MINIMIZE = 1 << 3,
712 GDK_FUNC_MAXIMIZE = 1 << 4,
713 GDK_FUNC_CLOSE = 1 << 5
716 typedef void (*GdkInputFunction) (gpointer data,
718 GdkInputCondition condition);
720 typedef void (*GdkDestroyNotify) (gpointer data);
722 /* Color Context modes.
724 * GDK_CC_MODE_UNDEFINED - unknown
725 * GDK_CC_MODE_BW - default B/W
726 * GDK_CC_MODE_STD_CMAP - has a standard colormap
727 * GDK_CC_MODE_TRUE - is a TrueColor/DirectColor visual
728 * GDK_CC_MODE_MY_GRAY - my grayramp
729 * GDK_CC_MODE_PALETTE - has a pre-allocated palette
734 GDK_CC_MODE_UNDEFINED,
736 GDK_CC_MODE_STD_CMAP,
740 } GdkColorContextMode;
742 /* Types of overlapping between a rectangle and a region
743 * GDK_OVERLAP_RECTANGLE_IN: rectangle is in region
744 * GDK_OVERLAP_RECTANGLE_OUT: rectangle in not in region
745 * GDK_OVERLAP_RECTANGLE_PART: rectangle in partially in region
750 GDK_OVERLAP_RECTANGLE_IN,
751 GDK_OVERLAP_RECTANGLE_OUT,
752 GDK_OVERLAP_RECTANGLE_PART
756 GDK_ACTION_DEFAULT = 1 << 0,
757 GDK_ACTION_COPY = 1 << 1,
758 GDK_ACTION_MOVE = 1 << 2,
759 GDK_ACTION_LINK = 1 << 3,
760 GDK_ACTION_PRIVATE = 1 << 4,
761 GDK_ACTION_ASK = 1 << 5
765 GDK_DRAG_PROTO_MOTIF,
767 GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming
769 GDK_DRAG_PROTO_NONE, /* Not a valid drag window */
770 GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
771 GDK_DRAG_PROTO_OLE2, /* The complex OLE2 dnd (not implemented) */
775 * A color consists of red, green and blue values in the
776 * range 0-65535 and a pixel value. The pixel value is highly
777 * dependent on the depth and colormap which this color will
778 * be used to draw into. Therefore, sharing colors between
779 * colormaps is a bad idea.
789 /* The colormap type.
790 * Colormaps consist of 256 colors.
799 * "type" is the type of visual this is (PseudoColor, TrueColor, etc).
800 * "depth" is the bit depth of this visual.
801 * "colormap_size" is the size of a colormap for this visual.
802 * "bits_per_rgb" is the number of significant bits per red, green and blue.
803 * The red, green and blue masks, shifts and precisions refer
804 * to value needed to calculate pixel values in TrueColor and DirectColor
805 * visuals. The "mask" is the significant bits within the pixel. The
806 * "shift" is the number of bits left we must shift a primary for it
807 * to be in position (according to the "mask"). "prec" refers to how
808 * much precision the pixel value contains for a particular primary.
814 GdkByteOrder byte_order;
831 struct _GdkWindowAttr
838 GdkWindowClass wclass;
840 GdkColormap *colormap;
841 GdkWindowType window_type;
844 gchar *wmclass_class;
845 gboolean override_redirect;
853 struct _GdkGeometry {
864 /* GdkGravity gravity; */
870 GdkVisual *visual; /* visual used to create the image */
871 GdkByteOrder byte_order;
875 guint16 bpp; /* bytes per pixel */
876 guint16 bpl; /* bytes per line */
885 GdkFunction function;
889 GdkPixmap *clip_mask;
890 GdkSubwindowMode subwindow_mode;
895 gint graphics_exposures;
897 GdkLineStyle line_style;
898 GdkCapStyle cap_style;
899 GdkJoinStyle join_style;
942 struct _GdkColorContextDither
944 gint fast_rgb[32][32][32]; /* quick look-up table for faster rendering */
945 gint fast_err[32][32][32]; /* internal RGB error information */
946 gint fast_erg[32][32][32];
947 gint fast_erb[32][32][32];
950 struct _GdkColorContext
953 GdkColormap *colormap;
955 gint num_colors; /* available no. of colors in colormap */
956 gint max_colors; /* maximum no. of colors */
957 gint num_allocated; /* no. of allocated colors */
959 GdkColorContextMode mode;
960 gint need_to_free_colormap;
961 GdkAtom std_cmap_atom;
963 gulong *clut; /* color look-up table */
964 GdkColor *cmap; /* colormap */
966 GHashTable *color_hash; /* hash table of allocated colors */
967 GdkColor *palette; /* preallocated palette */
968 gint num_palette; /* size of palette */
970 GdkColorContextDither *fast_dither; /* fast dither matrix */
999 /* Types for XInput support */
1001 struct _GdkDeviceKey
1004 GdkModifierType modifiers;
1007 struct _GdkDeviceInfo
1011 GdkInputSource source;
1013 gint has_cursor; /* TRUE if the X pointer follows device motion */
1015 GdkAxisUse *axes; /* Specifies use for each axis */
1020 struct _GdkTimeCoord
1030 /* Structure that holds information about a drag in progress.
1031 * this is used on both source and destination sides.
1033 struct _GdkDragContext {
1034 GdkDragProtocol protocol;
1038 GdkWindow *source_window;
1039 GdkWindow *dest_window;
1042 GdkDragAction actions;
1043 GdkDragAction suggested_action;
1044 GdkDragAction action;
1049 /* Event filtering */
1051 typedef void GdkXEvent; /* Can be cast to XEvent */
1053 typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
1064 struct _GdkEventExpose
1070 gint count; /* If non-zero, how many more events follow. */
1073 struct _GdkEventNoExpose
1078 /* XXX: does anyone need the X major_code or minor_code fields? */
1081 struct _GdkEventVisibility
1086 GdkVisibilityState state;
1089 struct _GdkEventMotion
1102 GdkInputSource source;
1104 gdouble x_root, y_root;
1107 struct _GdkEventButton
1120 GdkInputSource source;
1122 gdouble x_root, y_root;
1137 struct _GdkEventCrossing
1142 GdkWindow *subwindow;
1148 GdkCrossingMode mode;
1149 GdkNotifyType detail;
1154 struct _GdkEventFocus
1162 struct _GdkEventConfigure
1172 struct _GdkEventProperty
1182 struct _GdkEventSelection
1194 /* This event type will be used pretty rarely. It only is important
1195 for XInput aware programs that are drawing their own cursor */
1197 struct _GdkEventProximity
1203 GdkInputSource source;
1207 struct _GdkEventClient
1212 GdkAtom message_type;
1213 gushort data_format;
1221 /* Event types for DND */
1223 struct _GdkEventDND {
1227 GdkDragContext *context;
1230 gshort x_root, y_root;
1237 GdkEventExpose expose;
1238 GdkEventNoExpose no_expose;
1239 GdkEventVisibility visibility;
1240 GdkEventMotion motion;
1241 GdkEventButton button;
1243 GdkEventCrossing crossing;
1244 GdkEventFocus focus_change;
1245 GdkEventConfigure configure;
1246 GdkEventProperty property;
1247 GdkEventSelection selection;
1248 GdkEventProximity proximity;
1249 GdkEventClient client;
1261 GdkWindow *client_window;
1262 GdkWindow *focus_window;
1263 GdkEventMask filter_events;
1264 GdkPoint spot_location;
1268 GdkFont *preedit_fontset;
1269 GdkRectangle preedit_area;
1270 GdkRectangle preedit_area_needed;
1271 GdkColor preedit_foreground;
1272 GdkColor preedit_background;
1273 GdkPixmap *preedit_pixmap;
1274 GdkColormap *preedit_colormap;
1276 GdkFont *status_fontset;
1277 GdkRectangle status_area;
1278 GdkRectangle status_area_needed;
1279 GdkColor status_foreground;
1280 GdkColor status_background;
1281 GdkPixmap *status_pixmap;
1282 GdkColormap *status_colormap;
1287 #endif /* __cplusplus */
1290 #endif /* __GDK_TYPES_H__ */