1 | /*
|
---|
2 | * $Xorg: X.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $
|
---|
3 | */
|
---|
4 |
|
---|
5 | /* Definitions for the X window system likely to be used by applications */
|
---|
6 |
|
---|
7 | #ifndef X_H
|
---|
8 | #define X_H
|
---|
9 |
|
---|
10 | /***********************************************************
|
---|
11 |
|
---|
12 | Copyright 1987, 1998 The Open Group
|
---|
13 |
|
---|
14 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
15 | documentation for any purpose is hereby granted without fee, provided that
|
---|
16 | the above copyright notice appear in all copies and that both that
|
---|
17 | copyright notice and this permission notice appear in supporting
|
---|
18 | documentation.
|
---|
19 |
|
---|
20 | The above copyright notice and this permission notice shall be included in
|
---|
21 | all copies or substantial portions of the Software.
|
---|
22 |
|
---|
23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
26 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
27 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
28 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
29 |
|
---|
30 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
31 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
32 | in this Software without prior written authorization from The Open Group.
|
---|
33 |
|
---|
34 |
|
---|
35 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
36 |
|
---|
37 | All Rights Reserved
|
---|
38 |
|
---|
39 | Permission to use, copy, modify, and distribute this software and its
|
---|
40 | documentation for any purpose and without fee is hereby granted,
|
---|
41 | provided that the above copyright notice appear in all copies and that
|
---|
42 | both that copyright notice and this permission notice appear in
|
---|
43 | supporting documentation, and that the name of Digital not be
|
---|
44 | used in advertising or publicity pertaining to distribution of the
|
---|
45 | software without specific, written prior permission.
|
---|
46 |
|
---|
47 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
48 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
49 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
50 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
51 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
52 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
53 | SOFTWARE.
|
---|
54 |
|
---|
55 | ******************************************************************/
|
---|
56 | /* $XFree86: xc/include/X.h,v 1.5 2001/12/14 19:53:25 dawes Exp $ */
|
---|
57 |
|
---|
58 | #define X_PROTOCOL 11 /* current protocol version */
|
---|
59 | #define X_PROTOCOL_REVISION 0 /* current minor version */
|
---|
60 |
|
---|
61 | /* Resources */
|
---|
62 |
|
---|
63 | /*
|
---|
64 | * _XSERVER64 must ONLY be defined when compiling X server sources on
|
---|
65 | * systems where unsigned long is not 32 bits, must NOT be used in
|
---|
66 | * client or library code.
|
---|
67 | */
|
---|
68 | #ifndef _XSERVER64
|
---|
69 | # ifndef _XTYPEDEF_XID
|
---|
70 | # define _XTYPEDEF_XID
|
---|
71 | typedef unsigned long XID;
|
---|
72 | # endif
|
---|
73 | # ifndef _XTYPEDEF_MASK
|
---|
74 | # define _XTYPEDEF_MASK
|
---|
75 | typedef unsigned long Mask;
|
---|
76 | # endif
|
---|
77 | # ifndef _XTYPEDEF_ATOM
|
---|
78 | # define _XTYPEDEF_ATOM
|
---|
79 | typedef unsigned long Atom; /* Also in Xdefs.h */
|
---|
80 | # endif
|
---|
81 | typedef unsigned long VisualID;
|
---|
82 | typedef unsigned long Time;
|
---|
83 | #else
|
---|
84 | # include <X11/Xmd.h>
|
---|
85 | # ifndef _XTYPEDEF_XID
|
---|
86 | # define _XTYPEDEF_XID
|
---|
87 | typedef CARD32 XID;
|
---|
88 | # endif
|
---|
89 | # ifndef _XTYPEDEF_MASK
|
---|
90 | # define _XTYPEDEF_MASK
|
---|
91 | typedef CARD32 Mask;
|
---|
92 | # endif
|
---|
93 | # ifndef _XTYPEDEF_ATOM
|
---|
94 | # define _XTYPEDEF_ATOM
|
---|
95 | typedef CARD32 Atom;
|
---|
96 | # endif
|
---|
97 | typedef CARD32 VisualID;
|
---|
98 | typedef CARD32 Time;
|
---|
99 | #endif
|
---|
100 |
|
---|
101 | typedef XID Window;
|
---|
102 | typedef XID Drawable;
|
---|
103 | #ifndef _XTYPEDEF_FONT
|
---|
104 | # define _XTYPEDEF_FONT
|
---|
105 | typedef XID Font;
|
---|
106 | #endif
|
---|
107 | typedef XID Pixmap;
|
---|
108 | typedef XID Cursor;
|
---|
109 | typedef XID Colormap;
|
---|
110 | typedef XID GContext;
|
---|
111 | typedef XID KeySym;
|
---|
112 |
|
---|
113 | typedef unsigned char KeyCode;
|
---|
114 |
|
---|
115 | /*****************************************************************
|
---|
116 | * RESERVED RESOURCE AND CONSTANT DEFINITIONS
|
---|
117 | *****************************************************************/
|
---|
118 |
|
---|
119 | #ifndef None
|
---|
120 | #define None 0L /* universal null resource or null atom */
|
---|
121 | #endif
|
---|
122 |
|
---|
123 | #define ParentRelative 1L /* background pixmap in CreateWindow
|
---|
124 | and ChangeWindowAttributes */
|
---|
125 |
|
---|
126 | #define CopyFromParent 0L /* border pixmap in CreateWindow
|
---|
127 | and ChangeWindowAttributes
|
---|
128 | special VisualID and special window
|
---|
129 | class passed to CreateWindow */
|
---|
130 |
|
---|
131 | #define PointerWindow 0L /* destination window in SendEvent */
|
---|
132 | #define InputFocus 1L /* destination window in SendEvent */
|
---|
133 |
|
---|
134 | #define PointerRoot 1L /* focus window in SetInputFocus */
|
---|
135 |
|
---|
136 | #define AnyPropertyType 0L /* special Atom, passed to GetProperty */
|
---|
137 |
|
---|
138 | #define AnyKey 0L /* special Key Code, passed to GrabKey */
|
---|
139 |
|
---|
140 | #define AnyButton 0L /* special Button Code, passed to GrabButton */
|
---|
141 |
|
---|
142 | #define AllTemporary 0L /* special Resource ID passed to KillClient */
|
---|
143 |
|
---|
144 | #define CurrentTime 0L /* special Time */
|
---|
145 |
|
---|
146 | #define NoSymbol 0L /* special KeySym */
|
---|
147 |
|
---|
148 | /*****************************************************************
|
---|
149 | * EVENT DEFINITIONS
|
---|
150 | *****************************************************************/
|
---|
151 |
|
---|
152 | /* Input Event Masks. Used as event-mask window attribute and as arguments
|
---|
153 | to Grab requests. Not to be confused with event names. */
|
---|
154 |
|
---|
155 | #define NoEventMask 0L
|
---|
156 | #define KeyPressMask (1L<<0)
|
---|
157 | #define KeyReleaseMask (1L<<1)
|
---|
158 | #define ButtonPressMask (1L<<2)
|
---|
159 | #define ButtonReleaseMask (1L<<3)
|
---|
160 | #define EnterWindowMask (1L<<4)
|
---|
161 | #define LeaveWindowMask (1L<<5)
|
---|
162 | #define PointerMotionMask (1L<<6)
|
---|
163 | #define PointerMotionHintMask (1L<<7)
|
---|
164 | #define Button1MotionMask (1L<<8)
|
---|
165 | #define Button2MotionMask (1L<<9)
|
---|
166 | #define Button3MotionMask (1L<<10)
|
---|
167 | #define Button4MotionMask (1L<<11)
|
---|
168 | #define Button5MotionMask (1L<<12)
|
---|
169 | #define ButtonMotionMask (1L<<13)
|
---|
170 | #define KeymapStateMask (1L<<14)
|
---|
171 | #define ExposureMask (1L<<15)
|
---|
172 | #define VisibilityChangeMask (1L<<16)
|
---|
173 | #define StructureNotifyMask (1L<<17)
|
---|
174 | #define ResizeRedirectMask (1L<<18)
|
---|
175 | #define SubstructureNotifyMask (1L<<19)
|
---|
176 | #define SubstructureRedirectMask (1L<<20)
|
---|
177 | #define FocusChangeMask (1L<<21)
|
---|
178 | #define PropertyChangeMask (1L<<22)
|
---|
179 | #define ColormapChangeMask (1L<<23)
|
---|
180 | #define OwnerGrabButtonMask (1L<<24)
|
---|
181 |
|
---|
182 | /* Event names. Used in "type" field in XEvent structures. Not to be
|
---|
183 | confused with event masks above. They start from 2 because 0 and 1
|
---|
184 | are reserved in the protocol for errors and replies. */
|
---|
185 |
|
---|
186 | #define KeyPress 2
|
---|
187 | #define KeyRelease 3
|
---|
188 | #define ButtonPress 4
|
---|
189 | #define ButtonRelease 5
|
---|
190 | #define MotionNotify 6
|
---|
191 | #define EnterNotify 7
|
---|
192 | #define LeaveNotify 8
|
---|
193 | #define FocusIn 9
|
---|
194 | #define FocusOut 10
|
---|
195 | #define KeymapNotify 11
|
---|
196 | #define Expose 12
|
---|
197 | #define GraphicsExpose 13
|
---|
198 | #define NoExpose 14
|
---|
199 | #define VisibilityNotify 15
|
---|
200 | #define CreateNotify 16
|
---|
201 | #define DestroyNotify 17
|
---|
202 | #define UnmapNotify 18
|
---|
203 | #define MapNotify 19
|
---|
204 | #define MapRequest 20
|
---|
205 | #define ReparentNotify 21
|
---|
206 | #define ConfigureNotify 22
|
---|
207 | #define ConfigureRequest 23
|
---|
208 | #define GravityNotify 24
|
---|
209 | #define ResizeRequest 25
|
---|
210 | #define CirculateNotify 26
|
---|
211 | #define CirculateRequest 27
|
---|
212 | #define PropertyNotify 28
|
---|
213 | #define SelectionClear 29
|
---|
214 | #define SelectionRequest 30
|
---|
215 | #define SelectionNotify 31
|
---|
216 | #define ColormapNotify 32
|
---|
217 | #define ClientMessage 33
|
---|
218 | #define MappingNotify 34
|
---|
219 | #define LASTEvent 35 /* must be bigger than any event # */
|
---|
220 |
|
---|
221 |
|
---|
222 | /* Key masks. Used as modifiers to GrabButton and GrabKey, results of QueryPointer,
|
---|
223 | state in various key-, mouse-, and button-related events. */
|
---|
224 |
|
---|
225 | #define ShiftMask (1<<0)
|
---|
226 | #define LockMask (1<<1)
|
---|
227 | #define ControlMask (1<<2)
|
---|
228 | #define Mod1Mask (1<<3)
|
---|
229 | #define Mod2Mask (1<<4)
|
---|
230 | #define Mod3Mask (1<<5)
|
---|
231 | #define Mod4Mask (1<<6)
|
---|
232 | #define Mod5Mask (1<<7)
|
---|
233 |
|
---|
234 | /* modifier names. Used to build a SetModifierMapping request or
|
---|
235 | to read a GetModifierMapping request. These correspond to the
|
---|
236 | masks defined above. */
|
---|
237 | #define ShiftMapIndex 0
|
---|
238 | #define LockMapIndex 1
|
---|
239 | #define ControlMapIndex 2
|
---|
240 | #define Mod1MapIndex 3
|
---|
241 | #define Mod2MapIndex 4
|
---|
242 | #define Mod3MapIndex 5
|
---|
243 | #define Mod4MapIndex 6
|
---|
244 | #define Mod5MapIndex 7
|
---|
245 |
|
---|
246 |
|
---|
247 | /* button masks. Used in same manner as Key masks above. Not to be confused
|
---|
248 | with button names below. */
|
---|
249 |
|
---|
250 | #define Button1Mask (1<<8)
|
---|
251 | #define Button2Mask (1<<9)
|
---|
252 | #define Button3Mask (1<<10)
|
---|
253 | #define Button4Mask (1<<11)
|
---|
254 | #define Button5Mask (1<<12)
|
---|
255 |
|
---|
256 | #define AnyModifier (1<<15) /* used in GrabButton, GrabKey */
|
---|
257 |
|
---|
258 |
|
---|
259 | /* button names. Used as arguments to GrabButton and as detail in ButtonPress
|
---|
260 | and ButtonRelease events. Not to be confused with button masks above.
|
---|
261 | Note that 0 is already defined above as "AnyButton". */
|
---|
262 |
|
---|
263 | #define Button1 1
|
---|
264 | #define Button2 2
|
---|
265 | #define Button3 3
|
---|
266 | #define Button4 4
|
---|
267 | #define Button5 5
|
---|
268 |
|
---|
269 | /* Notify modes */
|
---|
270 |
|
---|
271 | #define NotifyNormal 0
|
---|
272 | #define NotifyGrab 1
|
---|
273 | #define NotifyUngrab 2
|
---|
274 | #define NotifyWhileGrabbed 3
|
---|
275 |
|
---|
276 | #define NotifyHint 1 /* for MotionNotify events */
|
---|
277 |
|
---|
278 | /* Notify detail */
|
---|
279 |
|
---|
280 | #define NotifyAncestor 0
|
---|
281 | #define NotifyVirtual 1
|
---|
282 | #define NotifyInferior 2
|
---|
283 | #define NotifyNonlinear 3
|
---|
284 | #define NotifyNonlinearVirtual 4
|
---|
285 | #define NotifyPointer 5
|
---|
286 | #define NotifyPointerRoot 6
|
---|
287 | #define NotifyDetailNone 7
|
---|
288 |
|
---|
289 | /* Visibility notify */
|
---|
290 |
|
---|
291 | #define VisibilityUnobscured 0
|
---|
292 | #define VisibilityPartiallyObscured 1
|
---|
293 | #define VisibilityFullyObscured 2
|
---|
294 |
|
---|
295 | /* Circulation request */
|
---|
296 |
|
---|
297 | #define PlaceOnTop 0
|
---|
298 | #define PlaceOnBottom 1
|
---|
299 |
|
---|
300 | /* protocol families */
|
---|
301 |
|
---|
302 | #define FamilyInternet 0
|
---|
303 | #define FamilyDECnet 1
|
---|
304 | #define FamilyChaos 2
|
---|
305 |
|
---|
306 | /* Property notification */
|
---|
307 |
|
---|
308 | #define PropertyNewValue 0
|
---|
309 | #define PropertyDelete 1
|
---|
310 |
|
---|
311 | /* Color Map notification */
|
---|
312 |
|
---|
313 | #define ColormapUninstalled 0
|
---|
314 | #define ColormapInstalled 1
|
---|
315 |
|
---|
316 | /* GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes */
|
---|
317 |
|
---|
318 | #define GrabModeSync 0
|
---|
319 | #define GrabModeAsync 1
|
---|
320 |
|
---|
321 | /* GrabPointer, GrabKeyboard reply status */
|
---|
322 |
|
---|
323 | #define GrabSuccess 0
|
---|
324 | #define AlreadyGrabbed 1
|
---|
325 | #define GrabInvalidTime 2
|
---|
326 | #define GrabNotViewable 3
|
---|
327 | #define GrabFrozen 4
|
---|
328 |
|
---|
329 | /* AllowEvents modes */
|
---|
330 |
|
---|
331 | #define AsyncPointer 0
|
---|
332 | #define SyncPointer 1
|
---|
333 | #define ReplayPointer 2
|
---|
334 | #define AsyncKeyboard 3
|
---|
335 | #define SyncKeyboard 4
|
---|
336 | #define ReplayKeyboard 5
|
---|
337 | #define AsyncBoth 6
|
---|
338 | #define SyncBoth 7
|
---|
339 |
|
---|
340 | /* Used in SetInputFocus, GetInputFocus */
|
---|
341 |
|
---|
342 | #define RevertToNone (int)None
|
---|
343 | #define RevertToPointerRoot (int)PointerRoot
|
---|
344 | #define RevertToParent 2
|
---|
345 |
|
---|
346 | /*****************************************************************
|
---|
347 | * ERROR CODES
|
---|
348 | *****************************************************************/
|
---|
349 |
|
---|
350 | #define Success 0 /* everything's okay */
|
---|
351 | #define BadRequest 1 /* bad request code */
|
---|
352 | #define BadValue 2 /* int parameter out of range */
|
---|
353 | #define BadWindow 3 /* parameter not a Window */
|
---|
354 | #define BadPixmap 4 /* parameter not a Pixmap */
|
---|
355 | #define BadAtom 5 /* parameter not an Atom */
|
---|
356 | #define BadCursor 6 /* parameter not a Cursor */
|
---|
357 | #define BadFont 7 /* parameter not a Font */
|
---|
358 | #define BadMatch 8 /* parameter mismatch */
|
---|
359 | #define BadDrawable 9 /* parameter not a Pixmap or Window */
|
---|
360 | #define BadAccess 10 /* depending on context:
|
---|
361 | - key/button already grabbed
|
---|
362 | - attempt to free an illegal
|
---|
363 | cmap entry
|
---|
364 | - attempt to store into a read-only
|
---|
365 | color map entry.
|
---|
366 | - attempt to modify the access control
|
---|
367 | list from other than the local host.
|
---|
368 | */
|
---|
369 | #define BadAlloc 11 /* insufficient resources */
|
---|
370 | #define BadColor 12 /* no such colormap */
|
---|
371 | #define BadGC 13 /* parameter not a GC */
|
---|
372 | #define BadIDChoice 14 /* choice not in range or already used */
|
---|
373 | #define BadName 15 /* font or color name doesn't exist */
|
---|
374 | #define BadLength 16 /* Request length incorrect */
|
---|
375 | #define BadImplementation 17 /* server is defective */
|
---|
376 |
|
---|
377 | #define FirstExtensionError 128
|
---|
378 | #define LastExtensionError 255
|
---|
379 |
|
---|
380 | /*****************************************************************
|
---|
381 | * WINDOW DEFINITIONS
|
---|
382 | *****************************************************************/
|
---|
383 |
|
---|
384 | /* Window classes used by CreateWindow */
|
---|
385 | /* Note that CopyFromParent is already defined as 0 above */
|
---|
386 |
|
---|
387 | #define InputOutput 1
|
---|
388 | #define InputOnly 2
|
---|
389 |
|
---|
390 | /* Window attributes for CreateWindow and ChangeWindowAttributes */
|
---|
391 |
|
---|
392 | #define CWBackPixmap (1L<<0)
|
---|
393 | #define CWBackPixel (1L<<1)
|
---|
394 | #define CWBorderPixmap (1L<<2)
|
---|
395 | #define CWBorderPixel (1L<<3)
|
---|
396 | #define CWBitGravity (1L<<4)
|
---|
397 | #define CWWinGravity (1L<<5)
|
---|
398 | #define CWBackingStore (1L<<6)
|
---|
399 | #define CWBackingPlanes (1L<<7)
|
---|
400 | #define CWBackingPixel (1L<<8)
|
---|
401 | #define CWOverrideRedirect (1L<<9)
|
---|
402 | #define CWSaveUnder (1L<<10)
|
---|
403 | #define CWEventMask (1L<<11)
|
---|
404 | #define CWDontPropagate (1L<<12)
|
---|
405 | #define CWColormap (1L<<13)
|
---|
406 | #define CWCursor (1L<<14)
|
---|
407 |
|
---|
408 | /* ConfigureWindow structure */
|
---|
409 |
|
---|
410 | #define CWX (1<<0)
|
---|
411 | #define CWY (1<<1)
|
---|
412 | #define CWWidth (1<<2)
|
---|
413 | #define CWHeight (1<<3)
|
---|
414 | #define CWBorderWidth (1<<4)
|
---|
415 | #define CWSibling (1<<5)
|
---|
416 | #define CWStackMode (1<<6)
|
---|
417 |
|
---|
418 |
|
---|
419 | /* Bit Gravity */
|
---|
420 |
|
---|
421 | #define ForgetGravity 0
|
---|
422 | #define NorthWestGravity 1
|
---|
423 | #define NorthGravity 2
|
---|
424 | #define NorthEastGravity 3
|
---|
425 | #define WestGravity 4
|
---|
426 | #define CenterGravity 5
|
---|
427 | #define EastGravity 6
|
---|
428 | #define SouthWestGravity 7
|
---|
429 | #define SouthGravity 8
|
---|
430 | #define SouthEastGravity 9
|
---|
431 | #define StaticGravity 10
|
---|
432 |
|
---|
433 | /* Window gravity + bit gravity above */
|
---|
434 |
|
---|
435 | #define UnmapGravity 0
|
---|
436 |
|
---|
437 | /* Used in CreateWindow for backing-store hint */
|
---|
438 |
|
---|
439 | #define NotUseful 0
|
---|
440 | #define WhenMapped 1
|
---|
441 | #define Always 2
|
---|
442 |
|
---|
443 | /* Used in GetWindowAttributes reply */
|
---|
444 |
|
---|
445 | #define IsUnmapped 0
|
---|
446 | #define IsUnviewable 1
|
---|
447 | #define IsViewable 2
|
---|
448 |
|
---|
449 | /* Used in ChangeSaveSet */
|
---|
450 |
|
---|
451 | #define SetModeInsert 0
|
---|
452 | #define SetModeDelete 1
|
---|
453 |
|
---|
454 | /* Used in ChangeCloseDownMode */
|
---|
455 |
|
---|
456 | #define DestroyAll 0
|
---|
457 | #define RetainPermanent 1
|
---|
458 | #define RetainTemporary 2
|
---|
459 |
|
---|
460 | /* Window stacking method (in configureWindow) */
|
---|
461 |
|
---|
462 | #define Above 0
|
---|
463 | #define Below 1
|
---|
464 | #define TopIf 2
|
---|
465 | #define BottomIf 3
|
---|
466 | #define Opposite 4
|
---|
467 |
|
---|
468 | /* Circulation direction */
|
---|
469 |
|
---|
470 | #define RaiseLowest 0
|
---|
471 | #define LowerHighest 1
|
---|
472 |
|
---|
473 | /* Property modes */
|
---|
474 |
|
---|
475 | #define PropModeReplace 0
|
---|
476 | #define PropModePrepend 1
|
---|
477 | #define PropModeAppend 2
|
---|
478 |
|
---|
479 | /*****************************************************************
|
---|
480 | * GRAPHICS DEFINITIONS
|
---|
481 | *****************************************************************/
|
---|
482 |
|
---|
483 | /* graphics functions, as in GC.alu */
|
---|
484 |
|
---|
485 | #define GXclear 0x0 /* 0 */
|
---|
486 | #define GXand 0x1 /* src AND dst */
|
---|
487 | #define GXandReverse 0x2 /* src AND NOT dst */
|
---|
488 | #define GXcopy 0x3 /* src */
|
---|
489 | #define GXandInverted 0x4 /* NOT src AND dst */
|
---|
490 | #define GXnoop 0x5 /* dst */
|
---|
491 | #define GXxor 0x6 /* src XOR dst */
|
---|
492 | #define GXor 0x7 /* src OR dst */
|
---|
493 | #define GXnor 0x8 /* NOT src AND NOT dst */
|
---|
494 | #define GXequiv 0x9 /* NOT src XOR dst */
|
---|
495 | #define GXinvert 0xa /* NOT dst */
|
---|
496 | #define GXorReverse 0xb /* src OR NOT dst */
|
---|
497 | #define GXcopyInverted 0xc /* NOT src */
|
---|
498 | #define GXorInverted 0xd /* NOT src OR dst */
|
---|
499 | #define GXnand 0xe /* NOT src OR NOT dst */
|
---|
500 | #define GXset 0xf /* 1 */
|
---|
501 |
|
---|
502 | /* LineStyle */
|
---|
503 |
|
---|
504 | #define LineSolid 0
|
---|
505 | #define LineOnOffDash 1
|
---|
506 | #define LineDoubleDash 2
|
---|
507 |
|
---|
508 | /* capStyle */
|
---|
509 |
|
---|
510 | #define CapNotLast 0
|
---|
511 | #define CapButt 1
|
---|
512 | #define CapRound 2
|
---|
513 | #define CapProjecting 3
|
---|
514 |
|
---|
515 | /* joinStyle */
|
---|
516 |
|
---|
517 | #define JoinMiter 0
|
---|
518 | #define JoinRound 1
|
---|
519 | #define JoinBevel 2
|
---|
520 |
|
---|
521 | /* fillStyle */
|
---|
522 |
|
---|
523 | #define FillSolid 0
|
---|
524 | #define FillTiled 1
|
---|
525 | #define FillStippled 2
|
---|
526 | #define FillOpaqueStippled 3
|
---|
527 |
|
---|
528 | /* fillRule */
|
---|
529 |
|
---|
530 | #define EvenOddRule 0
|
---|
531 | #define WindingRule 1
|
---|
532 |
|
---|
533 | /* subwindow mode */
|
---|
534 |
|
---|
535 | #define ClipByChildren 0
|
---|
536 | #define IncludeInferiors 1
|
---|
537 |
|
---|
538 | /* SetClipRectangles ordering */
|
---|
539 |
|
---|
540 | #define Unsorted 0
|
---|
541 | #define YSorted 1
|
---|
542 | #define YXSorted 2
|
---|
543 | #define YXBanded 3
|
---|
544 |
|
---|
545 | /* CoordinateMode for drawing routines */
|
---|
546 |
|
---|
547 | #define CoordModeOrigin 0 /* relative to the origin */
|
---|
548 | #define CoordModePrevious 1 /* relative to previous point */
|
---|
549 |
|
---|
550 | /* Polygon shapes */
|
---|
551 |
|
---|
552 | #define Complex 0 /* paths may intersect */
|
---|
553 | #define Nonconvex 1 /* no paths intersect, but not convex */
|
---|
554 | #define Convex 2 /* wholly convex */
|
---|
555 |
|
---|
556 | /* Arc modes for PolyFillArc */
|
---|
557 |
|
---|
558 | #define ArcChord 0 /* join endpoints of arc */
|
---|
559 | #define ArcPieSlice 1 /* join endpoints to center of arc */
|
---|
560 |
|
---|
561 | /* GC components: masks used in CreateGC, CopyGC, ChangeGC, OR'ed into
|
---|
562 | GC.stateChanges */
|
---|
563 |
|
---|
564 | #define GCFunction (1L<<0)
|
---|
565 | #define GCPlaneMask (1L<<1)
|
---|
566 | #define GCForeground (1L<<2)
|
---|
567 | #define GCBackground (1L<<3)
|
---|
568 | #define GCLineWidth (1L<<4)
|
---|
569 | #define GCLineStyle (1L<<5)
|
---|
570 | #define GCCapStyle (1L<<6)
|
---|
571 | #define GCJoinStyle (1L<<7)
|
---|
572 | #define GCFillStyle (1L<<8)
|
---|
573 | #define GCFillRule (1L<<9)
|
---|
574 | #define GCTile (1L<<10)
|
---|
575 | #define GCStipple (1L<<11)
|
---|
576 | #define GCTileStipXOrigin (1L<<12)
|
---|
577 | #define GCTileStipYOrigin (1L<<13)
|
---|
578 | #define GCFont (1L<<14)
|
---|
579 | #define GCSubwindowMode (1L<<15)
|
---|
580 | #define GCGraphicsExposures (1L<<16)
|
---|
581 | #define GCClipXOrigin (1L<<17)
|
---|
582 | #define GCClipYOrigin (1L<<18)
|
---|
583 | #define GCClipMask (1L<<19)
|
---|
584 | #define GCDashOffset (1L<<20)
|
---|
585 | #define GCDashList (1L<<21)
|
---|
586 | #define GCArcMode (1L<<22)
|
---|
587 |
|
---|
588 | #define GCLastBit 22
|
---|
589 | /*****************************************************************
|
---|
590 | * FONTS
|
---|
591 | *****************************************************************/
|
---|
592 |
|
---|
593 | /* used in QueryFont -- draw direction */
|
---|
594 |
|
---|
595 | #define FontLeftToRight 0
|
---|
596 | #define FontRightToLeft 1
|
---|
597 |
|
---|
598 | #define FontChange 255
|
---|
599 |
|
---|
600 | /*****************************************************************
|
---|
601 | * IMAGING
|
---|
602 | *****************************************************************/
|
---|
603 |
|
---|
604 | /* ImageFormat -- PutImage, GetImage */
|
---|
605 |
|
---|
606 | #define XYBitmap 0 /* depth 1, XYFormat */
|
---|
607 | #define XYPixmap 1 /* depth == drawable depth */
|
---|
608 | #define ZPixmap 2 /* depth == drawable depth */
|
---|
609 |
|
---|
610 | /*****************************************************************
|
---|
611 | * COLOR MAP STUFF
|
---|
612 | *****************************************************************/
|
---|
613 |
|
---|
614 | /* For CreateColormap */
|
---|
615 |
|
---|
616 | #define AllocNone 0 /* create map with no entries */
|
---|
617 | #define AllocAll 1 /* allocate entire map writeable */
|
---|
618 |
|
---|
619 |
|
---|
620 | /* Flags used in StoreNamedColor, StoreColors */
|
---|
621 |
|
---|
622 | #define DoRed (1<<0)
|
---|
623 | #define DoGreen (1<<1)
|
---|
624 | #define DoBlue (1<<2)
|
---|
625 |
|
---|
626 | /*****************************************************************
|
---|
627 | * CURSOR STUFF
|
---|
628 | *****************************************************************/
|
---|
629 |
|
---|
630 | /* QueryBestSize Class */
|
---|
631 |
|
---|
632 | #define CursorShape 0 /* largest size that can be displayed */
|
---|
633 | #define TileShape 1 /* size tiled fastest */
|
---|
634 | #define StippleShape 2 /* size stippled fastest */
|
---|
635 |
|
---|
636 | /*****************************************************************
|
---|
637 | * KEYBOARD/POINTER STUFF
|
---|
638 | *****************************************************************/
|
---|
639 |
|
---|
640 | #define AutoRepeatModeOff 0
|
---|
641 | #define AutoRepeatModeOn 1
|
---|
642 | #define AutoRepeatModeDefault 2
|
---|
643 |
|
---|
644 | #define LedModeOff 0
|
---|
645 | #define LedModeOn 1
|
---|
646 |
|
---|
647 | /* masks for ChangeKeyboardControl */
|
---|
648 |
|
---|
649 | #define KBKeyClickPercent (1L<<0)
|
---|
650 | #define KBBellPercent (1L<<1)
|
---|
651 | #define KBBellPitch (1L<<2)
|
---|
652 | #define KBBellDuration (1L<<3)
|
---|
653 | #define KBLed (1L<<4)
|
---|
654 | #define KBLedMode (1L<<5)
|
---|
655 | #define KBKey (1L<<6)
|
---|
656 | #define KBAutoRepeatMode (1L<<7)
|
---|
657 |
|
---|
658 | #define MappingSuccess 0
|
---|
659 | #define MappingBusy 1
|
---|
660 | #define MappingFailed 2
|
---|
661 |
|
---|
662 | #define MappingModifier 0
|
---|
663 | #define MappingKeyboard 1
|
---|
664 | #define MappingPointer 2
|
---|
665 |
|
---|
666 | /*****************************************************************
|
---|
667 | * SCREEN SAVER STUFF
|
---|
668 | *****************************************************************/
|
---|
669 |
|
---|
670 | #define DontPreferBlanking 0
|
---|
671 | #define PreferBlanking 1
|
---|
672 | #define DefaultBlanking 2
|
---|
673 |
|
---|
674 | #define DisableScreenSaver 0
|
---|
675 | #define DisableScreenInterval 0
|
---|
676 |
|
---|
677 | #define DontAllowExposures 0
|
---|
678 | #define AllowExposures 1
|
---|
679 | #define DefaultExposures 2
|
---|
680 |
|
---|
681 | /* for ForceScreenSaver */
|
---|
682 |
|
---|
683 | #define ScreenSaverReset 0
|
---|
684 | #define ScreenSaverActive 1
|
---|
685 |
|
---|
686 | /*****************************************************************
|
---|
687 | * HOSTS AND CONNECTIONS
|
---|
688 | *****************************************************************/
|
---|
689 |
|
---|
690 | /* for ChangeHosts */
|
---|
691 |
|
---|
692 | #define HostInsert 0
|
---|
693 | #define HostDelete 1
|
---|
694 |
|
---|
695 | /* for ChangeAccessControl */
|
---|
696 |
|
---|
697 | #define EnableAccess 1
|
---|
698 | #define DisableAccess 0
|
---|
699 |
|
---|
700 | /* Display classes used in opening the connection
|
---|
701 | * Note that the statically allocated ones are even numbered and the
|
---|
702 | * dynamically changeable ones are odd numbered */
|
---|
703 |
|
---|
704 | #define StaticGray 0
|
---|
705 | #define GrayScale 1
|
---|
706 | #define StaticColor 2
|
---|
707 | #define PseudoColor 3
|
---|
708 | #define TrueColor 4
|
---|
709 | #define DirectColor 5
|
---|
710 |
|
---|
711 |
|
---|
712 | /* Byte order used in imageByteOrder and bitmapBitOrder */
|
---|
713 |
|
---|
714 | #define LSBFirst 0
|
---|
715 | #define MSBFirst 1
|
---|
716 |
|
---|
717 | #endif /* X_H */
|
---|