VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/1.6/X11/X.h@ 17239

最後變更 在這個檔案從17239是 17239,由 vboxsync 提交於 16 年 前

Additions/x11/x11include: removed remaining svn:keywords properties

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette