1: #include <X/mit-copyright.h>
   2: 
   3: /* Copyright    Massachusetts Institute of Technology    1985	*/
   4: /* $Header: X.h,v 10.10 86/02/01 15:15:16 tony Rel $ */
   5: 
   6: /* Definitions for the X window system likely to be used by applications */
   7: 
   8: #define X_PROTOCOL  10      /* current protocol version */
   9: 
  10: /* Resources */
  11: 
  12: typedef long Window;
  13: typedef long Font;
  14: typedef long Bitmap;
  15: typedef long Pixmap;
  16: typedef long Cursor;
  17: typedef long Locator;
  18: 
  19: /* Input Event Codes */
  20: 
  21: #define NoEvent      0x0000
  22: #define KeyPressed   0x0001     /* keyboard key pressed */
  23: #define KeyReleased  0x0002     /* keyboard key released */
  24: #define ButtonPressed    0x0004     /* mouse button pressed */
  25: #define ButtonReleased   0x0008     /* mouse button released */
  26: #define EnterWindow  0x0010     /* mouse entering window */
  27: #define LeaveWindow  0x0020     /* mouse leaving window */
  28: #define MouseMoved   0x0040     /* mouse moves within window */
  29: #define ExposeWindow     0x0080     /* full window changed and/or exposed */
  30: #define ExposeRegion     0x0100     /* region of window exposed */
  31: #define ExposeCopy   0x0200     /* region exposed by X_CopyArea */
  32: #define RightDownMotion  0x0400     /* mouse moves with right button down */
  33: #define MiddleDownMotion 0x0800     /* mouse moves with middle button down */
  34: #define LeftDownMotion   0x1000     /* mouse moves with left button down */
  35: #define UnmapWindow  0x2000     /* window is unmapped */
  36: #define FocusChange  0x4000     /* keyboard focus changed */
  37: 
  38: /* Event detail bits */
  39: 
  40: #define ControlMask 0x4000      /* Control key */
  41: #define MetaMask    0x2000      /* Meta (Symbol) key */
  42: #define ShiftMask   0x1000      /* Shift key */
  43: #define ShiftLockMask   0x0800      /* ShiftLock key */
  44: #define LeftMask    0x0400      /* Left button */
  45: #define MiddleMask  0x0200      /* Middle button */
  46: #define RightMask   0x0100      /* Right button */
  47: #define ValueMask   0x00ff      /* Key/button code */
  48: 
  49: #define KeyState(x) (((x) & (ControlMask|MetaMask|ShiftMask)) >> 12)
  50: #define FullKeyState(x) (((x) & (ControlMask|MetaMask|ShiftMask|ShiftLockMask)) >> 11)
  51: #define ButtonState(x) (((x) & (LeftMask|MiddleMask|RightMask)) >> 8)
  52: 
  53: /* Button event detail codes */
  54: 
  55: #define RightButton 0
  56: #define MiddleButton    1
  57: #define LeftButton  2
  58: 
  59: /* Enter/Leave event detail codes */
  60: 
  61: #define IntoOrFromSubwindow 1
  62: #define VirtualCrossing     2
  63: 
  64: /* These are the error codes */
  65: 
  66: #define BadRequest  1       /* bad request code */
  67: #define BadValue    2       /* int parameter out of range */
  68: #define BadWindow   3       /* parameter not a Window */
  69: #define BadPixmap   4       /* parameter not a Pixmap */
  70: #define BadBitmap   5       /* parameter not a Bitmap */
  71: #define BadCursor   6       /* parameter not a Cursor */
  72: #define BadFont     7       /* parameter not a Font */
  73: #define BadMatch    8       /* parameter mismatch */
  74: #define BadTile     9       /* Pixmap shape invalid for tiling */
  75: #define BadGrab     10      /* mouse/button already grabbed */
  76: #define BadAccess   11      /* access control violation */
  77: #define BadAlloc    12      /* insufficient resources */
  78: #define BadColor    13      /* no such color */
  79: 
  80: /* for monochrome applications */
  81: 
  82: #define BlackPixel      0       /* may not actually be black */
  83: #define WhitePixel      1       /* may not actually be white */
  84: 
  85: /* graphics functions */
  86: 
  87: #define GXclear         0x0     /* 0 */
  88: #define GXand           0x1     /* src AND dst */
  89: #define GXandReverse        0x2     /* src AND NOT dst */
  90: #define GXcopy          0x3     /* src */
  91: #define GXandInverted       0x4     /* NOT src AND dst */
  92: #define GXnoop          0x5     /* dst */
  93: #define GXxor           0x6     /* src XOR dst */
  94: #define GXor            0x7     /* src OR dst */
  95: #define GXnor           0x8     /* NOT src AND NOT dst */
  96: #define GXequiv         0x9     /* NOT src XOR dst */
  97: #define GXinvert        0xa     /* NOT dst */
  98: #define GXorReverse     0xb     /* src OR NOT dst */
  99: #define GXcopyInverted      0xc     /* NOT src */
 100: #define GXorInverted        0xd     /* NOT src OR dst */
 101: #define GXnand          0xe     /* NOT src OR NOT dst */
 102: #define GXset           0xf     /* 1 */
 103: 
 104: /* Used in X_TileMode */
 105: 
 106: #define TileModeAbsolute    0
 107: #define TileModeRelative    1
 108: 
 109: /* Used in X_ClipMode */
 110: 
 111: #define ClipModeClipped     0
 112: #define ClipModeDrawThru    1
 113: 
 114: /* Used in X_QueryWindow reply */
 115: 
 116: #define IsUnmapped      0
 117: #define IsMapped        1
 118: #define IsInvisible     2
 119: 
 120: #define IsTransparent       0
 121: #define IsOpaque        1
 122: #define IsIcon          2
 123: 
 124: /* Used in X_Draw */
 125: 
 126: #define DrawSolidLine       0
 127: #define DrawDashedLine      1
 128: #define DrawPatternedLine   2
 129: 
 130: /* Used in X_Draw and X_DrawFilled */
 131: 
 132: typedef struct _Vertex {
 133:     short x, y;
 134:     unsigned short flags;
 135: } Vertex;
 136: 
 137: /* The meanings of the flag bits.  If the bit is 1 the predicate is true */
 138: 
 139: #define VertexRelative      0x0001      /* else absolute */
 140: #define VertexDontDraw      0x0002      /* else draw */
 141: #define VertexCurved        0x0004      /* else straight */
 142: #define VertexStartClosed   0x0008      /* else not */
 143: #define VertexEndClosed     0x0010      /* else not */
 144: #define VertexDrawLastPoint 0x0020      /* else don't */
 145: 
 146: /* Device identifiers returned by X_SetUp */
 147: 
 148: #define XDEV_XNEST      0   /* X in an X window */
 149: 
 150: /* DEC address space 1-99 */
 151: #define XDEV_VS100      1   /* DEC VS100			*/
 152: #define XDEV_QVSS       2   /* DEC QVSS (VS1 and VS2)	*/
 153: #define XDEV_QDSS       3   /* DEC QDSS display		*/
 154: #define XDEV_DECXXX     4   /* reserved for future use	*/
 155: #define XDEV_DECYYY     5   /* reserved for future use	*/
 156: #define XDEV_DECZZZ     6   /* reserved for future use	*/
 157: 
 158: /* Cognition address space 100-199 */
 159: #define XDEV_LEX90      100 /* Lexidata 90, Cognition       */
 160: 
 161: /* IBM address space 200-299 */
 162: #define XDEV_IBMACIS        200 /* IBM ACIS  display, wuf, RT/PC*/
 163: #define XDEV_IBMAPA8        201 /* IBM APA8  display, RT/PC     */
 164: #define XDEV_IBMAPA16       202 /* IBM APA16 display, RT/PC	*/
 165: 
 166: /* SMI address space 300-399 */
 167: #define SUN_BASE        300 /* base of SMI displays		*/
 168: #ifndef FBTYPE_SUN1BW
 169: /* from /usr/include/sun/fbio.h */
 170: #define FBTYPE_SUN1BW       0
 171: #define FBTYPE_SUN1COLOR    1
 172: #define FBTYPE_SUN2BW       2
 173: #define FBTYPE_SUN2COLOR    3
 174: #define FBTYPE_SUN2GP       4   /* reserved for future Sun use	*/
 175: #define FBTYPE_SUN3BW       5   /* reserved for future Sun use	*/
 176: #define FBTYPE_SUN3COLOR    6   /* reserved for future Sun use	*/
 177: #define FBTYPE_SUN4BW       7   /* reserved for future Sun use	*/
 178: #define FBTYPE_SUN4COLOR    8   /* reserved for future Sun use	*/
 179: #define FBTYPE_NOTSUN1      9   /* reserved for Sun customer	*/
 180: #define FBTYPE_NOTSUN2      10  /* reserved for Sun customer	*/
 181: #define FBTYPE_NOTSUN3      11  /* reserved for Sun customer	*/
 182: #endif
 183: #define XDEV_SUN1BW     FBTYPE_SUN1BW+SUN_BASE
 184: #define XDEV_SUN1COLOR      FBTYPE_SUN1COLOR+SUN_BASE
 185: #define XDEV_SUN2BW     FBTYPE_SUN2BW+SUN_BASE
 186: #define XDEV_SUN2COLOR      FBTYPE_SUN2COLOR+SUN_BASE
 187: #define XDEV_SUN2GP     FBTYPE_SUN2GP+SUN_BASE
 188: #define XDEV_SUN3BW     FBTYPE_SUN3BW+SUN_BASE
 189: #define XDEV_SUN3COLOR      FBTYPE_SUN3COLOR+SUN_BASE
 190: #define XDEV_SUN4BW     FBTYPE_SUN4BW+SUN_BASE
 191: #define XDEV_SUN4COLOR      FBTYPE_SUN4COLOR+SUN_BASE
 192: #define XDEV_NOTSUN1        FBTYPE_NOTSUN1+SUN_BASE
 193: #define XDEV_NOTSUN2        FBTYPE_NOTSUN2+SUN_BASE
 194: #define XDEV_NOTSUN3        FBTYPE_NOTSUN3+SUN_BASE
 195: 
 196: /* MASSCOMP address space 400-499 */
 197: #define XDEV_MC1        401 /* Masscomp, in progress	*/
 198: #define XDEV_MC2        402 /* Masscomp, (not implemented)  */
 199: #define XDEV_MC3        403 /* Masscomp, (not implemented)  */
 200: 
 201: /* Jupiter Systems address space 500-599 */
 202: #define XDEV_PGP20      501 /* 24 bit deep frame buffer	*/
 203: 
 204: /* Used in X_StoreColors */
 205: 
 206: typedef struct _ColorDef {
 207:     unsigned short pixel;
 208:     unsigned short red, green, blue;
 209: } ColorDef;
 210: 
 211: /* Used in X_PixmapBitsPut and X_StorePixmap */
 212: 
 213: #define XYFormat        0
 214: #define ZFormat         1
 215: 
 216: /* size in bytes of a bitmap */
 217: #define BitmapSize(width, height) (((((width) + 15) >> 3) &~ 1) * (height))
 218: /* size in bytes of a pixmap in XYFormat */
 219: #define XYPixmapSize(width, height, planes) (BitmapSize(width, height) * (planes))
 220: /* size in bytes of a pizmap in ZFormat for 9 to 16 bit planes */
 221: #define WZPixmapSize(width, height) (((width) * (height)) << 1)
 222: /* size in bytes of a pixmap in ZFormat for 2 to 8 bit planes */
 223: #define BZPixmapSize(width, height) ((width) * (height))
 224: 
 225: /* Used in X_QueryShape */
 226: 
 227: #define CursorShape     0
 228: #define TileShape       1
 229: #define BrushShape      2
 230: 
 231: /* Used in X_ShiftLock */
 232: 
 233: #define LockUpDownMode      0
 234: #define LockToggleMode      1
 235: 
 236: /* Used in X_AddHost, X_RemoveHost, and X_GetHosts */
 237: 
 238: #define XAF_INET        2
 239: #define XAF_DECnet      12

