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