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 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. |
---|
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 | * Library General Public License for more details. |
---|
13 | * |
---|
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. |
---|
18 | */ |
---|
19 | |
---|
20 | /* |
---|
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/. |
---|
25 | */ |
---|
26 | |
---|
27 | #ifndef __GDK_TYPES_H__ |
---|
28 | #define __GDK_TYPES_H__ |
---|
29 | |
---|
30 | |
---|
31 | /* GDK uses "glib". (And so does GTK). |
---|
32 | */ |
---|
33 | #include <glib.h> |
---|
34 | |
---|
35 | |
---|
36 | #define GDK_NONE 0L |
---|
37 | #define GDK_CURRENT_TIME 0L |
---|
38 | #define GDK_PARENT_RELATIVE 1L |
---|
39 | |
---|
40 | /* special deviceid for core pointer events */ |
---|
41 | #define GDK_CORE_POINTER 0xfedc |
---|
42 | |
---|
43 | |
---|
44 | #ifdef __cplusplus |
---|
45 | extern "C" { |
---|
46 | #endif /* __cplusplus */ |
---|
47 | |
---|
48 | |
---|
49 | /* Type definitions for the basic structures. |
---|
50 | */ |
---|
51 | |
---|
52 | typedef gulong GdkAtom; |
---|
53 | typedef struct _GdkColor GdkColor; |
---|
54 | typedef struct _GdkColormap GdkColormap; |
---|
55 | typedef struct _GdkVisual GdkVisual; |
---|
56 | typedef struct _GdkWindowAttr GdkWindowAttr; |
---|
57 | typedef struct _GdkWindow GdkWindow; |
---|
58 | typedef struct _GdkWindow GdkPixmap; |
---|
59 | typedef struct _GdkWindow GdkBitmap; |
---|
60 | typedef struct _GdkWindow GdkDrawable; |
---|
61 | typedef struct _GdkGeometry GdkGeometry; |
---|
62 | typedef struct _GdkImage GdkImage; |
---|
63 | typedef struct _GdkGCValues GdkGCValues; |
---|
64 | typedef struct _GdkGC GdkGC; |
---|
65 | typedef struct _GdkPoint GdkPoint; |
---|
66 | typedef struct _GdkRectangle GdkRectangle; |
---|
67 | typedef struct _GdkSegment GdkSegment; |
---|
68 | typedef struct _GdkFont GdkFont; |
---|
69 | typedef struct _GdkCursor GdkCursor; |
---|
70 | typedef struct _GdkColorContextDither GdkColorContextDither; |
---|
71 | typedef struct _GdkColorContext GdkColorContext; |
---|
72 | typedef struct _GdkDragContext GdkDragContext; |
---|
73 | |
---|
74 | typedef struct _GdkEventAny GdkEventAny; |
---|
75 | typedef struct _GdkEventExpose GdkEventExpose; |
---|
76 | typedef struct _GdkEventNoExpose GdkEventNoExpose; |
---|
77 | typedef struct _GdkEventVisibility GdkEventVisibility; |
---|
78 | typedef struct _GdkEventMotion GdkEventMotion; |
---|
79 | typedef struct _GdkEventButton GdkEventButton; |
---|
80 | typedef struct _GdkEventKey GdkEventKey; |
---|
81 | typedef struct _GdkEventFocus GdkEventFocus; |
---|
82 | typedef struct _GdkEventCrossing GdkEventCrossing; |
---|
83 | typedef struct _GdkEventConfigure GdkEventConfigure; |
---|
84 | typedef struct _GdkEventProperty GdkEventProperty; |
---|
85 | typedef struct _GdkEventSelection GdkEventSelection; |
---|
86 | typedef struct _GdkEventProximity GdkEventProximity; |
---|
87 | typedef struct _GdkEventClient GdkEventClient; |
---|
88 | |
---|
89 | typedef struct _GdkEventDND GdkEventDND; |
---|
90 | |
---|
91 | typedef union _GdkEvent GdkEvent; |
---|
92 | |
---|
93 | typedef struct _GdkDeviceKey GdkDeviceKey; |
---|
94 | typedef struct _GdkDeviceInfo GdkDeviceInfo; |
---|
95 | typedef struct _GdkTimeCoord GdkTimeCoord; |
---|
96 | typedef struct _GdkRegion GdkRegion; |
---|
97 | typedef void (*GdkEventFunc) (GdkEvent *event, |
---|
98 | gpointer data); |
---|
99 | |
---|
100 | typedef struct _GdkIC GdkIC; |
---|
101 | typedef struct _GdkICAttr GdkICAttr; |
---|
102 | |
---|
103 | typedef guint32 GdkWChar; |
---|
104 | |
---|
105 | |
---|
106 | /* Types of windows. |
---|
107 | * Root: There is only 1 root window and it is initialized |
---|
108 | * at startup. Creating a window of type GDK_WINDOW_ROOT |
---|
109 | * is an error. |
---|
110 | * Toplevel: Windows which interact with the window manager. |
---|
111 | * Child: Windows which are children of some other type of window. |
---|
112 | * (Any other type of window). Most windows are child windows. |
---|
113 | * Dialog: A special kind of toplevel window which interacts with |
---|
114 | * the window manager slightly differently than a regular |
---|
115 | * toplevel window. Dialog windows should be used for any |
---|
116 | * transient window. |
---|
117 | * Pixmap: Pixmaps are really just another kind of window which |
---|
118 | * doesn't actually appear on the screen. It can't have |
---|
119 | * children, either and is really just a convenience so |
---|
120 | * that the drawing functions can work on both windows |
---|
121 | * and pixmaps transparently. (ie. You shouldn't pass a |
---|
122 | * pixmap to any procedure which accepts a window with the |
---|
123 | * exception of the drawing functions). |
---|
124 | * Foreign: A window that actually belongs to another application |
---|
125 | */ |
---|
126 | typedef enum |
---|
127 | { |
---|
128 | GDK_WINDOW_ROOT, |
---|
129 | GDK_WINDOW_TOPLEVEL, |
---|
130 | GDK_WINDOW_CHILD, |
---|
131 | GDK_WINDOW_DIALOG, |
---|
132 | GDK_WINDOW_TEMP, |
---|
133 | GDK_WINDOW_PIXMAP, |
---|
134 | GDK_WINDOW_FOREIGN |
---|
135 | } GdkWindowType; |
---|
136 | |
---|
137 | /* Classes of windows. |
---|
138 | * InputOutput: Almost every window should be of this type. Such windows |
---|
139 | * receive events and are also displayed on screen. |
---|
140 | * InputOnly: Used only in special circumstances when events need to be |
---|
141 | * stolen from another window or windows. Input only windows |
---|
142 | * have no visible output, so they are handy for placing over |
---|
143 | * top of a group of windows in order to grab the events (or |
---|
144 | * filter the events) from those windows. |
---|
145 | */ |
---|
146 | typedef enum |
---|
147 | { |
---|
148 | GDK_INPUT_OUTPUT, |
---|
149 | GDK_INPUT_ONLY |
---|
150 | } GdkWindowClass; |
---|
151 | |
---|
152 | /* Types of images. |
---|
153 | * Normal: Normal X image type. These are slow as they involve passing |
---|
154 | * the entire image through the X connection each time a draw |
---|
155 | * request is required. |
---|
156 | * Shared: Shared memory X image type. These are fast as the X server |
---|
157 | * and the program actually use the same piece of memory. They |
---|
158 | * should be used with care though as there is the possibility |
---|
159 | * for both the X server and the program to be reading/writing |
---|
160 | * the image simultaneously and producing undesired results. |
---|
161 | */ |
---|
162 | typedef enum |
---|
163 | { |
---|
164 | GDK_IMAGE_NORMAL, |
---|
165 | GDK_IMAGE_SHARED, |
---|
166 | GDK_IMAGE_FASTEST |
---|
167 | } GdkImageType; |
---|
168 | |
---|
169 | /* Types of visuals. |
---|
170 | * StaticGray: |
---|
171 | * Grayscale: |
---|
172 | * StaticColor: |
---|
173 | * PseudoColor: |
---|
174 | * TrueColor: |
---|
175 | * DirectColor: |
---|
176 | */ |
---|
177 | typedef enum |
---|
178 | { |
---|
179 | GDK_VISUAL_STATIC_GRAY, |
---|
180 | GDK_VISUAL_GRAYSCALE, |
---|
181 | GDK_VISUAL_STATIC_COLOR, |
---|
182 | GDK_VISUAL_PSEUDO_COLOR, |
---|
183 | GDK_VISUAL_TRUE_COLOR, |
---|
184 | GDK_VISUAL_DIRECT_COLOR |
---|
185 | } GdkVisualType; |
---|
186 | |
---|
187 | /* Types of font. |
---|
188 | * GDK_FONT_FONT: the font is an XFontStruct. |
---|
189 | * GDK_FONT_FONTSET: the font is an XFontSet used for I18N. |
---|
190 | */ |
---|
191 | typedef enum |
---|
192 | { |
---|
193 | GDK_FONT_FONT, |
---|
194 | GDK_FONT_FONTSET |
---|
195 | } GdkFontType; |
---|
196 | |
---|
197 | /* Window attribute mask values. |
---|
198 | * GDK_WA_TITLE: The "title" field is valid. |
---|
199 | * GDK_WA_X: The "x" field is valid. |
---|
200 | * GDK_WA_Y: The "y" field is valid. |
---|
201 | * GDK_WA_CURSOR: The "cursor" field is valid. |
---|
202 | * GDK_WA_COLORMAP: The "colormap" field is valid. |
---|
203 | * GDK_WA_VISUAL: The "visual" field is valid. |
---|
204 | */ |
---|
205 | typedef enum |
---|
206 | { |
---|
207 | GDK_WA_TITLE = 1 << 1, |
---|
208 | GDK_WA_X = 1 << 2, |
---|
209 | GDK_WA_Y = 1 << 3, |
---|
210 | GDK_WA_CURSOR = 1 << 4, |
---|
211 | GDK_WA_COLORMAP = 1 << 5, |
---|
212 | GDK_WA_VISUAL = 1 << 6, |
---|
213 | GDK_WA_WMCLASS = 1 << 7, |
---|
214 | GDK_WA_NOREDIR = 1 << 8 |
---|
215 | } GdkWindowAttributesType; |
---|
216 | |
---|
217 | /* Size restriction enumeration. |
---|
218 | */ |
---|
219 | typedef enum |
---|
220 | { |
---|
221 | GDK_HINT_POS = 1 << 0, |
---|
222 | GDK_HINT_MIN_SIZE = 1 << 1, |
---|
223 | GDK_HINT_MAX_SIZE = 1 << 2, |
---|
224 | GDK_HINT_BASE_SIZE = 1 << 3, |
---|
225 | GDK_HINT_ASPECT = 1 << 4, |
---|
226 | GDK_HINT_RESIZE_INC = 1 << 5 |
---|
227 | } GdkWindowHints; |
---|
228 | |
---|
229 | /* GC function types. |
---|
230 | * Copy: Overwrites destination pixels with the source pixels. |
---|
231 | * Invert: Inverts the destination pixels. |
---|
232 | * Xor: Xor's the destination pixels with the source pixels. |
---|
233 | * Clear: set pixels to 0 |
---|
234 | * And: source AND destination |
---|
235 | * And Reverse: source AND (NOT destination) |
---|
236 | * And Invert: (NOT source) AND destination |
---|
237 | * Noop: destination |
---|
238 | * Or: source OR destination |
---|
239 | * Nor: (NOT source) AND (NOT destination) |
---|
240 | * Equiv: (NOT source) XOR destination |
---|
241 | * Xor Reverse: source OR (NOT destination) |
---|
242 | * Copy Inverted: NOT source |
---|
243 | * Xor Inverted: (NOT source) OR destination |
---|
244 | * Nand: (NOT source) OR (NOT destination) |
---|
245 | * Set: set pixels to 1 |
---|
246 | */ |
---|
247 | typedef enum |
---|
248 | { |
---|
249 | GDK_COPY, |
---|
250 | GDK_INVERT, |
---|
251 | GDK_XOR, |
---|
252 | GDK_CLEAR, |
---|
253 | GDK_AND, |
---|
254 | GDK_AND_REVERSE, |
---|
255 | GDK_AND_INVERT, |
---|
256 | GDK_NOOP, |
---|
257 | GDK_OR, |
---|
258 | GDK_EQUIV, |
---|
259 | GDK_OR_REVERSE, |
---|
260 | GDK_COPY_INVERT, |
---|
261 | GDK_OR_INVERT, |
---|
262 | GDK_NAND, |
---|
263 | GDK_SET |
---|
264 | } GdkFunction; |
---|
265 | |
---|
266 | /* GC fill types. |
---|
267 | * Solid: |
---|
268 | * Tiled: |
---|
269 | * Stippled: |
---|
270 | * OpaqueStippled: |
---|
271 | */ |
---|
272 | typedef enum |
---|
273 | { |
---|
274 | GDK_SOLID, |
---|
275 | GDK_TILED, |
---|
276 | GDK_STIPPLED, |
---|
277 | GDK_OPAQUE_STIPPLED |
---|
278 | } GdkFill; |
---|
279 | |
---|
280 | /* GC fill rule for polygons |
---|
281 | * EvenOddRule |
---|
282 | * WindingRule |
---|
283 | */ |
---|
284 | typedef enum |
---|
285 | { |
---|
286 | GDK_EVEN_ODD_RULE, |
---|
287 | GDK_WINDING_RULE |
---|
288 | } GdkFillRule; |
---|
289 | |
---|
290 | /* GC line styles |
---|
291 | * Solid: |
---|
292 | * OnOffDash: |
---|
293 | * DoubleDash: |
---|
294 | */ |
---|
295 | typedef enum |
---|
296 | { |
---|
297 | GDK_LINE_SOLID, |
---|
298 | GDK_LINE_ON_OFF_DASH, |
---|
299 | GDK_LINE_DOUBLE_DASH |
---|
300 | } GdkLineStyle; |
---|
301 | |
---|
302 | /* GC cap styles |
---|
303 | * CapNotLast: |
---|
304 | * CapButt: |
---|
305 | * CapRound: |
---|
306 | * CapProjecting: |
---|
307 | */ |
---|
308 | typedef enum |
---|
309 | { |
---|
310 | GDK_CAP_NOT_LAST, |
---|
311 | GDK_CAP_BUTT, |
---|
312 | GDK_CAP_ROUND, |
---|
313 | GDK_CAP_PROJECTING |
---|
314 | } GdkCapStyle; |
---|
315 | |
---|
316 | /* GC join styles |
---|
317 | * JoinMiter: |
---|
318 | * JoinRound: |
---|
319 | * JoinBevel: |
---|
320 | */ |
---|
321 | typedef enum |
---|
322 | { |
---|
323 | GDK_JOIN_MITER, |
---|
324 | GDK_JOIN_ROUND, |
---|
325 | GDK_JOIN_BEVEL |
---|
326 | } GdkJoinStyle; |
---|
327 | |
---|
328 | /* Cursor types. |
---|
329 | */ |
---|
330 | typedef enum |
---|
331 | { |
---|
332 | #include <gdk/gdkcursors.h> |
---|
333 | GDK_LAST_CURSOR, |
---|
334 | GDK_CURSOR_IS_PIXMAP = -1 |
---|
335 | } GdkCursorType; |
---|
336 | |
---|
337 | typedef enum { |
---|
338 | GDK_FILTER_CONTINUE, /* Event not handled, continue processesing */ |
---|
339 | GDK_FILTER_TRANSLATE, /* Translated event stored */ |
---|
340 | GDK_FILTER_REMOVE /* Terminate processing, removing event */ |
---|
341 | } GdkFilterReturn; |
---|
342 | |
---|
343 | typedef enum { |
---|
344 | GDK_VISIBILITY_UNOBSCURED, |
---|
345 | GDK_VISIBILITY_PARTIAL, |
---|
346 | GDK_VISIBILITY_FULLY_OBSCURED |
---|
347 | } GdkVisibilityState; |
---|
348 | |
---|
349 | /* Event types. |
---|
350 | * Nothing: No event occurred. |
---|
351 | * Delete: A window delete event was sent by the window manager. |
---|
352 | * The specified window should be deleted. |
---|
353 | * Destroy: A window has been destroyed. |
---|
354 | * Expose: Part of a window has been uncovered. |
---|
355 | * NoExpose: Same as expose, but no expose event was generated. |
---|
356 | * VisibilityNotify: A window has become fully/partially/not obscured. |
---|
357 | * MotionNotify: The mouse has moved. |
---|
358 | * ButtonPress: A mouse button was pressed. |
---|
359 | * ButtonRelease: A mouse button was release. |
---|
360 | * KeyPress: A key was pressed. |
---|
361 | * KeyRelease: A key was released. |
---|
362 | * EnterNotify: A window was entered. |
---|
363 | * LeaveNotify: A window was exited. |
---|
364 | * FocusChange: The focus window has changed. (The focus window gets |
---|
365 | * keyboard events). |
---|
366 | * Resize: A window has been resized. |
---|
367 | * Map: A window has been mapped. (It is now visible on the screen). |
---|
368 | * Unmap: A window has been unmapped. (It is no longer visible on |
---|
369 | * the screen). |
---|
370 | */ |
---|
371 | typedef enum |
---|
372 | { |
---|
373 | GDK_NOTHING = -1, |
---|
374 | GDK_DELETE = 0, |
---|
375 | GDK_DESTROY = 1, |
---|
376 | GDK_EXPOSE = 2, |
---|
377 | GDK_MOTION_NOTIFY = 3, |
---|
378 | GDK_BUTTON_PRESS = 4, |
---|
379 | GDK_2BUTTON_PRESS = 5, |
---|
380 | GDK_3BUTTON_PRESS = 6, |
---|
381 | GDK_BUTTON_RELEASE = 7, |
---|
382 | GDK_KEY_PRESS = 8, |
---|
383 | GDK_KEY_RELEASE = 9, |
---|
384 | GDK_ENTER_NOTIFY = 10, |
---|
385 | GDK_LEAVE_NOTIFY = 11, |
---|
386 | GDK_FOCUS_CHANGE = 12, |
---|
387 | GDK_CONFIGURE = 13, |
---|
388 | GDK_MAP = 14, |
---|
389 | GDK_UNMAP = 15, |
---|
390 | GDK_PROPERTY_NOTIFY = 16, |
---|
391 | GDK_SELECTION_CLEAR = 17, |
---|
392 | GDK_SELECTION_REQUEST = 18, |
---|
393 | GDK_SELECTION_NOTIFY = 19, |
---|
394 | GDK_PROXIMITY_IN = 20, |
---|
395 | GDK_PROXIMITY_OUT = 21, |
---|
396 | GDK_DRAG_ENTER = 22, |
---|
397 | GDK_DRAG_LEAVE = 23, |
---|
398 | GDK_DRAG_MOTION = 24, |
---|
399 | GDK_DRAG_STATUS = 25, |
---|
400 | GDK_DROP_START = 26, |
---|
401 | GDK_DROP_FINISHED = 27, |
---|
402 | GDK_CLIENT_EVENT = 28, |
---|
403 | GDK_VISIBILITY_NOTIFY = 29, |
---|
404 | GDK_NO_EXPOSE = 30 |
---|
405 | } GdkEventType; |
---|
406 | |
---|
407 | /* Event masks. (Used to select what types of events a window |
---|
408 | * will receive). |
---|
409 | */ |
---|
410 | typedef enum |
---|
411 | { |
---|
412 | GDK_EXPOSURE_MASK = 1 << 1, |
---|
413 | GDK_POINTER_MOTION_MASK = 1 << 2, |
---|
414 | GDK_POINTER_MOTION_HINT_MASK = 1 << 3, |
---|
415 | GDK_BUTTON_MOTION_MASK = 1 << 4, |
---|
416 | GDK_BUTTON1_MOTION_MASK = 1 << 5, |
---|
417 | GDK_BUTTON2_MOTION_MASK = 1 << 6, |
---|
418 | GDK_BUTTON3_MOTION_MASK = 1 << 7, |
---|
419 | GDK_BUTTON_PRESS_MASK = 1 << 8, |
---|
420 | GDK_BUTTON_RELEASE_MASK = 1 << 9, |
---|
421 | GDK_KEY_PRESS_MASK = 1 << 10, |
---|
422 | GDK_KEY_RELEASE_MASK = 1 << 11, |
---|
423 | GDK_ENTER_NOTIFY_MASK = 1 << 12, |
---|
424 | GDK_LEAVE_NOTIFY_MASK = 1 << 13, |
---|
425 | GDK_FOCUS_CHANGE_MASK = 1 << 14, |
---|
426 | GDK_STRUCTURE_MASK = 1 << 15, |
---|
427 | GDK_PROPERTY_CHANGE_MASK = 1 << 16, |
---|
428 | GDK_VISIBILITY_NOTIFY_MASK = 1 << 17, |
---|
429 | GDK_PROXIMITY_IN_MASK = 1 << 18, |
---|
430 | GDK_PROXIMITY_OUT_MASK = 1 << 19, |
---|
431 | GDK_SUBSTRUCTURE_MASK = 1 << 20, |
---|
432 | GDK_ALL_EVENTS_MASK = 0x0FFFFF |
---|
433 | } GdkEventMask; |
---|
434 | |
---|
435 | /* Types of enter/leave notifications. |
---|
436 | * Ancestor: |
---|
437 | * Virtual: |
---|
438 | * Inferior: |
---|
439 | * Nonlinear: |
---|
440 | * NonlinearVirtual: |
---|
441 | * Unknown: An unknown type of enter/leave event occurred. |
---|
442 | */ |
---|
443 | typedef enum |
---|
444 | { |
---|
445 | GDK_NOTIFY_ANCESTOR = 0, |
---|
446 | GDK_NOTIFY_VIRTUAL = 1, |
---|
447 | GDK_NOTIFY_INFERIOR = 2, |
---|
448 | GDK_NOTIFY_NONLINEAR = 3, |
---|
449 | GDK_NOTIFY_NONLINEAR_VIRTUAL = 4, |
---|
450 | GDK_NOTIFY_UNKNOWN = 5 |
---|
451 | } GdkNotifyType; |
---|
452 | |
---|
453 | /* Enter/leave event modes. |
---|
454 | * NotifyNormal |
---|
455 | * NotifyGrab |
---|
456 | * NotifyUngrab |
---|
457 | */ |
---|
458 | typedef enum |
---|
459 | { |
---|
460 | GDK_CROSSING_NORMAL, |
---|
461 | GDK_CROSSING_GRAB, |
---|
462 | GDK_CROSSING_UNGRAB |
---|
463 | } GdkCrossingMode; |
---|
464 | |
---|
465 | /* Types of modifiers. |
---|
466 | */ |
---|
467 | typedef enum |
---|
468 | { |
---|
469 | GDK_SHIFT_MASK = 1 << 0, |
---|
470 | GDK_LOCK_MASK = 1 << 1, |
---|
471 | GDK_CONTROL_MASK = 1 << 2, |
---|
472 | GDK_MOD1_MASK = 1 << 3, |
---|
473 | GDK_MOD2_MASK = 1 << 4, |
---|
474 | GDK_MOD3_MASK = 1 << 5, |
---|
475 | GDK_MOD4_MASK = 1 << 6, |
---|
476 | GDK_MOD5_MASK = 1 << 7, |
---|
477 | GDK_BUTTON1_MASK = 1 << 8, |
---|
478 | GDK_BUTTON2_MASK = 1 << 9, |
---|
479 | GDK_BUTTON3_MASK = 1 << 10, |
---|
480 | GDK_BUTTON4_MASK = 1 << 11, |
---|
481 | GDK_BUTTON5_MASK = 1 << 12, |
---|
482 | GDK_RELEASE_MASK = 1 << 13, |
---|
483 | GDK_MODIFIER_MASK = 0x3fff |
---|
484 | } GdkModifierType; |
---|
485 | |
---|
486 | typedef enum |
---|
487 | { |
---|
488 | GDK_CLIP_BY_CHILDREN = 0, |
---|
489 | GDK_INCLUDE_INFERIORS = 1 |
---|
490 | } GdkSubwindowMode; |
---|
491 | |
---|
492 | typedef enum |
---|
493 | { |
---|
494 | GDK_INPUT_READ = 1 << 0, |
---|
495 | GDK_INPUT_WRITE = 1 << 1, |
---|
496 | GDK_INPUT_EXCEPTION = 1 << 2 |
---|
497 | } GdkInputCondition; |
---|
498 | |
---|
499 | typedef enum |
---|
500 | { |
---|
501 | GDK_OK = 0, |
---|
502 | GDK_ERROR = -1, |
---|
503 | GDK_ERROR_PARAM = -2, |
---|
504 | GDK_ERROR_FILE = -3, |
---|
505 | GDK_ERROR_MEM = -4 |
---|
506 | } GdkStatus; |
---|
507 | |
---|
508 | typedef enum |
---|
509 | { |
---|
510 | GDK_LSB_FIRST, |
---|
511 | GDK_MSB_FIRST |
---|
512 | } GdkByteOrder; |
---|
513 | |
---|
514 | typedef enum |
---|
515 | { |
---|
516 | GDK_GC_FOREGROUND = 1 << 0, |
---|
517 | GDK_GC_BACKGROUND = 1 << 1, |
---|
518 | GDK_GC_FONT = 1 << 2, |
---|
519 | GDK_GC_FUNCTION = 1 << 3, |
---|
520 | GDK_GC_FILL = 1 << 4, |
---|
521 | GDK_GC_TILE = 1 << 5, |
---|
522 | GDK_GC_STIPPLE = 1 << 6, |
---|
523 | GDK_GC_CLIP_MASK = 1 << 7, |
---|
524 | GDK_GC_SUBWINDOW = 1 << 8, |
---|
525 | GDK_GC_TS_X_ORIGIN = 1 << 9, |
---|
526 | GDK_GC_TS_Y_ORIGIN = 1 << 10, |
---|
527 | GDK_GC_CLIP_X_ORIGIN = 1 << 11, |
---|
528 | GDK_GC_CLIP_Y_ORIGIN = 1 << 12, |
---|
529 | GDK_GC_EXPOSURES = 1 << 13, |
---|
530 | GDK_GC_LINE_WIDTH = 1 << 14, |
---|
531 | GDK_GC_LINE_STYLE = 1 << 15, |
---|
532 | GDK_GC_CAP_STYLE = 1 << 16, |
---|
533 | GDK_GC_JOIN_STYLE = 1 << 17 |
---|
534 | } GdkGCValuesMask; |
---|
535 | |
---|
536 | typedef enum |
---|
537 | { |
---|
538 | GDK_SELECTION_PRIMARY = 1, |
---|
539 | GDK_SELECTION_SECONDARY = 2 |
---|
540 | } GdkSelection; |
---|
541 | |
---|
542 | typedef enum |
---|
543 | { |
---|
544 | GDK_PROPERTY_NEW_VALUE, |
---|
545 | GDK_PROPERTY_DELETE |
---|
546 | } GdkPropertyState; |
---|
547 | |
---|
548 | typedef enum |
---|
549 | { |
---|
550 | GDK_PROP_MODE_REPLACE, |
---|
551 | GDK_PROP_MODE_PREPEND, |
---|
552 | GDK_PROP_MODE_APPEND |
---|
553 | } GdkPropMode; |
---|
554 | |
---|
555 | /* Enums for XInput support */ |
---|
556 | |
---|
557 | typedef enum |
---|
558 | { |
---|
559 | GDK_SOURCE_MOUSE, |
---|
560 | GDK_SOURCE_PEN, |
---|
561 | GDK_SOURCE_ERASER, |
---|
562 | GDK_SOURCE_CURSOR |
---|
563 | } GdkInputSource; |
---|
564 | |
---|
565 | typedef enum |
---|
566 | { |
---|
567 | GDK_MODE_DISABLED, |
---|
568 | GDK_MODE_SCREEN, |
---|
569 | GDK_MODE_WINDOW |
---|
570 | } GdkInputMode; |
---|
571 | |
---|
572 | typedef enum |
---|
573 | { |
---|
574 | GDK_AXIS_IGNORE, |
---|
575 | GDK_AXIS_X, |
---|
576 | GDK_AXIS_Y, |
---|
577 | GDK_AXIS_PRESSURE, |
---|
578 | GDK_AXIS_XTILT, |
---|
579 | GDK_AXIS_YTILT, |
---|
580 | GDK_AXIS_LAST |
---|
581 | } GdkAxisUse; |
---|
582 | |
---|
583 | /* The next two types define enums for predefined atoms relating |
---|
584 | to selections. In general, one will need to use gdk_intern_atom */ |
---|
585 | |
---|
586 | typedef enum |
---|
587 | { |
---|
588 | GDK_TARGET_BITMAP = 5, |
---|
589 | GDK_TARGET_COLORMAP = 7, |
---|
590 | GDK_TARGET_DRAWABLE = 17, |
---|
591 | GDK_TARGET_PIXMAP = 20, |
---|
592 | GDK_TARGET_STRING = 31 |
---|
593 | } GdkTarget; |
---|
594 | |
---|
595 | typedef enum |
---|
596 | { |
---|
597 | GDK_SELECTION_TYPE_ATOM = 4, |
---|
598 | GDK_SELECTION_TYPE_BITMAP = 5, |
---|
599 | GDK_SELECTION_TYPE_COLORMAP = 7, |
---|
600 | GDK_SELECTION_TYPE_DRAWABLE = 17, |
---|
601 | GDK_SELECTION_TYPE_INTEGER = 19, |
---|
602 | GDK_SELECTION_TYPE_PIXMAP = 20, |
---|
603 | GDK_SELECTION_TYPE_WINDOW = 33, |
---|
604 | GDK_SELECTION_TYPE_STRING = 31 |
---|
605 | } GdkSelectionType; |
---|
606 | |
---|
607 | typedef enum |
---|
608 | { |
---|
609 | GDK_EXTENSION_EVENTS_NONE, |
---|
610 | GDK_EXTENSION_EVENTS_ALL, |
---|
611 | GDK_EXTENSION_EVENTS_CURSOR |
---|
612 | } GdkExtensionMode; |
---|
613 | |
---|
614 | typedef enum /*< flags >*/ |
---|
615 | { |
---|
616 | GDK_IM_PREEDIT_AREA = 0x0001, |
---|
617 | GDK_IM_PREEDIT_CALLBACKS = 0x0002, |
---|
618 | GDK_IM_PREEDIT_POSITION = 0x0004, |
---|
619 | GDK_IM_PREEDIT_NOTHING = 0x0008, |
---|
620 | GDK_IM_PREEDIT_NONE = 0x0010, |
---|
621 | GDK_IM_PREEDIT_MASK = 0x001f, |
---|
622 | |
---|
623 | GDK_IM_STATUS_AREA = 0x0100, |
---|
624 | GDK_IM_STATUS_CALLBACKS = 0x0200, |
---|
625 | GDK_IM_STATUS_NOTHING = 0x0400, |
---|
626 | GDK_IM_STATUS_NONE = 0x0800, |
---|
627 | GDK_IM_STATUS_MASK = 0x0f00 |
---|
628 | } GdkIMStyle; |
---|
629 | |
---|
630 | typedef enum |
---|
631 | { |
---|
632 | GDK_IC_STYLE = 1 << 0, |
---|
633 | GDK_IC_CLIENT_WINDOW = 1 << 1, |
---|
634 | GDK_IC_FOCUS_WINDOW = 1 << 2, |
---|
635 | GDK_IC_FILTER_EVENTS = 1 << 3, |
---|
636 | GDK_IC_SPOT_LOCATION = 1 << 4, |
---|
637 | GDK_IC_LINE_SPACING = 1 << 5, |
---|
638 | GDK_IC_CURSOR = 1 << 6, |
---|
639 | |
---|
640 | GDK_IC_PREEDIT_FONTSET = 1 << 10, |
---|
641 | GDK_IC_PREEDIT_AREA = 1 << 11, |
---|
642 | GDK_IC_PREEDIT_AREA_NEEDED = 1 << 12, |
---|
643 | GDK_IC_PREEDIT_FOREGROUND = 1 << 13, |
---|
644 | GDK_IC_PREEDIT_BACKGROUND = 1 << 14, |
---|
645 | GDK_IC_PREEDIT_PIXMAP = 1 << 15, |
---|
646 | GDK_IC_PREEDIT_COLORMAP = 1 << 16, |
---|
647 | |
---|
648 | GDK_IC_STATUS_FONTSET = 1 << 21, |
---|
649 | GDK_IC_STATUS_AREA = 1 << 22, |
---|
650 | GDK_IC_STATUS_AREA_NEEDED = 1 << 23, |
---|
651 | GDK_IC_STATUS_FOREGROUND = 1 << 24, |
---|
652 | GDK_IC_STATUS_BACKGROUND = 1 << 25, |
---|
653 | GDK_IC_STATUS_PIXMAP = 1 << 26, |
---|
654 | GDK_IC_STATUS_COLORMAP = 1 << 27, |
---|
655 | |
---|
656 | GDK_IC_ALL_REQ = GDK_IC_STYLE | |
---|
657 | GDK_IC_CLIENT_WINDOW, |
---|
658 | |
---|
659 | GDK_IC_PREEDIT_AREA_REQ = GDK_IC_PREEDIT_AREA | |
---|
660 | GDK_IC_PREEDIT_FONTSET, |
---|
661 | GDK_IC_PREEDIT_POSITION_REQ = GDK_IC_PREEDIT_AREA | GDK_IC_SPOT_LOCATION | |
---|
662 | GDK_IC_PREEDIT_FONTSET, |
---|
663 | |
---|
664 | GDK_IC_STATUS_AREA_REQ = GDK_IC_STATUS_AREA | |
---|
665 | GDK_IC_STATUS_FONTSET |
---|
666 | } GdkICAttributesType; |
---|
667 | |
---|
668 | /* The next two enumeration values current match the |
---|
669 | * Motif constants. If this is changed, the implementation |
---|
670 | * of gdk_window_set_decorations/gdk_window_set_functions |
---|
671 | * will need to change as well. |
---|
672 | */ |
---|
673 | typedef enum |
---|
674 | { |
---|
675 | GDK_DECOR_ALL = 1 << 0, |
---|
676 | GDK_DECOR_BORDER = 1 << 1, |
---|
677 | GDK_DECOR_RESIZEH = 1 << 2, |
---|
678 | GDK_DECOR_TITLE = 1 << 3, |
---|
679 | GDK_DECOR_MENU = 1 << 4, |
---|
680 | GDK_DECOR_MINIMIZE = 1 << 5, |
---|
681 | GDK_DECOR_MAXIMIZE = 1 << 6 |
---|
682 | } GdkWMDecoration; |
---|
683 | |
---|
684 | typedef enum |
---|
685 | { |
---|
686 | GDK_FUNC_ALL = 1 << 0, |
---|
687 | GDK_FUNC_RESIZE = 1 << 1, |
---|
688 | GDK_FUNC_MOVE = 1 << 2, |
---|
689 | GDK_FUNC_MINIMIZE = 1 << 3, |
---|
690 | GDK_FUNC_MAXIMIZE = 1 << 4, |
---|
691 | GDK_FUNC_CLOSE = 1 << 5 |
---|
692 | } GdkWMFunction; |
---|
693 | |
---|
694 | typedef void (*GdkInputFunction) (gpointer data, |
---|
695 | gint source, |
---|
696 | GdkInputCondition condition); |
---|
697 | |
---|
698 | typedef void (*GdkDestroyNotify) (gpointer data); |
---|
699 | |
---|
700 | /* Color Context modes. |
---|
701 | * |
---|
702 | * GDK_CC_MODE_UNDEFINED - unknown |
---|
703 | * GDK_CC_MODE_BW - default B/W |
---|
704 | * GDK_CC_MODE_STD_CMAP - has a standard colormap |
---|
705 | * GDK_CC_MODE_TRUE - is a TrueColor/DirectColor visual |
---|
706 | * GDK_CC_MODE_MY_GRAY - my grayramp |
---|
707 | * GDK_CC_MODE_PALETTE - has a pre-allocated palette |
---|
708 | */ |
---|
709 | |
---|
710 | typedef enum |
---|
711 | { |
---|
712 | GDK_CC_MODE_UNDEFINED, |
---|
713 | GDK_CC_MODE_BW, |
---|
714 | GDK_CC_MODE_STD_CMAP, |
---|
715 | GDK_CC_MODE_TRUE, |
---|
716 | GDK_CC_MODE_MY_GRAY, |
---|
717 | GDK_CC_MODE_PALETTE |
---|
718 | } GdkColorContextMode; |
---|
719 | |
---|
720 | /* Types of overlapping between a rectangle and a region |
---|
721 | * GDK_OVERLAP_RECTANGLE_IN: rectangle is in region |
---|
722 | * GDK_OVERLAP_RECTANGLE_OUT: rectangle in not in region |
---|
723 | * GDK_OVERLAP_RECTANGLE_PART: rectangle in partially in region |
---|
724 | */ |
---|
725 | |
---|
726 | typedef enum |
---|
727 | { |
---|
728 | GDK_OVERLAP_RECTANGLE_IN, |
---|
729 | GDK_OVERLAP_RECTANGLE_OUT, |
---|
730 | GDK_OVERLAP_RECTANGLE_PART |
---|
731 | } GdkOverlapType; |
---|
732 | |
---|
733 | typedef enum { |
---|
734 | GDK_ACTION_DEFAULT = 1 << 0, |
---|
735 | GDK_ACTION_COPY = 1 << 1, |
---|
736 | GDK_ACTION_MOVE = 1 << 2, |
---|
737 | GDK_ACTION_LINK = 1 << 3, |
---|
738 | GDK_ACTION_PRIVATE = 1 << 4, |
---|
739 | GDK_ACTION_ASK = 1 << 5 |
---|
740 | } GdkDragAction; |
---|
741 | |
---|
742 | typedef enum { |
---|
743 | GDK_DRAG_PROTO_MOTIF, |
---|
744 | GDK_DRAG_PROTO_XDND, |
---|
745 | GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming |
---|
746 | * drags */ |
---|
747 | GDK_DRAG_PROTO_NONE /* Not a valid drag window */ |
---|
748 | } GdkDragProtocol; |
---|
749 | |
---|
750 | /* The color type. |
---|
751 | * A color consists of red, green and blue values in the |
---|
752 | * range 0-65535 and a pixel value. The pixel value is highly |
---|
753 | * dependent on the depth and colormap which this color will |
---|
754 | * be used to draw into. Therefore, sharing colors between |
---|
755 | * colormaps is a bad idea. |
---|
756 | */ |
---|
757 | struct _GdkColor |
---|
758 | { |
---|
759 | gulong pixel; |
---|
760 | gushort red; |
---|
761 | gushort green; |
---|
762 | gushort blue; |
---|
763 | }; |
---|
764 | |
---|
765 | /* The colormap type. |
---|
766 | * Colormaps consist of 256 colors. |
---|
767 | */ |
---|
768 | struct _GdkColormap |
---|
769 | { |
---|
770 | gint size; |
---|
771 | GdkColor *colors; |
---|
772 | }; |
---|
773 | |
---|
774 | /* The visual type. |
---|
775 | * "type" is the type of visual this is (PseudoColor, TrueColor, etc). |
---|
776 | * "depth" is the bit depth of this visual. |
---|
777 | * "colormap_size" is the size of a colormap for this visual. |
---|
778 | * "bits_per_rgb" is the number of significant bits per red, green and blue. |
---|
779 | * The red, green and blue masks, shifts and precisions refer |
---|
780 | * to value needed to calculate pixel values in TrueColor and DirectColor |
---|
781 | * visuals. The "mask" is the significant bits within the pixel. The |
---|
782 | * "shift" is the number of bits left we must shift a primary for it |
---|
783 | * to be in position (according to the "mask"). "prec" refers to how |
---|
784 | * much precision the pixel value contains for a particular primary. |
---|
785 | */ |
---|
786 | struct _GdkVisual |
---|
787 | { |
---|
788 | GdkVisualType type; |
---|
789 | gint depth; |
---|
790 | GdkByteOrder byte_order; |
---|
791 | gint colormap_size; |
---|
792 | gint bits_per_rgb; |
---|
793 | |
---|
794 | guint32 red_mask; |
---|
795 | gint red_shift; |
---|
796 | gint red_prec; |
---|
797 | |
---|
798 | guint32 green_mask; |
---|
799 | gint green_shift; |
---|
800 | gint green_prec; |
---|
801 | |
---|
802 | guint32 blue_mask; |
---|
803 | gint blue_shift; |
---|
804 | gint blue_prec; |
---|
805 | }; |
---|
806 | |
---|
807 | struct _GdkWindowAttr |
---|
808 | { |
---|
809 | gchar *title; |
---|
810 | gint event_mask; |
---|
811 | gint16 x, y; |
---|
812 | gint16 width; |
---|
813 | gint16 height; |
---|
814 | GdkWindowClass wclass; |
---|
815 | GdkVisual *visual; |
---|
816 | GdkColormap *colormap; |
---|
817 | GdkWindowType window_type; |
---|
818 | GdkCursor *cursor; |
---|
819 | gchar *wmclass_name; |
---|
820 | gchar *wmclass_class; |
---|
821 | gboolean override_redirect; |
---|
822 | }; |
---|
823 | |
---|
824 | struct _GdkWindow |
---|
825 | { |
---|
826 | gpointer user_data; |
---|
827 | }; |
---|
828 | |
---|
829 | struct _GdkGeometry { |
---|
830 | gint min_width; |
---|
831 | gint min_height; |
---|
832 | gint max_width; |
---|
833 | gint max_height; |
---|
834 | gint base_width; |
---|
835 | gint base_height; |
---|
836 | gint width_inc; |
---|
837 | gint height_inc; |
---|
838 | gdouble min_aspect; |
---|
839 | gdouble max_aspect; |
---|
840 | /* GdkGravity gravity; */ |
---|
841 | }; |
---|
842 | |
---|
843 | struct _GdkImage |
---|
844 | { |
---|
845 | GdkImageType type; |
---|
846 | GdkVisual *visual; /* visual used to create the image */ |
---|
847 | GdkByteOrder byte_order; |
---|
848 | guint16 width; |
---|
849 | guint16 height; |
---|
850 | guint16 depth; |
---|
851 | guint16 bpp; /* bytes per pixel */ |
---|
852 | guint16 bpl; /* bytes per line */ |
---|
853 | gpointer mem; |
---|
854 | }; |
---|
855 | |
---|
856 | struct _GdkGCValues |
---|
857 | { |
---|
858 | GdkColor foreground; |
---|
859 | GdkColor background; |
---|
860 | GdkFont *font; |
---|
861 | GdkFunction function; |
---|
862 | GdkFill fill; |
---|
863 | GdkPixmap *tile; |
---|
864 | GdkPixmap *stipple; |
---|
865 | GdkPixmap *clip_mask; |
---|
866 | GdkSubwindowMode subwindow_mode; |
---|
867 | gint ts_x_origin; |
---|
868 | gint ts_y_origin; |
---|
869 | gint clip_x_origin; |
---|
870 | gint clip_y_origin; |
---|
871 | gint graphics_exposures; |
---|
872 | gint line_width; |
---|
873 | GdkLineStyle line_style; |
---|
874 | GdkCapStyle cap_style; |
---|
875 | GdkJoinStyle join_style; |
---|
876 | }; |
---|
877 | |
---|
878 | struct _GdkGC |
---|
879 | { |
---|
880 | gint dummy_var; |
---|
881 | }; |
---|
882 | |
---|
883 | struct _GdkPoint |
---|
884 | { |
---|
885 | gint16 x; |
---|
886 | gint16 y; |
---|
887 | }; |
---|
888 | |
---|
889 | struct _GdkRectangle |
---|
890 | { |
---|
891 | gint16 x; |
---|
892 | gint16 y; |
---|
893 | guint16 width; |
---|
894 | guint16 height; |
---|
895 | }; |
---|
896 | |
---|
897 | struct _GdkSegment |
---|
898 | { |
---|
899 | gint16 x1; |
---|
900 | gint16 y1; |
---|
901 | gint16 x2; |
---|
902 | gint16 y2; |
---|
903 | }; |
---|
904 | |
---|
905 | struct _GdkFont |
---|
906 | { |
---|
907 | GdkFontType type; |
---|
908 | gint ascent; |
---|
909 | gint descent; |
---|
910 | }; |
---|
911 | |
---|
912 | struct _GdkCursor |
---|
913 | { |
---|
914 | GdkCursorType type; |
---|
915 | }; |
---|
916 | |
---|
917 | |
---|
918 | struct _GdkColorContextDither |
---|
919 | { |
---|
920 | gint fast_rgb[32][32][32]; /* quick look-up table for faster rendering */ |
---|
921 | gint fast_err[32][32][32]; /* internal RGB error information */ |
---|
922 | gint fast_erg[32][32][32]; |
---|
923 | gint fast_erb[32][32][32]; |
---|
924 | }; |
---|
925 | |
---|
926 | struct _GdkColorContext |
---|
927 | { |
---|
928 | GdkVisual *visual; |
---|
929 | GdkColormap *colormap; |
---|
930 | |
---|
931 | gint num_colors; /* available no. of colors in colormap */ |
---|
932 | gint max_colors; /* maximum no. of colors */ |
---|
933 | gint num_allocated; /* no. of allocated colors */ |
---|
934 | |
---|
935 | GdkColorContextMode mode; |
---|
936 | gint need_to_free_colormap; |
---|
937 | GdkAtom std_cmap_atom; |
---|
938 | |
---|
939 | gulong *clut; /* color look-up table */ |
---|
940 | GdkColor *cmap; /* colormap */ |
---|
941 | |
---|
942 | GHashTable *color_hash; /* hash table of allocated colors */ |
---|
943 | GdkColor *palette; /* preallocated palette */ |
---|
944 | gint num_palette; /* size of palette */ |
---|
945 | |
---|
946 | GdkColorContextDither *fast_dither; /* fast dither matrix */ |
---|
947 | |
---|
948 | struct |
---|
949 | { |
---|
950 | gint red; |
---|
951 | gint green; |
---|
952 | gint blue; |
---|
953 | } shifts; |
---|
954 | |
---|
955 | struct |
---|
956 | { |
---|
957 | gulong red; |
---|
958 | gulong green; |
---|
959 | gulong blue; |
---|
960 | } masks; |
---|
961 | |
---|
962 | struct |
---|
963 | { |
---|
964 | gint red; |
---|
965 | gint green; |
---|
966 | gint blue; |
---|
967 | } bits; |
---|
968 | |
---|
969 | gulong max_entry; |
---|
970 | |
---|
971 | gulong black_pixel; |
---|
972 | gulong white_pixel; |
---|
973 | }; |
---|
974 | |
---|
975 | /* Types for XInput support */ |
---|
976 | |
---|
977 | struct _GdkDeviceKey |
---|
978 | { |
---|
979 | guint keyval; |
---|
980 | GdkModifierType modifiers; |
---|
981 | }; |
---|
982 | |
---|
983 | struct _GdkDeviceInfo |
---|
984 | { |
---|
985 | guint32 deviceid; |
---|
986 | gchar *name; |
---|
987 | GdkInputSource source; |
---|
988 | GdkInputMode mode; |
---|
989 | gint has_cursor; /* TRUE if the X pointer follows device motion */ |
---|
990 | gint num_axes; |
---|
991 | GdkAxisUse *axes; /* Specifies use for each axis */ |
---|
992 | gint num_keys; |
---|
993 | GdkDeviceKey *keys; |
---|
994 | }; |
---|
995 | |
---|
996 | struct _GdkTimeCoord |
---|
997 | { |
---|
998 | guint32 time; |
---|
999 | gdouble x; |
---|
1000 | gdouble y; |
---|
1001 | gdouble pressure; |
---|
1002 | gdouble xtilt; |
---|
1003 | gdouble ytilt; |
---|
1004 | }; |
---|
1005 | |
---|
1006 | /* Structure that holds information about a drag in progress. |
---|
1007 | * this is used on both source and destination sides. |
---|
1008 | */ |
---|
1009 | struct _GdkDragContext { |
---|
1010 | GdkDragProtocol protocol; |
---|
1011 | |
---|
1012 | gboolean is_source; |
---|
1013 | |
---|
1014 | GdkWindow *source_window; |
---|
1015 | GdkWindow *dest_window; |
---|
1016 | |
---|
1017 | GList *targets; |
---|
1018 | GdkDragAction actions; |
---|
1019 | GdkDragAction suggested_action; |
---|
1020 | GdkDragAction action; |
---|
1021 | |
---|
1022 | guint32 start_time; |
---|
1023 | }; |
---|
1024 | |
---|
1025 | /* Event filtering */ |
---|
1026 | |
---|
1027 | typedef void GdkXEvent; /* Can be cast to XEvent */ |
---|
1028 | |
---|
1029 | typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent, |
---|
1030 | GdkEvent *event, |
---|
1031 | gpointer data); |
---|
1032 | |
---|
1033 | struct _GdkEventAny |
---|
1034 | { |
---|
1035 | GdkEventType type; |
---|
1036 | GdkWindow *window; |
---|
1037 | gint8 send_event; |
---|
1038 | }; |
---|
1039 | |
---|
1040 | struct _GdkEventExpose |
---|
1041 | { |
---|
1042 | GdkEventType type; |
---|
1043 | GdkWindow *window; |
---|
1044 | gint8 send_event; |
---|
1045 | GdkRectangle area; |
---|
1046 | gint count; /* If non-zero, how many more events follow. */ |
---|
1047 | }; |
---|
1048 | |
---|
1049 | struct _GdkEventNoExpose |
---|
1050 | { |
---|
1051 | GdkEventType type; |
---|
1052 | GdkWindow *window; |
---|
1053 | gint8 send_event; |
---|
1054 | /* XXX: does anyone need the X major_code or minor_code fields? */ |
---|
1055 | }; |
---|
1056 | |
---|
1057 | struct _GdkEventVisibility |
---|
1058 | { |
---|
1059 | GdkEventType type; |
---|
1060 | GdkWindow *window; |
---|
1061 | gint8 send_event; |
---|
1062 | GdkVisibilityState state; |
---|
1063 | }; |
---|
1064 | |
---|
1065 | struct _GdkEventMotion |
---|
1066 | { |
---|
1067 | GdkEventType type; |
---|
1068 | GdkWindow *window; |
---|
1069 | gint8 send_event; |
---|
1070 | guint32 time; |
---|
1071 | gdouble x; |
---|
1072 | gdouble y; |
---|
1073 | gdouble pressure; |
---|
1074 | gdouble xtilt; |
---|
1075 | gdouble ytilt; |
---|
1076 | guint state; |
---|
1077 | gint16 is_hint; |
---|
1078 | GdkInputSource source; |
---|
1079 | guint32 deviceid; |
---|
1080 | gdouble x_root, y_root; |
---|
1081 | }; |
---|
1082 | |
---|
1083 | struct _GdkEventButton |
---|
1084 | { |
---|
1085 | GdkEventType type; |
---|
1086 | GdkWindow *window; |
---|
1087 | gint8 send_event; |
---|
1088 | guint32 time; |
---|
1089 | gdouble x; |
---|
1090 | gdouble y; |
---|
1091 | gdouble pressure; |
---|
1092 | gdouble xtilt; |
---|
1093 | gdouble ytilt; |
---|
1094 | guint state; |
---|
1095 | guint button; |
---|
1096 | GdkInputSource source; |
---|
1097 | guint32 deviceid; |
---|
1098 | gdouble x_root, y_root; |
---|
1099 | }; |
---|
1100 | |
---|
1101 | struct _GdkEventKey |
---|
1102 | { |
---|
1103 | GdkEventType type; |
---|
1104 | GdkWindow *window; |
---|
1105 | gint8 send_event; |
---|
1106 | guint32 time; |
---|
1107 | guint state; |
---|
1108 | guint keyval; |
---|
1109 | gint length; |
---|
1110 | gchar *string; |
---|
1111 | }; |
---|
1112 | |
---|
1113 | struct _GdkEventCrossing |
---|
1114 | { |
---|
1115 | GdkEventType type; |
---|
1116 | GdkWindow *window; |
---|
1117 | gint8 send_event; |
---|
1118 | GdkWindow *subwindow; |
---|
1119 | guint32 time; |
---|
1120 | gdouble x; |
---|
1121 | gdouble y; |
---|
1122 | gdouble x_root; |
---|
1123 | gdouble y_root; |
---|
1124 | GdkCrossingMode mode; |
---|
1125 | GdkNotifyType detail; |
---|
1126 | gboolean focus; |
---|
1127 | guint state; |
---|
1128 | }; |
---|
1129 | |
---|
1130 | struct _GdkEventFocus |
---|
1131 | { |
---|
1132 | GdkEventType type; |
---|
1133 | GdkWindow *window; |
---|
1134 | gint8 send_event; |
---|
1135 | gint16 in; |
---|
1136 | }; |
---|
1137 | |
---|
1138 | struct _GdkEventConfigure |
---|
1139 | { |
---|
1140 | GdkEventType type; |
---|
1141 | GdkWindow *window; |
---|
1142 | gint8 send_event; |
---|
1143 | gint16 x, y; |
---|
1144 | gint16 width; |
---|
1145 | gint16 height; |
---|
1146 | }; |
---|
1147 | |
---|
1148 | struct _GdkEventProperty |
---|
1149 | { |
---|
1150 | GdkEventType type; |
---|
1151 | GdkWindow *window; |
---|
1152 | gint8 send_event; |
---|
1153 | GdkAtom atom; |
---|
1154 | guint32 time; |
---|
1155 | guint state; |
---|
1156 | }; |
---|
1157 | |
---|
1158 | struct _GdkEventSelection |
---|
1159 | { |
---|
1160 | GdkEventType type; |
---|
1161 | GdkWindow *window; |
---|
1162 | gint8 send_event; |
---|
1163 | GdkAtom selection; |
---|
1164 | GdkAtom target; |
---|
1165 | GdkAtom property; |
---|
1166 | guint32 requestor; |
---|
1167 | guint32 time; |
---|
1168 | }; |
---|
1169 | |
---|
1170 | /* This event type will be used pretty rarely. It only is important |
---|
1171 | for XInput aware programs that are drawing their own cursor */ |
---|
1172 | |
---|
1173 | struct _GdkEventProximity |
---|
1174 | { |
---|
1175 | GdkEventType type; |
---|
1176 | GdkWindow *window; |
---|
1177 | gint8 send_event; |
---|
1178 | guint32 time; |
---|
1179 | GdkInputSource source; |
---|
1180 | guint32 deviceid; |
---|
1181 | }; |
---|
1182 | |
---|
1183 | struct _GdkEventClient |
---|
1184 | { |
---|
1185 | GdkEventType type; |
---|
1186 | GdkWindow *window; |
---|
1187 | gint8 send_event; |
---|
1188 | GdkAtom message_type; |
---|
1189 | gushort data_format; |
---|
1190 | union { |
---|
1191 | char b[20]; |
---|
1192 | short s[10]; |
---|
1193 | long l[5]; |
---|
1194 | } data; |
---|
1195 | }; |
---|
1196 | |
---|
1197 | /* Event types for DND */ |
---|
1198 | |
---|
1199 | struct _GdkEventDND { |
---|
1200 | GdkEventType type; |
---|
1201 | GdkWindow *window; |
---|
1202 | gint8 send_event; |
---|
1203 | GdkDragContext *context; |
---|
1204 | |
---|
1205 | guint32 time; |
---|
1206 | gshort x_root, y_root; |
---|
1207 | }; |
---|
1208 | |
---|
1209 | union _GdkEvent |
---|
1210 | { |
---|
1211 | GdkEventType type; |
---|
1212 | GdkEventAny any; |
---|
1213 | GdkEventExpose expose; |
---|
1214 | GdkEventNoExpose no_expose; |
---|
1215 | GdkEventVisibility visibility; |
---|
1216 | GdkEventMotion motion; |
---|
1217 | GdkEventButton button; |
---|
1218 | GdkEventKey key; |
---|
1219 | GdkEventCrossing crossing; |
---|
1220 | GdkEventFocus focus_change; |
---|
1221 | GdkEventConfigure configure; |
---|
1222 | GdkEventProperty property; |
---|
1223 | GdkEventSelection selection; |
---|
1224 | GdkEventProximity proximity; |
---|
1225 | GdkEventClient client; |
---|
1226 | GdkEventDND dnd; |
---|
1227 | }; |
---|
1228 | |
---|
1229 | struct _GdkRegion |
---|
1230 | { |
---|
1231 | gpointer user_data; |
---|
1232 | }; |
---|
1233 | |
---|
1234 | struct _GdkICAttr |
---|
1235 | { |
---|
1236 | GdkIMStyle style; |
---|
1237 | GdkWindow *client_window; |
---|
1238 | GdkWindow *focus_window; |
---|
1239 | GdkEventMask filter_events; |
---|
1240 | GdkPoint spot_location; |
---|
1241 | gint line_spacing; |
---|
1242 | GdkCursor *cursor; |
---|
1243 | |
---|
1244 | GdkFont *preedit_fontset; |
---|
1245 | GdkRectangle preedit_area; |
---|
1246 | GdkRectangle preedit_area_needed; |
---|
1247 | GdkColor preedit_foreground; |
---|
1248 | GdkColor preedit_background; |
---|
1249 | GdkPixmap *preedit_pixmap; |
---|
1250 | GdkColormap *preedit_colormap; |
---|
1251 | |
---|
1252 | GdkFont *status_fontset; |
---|
1253 | GdkRectangle status_area; |
---|
1254 | GdkRectangle status_area_needed; |
---|
1255 | GdkColor status_foreground; |
---|
1256 | GdkColor status_background; |
---|
1257 | GdkPixmap *status_pixmap; |
---|
1258 | GdkColormap *status_colormap; |
---|
1259 | }; |
---|
1260 | |
---|
1261 | #ifdef __cplusplus |
---|
1262 | } |
---|
1263 | #endif /* __cplusplus */ |
---|
1264 | |
---|
1265 | |
---|
1266 | #endif /* __GDK_TYPES_H__ */ |
---|