Defined struct's

_ColorDef defined in line 206; never used
_Vertex defined in line 132; never used

Defined typedef's

Pixmap defined in line 15; used 93 times
Vertex defined in line 135; used 70 times
Window defined in line 12; used 266 times

Defined macros

BadAccess defined in line 76; used 3 times
BadBitmap defined in line 70; used 9 times
BadColor defined in line 78; used 2 times
BadCursor defined in line 71; used 4 times
BadFont defined in line 72; used 9 times
BadGrab defined in line 75; used 2 times
BadPixmap defined in line 69; used 8 times
BadRequest defined in line 66; used 1 times
BadTile defined in line 74; used 5 times
BadWindow defined in line 68; used 3 times
BlackPixel defined in line 82; used 114 times
BrushShape defined in line 229; used 1 times
ButtonPressed defined in line 24; used 65 times
ButtonState defined in line 51; used 2 times
CursorShape defined in line 227; used 1 times
DrawDashedLine defined in line 127; used 1 times
DrawPatternedLine defined in line 128; used 1 times
DrawSolidLine defined in line 126; used 2 times
FBTYPE_NOTSUN1 defined in line 179; used 1 times
FBTYPE_NOTSUN2 defined in line 180; used 1 times
FBTYPE_NOTSUN3 defined in line 181; used 1 times
FBTYPE_SUN1BW defined in line 170; used 2 times
FBTYPE_SUN1COLOR defined in line 171; used 1 times
FBTYPE_SUN2BW defined in line 172; used 1 times
FBTYPE_SUN2COLOR defined in line 173; used 1 times
FBTYPE_SUN2GP defined in line 174; used 1 times
FBTYPE_SUN3BW defined in line 175; used 1 times
FBTYPE_SUN3COLOR defined in line 176; used 1 times
FBTYPE_SUN4BW defined in line 177; used 1 times
FBTYPE_SUN4COLOR defined in line 178; used 1 times
FocusChange defined in line 36; used 4 times
FullKeyState defined in line 50; used 3 times
GXand defined in line 88; used 1 times
GXandInverted defined in line 91; never used
GXandReverse defined in line 89; never used
GXclear defined in line 87; never used
GXcopy defined in line 90; used 74 times
GXequiv defined in line 96; used 1 times
GXnand defined in line 101; never used
GXnoop defined in line 92; used 2 times
GXnor defined in line 95; never used
GXor defined in line 94; used 1 times
GXorInverted defined in line 100; never used
GXorReverse defined in line 98; never used
GXset defined in line 102; never used
IntoOrFromSubwindow defined in line 61; used 2 times
IsInvisible defined in line 118; used 1 times
IsMapped defined in line 117; used 1 times
IsUnmapped defined in line 116; never used
KeyReleased defined in line 23; used 3 times
LeftDownMotion defined in line 34; used 4 times
LockToggleMode defined in line 234; used 1 times
LockUpDownMode defined in line 233; used 1 times
NoEvent defined in line 21; used 3 times
RightDownMotion defined in line 32; used 2 times
SUN_BASE defined in line 167; used 13 times
TileShape defined in line 228; used 1 times
VertexCurved defined in line 141; never used
VertexEndClosed defined in line 143; never used
VertexStartClosed defined in line 142; never used
VirtualCrossing defined in line 62; used 4 times
WhitePixel defined in line 83; used 108 times
XDEV_DECXXX defined in line 154; never used
XDEV_DECYYY defined in line 155; never used
XDEV_DECZZZ defined in line 156; never used
XDEV_IBMACIS defined in line 162; never used
XDEV_IBMAPA16 defined in line 164; never used
XDEV_IBMAPA8 defined in line 163; never used
XDEV_LEX90 defined in line 159; never used
XDEV_MC1 defined in line 197; never used
XDEV_MC2 defined in line 198; never used
XDEV_MC3 defined in line 199; never used
XDEV_NOTSUN1 defined in line 192; never used
XDEV_NOTSUN2 defined in line 193; never used
XDEV_NOTSUN3 defined in line 194; never used
XDEV_PGP20 defined in line 202; never used
XDEV_QDSS defined in line 153; used 1 times
XDEV_QVSS defined in line 152; used 1 times
XDEV_SUN1BW defined in line 183; never used
XDEV_SUN1COLOR defined in line 184; never used
XDEV_SUN2BW defined in line 185; never used
XDEV_SUN2COLOR defined in line 186; never used
XDEV_SUN2GP defined in line 187; never used
XDEV_SUN3BW defined in line 188; never used
XDEV_SUN3COLOR defined in line 189; never used
XDEV_SUN4BW defined in line 190; never used
XDEV_SUN4COLOR defined in line 191; never used
XDEV_VS100 defined in line 151; used 1 times
XDEV_XNEST defined in line 148; used 1 times
X_PROTOCOL defined in line 8; used 1 times

Usage of this include

Last modified: 1986-02-01
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2350
Valid CSS Valid XHTML 1.0 Strict