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)
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.
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 * Shared Pixmap: Also a shared memory image, which also has a
193 * pixmap using the same memory.
200 GDK_IMAGE_SHARED_PIXMAP
213 GDK_VISUAL_STATIC_GRAY,
214 GDK_VISUAL_GRAYSCALE,
215 GDK_VISUAL_STATIC_COLOR,
216 GDK_VISUAL_PSEUDO_COLOR,
217 GDK_VISUAL_TRUE_COLOR,
218 GDK_VISUAL_DIRECT_COLOR
222 * GDK_FONT_FONT: the font is an XFontStruct.
223 * GDK_FONT_FONTSET: the font is an XFontSet used for I18N.
231 /* Window attribute mask values.
232 * GDK_WA_TITLE: The "title" field is valid.
233 * GDK_WA_X: The "x" field is valid.
234 * GDK_WA_Y: The "y" field is valid.
235 * GDK_WA_CURSOR: The "cursor" field is valid.
236 * GDK_WA_COLORMAP: The "colormap" field is valid.
237 * GDK_WA_VISUAL: The "visual" field is valid.
241 GDK_WA_TITLE = 1 << 1,
244 GDK_WA_CURSOR = 1 << 4,
245 GDK_WA_COLORMAP = 1 << 5,
246 GDK_WA_VISUAL = 1 << 6,
247 GDK_WA_WMCLASS = 1 << 7,
248 GDK_WA_NOREDIR = 1 << 8
249 } GdkWindowAttributesType;
251 /* Size restriction enumeration.
255 GDK_HINT_POS = 1 << 0,
256 GDK_HINT_MIN_SIZE = 1 << 1,
257 GDK_HINT_MAX_SIZE = 1 << 2,
258 GDK_HINT_BASE_SIZE = 1 << 3,
259 GDK_HINT_ASPECT = 1 << 4,
260 GDK_HINT_RESIZE_INC = 1 << 5
263 /* GC function types.
264 * Copy: Overwrites destination pixels with the source pixels.
265 * Invert: Inverts the destination pixels.
266 * Xor: Xor's the destination pixels with the source pixels.
267 * Clear: set pixels to 0
268 * And: source AND destination
269 * And Reverse: source AND (NOT destination)
270 * And Invert: (NOT source) AND destination
272 * Or: source OR destination
273 * Nor: (NOT source) AND (NOT destination)
274 * Equiv: (NOT source) XOR destination
275 * Xor Reverse: source OR (NOT destination)
276 * Copy Inverted: NOT source
277 * Xor Inverted: (NOT source) OR destination
278 * Nand: (NOT source) OR (NOT destination)
279 * Set: set pixels to 1
314 /* GC fill rule for polygons
332 GDK_LINE_ON_OFF_DASH,
366 #include <gdk/gdkcursors.h>
368 GDK_CURSOR_IS_PIXMAP = -1
372 GDK_FILTER_CONTINUE, /* Event not handled, continue processesing */
373 GDK_FILTER_TRANSLATE, /* Translated event stored */
374 GDK_FILTER_REMOVE /* Terminate processing, removing event */
378 GDK_VISIBILITY_UNOBSCURED,
379 GDK_VISIBILITY_PARTIAL,
380 GDK_VISIBILITY_FULLY_OBSCURED
381 } GdkVisibilityState;
384 * Nothing: No event occurred.
385 * Delete: A window delete event was sent by the window manager.
386 * The specified window should be deleted.
387 * Destroy: A window has been destroyed.
388 * Expose: Part of a window has been uncovered.
389 * NoExpose: Same as expose, but no expose event was generated.
390 * VisibilityNotify: A window has become fully/partially/not obscured.
391 * MotionNotify: The mouse has moved.
392 * ButtonPress: A mouse button was pressed.
393 * ButtonRelease: A mouse button was release.
394 * KeyPress: A key was pressed.
395 * KeyRelease: A key was released.
396 * EnterNotify: A window was entered.
397 * LeaveNotify: A window was exited.
398 * FocusChange: The focus window has changed. (The focus window gets
400 * Resize: A window has been resized.
401 * Map: A window has been mapped. (It is now visible on the screen).
402 * Unmap: A window has been unmapped. (It is no longer visible on
411 GDK_MOTION_NOTIFY = 3,
412 GDK_BUTTON_PRESS = 4,
413 GDK_2BUTTON_PRESS = 5,
414 GDK_3BUTTON_PRESS = 6,
415 GDK_BUTTON_RELEASE = 7,
418 GDK_ENTER_NOTIFY = 10,
419 GDK_LEAVE_NOTIFY = 11,
420 GDK_FOCUS_CHANGE = 12,
424 GDK_PROPERTY_NOTIFY = 16,
425 GDK_SELECTION_CLEAR = 17,
426 GDK_SELECTION_REQUEST = 18,
427 GDK_SELECTION_NOTIFY = 19,
428 GDK_PROXIMITY_IN = 20,
429 GDK_PROXIMITY_OUT = 21,
432 GDK_DRAG_MOTION = 24,
433 GDK_DRAG_STATUS = 25,
435 GDK_DROP_FINISHED = 27,
436 GDK_CLIENT_EVENT = 28,
437 GDK_VISIBILITY_NOTIFY = 29,
441 /* Event masks. (Used to select what types of events a window
446 GDK_EXPOSURE_MASK = 1 << 1,
447 GDK_POINTER_MOTION_MASK = 1 << 2,
448 GDK_POINTER_MOTION_HINT_MASK = 1 << 3,
449 GDK_BUTTON_MOTION_MASK = 1 << 4,
450 GDK_BUTTON1_MOTION_MASK = 1 << 5,
451 GDK_BUTTON2_MOTION_MASK = 1 << 6,
452 GDK_BUTTON3_MOTION_MASK = 1 << 7,
453 GDK_BUTTON_PRESS_MASK = 1 << 8,
454 GDK_BUTTON_RELEASE_MASK = 1 << 9,
455 GDK_KEY_PRESS_MASK = 1 << 10,
456 GDK_KEY_RELEASE_MASK = 1 << 11,
457 GDK_ENTER_NOTIFY_MASK = 1 << 12,
458 GDK_LEAVE_NOTIFY_MASK = 1 << 13,
459 GDK_FOCUS_CHANGE_MASK = 1 << 14,
460 GDK_STRUCTURE_MASK = 1 << 15,
461 GDK_PROPERTY_CHANGE_MASK = 1 << 16,
462 GDK_VISIBILITY_NOTIFY_MASK = 1 << 17,
463 GDK_PROXIMITY_IN_MASK = 1 << 18,
464 GDK_PROXIMITY_OUT_MASK = 1 << 19,
465 GDK_SUBSTRUCTURE_MASK = 1 << 20,
466 GDK_ALL_EVENTS_MASK = 0x0FFFFF
469 /* Types of enter/leave notifications.
475 * Unknown: An unknown type of enter/leave event occurred.
479 GDK_NOTIFY_ANCESTOR = 0,
480 GDK_NOTIFY_VIRTUAL = 1,
481 GDK_NOTIFY_INFERIOR = 2,
482 GDK_NOTIFY_NONLINEAR = 3,
483 GDK_NOTIFY_NONLINEAR_VIRTUAL = 4,
484 GDK_NOTIFY_UNKNOWN = 5
487 /* Enter/leave event modes.
499 /* Types of modifiers.
503 GDK_SHIFT_MASK = 1 << 0,
504 GDK_LOCK_MASK = 1 << 1,
505 GDK_CONTROL_MASK = 1 << 2,
506 GDK_MOD1_MASK = 1 << 3,
507 GDK_MOD2_MASK = 1 << 4,
508 GDK_MOD3_MASK = 1 << 5,
509 GDK_MOD4_MASK = 1 << 6,
510 GDK_MOD5_MASK = 1 << 7,
511 GDK_BUTTON1_MASK = 1 << 8,
512 GDK_BUTTON2_MASK = 1 << 9,
513 GDK_BUTTON3_MASK = 1 << 10,
514 GDK_BUTTON4_MASK = 1 << 11,
515 GDK_BUTTON5_MASK = 1 << 12,
516 GDK_RELEASE_MASK = 1 << 13,
517 GDK_MODIFIER_MASK = 0x3fff
522 GDK_CLIP_BY_CHILDREN = 0,
523 GDK_INCLUDE_INFERIORS = 1
528 GDK_INPUT_READ = 1 << 0,
529 GDK_INPUT_WRITE = 1 << 1,
530 GDK_INPUT_EXCEPTION = 1 << 2
537 GDK_ERROR_PARAM = -2,
550 GDK_GC_FOREGROUND = 1 << 0,
551 GDK_GC_BACKGROUND = 1 << 1,
552 GDK_GC_FONT = 1 << 2,
553 GDK_GC_FUNCTION = 1 << 3,
554 GDK_GC_FILL = 1 << 4,
555 GDK_GC_TILE = 1 << 5,
556 GDK_GC_STIPPLE = 1 << 6,
557 GDK_GC_CLIP_MASK = 1 << 7,
558 GDK_GC_SUBWINDOW = 1 << 8,
559 GDK_GC_TS_X_ORIGIN = 1 << 9,
560 GDK_GC_TS_Y_ORIGIN = 1 << 10,
561 GDK_GC_CLIP_X_ORIGIN = 1 << 11,
562 GDK_GC_CLIP_Y_ORIGIN = 1 << 12,
563 GDK_GC_EXPOSURES = 1 << 13,
564 GDK_GC_LINE_WIDTH = 1 << 14,
565 GDK_GC_LINE_STYLE = 1 << 15,
566 GDK_GC_CAP_STYLE = 1 << 16,
567 GDK_GC_JOIN_STYLE = 1 << 17
572 GDK_SELECTION_PRIMARY = 1,
573 GDK_SELECTION_SECONDARY = 2
578 GDK_PROPERTY_NEW_VALUE,
584 GDK_PROP_MODE_REPLACE,
585 GDK_PROP_MODE_PREPEND,
589 /* Enums for XInput support */
617 /* The next two types define enums for predefined atoms relating
618 to selections. In general, one will need to use gdk_intern_atom */
622 GDK_TARGET_BITMAP = 5,
623 GDK_TARGET_COLORMAP = 7,
624 GDK_TARGET_DRAWABLE = 17,
625 GDK_TARGET_PIXMAP = 20,
626 GDK_TARGET_STRING = 31
631 GDK_SELECTION_TYPE_ATOM = 4,
632 GDK_SELECTION_TYPE_BITMAP = 5,
633 GDK_SELECTION_TYPE_COLORMAP = 7,
634 GDK_SELECTION_TYPE_DRAWABLE = 17,
635 GDK_SELECTION_TYPE_INTEGER = 19,
636 GDK_SELECTION_TYPE_PIXMAP = 20,
637 GDK_SELECTION_TYPE_WINDOW = 33,
638 GDK_SELECTION_TYPE_STRING = 31
643 GDK_EXTENSION_EVENTS_NONE,
644 GDK_EXTENSION_EVENTS_ALL,
645 GDK_EXTENSION_EVENTS_CURSOR
648 typedef enum /*< flags >*/
650 GDK_IM_PREEDIT_AREA = 0x0001,
651 GDK_IM_PREEDIT_CALLBACKS = 0x0002,
652 GDK_IM_PREEDIT_POSITION = 0x0004,
653 GDK_IM_PREEDIT_NOTHING = 0x0008,
654 GDK_IM_PREEDIT_NONE = 0x0010,
655 GDK_IM_PREEDIT_MASK = 0x001f,
657 GDK_IM_STATUS_AREA = 0x0100,
658 GDK_IM_STATUS_CALLBACKS = 0x0200,
659 GDK_IM_STATUS_NOTHING = 0x0400,
660 GDK_IM_STATUS_NONE = 0x0800,
661 GDK_IM_STATUS_MASK = 0x0f00
666 GDK_IC_STYLE = 1 << 0,
667 GDK_IC_CLIENT_WINDOW = 1 << 1,
668 GDK_IC_FOCUS_WINDOW = 1 << 2,
669 GDK_IC_FILTER_EVENTS = 1 << 3,
670 GDK_IC_SPOT_LOCATION = 1 << 4,
671 GDK_IC_LINE_SPACING = 1 << 5,
672 GDK_IC_CURSOR = 1 << 6,
674 GDK_IC_PREEDIT_FONTSET = 1 << 10,
675 GDK_IC_PREEDIT_AREA = 1 << 11,
676 GDK_IC_PREEDIT_AREA_NEEDED = 1 << 12,
677 GDK_IC_PREEDIT_FOREGROUND = 1 << 13,
678 GDK_IC_PREEDIT_BACKGROUND = 1 << 14,
679 GDK_IC_PREEDIT_PIXMAP = 1 << 15,
680 GDK_IC_PREEDIT_COLORMAP = 1 << 16,
682 GDK_IC_STATUS_FONTSET = 1 << 21,
683 GDK_IC_STATUS_AREA = 1 << 22,
684 GDK_IC_STATUS_AREA_NEEDED = 1 << 23,
685 GDK_IC_STATUS_FOREGROUND = 1 << 24,
686 GDK_IC_STATUS_BACKGROUND = 1 << 25,
687 GDK_IC_STATUS_PIXMAP = 1 << 26,
688 GDK_IC_STATUS_COLORMAP = 1 << 27,
690 GDK_IC_ALL_REQ = GDK_IC_STYLE |
691 GDK_IC_CLIENT_WINDOW,
693 GDK_IC_PREEDIT_AREA_REQ = GDK_IC_PREEDIT_AREA |
694 GDK_IC_PREEDIT_FONTSET,
695 GDK_IC_PREEDIT_POSITION_REQ = GDK_IC_PREEDIT_AREA | GDK_IC_SPOT_LOCATION |
696 GDK_IC_PREEDIT_FONTSET,
698 GDK_IC_STATUS_AREA_REQ = GDK_IC_STATUS_AREA |
699 GDK_IC_STATUS_FONTSET
700 } GdkICAttributesType;
702 /* The next two enumeration values current match the
703 * Motif constants. If this is changed, the implementation
704 * of gdk_window_set_decorations/gdk_window_set_functions
705 * will need to change as well.
709 GDK_DECOR_ALL = 1 << 0,
710 GDK_DECOR_BORDER = 1 << 1,
711 GDK_DECOR_RESIZEH = 1 << 2,
712 GDK_DECOR_TITLE = 1 << 3,
713 GDK_DECOR_MENU = 1 << 4,
714 GDK_DECOR_MINIMIZE = 1 << 5,
715 GDK_DECOR_MAXIMIZE = 1 << 6
720 GDK_FUNC_ALL = 1 << 0,
721 GDK_FUNC_RESIZE = 1 << 1,
722 GDK_FUNC_MOVE = 1 << 2,
723 GDK_FUNC_MINIMIZE = 1 << 3,
724 GDK_FUNC_MAXIMIZE = 1 << 4,
725 GDK_FUNC_CLOSE = 1 << 5
728 typedef void (*GdkInputFunction) (gpointer data,
730 GdkInputCondition condition);
732 typedef void (*GdkDestroyNotify) (gpointer data);
734 /* Color Context modes.
736 * GDK_CC_MODE_UNDEFINED - unknown
737 * GDK_CC_MODE_BW - default B/W
738 * GDK_CC_MODE_STD_CMAP - has a standard colormap
739 * GDK_CC_MODE_TRUE - is a TrueColor/DirectColor visual
740 * GDK_CC_MODE_MY_GRAY - my grayramp
741 * GDK_CC_MODE_PALETTE - has a pre-allocated palette
746 GDK_CC_MODE_UNDEFINED,
748 GDK_CC_MODE_STD_CMAP,
752 } GdkColorContextMode;
754 /* Types of overlapping between a rectangle and a region
755 * GDK_OVERLAP_RECTANGLE_IN: rectangle is in region
756 * GDK_OVERLAP_RECTANGLE_OUT: rectangle in not in region
757 * GDK_OVERLAP_RECTANGLE_PART: rectangle in partially in region
762 GDK_OVERLAP_RECTANGLE_IN,
763 GDK_OVERLAP_RECTANGLE_OUT,
764 GDK_OVERLAP_RECTANGLE_PART
768 GDK_ACTION_DEFAULT = 1 << 0,
769 GDK_ACTION_COPY = 1 << 1,
770 GDK_ACTION_MOVE = 1 << 2,
771 GDK_ACTION_LINK = 1 << 3,
772 GDK_ACTION_PRIVATE = 1 << 4,
773 GDK_ACTION_ASK = 1 << 5
777 GDK_DRAG_PROTO_MOTIF,
779 GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming drags */
780 GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
781 GDK_DRAG_PROTO_OLE2, /* The complex OLE2 dnd */
782 GDK_DRAG_PROTO_NONE /* Not a valid drag window */
786 * A color consists of red, green and blue values in the
787 * range 0-65535 and a pixel value. The pixel value is highly
788 * dependent on the depth and colormap which this color will
789 * be used to draw into. Therefore, sharing colors between
790 * colormaps is a bad idea.
800 /* The colormap type.
801 * Colormaps consist of 256 colors.
810 * "type" is the type of visual this is (PseudoColor, TrueColor, etc).
811 * "depth" is the bit depth of this visual.
812 * "colormap_size" is the size of a colormap for this visual.
813 * "bits_per_rgb" is the number of significant bits per red, green and blue.
814 * The red, green and blue masks, shifts and precisions refer
815 * to value needed to calculate pixel values in TrueColor and DirectColor
816 * visuals. The "mask" is the significant bits within the pixel. The
817 * "shift" is the number of bits left we must shift a primary for it
818 * to be in position (according to the "mask"). "prec" refers to how
819 * much precision the pixel value contains for a particular primary.
825 GdkByteOrder byte_order;
842 struct _GdkWindowAttr
849 GdkWindowClass wclass;
851 GdkColormap *colormap;
852 GdkWindowType window_type;
855 gchar *wmclass_class;
856 gboolean override_redirect;
864 struct _GdkGeometry {
875 /* GdkGravity gravity; */
881 GdkVisual *visual; /* visual used to create the image */
882 GdkByteOrder byte_order;
886 guint16 bpp; /* bytes per pixel */
887 guint16 bpl; /* bytes per line */
896 GdkFunction function;
900 GdkPixmap *clip_mask;
901 GdkSubwindowMode subwindow_mode;
906 gint graphics_exposures;
908 GdkLineStyle line_style;
909 GdkCapStyle cap_style;
910 GdkJoinStyle join_style;
953 struct _GdkColorContextDither
955 gint fast_rgb[32][32][32]; /* quick look-up table for faster rendering */
956 gint fast_err[32][32][32]; /* internal RGB error information */
957 gint fast_erg[32][32][32];
958 gint fast_erb[32][32][32];
961 struct _GdkColorContext
964 GdkColormap *colormap;
966 gint num_colors; /* available no. of colors in colormap */
967 gint max_colors; /* maximum no. of colors */
968 gint num_allocated; /* no. of allocated colors */
970 GdkColorContextMode mode;
971 gint need_to_free_colormap;
972 GdkAtom std_cmap_atom;
974 gulong *clut; /* color look-up table */
975 GdkColor *cmap; /* colormap */
977 GHashTable *color_hash; /* hash table of allocated colors */
978 GdkColor *palette; /* preallocated palette */
979 gint num_palette; /* size of palette */
981 GdkColorContextDither *fast_dither; /* fast dither matrix */
1010 /* Types for XInput support */
1012 struct _GdkDeviceKey
1015 GdkModifierType modifiers;
1018 struct _GdkDeviceInfo
1022 GdkInputSource source;
1024 gint has_cursor; /* TRUE if the X pointer follows device motion */
1026 GdkAxisUse *axes; /* Specifies use for each axis */
1031 struct _GdkTimeCoord
1041 /* Structure that holds information about a drag in progress.
1042 * this is used on both source and destination sides.
1044 struct _GdkDragContext {
1045 GdkDragProtocol protocol;
1049 GdkWindow *source_window;
1050 GdkWindow *dest_window;
1053 GdkDragAction actions;
1054 GdkDragAction suggested_action;
1055 GdkDragAction action;
1060 /* Event filtering */
1062 typedef void GdkXEvent; /* Can be cast to XEvent */
1064 typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
1075 struct _GdkEventExpose
1081 gint count; /* If non-zero, how many more events follow. */
1084 struct _GdkEventNoExpose
1089 /* XXX: does anyone need the X major_code or minor_code fields? */
1092 struct _GdkEventVisibility
1097 GdkVisibilityState state;
1100 struct _GdkEventMotion
1113 GdkInputSource source;
1115 gdouble x_root, y_root;
1118 struct _GdkEventButton
1131 GdkInputSource source;
1133 gdouble x_root, y_root;
1148 struct _GdkEventCrossing
1153 GdkWindow *subwindow;
1159 GdkCrossingMode mode;
1160 GdkNotifyType detail;
1165 struct _GdkEventFocus
1173 struct _GdkEventConfigure
1183 struct _GdkEventProperty
1193 struct _GdkEventSelection
1205 /* This event type will be used pretty rarely. It only is important
1206 for XInput aware programs that are drawing their own cursor */
1208 struct _GdkEventProximity
1214 GdkInputSource source;
1218 struct _GdkEventClient
1223 GdkAtom message_type;
1224 gushort data_format;
1232 /* Event types for DND */
1234 struct _GdkEventDND {
1238 GdkDragContext *context;
1241 gshort x_root, y_root;
1248 GdkEventExpose expose;
1249 GdkEventNoExpose no_expose;
1250 GdkEventVisibility visibility;
1251 GdkEventMotion motion;
1252 GdkEventButton button;
1254 GdkEventCrossing crossing;
1255 GdkEventFocus focus_change;
1256 GdkEventConfigure configure;
1257 GdkEventProperty property;
1258 GdkEventSelection selection;
1259 GdkEventProximity proximity;
1260 GdkEventClient client;
1272 GdkWindow *client_window;
1273 GdkWindow *focus_window;
1274 GdkEventMask filter_events;
1275 GdkPoint spot_location;
1279 GdkFont *preedit_fontset;
1280 GdkRectangle preedit_area;
1281 GdkRectangle preedit_area_needed;
1282 GdkColor preedit_foreground;
1283 GdkColor preedit_background;
1284 GdkPixmap *preedit_pixmap;
1285 GdkColormap *preedit_colormap;
1287 GdkFont *status_fontset;
1288 GdkRectangle status_area;
1289 GdkRectangle status_area_needed;
1290 GdkColor status_foreground;
1291 GdkColor status_background;
1292 GdkPixmap *status_pixmap;
1293 GdkColormap *status_colormap;
1298 #endif /* __cplusplus */
1301 #endif /* __GDK_TYPES_H__ */