2 |
7u83 |
1 |
# Crown Copyright (c) 1997
|
|
|
2 |
#
|
|
|
3 |
# This TenDRA(r) Computer Program is subject to Copyright
|
|
|
4 |
# owned by the United Kingdom Secretary of State for Defence
|
|
|
5 |
# acting through the Defence Evaluation and Research Agency
|
|
|
6 |
# (DERA). It is made available to Recipients with a
|
|
|
7 |
# royalty-free licence for its use, reproduction, transfer
|
|
|
8 |
# to other parties and amendment for any purpose not excluding
|
|
|
9 |
# product development provided that any such use et cetera
|
|
|
10 |
# shall be deemed to be acceptance of the following conditions:-
|
|
|
11 |
#
|
|
|
12 |
# (1) Its Recipients shall ensure that this Notice is
|
|
|
13 |
# reproduced upon any copies or amended versions of it;
|
|
|
14 |
#
|
|
|
15 |
# (2) Any amended version of it shall be clearly marked to
|
|
|
16 |
# show both the nature of and the organisation responsible
|
|
|
17 |
# for the relevant amendment or amendments;
|
|
|
18 |
#
|
|
|
19 |
# (3) Its onward transfer from a recipient to another
|
|
|
20 |
# party shall be deemed to be that party's acceptance of
|
|
|
21 |
# these conditions;
|
|
|
22 |
#
|
|
|
23 |
# (4) DERA gives no warranty or assurance as to its
|
|
|
24 |
# quality or suitability for any purpose and DERA accepts
|
|
|
25 |
# no liability whatsoever in relation to any use to which
|
|
|
26 |
# it may be put.
|
|
|
27 |
#
|
|
|
28 |
# Types and constants for X protocol to be used by applications
|
|
|
29 |
|
|
|
30 |
+USE "ansi", "stddef.h", "wchar_t" (!?) ;
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
# Types
|
|
|
34 |
|
|
|
35 |
+TYPE ( int ) XID ; # see 1.1
|
|
|
36 |
+TYPEDEF XID Window ; # see 1.1
|
|
|
37 |
+TYPEDEF XID Font ; # see 1.1
|
|
|
38 |
+TYPEDEF XID Pixmap ; # see 1.1
|
|
|
39 |
+TYPEDEF XID Colormap ; # see 1.1
|
|
|
40 |
+TYPEDEF XID Cursor ; # see 1.1
|
|
|
41 |
+TYPEDEF XID GContext ; # see 1.1
|
|
|
42 |
+TYPEDEF XID Drawable ; # can be a Window or a Pixmap (see 4.2)
|
|
|
43 |
|
|
|
44 |
+TYPE ( int ) Atom ; # see 4.3
|
|
|
45 |
+TYPE ( int ) Bool ; # see 1.4
|
|
|
46 |
+TYPE ( int ) KeyCode ; # see 12.7
|
|
|
47 |
+TYPE ( int ) KeySym ; # see 12.7
|
|
|
48 |
+TYPE ( int ) Status ; # see 1.2
|
|
|
49 |
+TYPE ( int ) Time ; # see 4.5 and 12.1
|
|
|
50 |
+TYPE ( int ) VisualID ; # see 3.1
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
# Miscellaneous constants
|
|
|
54 |
|
|
|
55 |
+DEFINE None 0 ; # universal null (see 1.4)
|
|
|
56 |
+CONST Bool True, False ; # see 1.4
|
|
|
57 |
+CONST XID AllTemporary ; # see 9.6
|
|
|
58 |
+CONST XID InputFocus ; # see 11.6
|
|
|
59 |
+DEFINE CopyFromParent 0 ; # see 3.2.2 etc, can be int or ptr
|
|
|
60 |
+CONST XID ParentRelative ; # see 3.2.1 etc
|
|
|
61 |
+CONST XID PointerRoot ; # see 12.5
|
|
|
62 |
+CONST XID PointerWindow ; # see 11.6
|
|
|
63 |
+CONST int AnyKey ; # see 12.2
|
|
|
64 |
+CONST unsigned AnyButton ; # see 12.1
|
|
|
65 |
+CONST unsigned AnyModifier ; # see 12.2
|
|
|
66 |
+CONST Atom AnyPropertyType ; # see 4.4
|
|
|
67 |
+CONST KeySym NoSymbol ; # see 12.7
|
|
|
68 |
+CONST Status Success ; # see 4.4 etc
|
|
|
69 |
+CONST Time CurrentTime ; # see 4.5
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
# Event Types (10.1)
|
|
|
73 |
|
|
|
74 |
+CONST int KeyPress, KeyRelease ;
|
|
|
75 |
+CONST int ButtonPress, ButtonRelease, MotionNotify ;
|
|
|
76 |
+CONST int EnterNotify, LeaveNotify ;
|
|
|
77 |
+CONST int FocusIn, FocusOut ;
|
|
|
78 |
+CONST int KeymapNotify ;
|
|
|
79 |
+CONST int Expose, GraphicsExpose, NoExpose ;
|
|
|
80 |
+CONST int CirculateRequest, ConfigureRequest, MapRequest, ResizeRequest ;
|
|
|
81 |
+CONST int CirculateNotify, ConfigureNotify, CreateNotify, DestroyNotify ;
|
|
|
82 |
+CONST int GravityNotify, MapNotify, MappingNotify, ReparentNotify ;
|
|
|
83 |
+CONST int UnmapNotify, VisibilityNotify ;
|
|
|
84 |
+CONST int ColormapNotify, ClientMessage, PropertyNotify ;
|
|
|
85 |
+CONST int SelectionClear, SelectionNotify, SelectionRequest ;
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
# Event Masks (see 3.2.7, 10.3)
|
|
|
89 |
|
|
|
90 |
+CONST long NoEventMask, KeyPressMask, KeyReleaseMask ;
|
|
|
91 |
+CONST long ButtonPressMask, ButtonReleaseMask ;
|
|
|
92 |
+CONST long EnterWindowMask, LeaveWindowMask ;
|
|
|
93 |
+CONST long PointerMotionMask, PointerMotionHintMask ;
|
|
|
94 |
+CONST long Button1MotionMask, Button2MotionMask, Button3MotionMask ;
|
|
|
95 |
+CONST long Button4MotionMask, Button5MotionMask, ButtonMotionMask ;
|
|
|
96 |
+CONST long KeymapStateMask, ExposureMask, VisibilityChangeMask ;
|
|
|
97 |
+CONST long StructureNotifyMask, ResizeRedirectMask ;
|
|
|
98 |
+CONST long SubstructureNotifyMask, SubstructureRedirectMask ;
|
|
|
99 |
+CONST long FocusChangeMask, PropertyChangeMask, ColormapChangeMask ;
|
|
|
100 |
+CONST long OwnerGrabButtonMask ;
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
# Error Codes (see 11.8.2)
|
|
|
104 |
|
|
|
105 |
+CONST int BadAccess, BadAlloc, BadAtom, BadColor, BadCursor ;
|
|
|
106 |
+CONST int BadDrawable, BadFont, BadGC, BadIDChoice, BadImplementation ;
|
|
|
107 |
+CONST int BadLength, BadMatch, BadName, BadPixmap, BadRequest ;
|
|
|
108 |
+CONST int BadValue, BadWindow ;
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
# Creating Windows (3.3)
|
|
|
112 |
+CONST int InputOutput, InputOnly ;
|
|
|
113 |
|
|
|
114 |
# Window attributes (3.2)
|
|
|
115 |
+DEFINE CWBackPixmap %% (1L<<0) %% ;
|
|
|
116 |
+DEFINE CWBackPixel %% (1L<<1) %% ;
|
|
|
117 |
+DEFINE CWBorderPixmap %% (1L<<2) %% ;
|
|
|
118 |
+DEFINE CWBorderPixel %% (1L<<3) %% ;
|
|
|
119 |
+DEFINE CWBitGravity %% (1L<<4) %% ;
|
|
|
120 |
+DEFINE CWWinGravity %% (1L<<5) %% ;
|
|
|
121 |
+DEFINE CWBackingStore %% (1L<<6) %% ;
|
|
|
122 |
+DEFINE CWBackingPlanes %% (1L<<7) %% ;
|
|
|
123 |
+DEFINE CWBackingPixel %% (1L<<8) %% ;
|
|
|
124 |
+DEFINE CWOverrideRedirect %% (1L<<9) %% ;
|
|
|
125 |
+DEFINE CWSaveUnder %% (1L<<10) %% ;
|
|
|
126 |
+DEFINE CWEventMask %% (1L<<11) %% ;
|
|
|
127 |
+DEFINE CWDontPropagate %% (1L<<12) %% ;
|
|
|
128 |
+DEFINE CWColormap %% (1L<<13) %% ;
|
|
|
129 |
+DEFINE CWCursor %% (1L<<14) %% ;
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
# Configuring Windows (3.7)
|
|
|
133 |
+DEFINE CWX %% (1<<0) %% ;
|
|
|
134 |
+DEFINE CWY %% (1<<1) %% ;
|
|
|
135 |
+DEFINE CWWidth %% (1<<2) %% ;
|
|
|
136 |
+DEFINE CWHeight %% (1<<3) %% ;
|
|
|
137 |
+DEFINE CWBorderWidth %% (1<<4) %% ;
|
|
|
138 |
+DEFINE CWSibling %% (1<<5) %% ;
|
|
|
139 |
+DEFINE CWStackMode %% (1<<6) %% ;
|
|
|
140 |
|
|
|
141 |
|
|
|
142 |
# Gravity Attributes (3.2.3)
|
|
|
143 |
+CONST int NorthWestGravity, NorthGravity, NorthEastGravity ;
|
|
|
144 |
+CONST int WestGravity, CenterGravity, EastGravity ;
|
|
|
145 |
+CONST int SouthWestGravity, SouthGravity, SouthEastGravity ;
|
|
|
146 |
+CONST int ForgetGravity, StaticGravity, UnmapGravity ;
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
# Backing Store Attributes (3.2.4, see also 2.2.3)
|
|
|
150 |
+CONST int NotUseful, WhenMapped, Always ;
|
|
|
151 |
|
|
|
152 |
|
|
|
153 |
# Obtaining Window Information (4.1)
|
|
|
154 |
+CONST int IsUnmapped, IsUnviewable, IsViewable ;
|
|
|
155 |
|
|
|
156 |
|
|
|
157 |
# Closing the display (2.5)
|
|
|
158 |
+CONST int DestroyAll, RetainPermanent, RetainTemporary ;
|
|
|
159 |
|
|
|
160 |
|
|
|
161 |
# Configuring Windows (3.7)
|
|
|
162 |
+CONST int Above, Below, TopIf, BottomIf, Opposite ;
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
# Changing Window Stacking Order (3.8)
|
|
|
166 |
+CONST int RaiseLowest, LowerHighest ;
|
|
|
167 |
|
|
|
168 |
|
|
|
169 |
# Obtaining and Changing Window Properties (4.4)
|
|
|
170 |
+CONST int PropModeReplace, PropModePrepend, PropModeAppend ;
|
|
|
171 |
|
|
|
172 |
|
|
|
173 |
# Creating, Copying and Destroying Colormaps (6.4)
|
|
|
174 |
+CONST int AllocNone, AllocAll ;
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
# Colour Structures (6.1)
|
|
|
178 |
+CONST int DoRed, DoGreen, DoBlue ;
|
|
|
179 |
|
|
|
180 |
|
|
|
181 |
# Visual types (3.1)
|
|
|
182 |
+CONST int StaticGray, StaticColor, TrueColor, GrayScale ;
|
|
|
183 |
+CONST int PseudoColor, DirectColor ;
|
|
|
184 |
|
|
|
185 |
|
|
|
186 |
# Image format functions (2.2.2)
|
|
|
187 |
+CONST int LSBFirst, MSBFirst ;
|
|
|
188 |
|
|
|
189 |
# Manipulating GCs (7.1)
|
|
|
190 |
+DEFINE GCFunction %% (1L<<0) %% ;
|
|
|
191 |
+DEFINE GCPlaneMask %% (1L<<1) %% ;
|
|
|
192 |
+DEFINE GCForeground %% (1L<<2) %% ;
|
|
|
193 |
+DEFINE GCBackground %% (1L<<3) %% ;
|
|
|
194 |
+DEFINE GCLineWidth %% (1L<<4) %% ;
|
|
|
195 |
+DEFINE GCLineStyle %% (1L<<5) %% ;
|
|
|
196 |
+DEFINE GCCapStyle %% (1L<<6) %% ;
|
|
|
197 |
+DEFINE GCJoinStyle %% (1L<<7) %% ;
|
|
|
198 |
+DEFINE GCFillStyle %% (1L<<8) %% ;
|
|
|
199 |
+DEFINE GCFillRule %% (1L<<9) %% ;
|
|
|
200 |
+DEFINE GCTile %% (1L<<10) %% ;
|
|
|
201 |
+DEFINE GCStipple %% (1L<<11) %% ;
|
|
|
202 |
+DEFINE GCTileStipXOrigin %% (1L<<12) %% ;
|
|
|
203 |
+DEFINE GCTileStipYOrigin %% (1L<<13) %% ;
|
|
|
204 |
+DEFINE GCFont %% (1L<<14) %% ;
|
|
|
205 |
+DEFINE GCSubwindowMode %% (1L<<15) %% ;
|
|
|
206 |
+DEFINE GCGraphicsExposures %% (1L<<16) %% ;
|
|
|
207 |
+DEFINE GCClipXOrigin %% (1L<<17) %% ;
|
|
|
208 |
+DEFINE GCClipYOrigin %% (1L<<18) %% ;
|
|
|
209 |
+DEFINE GCClipMask %% (1L<<19) %% ;
|
|
|
210 |
+DEFINE GCDashOffset %% (1L<<20) %% ;
|
|
|
211 |
+DEFINE GCDashList %% (1L<<21) %% ;
|
|
|
212 |
+DEFINE GCArcMode %% (1L<<22) %% ;
|
|
|
213 |
|
|
|
214 |
+DEFINE GXclear %% 0x0 %% ;
|
|
|
215 |
+DEFINE GXand %% 0x1 %% ;
|
|
|
216 |
+DEFINE GXandReverse %% 0x2 %% ;
|
|
|
217 |
+DEFINE GXcopy %% 0x3 %% ;
|
|
|
218 |
+DEFINE GXandInverted %% 0x4 %% ;
|
|
|
219 |
+DEFINE GXnoop %% 0x5 %% ;
|
|
|
220 |
+DEFINE GXxor %% 0x6 %% ;
|
|
|
221 |
+DEFINE GXor %% 0x7 %% ;
|
|
|
222 |
+DEFINE GXnor %% 0x8 %% ;
|
|
|
223 |
+DEFINE GXequiv %% 0x9 %% ;
|
|
|
224 |
+DEFINE GXinvert %% 0xa %% ;
|
|
|
225 |
+DEFINE GXorReverse %% 0xb %% ;
|
|
|
226 |
+DEFINE GXcopyInverted %% 0xc %% ;
|
|
|
227 |
+DEFINE GXorInverted %% 0xd %% ;
|
|
|
228 |
+DEFINE GXnand %% 0xe %% ;
|
|
|
229 |
+DEFINE GXset %% 0xf %% ;
|
|
|
230 |
|
|
|
231 |
+CONST int LineSolid, LineDoubleDash, LineOnOffDash ;
|
|
|
232 |
+CONST int CapNotLast, CapButt, CapRound, CapProjecting ;
|
|
|
233 |
+CONST int JoinMiter, JoinRound, JoinBevel ;
|
|
|
234 |
+CONST int FillSolid, FillTiled, FillOpaqueStippled, FillStippled ;
|
|
|
235 |
+CONST int ClipByChildren, IncludeInferiors ;
|
|
|
236 |
+CONST int EvenOddRule, WindingRule ;
|
|
|
237 |
+CONST int TileShape, CursorShape, StippleShape ;
|
|
|
238 |
+CONST int Unsorted, YSorted, YXSorted, YXBanded ;
|
|
|
239 |
+CONST int ArcChord, ArcPieSlice ;
|
|
|
240 |
|
|
|
241 |
|
|
|
242 |
# Drawing Single and Multiple Lines (8.3.1)
|
|
|
243 |
+CONST int CoordModeOrigin, CoordModePrevious ;
|
|
|
244 |
|
|
|
245 |
|
|
|
246 |
# Filling a Single Polygon (8.4.2)
|
|
|
247 |
+CONST int Complex, Convex, Nonconvex ;
|
|
|
248 |
|
|
|
249 |
|
|
|
250 |
# Font Metrics (8.5)
|
|
|
251 |
+CONST unsigned FontLeftToRight, FontRightToLeft ;
|
|
|
252 |
|
|
|
253 |
|
|
|
254 |
# Tranferring Images between Client and Server (8.7)
|
|
|
255 |
+CONST int XYBitmap, XYPixmap, ZPixmap ;
|
|
|
256 |
|
|
|
257 |
|
|
|
258 |
# Controlling the Lifetime of a Window (9.2)
|
|
|
259 |
+CONST int SetModeInsert, SetModeDelete ;
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
# Screen Saver Control (9.7)
|
|
|
263 |
+CONST int DontPreferBlanking, PreferBlanking, DefaultBlanking ;
|
|
|
264 |
+CONST int DontAllowExposures, AllowExposures, DefaultExposures ;
|
|
|
265 |
+CONST int ScreenSaverActive, ScreenSaverReset ;
|
|
|
266 |
|
|
|
267 |
|
|
|
268 |
# Adding, Getting and Removing Hosts (9.8.1)
|
|
|
269 |
+CONST int FamilyInternet, FamilyDECnet, FamilyChaos ;
|
|
|
270 |
|
|
|
271 |
|
|
|
272 |
# Changing, Enabling and Disabling Access Control (9.8.2)
|
|
|
273 |
+CONST int EnableAccess, DisableAccess ;
|
|
|
274 |
|
|
|
275 |
|
|
|
276 |
# Event details (10.5 etc)
|
|
|
277 |
+CONST int NotifyAncestor, NotifyDetailNone, NotifyGrab, NotifyHint ;
|
|
|
278 |
+CONST int NotifyInferior, NotifyNonlinear, NotifyNonlinearVirtual ;
|
|
|
279 |
+CONST int NotifyNormal, NotifyPointer, NotifyPointerRoot ;
|
|
|
280 |
+CONST int NotifyUngrab, NotifyVirtual, NotifyWhileGrabbed ;
|
|
|
281 |
|
|
|
282 |
+CONST int Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask ;
|
|
|
283 |
+CONST int ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask ;
|
|
|
284 |
+CONST int Mod4Mask, Mod5Mask ;
|
|
|
285 |
|
|
|
286 |
+CONST int Button1, Button2, Button3, Button4, Button5 ;
|
|
|
287 |
|
|
|
288 |
|
|
|
289 |
# Window State Change Events (10.10)
|
|
|
290 |
+CONST int PlaceOnTop, PlaceOnBottom ;
|
|
|
291 |
+CONST int MappingModifier, MappingKeyboard, MappingPointer ;
|
|
|
292 |
+CONST int VisibilityUnobscured, VisibilityPartiallyObscured ;
|
|
|
293 |
+CONST int VisibilityFullyObscured ;
|
|
|
294 |
|
|
|
295 |
|
|
|
296 |
# Colormap State Change Events (10.12)
|
|
|
297 |
+CONST int ColormapInstalled, ColormapUninstalled ;
|
|
|
298 |
|
|
|
299 |
|
|
|
300 |
# Client Communication Events (10.13)
|
|
|
301 |
+CONST int PropertyNewValue, PropertyDelete ;
|
|
|
302 |
|
|
|
303 |
|
|
|
304 |
# Event Queue Management (11.3)
|
|
|
305 |
+CONST int QueuedAlready, QueuedAfterFlush, QueuedAfterReading ;
|
|
|
306 |
|
|
|
307 |
|
|
|
308 |
# Pointer Grabbing (12.1)
|
|
|
309 |
+CONST int GrabSuccess ;
|
|
|
310 |
+CONST int GrabModeSync, GrabModeAsync ;
|
|
|
311 |
|
|
|
312 |
|
|
|
313 |
# Keyboard Grabbing (12.2)
|
|
|
314 |
+CONST int AlreadyGrabbed, GrabNotViewable, GrabFrozen, GrabInvalidTime ;
|
|
|
315 |
|
|
|
316 |
|
|
|
317 |
# Resuming Event Processing (12.3)
|
|
|
318 |
+CONST int AsyncPointer, SyncPointer, AsyncKeyboard, SyncKeyboard ;
|
|
|
319 |
+CONST int ReplayPointer, ReplayKeyboard, AsyncBoth, SyncBoth ;
|
|
|
320 |
|
|
|
321 |
|
|
|
322 |
# Controlling Input Focus (12.5)
|
|
|
323 |
+CONST int RevertToParent, RevertToPointerRoot, RevertToNone ;
|
|
|
324 |
|
|
|
325 |
|
|
|
326 |
# Keyboard and Pointer Settings (12.6)
|
|
|
327 |
+DEFINE KBKeyClickPercent %% (1L<<0) %% ;
|
|
|
328 |
+DEFINE KBBellPercent %% (1L<<1) %% ;
|
|
|
329 |
+DEFINE KBBellPitch %% (1L<<2) %% ;
|
|
|
330 |
+DEFINE KBBellDuration %% (1L<<3) %% ;
|
|
|
331 |
+DEFINE KBLed %% (1L<<4) %% ;
|
|
|
332 |
+DEFINE KBLedMode %% (1L<<5) %% ;
|
|
|
333 |
+DEFINE KBKey %% (1L<<6) %% ;
|
|
|
334 |
+DEFINE KBAutoRepeatMode %% (1L<<7) %% ;
|
|
|
335 |
+CONST int LedModeOn, LedModeOff ;
|
|
|
336 |
+CONST int AutoRepeatModeOn, AutoRepeatModeOff, AutoRepeatModeDefault ;
|
|
|
337 |
+CONST int MappingSuccess, MappingBusy, MappingFailed ;
|
|
|
338 |
|
|
|
339 |
|
|
|
340 |
# Locating points (16.5.5)
|
|
|
341 |
+CONST int RectangleIn, RectangleOut, RectanglePart ;
|
|
|
342 |
|
|
|
343 |
|
|
|
344 |
# Manipulating Bitmaps (16.9)
|
|
|
345 |
+CONST int BitmapSuccess ;
|
|
|
346 |
+CONST int BitmapOpenFailed, BitmapFileInvalid, BitmapNoMemory ;
|