OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tk/] [xlib/] [X11/] [X.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.