1
2
3 Oc  Abstract  Hardware  Ltd
4   Poly/ML  for  X
5
6
7
8Reference  Manual
9             Mike Crawley
10
11cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                         1
12
13
14
15Copyright (c) Abstract Hardware Limited 1991, 1994
16
17
18Copyright (c) 1987 Digital Equipment Corporation
19
20
21Copyright (c) 1987 Massachusetts Institute of Technology
22
23
24All Rights Reserved.
25
26
27Permission  to  use,  copy,  modify,  and  distribute  this  signature  and  its  documentation  for  any
28purpose and without fee is hereby granted, provided that the above copyright notices appear in
29all copies and that both the copyright notices and this permission notice appear in supporting
30documentation,  and  that  the  names  of  Digital,  MIT  and  AHL  not  be  used  in  advertising  or
31publicity  pertaining  to  distribution  of  the  signature  and  its  documentation  without  specific,
32written  prior  permission.   Digital,  MIT  and  AHL  disclaim  all  warranties  with  regard  to  this
33signature and its documentation, including all implied warranties of merchantability and fitness,
34in no event shall Digital, MIT or AHL be liable for any special, indirect or consequential damages
35or any damages whatsoever resulting from loss of use, data or profits, whether in an action of
36contract,  negligence  or  other  tortious  action,  arising  out  of  or  in  connection  with  the  use  or
37performance of this signature and its documentation.
38
39
40The X Window System is a Trademark of MIT.
41
422                                                         X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
43
44
45Contents
46
471   Introduction                                                                                                   11
48
49
50    1.1    The ML interface    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
51 *  .    11
52
53
54    1.2    Naming and calling conventions    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    11
55
56
57    1.3    Event Handling    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
58 *.  .    12
59
60
61    1.4    X and the Garbage Collector   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    13
62
63
64    1.5    X and Persistent Store    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
65 *    13
66
67
68
692   Function Reference                                                                                         15
70
71
72    2.1    Colours, Pixels and RGB values    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    15
73
74
75           2.1.1     And, Or, Xor, Not, >>, <<    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    15
76
77
78           2.1.2     BlackPixel, WhitePixel   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   *
79 * 15
80
81
82           2.1.3     Pixel, RGB, XColor   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
83 *   16
84
85
86           2.1.4     XAllocColor,  XAllocColorCells,  XAllocColorPlanes,  XAllocNamedColor,
87                     XFreeColors    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
88 * .  .    17
89
90
91           2.1.5     XLookupColor, XQueryColor, XQueryColors   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    19
92
93
94           2.1.6     XParseColor   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
95 *.  .    20
96
97
98           2.1.7     XStoreColor, XStoreColors, XStoreNamedColor    .  .  .  .  .  .  .  .  .  .  .  .  .  .    21
99
100
101    2.2    Colormaps    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
102 * .  .  .    22
103
104
105           2.2.1     DefaultColormap    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
106 *    22
107
108
109           2.2.2     DefaultDepth    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
110 *  .    22
111
112
113           2.2.3     DisplayCells    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
114 *  .  .    23
115
116
117           2.2.4     VisualClass  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
118 *  .  .    23
119
120
121           2.2.5     XCreateColormap, XCopyColormapAndFree, XFreeColormap, XSetWin-
122                     dowColormap    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
123 * .    24
124
125
126
127                                                              3
128
1294                                                         X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
130
131
132
133           2.2.6     XInstallColormap, XUninstallColormap, XListInstalledColormaps   .  .  .  .    25
134
135
136           2.2.7     XSetRGBColormaps, XGetRGBColormaps   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    26
137
138
139    2.3    Cursors   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
140 * .  .  .  .    @
141
142
143           2.3.1     XCreateFontCursor, XCreatePixmapCursor, XCreateGlyphCursor   .  .  .  .    28
144
145
146           2.3.2     XDefineCursor, XUndefineCursor, NoCursor    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    29
147
148
149           2.3.3     XRecolorCursor, XFreeCursor    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    30
150
151
152    2.4    Display Specifications   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
153 * .    31
154
155
156           2.4.1     AllPlanes   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
157 * .  .  .    31
158
159
160           2.4.2     BitmapBitOrder   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
161 *.    31
162
163
164           2.4.3     BitmapPad   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
165 * .  .    31
166
167
168           2.4.4     BitmapUnit    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
169 *.  .    32
170
171
172           2.4.5     ByteOrder    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
173 *  .  .    32
174
175
176           2.4.6     CellsOfScreen    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
177 *.  .    32
178
179
180           2.4.7     ColormapExists, CursorExists, DrawableExists, FontExists, GCExists, Vi-
181                     sualExists    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
182 *.  .  .    33
183
184
185           2.4.8     ColormapID,  CursorID,  DrawableID,  FontID,  GCID,  VisualID,  Same-
186                     Drawable   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
187 *.  .  .    33
188
189
190           2.4.9     DefaultVisual    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
191 *.  .    34
192
193
194           2.4.10    DisplayConnected   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
195 *    34
196
197
198           2.4.11    DisplayHeight, DisplayHeightMM, DisplayWidth, DisplayWidthMM  .  .  .    34
199
200
201           2.4.12    DisplayPlanes    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
202 *.  .    35
203
204
205           2.4.13    DisplayString    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
206 *.  .    35
207
208
209           2.4.14    DoesBackingStore   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
210 *    35
211
212
213           2.4.15    DoesSaveUnders   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
214 *.    36
215
216
217           2.4.16    EventMaskOfScreen   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
218 *  36
219
220
221           2.4.17    MinCmapsOfScreen   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   *
222 * 36
223
224
225           2.4.18    MaxCmapsOfScreen   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   *
226 * 37
227
228
229           2.4.19    NoColormap, NoCursor, NoDrawable, NoFont, NoVisual, ParentRelative,
230                     CopyFromParentDrawable,  CopyFromParentVisual,  PointerWindow,  In-
231                     putFocus, PointerRoot    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   *
232 * 37
233
234
235           2.4.20    ProtocolRevision  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
236 * .    37
237
238
239           2.4.21    ProtocolVersion    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
240 *  .    38
241
242cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                         5
243
244
245
246           2.4.22    RootWindow   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
247 *  .    38
248
249
250           2.4.23    ServerVendor  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
251 *.  .    38
252
253
254           2.4.24    VendorRelease   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
255 *  .    39
256
257
258           2.4.25    XQueryBestCursor,  XQueryBestSize,  XQueryBestStipple,  XQueryBest-
259                     Tile   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
260 *  .  .  .  .   @
261
262
263    2.5    Drawing Primitives    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
264 * .    40
265
266
267           2.5.1     XClearArea, XClearWindow    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    40
268
269
270           2.5.2     XCopyArea, XCopyPlane   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    41
271
272
273           2.5.3     XDrawArc, XDrawArcs   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    42
274
275
276           2.5.4     XDrawImageString, XDrawImageString16    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    44
277
278
279           2.5.5     XDrawLine, XDrawLines, XDrawSegments   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    45
280
281
282           2.5.6     XDrawPoint, XDrawPoints   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    46
283
284
285           2.5.7     XDrawRectangle, XDrawRectangles   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    46
286
287
288           2.5.8     XDrawString, XDrawString16    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    47
289
290
291           2.5.9     XDrawText, XDrawText16   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    48
292
293
294           2.5.10    XFillArc, XFillArcs, XFillPolygon, XFillRectangle, XFillRectangles   .  .  .    49
295
296
297    2.6    Exceptions    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
298 *  .  .  .    51
299
300
301           2.6.1     Range  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
302 *  .  .  .    51
303
304
305           2.6.2     XWindows   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
306 *.  .    51
307
308
309    2.7    Event Handling    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
310 *.  .    52
311
312
313           2.7.1     IsCursorKey,  IsFunctionKey,  IsKeypadKey,  IsMiscFunctionKey,  IsModi-
314                     fierKey, IsPFKey    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
315 *.    52
316
317
318           2.7.2     ShiftDown, ControlDown   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    52
319
320
321           2.7.3     XLookupString, NoSymbol   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    53
322
323
324           2.7.4     XSelectInput   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
325 * .  .    54
326
327
328           2.7.5     XSetHandler, NullHandler    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    55
329
330
331           2.7.6     XSetInputFocus, XGetInputFocus   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    56
332
333
334           2.7.7     XSync, XFlush  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
335 * .    57
336
337
338           2.7.8     XSyncronise, XSynchronize   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    58
339
340
341           2.7.9     XTranslateCoordinates    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .   *
342 * 58
343
344
345    2.8    Fonts    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
346 *.  .  .  .  .  @
347
3486                                                         X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
349
350
351
352           2.8.1     CharLBearing,  CharRBearing,  CharWidth,  CharAscent,  CharDescent,
353                     CharAttributes     .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
354 *  .    59
355
356
357           2.8.2     FSFont,   FSDirection,   FSMinChar,   FSMaxChar,   FSMinByte1,   FS-
358                     MaxByte1,  FSAllCharsExist,  FSAllCharsExist,  FSDefaultChar,  FSMin-
359                     Bounds,  FSMaxBounds,  PSPerChar,  FSPerChar,  FSAscent,  FSDescent,
360                     FSAscent,  FSDescent,  FSMinWidth,  FSMaxWidth,  FSMinHeight,  FS-
361                     MaxHeight   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
362 * .  .    59
363
364
365           2.8.3     XListFonts, XListFontsWithInfo   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    60
366
367
368           2.8.4     XLoadFont, XLoadQueryFont, XQueryFont, XFreeFont, XUnloadFont    .    61
369
370
371           2.8.5     XSetFontPath, XGetFontPath    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    64
372
373
374           2.8.6     XTextExtents, XTextExtents16    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    64
375
376
377           2.8.7     XTextWidth, XTextWidth16   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    65
378
379
380    2.9    Geometry   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
381 *  .  .  .    66
382
383
384           2.9.1     AddPoint, SubtractPoint   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    66
385
386
387           2.9.2     Inside,  Overlap,  Within,  LeftOf,  RightOf,  AboveOf,  BelowOf,  Horizon-
388                     tallyAbutting, VerticallyAbutting    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    66
389
390
391           2.9.3     Intersection, Union, Section     .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    *
392 *67
393
394
395           2.9.4     Left,  Right,  Top,  Bottom,  Width,  Height,  TopLeft,  TopRight,  Bottom-
396                     Left, BottomRight, XRectangle, Area, Rect, DestructRect, DestructArea,
397                     empty  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
398 *  .  .  .    67
399
400
401           2.9.5     MakeRect, SplitRect    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
402 *  68
403
404
405           2.9.6     NegativePoint    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
406 *.  .    69
407
408
409           2.9.7     OutsetRect, OffsetRect, IncludePoint    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    69
410
411
412           2.9.8     Reflect    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
413 *.  .  .  .    7@
414
415
416           2.9.9     XPoint    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
417 *  .  .  .    70
418
419
420    2.10   GC - Graphics Context   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
421 *  70
422
423
424           2.10.1    DefaultGC   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
425 * .  .    70
426
427
428           2.10.2    XCreateGC, XChangeGC, XFreeGC  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    71
429
430
431           2.10.3    XSetArcMode    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
432 * .    76
433
434
435           2.10.4    XSetBackground   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
436 *.    76
437
438
439           2.10.5    XSetClipMask   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
440 * .    77
441
442
443           2.10.6    XSetClipOrigin    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
444 * .    77
445
446
447           2.10.7    XSetClipRectangles   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
448 *   77
449
450cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                         7
451
452
453
454           2.10.8    XSetColours    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
455 * .  .    78
456
457
458           2.10.9    XSetDashes    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
459 *.  .    79
460
461
462           2.10.10   XSetFillRule   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
463 * .  .    79
464
465
466           2.10.11   XSetFillStyle   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
467 *  .  .    80
468
469
470           2.10.12   XSetFont   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
471 *.  .  .    80
472
473
474           2.10.13   XSetForeground   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
475 *.    81
476
477
478           2.10.14   XSetFunction    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
479 *  .    81
480
481
482           2.10.15   XSetGraphicsExposures  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    81
483
484
485           2.10.16   XSetLineAttributes    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
486 *    82
487
488
489           2.10.17   XSetPlaneMask    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
490 *.    82
491
492
493           2.10.18   XSetState    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
494 *  .  .    83
495
496
497           2.10.19   XSetStipple    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
498 * .  .    83
499
500
501           2.10.20   XSetSubwindowMode   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    84
502
503
504           2.10.21   XSetTile    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
505 * .  .  .    84
506
507
508           2.10.22   XSetTSOrigin    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
509 *  .    85
510
511
512    2.11   Images    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
513 * .  .  .  .    @
514
515
516           2.11.1    ImageByteOrder, ImageDepth, ImageSize   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    85
517
518
519           2.11.2    VisualRedMask, VisualGreenMask, VisualBlueMask   .  .  .  .  .  .  .  .  .  .  .  .    86
520
521
522           2.11.3    XCreateImage, XGetPixel, XPutPixel, XSubImage, XAddPixel     .  .  .  .  .    86
523
524
525           2.11.4    XPutImage, XGetImage, XGetSubImage    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    88
526
527
528    2.12   Properties and Selections   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
529 *   90
530
531
532           2.12.1    XDeleteProperty  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
533 *.    90
534
535
536           2.12.2    XInternAtom, XGetAtomName    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    90
537
538
539           2.12.3    XSetProperty, XGetTextProperty    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    91
540
541
542           2.12.4    XSetSelectionOwner, XGetSelectionOwner, XConvertSelection, XSendSe-
543                     lectionNotify   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
544 *  .  .    92
545
546
547    2.13   Screen Saver    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
548 * .  .  .    94
549
550
551           2.13.1    XSetScreenSaver,         XForceScreenSaver,         XActivateScreenSaver,
552                     XResetScreenSaver, XGetScreenSaver   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    94
553
554
555    2.14   Tiles, Stipples, Bitmaps and Pixmaps   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    95
556
557
558           2.14.1    XCreatePixmap, XFreePixmap   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    95
559
5608                                                         X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
561
562
563
564           2.14.2    XReadBitmapFile, XWriteBitmapFile, XCreatePixmapFromBitmapData,
565                     XCreateBitmapFromData  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    96
566
567
568    2.15   User Preferences   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
569 * .  .    98
570
571
572           2.15.1    XAutoRepeatOn, XAutoRepeatOff, XBell, XQueryKeymap     .  .  .  .  .  .  .    98
573
574
575           2.15.2    XGetDefault   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
576 *.  .    98
577
578
579    2.16   Windows    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
580 *  .  .  .    99
581
582
583           2.16.1    XCreateWindow, XCreateSimpleWindow   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .    99
584
585
586           2.16.2    XDestroyWindow, XDestroySubwindows    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  101
587
588
589           2.16.3    XGetGeometry, XGetWindowAttributes    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  101
590
591
592           2.16.4    XGetWindowRoot,  XGetWindowPosition,  XGetWindowSize,  XGetWin-
593                     dowBorderWidth,  XGetWindowDepth,  XGetWindowParent,  XGetWin-
594                     dowChildren   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
595 *.  .  104
596
597
598           2.16.5    XChangeWindowAttributes,    XSetWindowBackground,    XSetWindow-
599                     BackgroundPixmap, XSetWindowBorder, XSetWindowBorderPixmap   .  .  104
600
601
602           2.16.6    XConfigureWindow, XMoveWindow, XResizeWindow, XMoveResizeWin-
603                     dow, XSetWindowBorderWidth    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  106
604
605
606           2.16.7    XMapWindow, XMapRaised, XMapSubwindows   .  .  .  .  .  .  .  .  .  .  .  .  .  .  108
607
608
609           2.16.8    XQueryPointer  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
610 * .  109
611
612
613           2.16.9    XQueryTree    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
614 *.  .  110
615
616
617           2.16.10   XRaiseWindow, XLowerWindow, XCirculateSubwindows, XCirculateSub-
618                     windowsDown, XCirculateSubwindowsUp, XRestackWindows    .  .  .  .  .  .  110
619
620
621           2.16.11   XReparentWindow    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  1*
622 *12
623
624
625           2.16.12   XUnmapWindow, XUnmapSubwindows   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  113
626
627
628    2.17   Window Manager    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
629 *.  113
630
631
632           2.17.1    XSetIconSizes, XGetIconSizes    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  113
633
634
635           2.17.2    XSetTransientForHint, XGetTransientForHint    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  114
636
637
638           2.17.3    XSetWMClass, XGetWMClass   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  114
639
640
641           2.17.4    XSetWMClientMachine, XGetWMClientMachine    .  .  .  .  .  .  .  .  .  .  .  .  .  115
642
643
644           2.17.5    XSetWMColormapWindows, XGetWMColormapWindows    .  .  .  .  .  .  .  .  116
645
646
647           2.17.6    XSetWMCommand, XGetWMCommand   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  116
648
649
650           2.17.7    XSetWMHints, XGetWMHints  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  117
651
652
653           2.17.8    XSetWMIconName, XGetWMIconName    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  118
654
655cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                         9
656
657
658
659           2.17.9    XSetWMName, XGetWMName    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  119
660
661
662           2.17.10   XSetWMProperties    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
663 *119
664
665
666           2.17.11   XSetWMSizeHints,        XGetWMSizeHints,        XSetWMNormalHints,
667                     XGetWMNormalHints    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  121
668
669
670           2.17.12   XWMGeometry    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
671 * 122
672
673
674
6753   Event Reference                                                                                            125
676
677
678    3.1    XEvent   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
679 *.  .  .  .  125
680
681
682    3.2    ButtonPress, ButtonRelease, KeyPress, KeyRelease, MotionNotify   .  .  .  .  .  .  .  .  126
683
684
685    3.3    CirculateNotify  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
686 *  .  .  128
687
688
689    3.4    CirculateRequest  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
690 *.  .  128
691
692
693    3.5    ColormapNotify    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
694 *.  .  128
695
696
697    3.6    ConfigureNotify    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
698 * .  .  129
699
700
701    3.7    ConfigureRequest    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
702 *  .  130
703
704
705    3.8    CreateNotify   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
706 *.  .  .  130
707
708
709    3.9    DeleteRequest    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
710 *  .  .  130
711
712
713    3.10   DestroyNotify    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
714 *  .  .  131
715
716
717    3.11   EnterNotify, LeaveNotify, NotifyMode, NotifyDetail   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  131
718
719
720    3.12   Expose    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
721 * .  .  .  .  13@
722
723
724    3.13   FocusIn, FocusOut  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
725 * .  133
726
727
728    3.14   GraphicsExpose, NoExpose   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  133
729
730
731    3.15   GravityNotify    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
732 *  .  .  134
733
734
735    3.16   KeymapNotify   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
736 *.  .  134
737
738
739    3.17   MapNotify    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
740 * .  .  .  135
741
742
743    3.18   MapRequest    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
744 *  .  .  135
745
746
747    3.19   Message  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
748 *.  .  .  .  135
749
750
751    3.20   ReparentNotify  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
752 * .  .  135
753
754
755    3.21   ResizeRequest    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
756 *  .  .  136
757
758
759    3.22   SelectionClear    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
760 *.  .  .  136
761
762
763    3.23   SelectionNotify   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
764 *.  .  .  137
765
766
767    3.24   SelectionRequest   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
768 * .  .  137
769
77010                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
771
772
773
774    3.25   UnmapNotify  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
775 * .  .  137
776
777
778    3.26   VisibilityNotify  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
779 *.  .  .  138
780
781
782
7834   Protocol Error Messages                                                                               139
784
785
786    4.1    BadAccess    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
787 * .  .  .  139
788
789
790    4.2    BadAlloc   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
791 *  .  .  .  139
792
793
794    4.3    BadAtom   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
795 * .  .  .  139
796
797
798    4.4    BadColor   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
799 *  .  .  .  139
800
801
802    4.5    BadCursor    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
803 * .  .  .  140
804
805
806    4.6    BadDrawable   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
807 *  .  .  140
808
809
810    4.7    BadFont    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
811 *  .  .  .  140
812
813
814    4.8    BadGC   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
815 *  .  .  .  140
816
817
818    4.9    BadImplementation    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
819 *.  140
820
821
822    4.10   BadIDChoice, BadLength   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  140
823
824
825    4.11   BadMatch    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  *
826 *.  .  .  141
827
828
829    4.12   BadPixmap  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
830 *  .  .  142
831
832
833    4.13   BadRequest    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
834 *  .  .  142
835
836
837    4.14   BadValue   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .*
838 *  .  .  .  142
839
840
841    4.15   BadWindow    .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . *
842 * .  .  142
843
844
845Chapter  1
846
847
848
849Introduction
8501.1       The  ML  interface
851
852
853
854We  have  implemented  an  ML  interface  to  Xlib,  the  industry  standard  C  interface  for  X  at
855the lowest level,  and which is widely used as the basis for many toolkits.  We provide all the
856major function groups, so that this interface can be used to implement fully functional complex
857applications.  We also provide a set of geometric functions for handling points and rectangles,
858and a set of functions for performing logical operations on plane masks and pixel values.
859
860
861Xlib is now widely documented, with many good reference and programming manuals available.
862We provide our version of the Xlib reference manual with ML signatures and types, and a more
863functional style to the programming interface.
864
865
866We provide ML example programs to show the functionality of the ML interface to Xlib.  These
867examples range from simple line drawing applications through to colour examples and a mini
868text editor showing how to program with selections.  The full signatures of the structures are
869also provided so that modules may be written for separate compilation.
870
871
872Because of the great similarity between our interface and the original Xlib, experienced X pro-
873grammers can use the skills they have already developed with very few changes.
874
8751.2       Naming  and  calling  conventions
876
877
878
879We have kept to the Xlib naming conventions as closely as possible.  This means that standard
880Xlib documentation can be used along with our reference manual.
881
882
883
884Types                       Drawable, Cursor
885
886Functions                   XDrawLines, XSetWindowColormap, XLoadQueryFont
887
888Constructors                FillTiled, JoinMiter, AllowExposures
889
890Constants                   XA__PRIMARY, XA__STRING
891
892Labels                      borderWidth
893
894
895
896                                                             11
897
89812                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
899
900
901
902Datatypes are used where possible so that arguments are strongly typed and pattern matching
903may be used for returned values, this is especially useful for pattern matching the different sub-
904types  of  events.   Abstypes  are  only  used  for  the  X  resource  types  which  have  no  meaningful
905textual representation.
906
907
908The functions have been made more functional.  Where an Xlib function modified its arguments,
909this has been changed so that the function returns new, modified copies of the arguments.  Where
910values were passed in partially filled-in structures with OR-ed bit masks, now the programmer
911uses constructors to make the list of values.  Similarly, return values of this type are now lists of
912constructed values.
913
914
915The majority of X applications use a single display and single screen.  Typically, they connect to
916the display when initialising and then pass the display parameter into every Xlib call from then
917on.  In release 1 we connect to the display when initialising and implicitly pass the display and
918screen parameters to all Xlib functions.  This reduces the number of parameters that have to
919be supplied and simplifies the signature.  Another way of looking at this is to say that we have
920already called XOpenDisplay for the user and have partially applied all the Xlib functions with
921that display.
922
923
924In subsequent releases every X resource value will have its display parameter implicitly built in,
925a display connection function will be provided, and the types of the other Xlib functions will be
926unchanged.
927
9281.3       Event  Handling
929
930
931
932We provide an alternative event handling scheme.
933
934
935In normal Xlib programs written in C the user calls XNextEvent and then has to work out which
936window the event is for.  This soon gets unwieldy as the number of windows increases, and is
937very difficult to use when interfacing with toolkits of window functions.  In many X toolkits each
938newly created window registers a function with an event handler, then events for that window
939are passed directly to the window function when the event reaches the head of the event queue.
940
941
942We implement a similar scheme.  When a window is created it is initially unhandled.  It can be
943used for drawing on, but it will not process any events.  An ML function can then be registered
944for that window, and an initial value supplied.  The registered function will transform the value
945to a new value every time an event arrives for that window.  In other words, a functional state
946machine is set up for each window.  We also implement strongly typed message passing between
947windows, and extra event types for decoding multi-click events such as double clicking, and for
948implementing millisecond-resolution timer events.
949
950
951In more detail, we have a single Poly/ML process that handles events arriving down the event
952queue.  It reads each event in turn, finds the window, the window function and the window state,
953and applies the event and state to the function.  This returns a new state, which replaces the
954original state.  Because only one process handles the events, we guarantee that no other window
955function can run at the same time.  Any messages 'sent' by this window function are queued
956up  and  processed  when  this  event  has  finished,  before  the  next  event  from  the  server.  If  the
957window function raises an exception, instead of returning a new state, then the current state is
958left unchanged, and the exception is reported at the terminal.  In this way all events are handled
959in turn in a predictable order, and in the same way that C event handlers work.  The Poly/ML
960top level shell process is still available for debugging and control.
961
962cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        13
963
964
965
966If  a  window  has  an  operation  that  takes  a  long  time  to  complete,  then  the  programmer  can
967use Poly/ML processes to do the computations 'in the background' and 'send' the result as a
968message to the window for display.  However, the use of processes in this way is discouraged as
969they are not standard.
970
971
972If a window function loops, then all other windows will freeze.  Since the Poly/ML top level shell
973is available the user can type ^C followed by 'f' to raise Interrupt in that window function.
974
9751.4       X  and  the  Garbage  Collector
976
977
978
979The  garbage  collector  in  Poly/ML  can  detect  when  a  value  is  no  longer  referenced,  and  can
980perform an action in this circumstance.
981
982
983This is already done with streams.  If you create an instream or an outstream and forget to close
984it  with  close_in  or  close_out,  then  it  would  hang  on  to  its  Unix  file  descriptor  for  the  rest  of
985the session.  File descriptors are considered a precious resource in Unix, you are only allowed to
986have a small number of files open at any one time, so the garbage collector detects out of scope
987streams and closes the associated file descriptor.
988
989
990In X there are several types of precious resources.  These include Windows, GCs, Pixmaps, Fonts
991and Cursors.  Functions are provided so that the user can explicitly reclaim the resources used
992by these types of object, but a similar problem occurs.  If a resource is not explicitly reclaimed,
993and allowed to go out of scope then it can never be reclaimed by the user.  The garbage collector
994steps in and automatically cleans up.  The table below summarises the effect.
995
996
997
998Window                 close the window with XDestroyWindow
999
1000GC                     free the GC with XFreeGC
1001
1002Pixmap                 free the Pixmap with XFreePixmap
1003
1004Font                   unload the Font with XUnloadFont
1005
1006Cursor                 free the Cursor with XFreeCursor
1007
1008XColor                 free the XColor with XFreeColors
1009
1010Colormap               free the Colormap with XFreeColormap
1011
1012
1013
1014Xlib includes a function called XFree which is used to free the storage required by the return
1015types of several of its functions.  This is not required in the ML interface because the garbage
1016collector performs this operation.
1017
10181.5       X  and  Persistent  Store
1019
1020
1021
1022In Poly/ML, persistent store is used to carry all ML values across to the next ML session with
1023no change, except for a couple of cases.
1024
1025
1026If you have a stream open when you save your environment, and then you attempt to read or
1027write that stream in the next session, then Poly/ML will raise the Io exception.
1028
102914                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
1030
1031
1032
1033In  X,  many  values  such  as  Windows  and  Pixmaps  are  volatile,  they  can  only  be  used  in  the
1034session that created them.  If you attempt to draw in a window that you have brought across
1035from an earlier session then Poly/ML will raise an exception.  To make things cleaner we provide
1036the following functions on volatile objects.
1037
1038
1039    val  DrawableExists:  Drawable  ->  bool  ;
1040    val  GCExists:          GC          ->  bool  ;
1041    val  FontExists:       Font       ->  bool  ;
1042    val  CursorExists:     Cursor     ->  bool  ;
1043    val  PixelExists:      int         ->  bool  ;
1044
1045
1046and so on.
1047
1048
1049These are useful for restarting applications. If an application loads fonts, generates some bitmaps,
1050and creates some windows to work in, and then gets saved to persistent store, then when the
1051next  session  is  started  the  application  can  detect  that  its  resources  have  evaporated  and  can
1052recreate them only when needed.
1053
1054
1055Chapter  2
1056
1057
1058
1059Function   Reference
10602.1       Colours,  Pixels  and  RGB  values
1061
1062
1063
10642.1.1       And,  Or,  Xor,  Not,  >>,  <<
1065
1066
1067
1068Types:
1069
1070
1071          infix  And  Or  Xor  >>  <<
1072
1073
1074          val  Not:  int  ->  int
1075          val  And:  int  *  int  ->  int
1076          val  Or:   int  *  int  ->  int
1077          val  Xor:  int  *  int  ->  int
1078          val  >>  :  int  *  int  ->  int
1079          val  <<  :  int  *  int  ->  int
1080
1081
1082Description:
1083
1084       These functions provide useful arithmetic operations on ints representing pixel values and
1085       plane masks, which, in X, are unsigned 32-bit quantities.  The least significant bits of these
1086       quantities are on the right, and the most significant bits are on the left.
1087
1088       And, Or and Xor perform bitwise boolean functions.
1089
1090       Not performs bitwise negation, so Not  0  =  4294967295 .
1091
1092       a  >>  b returns a shifted b bits to the right,  where b is not negative.  a  <<  b returns a
1093       shifted b bits to the left, where b is not negative.
1094
1095       If negative values,  or values greater than 4294967295 are passed to these functions then
1096       exception Range is raised.
10972.1.2       BlackPixel,  WhitePixel
1098
1099
1100
1101Types:
1102
1103
1104          val  BlackPixel:  unit  ->  int
1105          val  WhitePixel:  unit  ->  int
1106
1107
1108                                                             15
1109
111016                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
1111
1112
1113
1114Syntax:
1115
1116
1117          val  black  =  BlackPixel()  ;
1118          val  white  =  WhitePixel()  ;
1119
1120
1121Description:
1122
1123       The BlackPixel function returns the black pixel value for the screen.
1124
1125       The WhitePixel function returns the white pixel value for the screen.
11262.1.3       Pixel,  RGB,  XColor
1127
1128
1129
1130Types:
1131
1132
1133          val  Pixel:  XColor  ->  int
1134          val  RGB:     XColor  ->  (int  *  int  *  int)
1135
1136
1137Syntax:
1138
1139
1140          val  pixel  =  Pixel  colour  ;
1141          val  (red,green,blue)  =  RGB  colour  ;
1142
1143
1144Arguments:
1145
1146
1147       pixel          Returns the pixel field of the XColor structure
1148
1149       red            Returns the red, green and blue components of the XColor structure as num-
1150                      bers in the range 0..65535.
1151
1152
1153Argument Type:
1154
1155
1156          datatype  XColor  =  XColor  of  {  doRed:     bool,
1157                                                     doGreen:  bool,
1158                                                     doBlue:   bool,
1159                                                     red:       int,
1160                                                     green:     int,
1161                                                     blue:      int,
1162                                                     pixel:     int  }
1163
1164
1165Description:
1166
1167       The  red,  green,  and  blue  values  are  scaled  between  0  and  65535.   Full  brightness  in  a
1168       colour is a value of 65535 independent of the number of bits actually used in the display
1169       hardware.  Half brightness in a colour is a value of 32767, and off is 0.  This representation
1170       gives  uniform  results  for  colour  values  across  different  screens.   In  some  functions,  the
1171       doRed, doGreen and doBlue fields control which of the red, green, and blue members are
1172       used.
1173
1174cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        17
1175
1176
1177
11782.1.4       XAllocColor,  XAllocColorCells,  XAllocColorPlanes,
1179
1180            XAllocNamedColor,  XFreeColors
1181
1182
1183
1184Types:
1185
1186
1187          val  XAllocColor:          Colormap  ->  XColor  ->  XColor
1188          val  XAllocNamedColor:   Colormap  ->  string  ->  (XColor  *  XColor)
1189          val  XFreeColors:          Colormap  ->  int  list  ->  int  ->  unit
1190
1191
1192          val  XAllocColorCells:   Colormap  ->  bool  ->
1193                                           int  ->  int  ->  (int  list  *  int  list)
1194
1195
1196          val  XAllocColorPlanes:  Colormap  ->  bool  ->
1197                                           int  ->  int  ->
1198                                           int  ->  int  ->  (int  list  *  int  *  int  *  int)
1199
1200
1201Syntax:
1202
1203
1204          val  real  =  XAllocColor  cmap  colour  ;
1205
1206
1207          val  (real,desired)  =  XAllocNamedColor  cmap  name  ;
1208
1209
1210          XFreeColors  cmap  pixels  planes  ;
1211
1212
1213          val  (masks,basePixels)  =  XAllocColorCells  cmap  contig  nplanes  ncolours  ;
1214
1215
1216          val  (basePixels,
1217                 redMask,
1218                 greenMask,
1219                 blueMask)  =  XAllocColorPlanes  cmap  contig  ncolours
1220                                                            nreds  ngreens  nblues  ;
1221
1222
1223Arguments:
1224
1225
1226       name                    Specifies the colour name string (for example, red) whose colour defini-
1227                               tion structure you want returned.
1228
1229       cmap                    Specifies the colormap.
1230
1231       contig                  Specifies a bool that indicates whether the planes must be contiguous.
1232
1233       ncolours                Specifies the number of pixel values that are to be returned.
1234
1235       nplanes                 Specifies the number of plane masks that are to be returned.
1236
1237       nreds                   Specifies the number of red planes.  The value you pass must be nonneg-
1238                               ative.
1239
1240       ngreens                 Specifies the number of green planes.  The value you pass must be non-
1241                               negative.
1242
1243       nblues                  Specifies the number of blue planes.  The value you pass must be non-
1244                               negative.
1245
1246       pixels                  Specifies a list of pixel values.
1247
1248       planes                  Specifies the planes you want to free.
1249
1250       colour                  Specifies the values actually used in the colormap.
1251
1252       desired                 Returns the exact RGB values.
1253
125418                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
1255
1256
1257
1258       real                    Returns the closest RGB values provided by the hardware.
1259
1260       masks                   Returns the list of plane masks
1261
1262       basePixels              Returns the list of base pixels
1263
1264       redMask                 Returns the red mask
1265
1266       greenMask               Returns the green mask
1267
1268       blueMask                Returns the blue mask
1269
1270
1271Argument Type:
1272
1273
1274          datatype  XColor  =  XColor  of  {  doRed:     bool,
1275                                                     doGreen:  bool,
1276                                                     doBlue:   bool,
1277                                                     red:       int,
1278                                                     green:     int,
1279                                                     blue:      int,
1280                                                     pixel:     int  }
1281
1282
1283Description:
1284
1285       The  XAllocColor  function  allocates  a  read-only  colormap  entry  corresponding  to  the
1286       closest RGB values supported by the hardware.  XAllocColor returns the pixel value of
1287       the colour closest to the specified RGB elements supported by the hardware and returns the
1288       RGB values actually used.  The corresponding colormap cell is read-only.  If XAllocColor
1289       fails  then  exception  XWindows  is  raised  with  "XAllocColor  failed"  .   Multiple  clients
1290       that  request  the  same  effective  RGB  values  can  be  assigned  the  same  read-only  entry,
1291       thus,  allowing  entries  to  be  shared.  When  the  last  client  deallocates  a  shared  cell,  it  is
1292       deallocated.  XAllocColor does not use or affect the flags in the XColor structure.
1293
1294       The XAllocNamedColor function looks up the named colour with respect to the screen
1295       that is associated with the specified colormap.  It returns both the exact database definition
1296       and  the  closest  colour  supported  by  the  screen.   The  allocated  colour  cell  is  read-only.
1297       You  should  use  the  ISO  Latin-1  encoding;  uppercase  and  lowercase  do  not  matter.   If
1298       XAllocNamedColor fails then exception XWindows is raised with "XAllocNamedColor
1299       failed" .
1300
1301       The XAllocColorCells function allocates read/write colour cells.  The number of colours
1302       must be positive and the number of planes nonnegative, otherwise exception Range is raised
1303       or  a  BadValue  error  results.   If  ncolours  and  nplanes  are  requested,  then  ncolours
1304       pixels  and  nplanes  plane  masks  are  returned.   No  mask  will  have  any  bits  set  to  1  in
1305       common with any other mask or with any of the pixels.  By ORing together each pixel
1306       with zero or more masks, ncolours  *  2  ^  nplanes distinct pixels can be produced.  All
1307       of  these  are  allocated  writable  by  the  request.  For  GrayScale  or  PseudoColor,  each
1308       mask has exactly one bit set to 1.  For DirectColor,  each has exactly three bits set to
1309       1.  If contig is true and if all masks are ORed together, a single contiguous set of bits set
1310       to 1 will be formed for GrayScale or PseudoColor and three contiguous sets of bits set
1311       to 1 (one within each pixel subfield) for DirectColor.  The RGB values of the allocated
1312       entries  are  undefined.  If  XAllocColorCells  fails  then  exception  XWindows  is  raised
1313       with "XAllocColorCells failed" .
1314
1315       The  XAllocColorPlanes  function  allocates  read/write  colour  cells.    The  specified
1316       ncolours  must  be  positive;  and  nreds,  ngreens,  and  nblues  must  be  nonnegative,  other-
1317       wise  exception  Range  is  raised  or  a  BadValue  error  results.  If  ncolours  colours,  nreds
1318       reds, ngreens greens, and nblues blues are requested, ncolours pixels are returned; and the
1319       masks have nreds, ngreens, and nblues bits set to 1, respectively.  If contig is true, each
1320
1321cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        19
1322
1323
1324
1325       mask will have a contiguous set of bits set to 1.  No mask will have any bits set to 1 in
1326       common with any other mask or with any of the pixels.  For DirectColor, each mask will
1327       lie within the corresponding pixel subfield.  By ORing together subsets of masks with each
1328       pixel value, ncolours  *  2  ^  (nreds+ngreens+nblues) distinct pixel values can be pro-
1329       duced.  All of these are allocated by the request.  However, in the colormap, there are only
1330       ncolours  *  2  ^  nreds independent red entries, ncolours  *  2  ^  ngreens independent
1331       green entries, and ncolours  *  2  ^  nblues independent blue entries.  This is true even for
1332       PseudoColor.  When the colormap entry of a pixel value is changed (using XStoreCol-
1333       ors, XStoreColor, or XStoreNamedColor), the pixel is decomposed according to the
1334       masks, and the corresponding independent entries are updated.  If XAllocColorPlanes
1335       fails then exception XWindows is raised with "XAllocColorPlanes failed" .
1336
1337       The XFreeColors function frees the cells represented by pixels whose values are in the
1338       pixels list. The planes argument should not have any bits set to 1 in common with any of the
1339       pixels.  The set of all pixels is produced by ORing together subsets of the planes argument
1340       with the pixels.  The request frees all of these pixels that were allocated by the client (using
1341       XAllocColor,  XAllocNamedColor,  XAllocColorCells,  and XAllocColorPlanes).
1342       Note that freeing an individual pixel obtained from XAllocColorPlanes may not actually
1343       allow it to be reused until all of its related pixels are also freed.  Similarly, a read-only entry
1344       is not actually freed until it has been freed by all clients, and if a client allocates the same
1345       read-only entry multiple times, it must free the entry that many times before the entry is
1346       actually freed.
1347
1348       All specified pixels that are allocated by the client in the colormap are freed, even if one
1349       or more pixels produce an error.  If a specified pixel is not a valid index into the colormap,
1350       a  BadValue  error  results.  If  a  specified  pixel  is  not  allocated  by  the  client  (that  is,  is
1351       unallocated or is only allocated by another client),  a BadAccess error results.  If more
1352       than one pixel is in error, the one that gets reported is arbitrary.
13532.1.5       XLookupColor,  XQueryColor,  XQueryColors
1354
1355
1356
1357Types:
1358
1359
1360          val  XLookupColor:  Colormap  ->  string  ->  (XColor  *  XColor)
1361          val  XQueryColor:   Colormap  ->  int  ->  XColor
1362          val  XQueryColors:  Colormap  ->  int  list  ->  XColor  list
1363
1364
1365Syntax:
1366
1367
1368          val  (desired,real)  =  XLookupColor  cmap  name  ;
1369
1370
1371          val  colour   =  XQueryColor   cmap  pixel  ;
1372          val  colours  =  XQueryColors  cmap  pixels  ;
1373
1374
1375Arguments:
1376
1377
1378       colormap              Specifies the colormap.
1379
1380       name                  Specifies the colour name string (for example, red) whose colour definition
1381                             structure you want returned.
1382
1383       colour                Returns the RGB values for the specified pixel.
1384
1385       colours               Returns a list of colour definition structures for the pixel specified.
1386
1387       desired               Returns the exact RGB values.
1388
138920                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
1390
1391
1392
1393       real                  Returns the closest RGB values provided by the hardware.
1394
1395
1396Description:
1397
1398       The XLookupColor function looks up the string name of a colour with respect to the
1399       screen associated with the specified colormap.  It returns both the exact colour values and
1400       the closest values provided by the screen with respect to the visual type of the specified
1401       colormap.   You  should  use  the  ISO  Latin-1  encoding;  uppercase  and  lowercase  do  not
1402       matter.  XLookupColor raises exception XWindows with "XLookupColor failed" if the
1403       name did not exist.
1404
1405       The XQueryColor function returns the hardware-specific RGB values for the specified
1406       pixel  and  sets  the  DoRed,  DoGreen,  and  DoBlue  flags.   The  XQueryColors  function
1407       returns  the  RGB  values  for  each  pixel  in  the  list  and  sets  the  DoRed,  DoGreen,  and
1408       DoBlue flags.
14092.1.6       XParseColor
1410
1411
1412
1413Types:
1414
1415
1416          val  XParseColor:  Colormap  ->  string  ->  XColor
1417
1418
1419Syntax:
1420
1421
1422          val  colour  =  XParseColor  cmap  name  ;
1423
1424
1425Arguments:
1426
1427
1428       cmap              Specifies the colormap.
1429
1430       name              Specifies the colour name string; case is ignored.
1431
1432       colour            Returns the exact colour value for later use and sets the doRed, doGreen, and
1433                         doBlue flags.
1434
1435
1436Argument Type:
1437
1438
1439          datatype  XColor  =  XColor  of  {  doRed:     bool,
1440                                                     doGreen:  bool,
1441                                                     doBlue:   bool,
1442                                                     red:       int,
1443                                                     green:     int,
1444                                                     blue:      int,
1445                                                     pixel:     int  }
1446
1447
1448Description:
1449
1450       The  XParseColor  function  provides  a  simple  way  to  create  a  standard  user  interface
1451       to  colour.  It  takes  a  string  specification  of  a  colour,  typically  from  a  command  line  or
1452       XGetDefault  option,  and  returns  the  corresponding  red,  green,  and  blue  values  that
1453       are suitable for a subsequent call to XAllocColor or XStoreColor.  The colour can be
1454       specified either as a colour name (as in XAllocNamedColor) or as an initial sharp sign
1455       character followed by a numeric specification, in one of the following formats:
1456
1457       #RGB                                      (4 bits each)
1458
1459cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        21
1460
1461
1462
1463       #RRGGBB                                   (8 bits each)
1464
1465       #RRRGGGBBB                                (12 bits each)
1466
1467       #RRRRGGGGBBBB                             (16 bits each)
1468
1469       The  R,  G,  and  B  represent  single  hexadecimal  digits  (both  uppercase  and  lowercase).
1470       When fewer than 16 bits each are specified, they represent the most-significant bits of the
1471       value.  For example, #3a7 is the same as #3000a0007000.  The colormap is used only to
1472       determine which screen to look up the colour on.  For example, you can use the screen's
1473       default colormap.
1474
1475       If the initial character is a sharp sign but the string otherwise fails to fit the above formats
1476       or if the initial character is not a sharp sign and the named colour does not exist in the
1477       server's database, then exception XWindows is raised with "XParseColor failed" .
14782.1.7       XStoreColor,  XStoreColors,  XStoreNamedColor
1479
1480
1481
1482Types:
1483
1484
1485          val  XStoreColor:         Colormap  ->  XColor  ->  unit
1486          val  XStoreColors:       Colormap  ->  XColor  list  ->  unit
1487          val  XStoreNamedColor:  Colormap  ->  string  ->  int  ->  (bool  *  bool  *  bool)  ->  unit
1488
1489
1490Syntax:
1491
1492
1493          XStoreColor  cmap  colour  ;
1494          XStoreColors  cmap  colours  ;
1495          XStoreNamedColor  cmap  name  pixel  (doRed,doGreen,doBlue)  ;
1496
1497
1498Arguments:
1499
1500
1501       colour             Specifies the pixel and RGB values
1502
1503       colours            Specifies a list of pixel and RGB values
1504
1505       cmap               Specifies the colormap.
1506
1507       doRed              Specifies if the red component is set
1508
1509       doGreen            Specifies if the green component is set
1510
1511       doBlue             Specifies if the blue component is set.
1512
1513       name               Name of colour to copy RGB values from.
1514
1515       pixel              Specifies the entry in the colormap.
1516
1517
1518Argument Type:
1519
1520
1521          datatype  XColor  =  XColor  of  {  doRed:     bool,
1522                                                     doGreen:  bool,
1523                                                     doBlue:   bool,
1524                                                     red:       int,
1525                                                     green:     int,
1526                                                     blue:      int,
1527                                                     pixel:     int  }
1528
152922                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
1530
1531
1532
1533Description:
1534
1535       The  XStoreColors  function  changes  the  colormap  entries  of  the  pixel  values  specified
1536       in  the  pixel  members  of  the  XColor  structures.  You  specify  which  colour  components
1537       are to be changed by setting doRed, doGreen, and/or doBlue in the XColor structures.
1538       If  the  colormap  is  an  installed  map  for  its  screen,  the  changes  are  visible  immediately.
1539       XStoreColors changes the specified pixels if they are allocated writable in the colormap
1540       by  any  client,  even  if  one  or  more  pixels  generates  an  error.   If  a  specified  pixel  is  not
1541       a valid index into the colormap, a BadValue error results.  If a specified pixel either is
1542       unallocated or is allocated read-only, a BadAccess error results.  If more than one pixel
1543       is in error, the one that gets reported is arbitrary.
1544
1545       The XStoreColor function changes the colormap entry of the pixel value specified in the
1546       pixel member of the XColor structure.  You specified this value in the pixel member of
1547       the XColor structure.  This pixel value must be a read/write cell and a valid index into
1548       the colormap.  If a specified pixel is not a valid index into the colormap, a BadValue error
1549       results.  XStoreColor also changes the red, green, and/or blue colour components.  You
1550       specify  which  colour  components  are  to  be  changed  by  setting  doRed,  doGreen,  and/or
1551       doBlue in the XColor structure.  If the colormap is an installed map for its screen, the
1552       changes are visible immediately.
1553
1554       The XStoreNamedColor function looks up the named colour with respect to the screen
1555       associated with the colormap and stores the result in the specified colormap.  The pixel
1556       argument determines the entry in the colormap. The booleans doRed, doGreen, and doBlue
1557       determine which of the red, green, and blue components are set.  If the specified pixel is
1558       not a valid index into the colormap, a BadValue error results.  If the specified pixel either
1559       is unallocated or is allocated read-only, a BadAccess error results.  You should use the
1560       ISO Latin-1 encoding; uppercase and lowercase do not matter.
1561
15622.2       Colormaps
1563
1564
1565
15662.2.1       DefaultColormap
1567
1568
1569
1570Types:
1571
1572
1573          val  DefaultColormap:  unit  ->  Colormap
1574
1575
1576Syntax:
1577
1578
1579          val  cmap  =  DefaultColormap()  ;
1580
1581
1582Description:
1583
1584       The DefaultColormap function returns the default colormap for allocation on the screen.
15852.2.2       DefaultDepth
1586
1587
1588
1589Types:
1590
1591
1592          val  DefaultDepth:  unit  ->  int
1593
1594cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        23
1595
1596
1597
1598Syntax:
1599
1600
1601          val  depth  =  DefaultDepth()  ;
1602
1603
1604Description:
1605
1606       The  DefaultDepth  function  returns  the  depth  (number  of  planes)  of  the  default  root
1607       window for the screen.
16082.2.3       DisplayCells
1609
1610
1611
1612Types:
1613
1614
1615          val  DisplayCells:  unit  ->  int
1616
1617
1618Syntax:
1619
1620
1621          val  cells  =  DisplayCells()  ;
1622
1623
1624Description:
1625
1626       The DisplayCells function returns the number of entries in the default colormap.
16272.2.4       VisualClass
1628
1629
1630
1631Types:
1632
1633
1634          val  VisualClass:  Visual  ->  VisualClass
1635
1636
1637Syntax:
1638
1639
1640          val  class  =  VisualClass  visual  ;
1641
1642
1643Arguments:
1644
1645
1646       visual           Specifies the visual.
1647
1648       class            Returns the class from the visual.
1649
1650
1651Argument Type:
1652
1653
1654          datatype  VisualClass  =  StaticGray   |  GrayScale
1655                                        |  StaticColor  |  PseudoColor
1656                                        |  TrueColor     |  DirectColor
1657
1658
1659Description:
1660
1661       Returns the visual class from the specified visual.
1662
166324                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
1664
1665
1666
16672.2.5       XCreateColormap,  XCopyColormapAndFree,  XFreeColormap,
1668
1669            XSetWindowColormap
1670
1671
1672
1673Types:
1674
1675
1676          val  XCreateColormap:         Drawable  ->  Visual  ->  AllocType  ->  Colormap
1677          val  XCopyColormapAndFree:  Colormap  ->  Colormap
1678          val  XFreeColormap:            Colormap  ->  unit
1679          val  XSetWindowColormap:     Drawable  ->  Colormap  ->  unit
1680
1681
1682Syntax:
1683
1684
1685          val  cmap  =  XCreateColormap  w  visual  alloc  ;
1686          val  copy  =  XCopyColormapAndFree  cmap  ;
1687          XFreeColormap  cmap  ;
1688          XSetWindowColormap  w  cmap  ;
1689
1690
1691Arguments:
1692
1693
1694       w                Specifies the window
1695
1696       visual           Specifies a visual type supported on the screen.  If the visual type is not one
1697                        supported by the screen, a BadMatch error results.
1698
1699       alloc            Specifies the colormap entries to be allocated.  You can pass AllocNone or
1700                        AllocAll.
1701
1702       cmap             Specifies the colormap.
1703
1704       copy             Returns a copy of the colormap.
1705
1706
1707Argument Type:
1708
1709
1710          datatype  AllocType  =  AllocNone  |  AllocAll
1711
1712
1713          datatype  VisualClass  =  StaticGray   |  GrayScale
1714                                        |  StaticColor  |  PseudoColor
1715                                        |  TrueColor     |  DirectColor
1716
1717
1718          datatype  XColor  =  XColor  of  {  doRed:     bool,
1719                                                     doGreen:  bool,
1720                                                     doBlue:   bool,
1721                                                     red:       int,
1722                                                     green:     int,
1723                                                     blue:      int,
1724                                                     pixel:     int  }
1725
1726
1727Argument Description:
1728
1729       The  red,  green,  and  blue  values  are  scaled  between  0  and  65535.   Full  brightness  in  a
1730       colour is a value of 65535 independent of the number of bits actually used in the display
1731       hardware.  Half brightness in a colour is a value of 32767, and off is 0.  This representation
1732       gives  uniform  results  for  colour  values  across  different  screens.   In  some  functions,  the
1733       doRed, doGreen and doBlue fields control which of the red, green, and blue members are
1734       used.
1735
1736cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        25
1737
1738
1739
1740Description:
1741
1742       The XCreateColormap function creates a colormap of the specified visual type for the
1743       screen on which the specified window resides and returns the colormap associated with it.
1744       Note that the specified window is only used to determine the screen.
1745
1746       The initial values of the colormap entries are undefined for the visual classes GrayScale,
1747       PseudoColor, and DirectColor.  For StaticGray, StaticColor, and TrueColor, the
1748       entries have defined values, but those values are specific to the visual and are not defined
1749       by X. For StaticGray, StaticColor, and TrueColor, alloc must be AllocNone, or a
1750       BadMatch error results.  For the other visual classes, if alloc is AllocNone, the colormap
1751       initially has no allocated entries, and clients can allocate them.
1752
1753       If  alloc  is  AllocAll,  the  entire  colormap  is  allocated  writable.  The  initial  values  of  all
1754       allocated  entries  are  undefined.   For  GrayScale  and  PseudoColor,  the  effect  is  as  if
1755       an XAllocColorCells call returned all pixel values from zero to N - 1,  where N is the
1756       colormap  entries  value  in  the  specified  visual.   For  DirectColor,  the  effect  is  as  if  an
1757       XAllocColorPlanes  call  returned  a  pixel  value  of  zero  and  redMask,  greenMask,  and
1758       blueMask  values  containing  the  same  bits  as  the  corresponding  masks  in  the  specified
1759       visual.  However, in all cases, none of these entries can be freed by using XFreeColors.
1760
1761       The XCopyColormapAndFree function creates a colormap of the same visual type and
1762       for the same screen as the specified colormap and returns the new colormap.  It also moves
1763       all of the client's existing allocation from the specified colormap to the new colormap with
1764       their colour values intact and their read-only or writable characteristics intact and frees
1765       those entries in the specified colormap. Color values in other entries in the new colormap are
1766       undefined.  If the specified colormap was created by the client with alloc set to AllocAll,
1767       the new colormap is also created with AllocAll, all colour values for all entries are copied
1768       from the specified colormap, and then all entries in the specified colormap are freed.  If the
1769       specified colormap was not created by the client with AllocAll, the allocations to be moved
1770       are all those pixels and planes that have been allocated by the client using XAllocColor,
1771       XAllocNamedColor, XAllocColorCells, or XAllocColorPlanes and that have not
1772       been freed since they were allocated.
1773
1774       The  XFreeColormap  function  deletes  the  association  between  the  colormap  resource
1775       in  the  server  and  the  ML  Colormap  value.   However,  this  function  has  no  effect  on
1776       the  default  colormap  for  a  screen.   If  the  specified  colormap  is  an  installed  map  for  a
1777       screen,  it  is  uninstalled  (see  XUninstallColormap).   If  the  specified  colormap  is  de-
1778       fined  as  the  colormap  for  a  window  (by  XCreateWindow,  XSetWindowColormap,
1779       or XChangeWindowAttributes),  XFreeColormap changes the colormap associated
1780       with the window to NoColormap and generates a ColormapNotify event.  X does not
1781       define the colours displayed for a window with a colormap of NoColormap.
1782
1783       The XSetWindowColormap function sets the specified colormap of the specified win-
1784       dow.  The colormap must have the same visual type as the window, or a BadMatch error
1785       results.
17862.2.6       XInstallColormap,  XUninstallColormap,
1787
1788            XListInstalledColormaps
1789
1790
1791
1792Types:
1793
1794
1795          val  XInstallColormap:            Colormap  ->  unit
1796          val  XListInstalledColormaps:  Drawable  ->  Colormap  list
1797          val  XUninstallColormap:         Colormap  ->  unit
1798
179926                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
1800
1801
1802
1803Syntax:
1804
1805
1806          XInstallColormap  cmap  ;
1807          XUninstallColormap  cmap  ;
1808          val  cmaps  =  XListInstalledColormaps  w  ;
1809
1810
1811Arguments:
1812
1813
1814       cmap            Specifies the colormap.
1815
1816       w               Specifies the window that determines the screen.
1817
1818
1819Description:
1820
1821       The XInstallColormap function installs the specified colormap for its associated screen.
1822       All  windows  associated  with  this  colormap  immediately  display  with  true  colours.  You
1823       associated  the  windows  with  this  colormap  when  you  created  them  by  calling  XCre-
1824       ateWindow, XCreateSimpleWindow, XChangeWindowAttributes, or XSetWin-
1825       dowColormap.
1826
1827       If  the  specified  colormap  is  not  already  an  installed  colormap,  the  X  server  generates  a
1828       ColormapNotify event on each window that has that colormap.  In addition, for every
1829       other colormap that is installed as a result of a call to XInstallColormap, the X server
1830       generates a ColormapNotify event on each window that has that colormap.
1831
1832       The XUninstallColormap function removes the specified colormap from the required list
1833       for its screen.  As a result, the specified colormap might be uninstalled, and the X server
1834       might implicitly install or uninstall additional colormaps.  Which colormaps get installed
1835       or uninstalled is server-dependent except that the required list must remain installed.
1836
1837       If the specified colormap becomes uninstalled, the X server generates a ColormapNotify
1838       event on each window that has that colormap.  In addition, for every other colormap that
1839       is  installed  or  uninstalled  as  a  result  of  a  call  to  XUninstallColormap,  the  X  server
1840       generates a ColormapNotify event on each window that has that colormap.
1841
1842       The  XListInstalledColormaps  function  returns  a  list  of  the  currently  installed  col-
1843       ormaps  for  the  screen  of  the  specified  window.   The  order  of  the  colormaps  in  the  list
1844       is not significant and is no explicit indication of the required list.  If XListInstalledCol-
1845       ormaps fails then exception XWindows is raised with "XListInstalledColormaps failed"
1846       .
18472.2.7       XSetRGBColormaps,  XGetRGBColormaps
1848
1849
1850
1851Types:
1852
1853
1854          val  XSetRGBColormaps:  Drawable  ->  int  ->  XStandardColormap  list  ->  unit
1855          val  XGetRGBColormaps:  Drawable  ->  int  ->  XStandardColormap  list
1856
1857
1858Syntax:
1859
1860
1861          XSetRGBColormaps  w  property  stdmaps  ;
1862          val  maps  =  XGetRGBColormaps  w  property  ;
1863
1864
1865Arguments:
1866
1867
1868       w                    Specifies the window.
1869
1870cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        27
1871
1872
1873
1874       property             Specifies the property atom.
1875
1876       stdmaps              Specifies the XStandardColormaps to be used
1877
1878       maps                 Returns the XStandardColormap
1879
1880
1881Argument Type:
1882
1883
1884          datatype  XStandardColormap  =  XStandardColormap  of  {  colormap:   Colormap,
1885                                                                                     redMax:      int,
1886                                                                                     redMult:     int,
1887                                                                                     greenMax:   int,
1888                                                                                     greenMult:  int,
1889                                                                                     blueMax:     int,
1890                                                                                     blueMult:   int,
1891                                                                                     basePixel:  int,
1892                                                                                     visual:      Visual  }
1893
1894
1895Argument Description:
1896
1897       The colormap member is the colormap created by the XCreateColormap function.  The
1898       redMax, greenMax, and blueMax members give the maximum red, green, and blue values,
1899       respectively.  Each colour coefficient ranges from zero to its max, inclusive.  For example,
1900       a common colormap allocation is 3/3/2 (3 planes for red, 3 planes for green, and 2 planes
1901       for blue).  This colormap would have redMax = 7, greenMax = 7, and blueMax = 3.  An
1902       alternate allocation that uses only 216 colours is redMax = 5, greenMax = 5, and blueMax
1903       = 5.
1904
1905       The redMult, greenMult, and blueMult members give the scale factors used to compose
1906       a full pixel value.  (See the discussion of the basePixel members for further information.)
1907       For a 3/3/2 allocation, redMult might be 32, greenMult might be 4, and blueMult might
1908       be 1.  For a 6-colours-each allocation,  redMult might be 36,  greenMult might be 6,  and
1909       blueMult might be 1.
1910
1911       The basePixel member gives the base pixel value used to compose a full pixel value. Usually,
1912       the basePixel is obtained from a call to the XAllocColorPlanes function.  Given integer
1913       red,  green,  and  blue  coefficients  in  their  appropriate  ranges,  one  then  can  compute  a
1914       corresponding pixel value by using the following expression:
1915
1916
1917             r  *  redMult  +  g  *  greenMult  +  b  *  blueMult  +  basePixel
1918
1919
1920       For GrayScale colormaps, only the colormap, redMax, redMult, and basePixel members
1921       are defined.  The other members are ignored.
1922
1923       To compute a GrayScale pixel value, use the following expression:
1924
1925
1926             gray  *  redMult  +  basePixel
1927
1928
1929       The visual member gives the the visual from which the colormap was created.
1930
1931       The   properties   containing   the   XStandardColormap   information   have   the   type
1932       RGB__COLOR__MAP.
1933
1934Description:
1935
1936       XSetRGBColormaps sets the RGB colormap definition in the specified property on the
1937       named window.  The property is stored with a type of RGB__COLOR__MAP and a format
1938       of 32.  Note that it is the caller's responsibility to honour the ICCCM restriction that only
1939       RGB__DEFAULT__MAP can contain more than one definition.
1940
194128                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
1942
1943
1944
1945       The  XGetRGBColormaps  function  returns  the  RGB  colormap  definitions  stored  in
1946       the  specified  property  on  the  named  window.     If  the  property  exists,   is  of  type
1947       RGB__COLOR__MAP,  is  of  format  32,  and  is  long  enough  to  contain  a  colormap
1948       definition  (if  the  visual  is  not  present,  XGetRGBColormaps  assumes  the  default
1949       visual  for  the  screen  on  which  the  window  is  located),  XGetRGBColormaps  re-
1950       turns  the  list  of  colormaps.  Otherwise,  XGetRGBColormaps  returns  the  empty  list.
1951       Note  that  it  is  the  caller's  responsibility  to  honour  the  ICCCM  restriction  that  only
1952       RGB__DEFAULT__MAP can contain more than one definition.
1953
19542.3       Cursors
1955
1956
1957
19582.3.1       XCreateFontCursor,  XCreatePixmapCursor,
1959
1960            XCreateGlyphCursor
1961
1962
1963
1964Types:
1965
1966
1967          val  XCreateFontCursor:     int  ->  Cursor
1968
1969
1970          val  XCreatePixmapCursor:  Drawable  ->  Drawable  ->
1971                                              XColor  ->  XColor  ->  XPoint  ->  Cursor
1972
1973
1974          val  XCreateGlyphCursor:   Font  ->  Font  ->
1975                                              int   ->  int  ->
1976                                              XColor  ->  XColor  ->  Cursor
1977
1978
1979Syntax:
1980
1981
1982          val  cursor  =  XCreateFontCursor  shape  ;
1983
1984
1985          val  cursor  =  XCreatePixmapCursor  source  mask
1986                                                          foreground  background  hotspot  ;
1987
1988
1989          val  cursor  =  XCreateGlyphCursor  sourceFont  maskFont
1990                                                          sourceChar  maskChar
1991                                                          foreground  background  ;
1992
1993
1994Arguments:
1995
1996
1997       background                Specifies the RGB values for the background of the source.
1998
1999       foreground                Specifies the RGB values for the foreground of the source.
2000
2001       mask                      Specifies the cursor's mask bits to be displayed or NoDrawable.
2002
2003       maskChar                  Specifies the glyph character for the mask.
2004
2005       maskFont                  Specifies the font for the mask glyph or NoFont.
2006
2007       shape                     Specifies the shape name of the cursor.
2008
2009       source                    Specifies the cursor's source bits to be displayed.
2010
2011       sourceChar                Specifies the character glyph for the source.
2012
2013       sourceFont                Specifies the font for the source glyph.
2014
2015cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        29
2016
2017
2018
2019       hotspot                   Specifies the x and y coordinates, which indicate the hotspot relative
2020                                 to the source's origin.
2021
2022       cursor                    Returns the new cursor
2023
2024
2025Argument Type:
2026
2027
2028          datatype  XColor  =  XColor  of  {  doRed:     bool,
2029                                                     doGreen:  bool,
2030                                                     doBlue:   bool,
2031                                                     red:       int,
2032                                                     green:     int,
2033                                                     blue:      int,
2034                                                     pixel:     int  }
2035
2036
2037Description:
2038
2039       X provides a set of standard cursor shapes in a special font named cursor.  Applications
2040       are encouraged to use this interface for their cursors because the font can be customized
2041       for the individual display type.  The shape argument specifies which glyph of the standard
2042       fonts to use.
2043
2044       The hotspot comes from the information stored in the cursor font.  The initial colours of a
2045       cursor are a black foreground and a white background (see XRecolorCursor).
2046
2047       The XCreatePixmapCursor function creates and returns a cursor.  The foreground and
2048       background RGB values must be specified using foreground and background, even if the
2049       X server only has a StaticGray or GrayScale screen.  The foreground colour is used for
2050       the pixels set to 1 in the source, and the background colour is used for the pixels set to 0.
2051       Both source and mask, if specified, must have depth one (or a BadMatch error results)
2052       but can have any root.  The mask argument defines the shape of the cursor.  The pixels
2053       set to 1 in the mask define which source pixels are displayed, and the pixels set to 0 define
2054       which pixels are ignored.  If no mask is given, all pixels of the source are displayed.  The
2055       mask, if present, must be the same size as the pixmap defined by the source argument, or a
2056       BadMatch error results.  The hotspot must be a point within the source, or a BadMatch
2057       error results.
2058
2059       The components of the cursor can be transformed arbitrarily to meet display limitations.
2060       The pixmaps can be freed immediately if no further explicit references to them are to be
2061       made.  Subsequent drawing in the source or mask pixmap has an undefined effect on the
2062       cursor.  The X server might or might not make a copy of the pixmap.
2063
2064       The XCreateGlyphCursor function is similar to XCreatePixmapCursor except that
2065       the source and mask bitmaps are obtained from the specified font glyphs.  The sourceChar
2066       must  be  a  defined  glyph  in  sourceFont,  or  a  BadValue  error  results.   If  maskFont  is
2067       given, maskChar must be a defined glyph in maskFont, or a BadValue error results.  The
2068       maskFont and maskChar are optional.  The origins of the sourceChar and maskChar (if
2069       defined) glyphs are positioned coincidently and define the hotspot.  The sourceChar and
2070       maskChar need not have the same bounding box metrics, and there is no restriction on the
2071       placement of the hotspot relative to the bounding boxes.  If no maskChar is given, all pixels
2072       of the source are displayed.  You can free the fonts immediately by calling XFreeFont if
2073       no further explicit references to them are to be made.
20742.3.2       XDefineCursor,  XUndefineCursor,  NoCursor
2075
2076
2077
2078Types:
2079
208030                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
2081
2082
2083
2084          val  XDefineCursor:     Drawable  ->  Cursor  ->  unit
2085          val  XUndefineCursor:  Drawable  ->  unit
2086          val  NoCursor:            Cursor
2087
2088
2089Syntax:
2090
2091
2092          XDefineCursor  w  cursor  ;
2093          XUndefineCursor  w  ;
2094
2095
2096Arguments:
2097
2098
2099       cursor            Specifies the cursor that is to be displayed or NoCursor.
2100
2101       w                 Specifies the window.
2102
2103
2104Description:
2105
2106       If  a  cursor  is  set,  it  will  be  used  when  the  pointer  is  in  the  window.   If  the  cursor  is
2107       NoCursor, it is equivalent to XUndefineCursor.
2108
2109       The XUndefineCursor undoes the effect of a previous XDefineCursor for this window.
2110       When  the  pointer  is  in  the  window,  the  parent's  cursor  will  now  be  used.  On  the  root
2111       window, the default cursor is restored.
21122.3.3       XRecolorCursor,  XFreeCursor
2113
2114
2115
2116Types:
2117
2118
2119          val  XRecolorCursor:  Cursor  ->  XColor  ->  XColor  ->  unit
2120          val  XFreeCursor:      Cursor     ->  unit
2121
2122
2123Syntax:
2124
2125
2126          XRecolorCursor  cursor  fg  bg  ;
2127          XFreeCursor  cursor  ;
2128
2129
2130Arguments:
2131
2132
2133       bg                Specifies the RGB values for the background of the source.
2134
2135       cursor            Specifies the cursor.
2136
2137       fg                Specifies the RGB values for the foreground of the source.
2138
2139
2140Description:
2141
2142       The XRecolorCursor function changes the colour of the specified cursor, and if the cursor
2143       is being displayed on a screen, the change is visible immediately.
2144
2145       The  XFreeCursor  function  deletes  the  association  between  the  Cursor  value  and  the
2146       specified cursor in the server.  The cursor storage is freed when no other resource references
2147       it.  The specified cursor should not be referred to again.
2148
2149cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        31
2150
2151
2152
21532.4       Display  Specifications
2154
2155
2156
21572.4.1       AllPlanes
2158
2159
2160
2161Types:
2162
2163
2164          val  AllPlanes:  int
2165
2166
2167Syntax:
2168
2169
2170          val  planeMask  =  AllPlanes  ;
2171
2172
2173Description:
2174
2175       AllPlanes is a value with all bits set to 1 and is suitable for use in a plane mask argument
2176       to a function.
21772.4.2       BitmapBitOrder
2178
2179
2180
2181Types:
2182
2183
2184          val  BitmapBitOrder:  unit  ->  ImageOrder
2185
2186
2187Argument Type:
2188
2189
2190          datatype  ImageOrder  =  LSBFirst  |  MSBFirst
2191
2192
2193Syntax:
2194
2195
2196          val  order  =  BitmapBitOrder()  ;
2197
2198
2199Description:
2200
2201       The BitmapBitOrder function returns LSBFirst or MSBFirst to indicate whether the
2202       leftmost bit in the bitmap as displayed on the screen is the least or most significant bit in
2203       the bytes comprising the bitmap data.
22042.4.3       BitmapPad
2205
2206
2207
2208Types:
2209
2210
2211          val  BitmapPad:  unit  ->  int
2212
2213
2214Syntax:
2215
2216
2217          val  pad  =  BitmapPad()  ;
2218
2219
2220Description:
2221
2222       The BitmapPad function returns the number of bits that each scanline must be padded.
2223
222432                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
2225
2226
2227
22282.4.4       BitmapUnit
2229
2230
2231
2232Types:
2233
2234
2235          val  BitmapUnit:  unit  ->  int
2236
2237
2238Syntax:
2239
2240
2241          val  scanline  =  BitmapUnit()  ;
2242
2243
2244Description:
2245
2246       The BitmapUnit function returns the size of a bitmap's scanline unit in bits.
22472.4.5       ByteOrder
2248
2249
2250
2251Types:
2252
2253
2254          val  ByteOrder:  unit  ->  ImageOrder
2255
2256
2257Argument Type:
2258
2259
2260          datatype  ImageOrder  =  LSBFirst  |  MSBFirst
2261
2262
2263Syntax:
2264
2265
2266          val  order  =  ByteOrder  ;
2267
2268
2269Description:
2270
2271       The  ByteOrder  function  specifies  the  required  byte  order  for  images  for  each  scanline
2272       unit in XY format (bitmap) or for each pixel value in Z format.
22732.4.6       CellsOfScreen
2274
2275
2276
2277Types:
2278
2279
2280          val  CellsOfScreen:  unit  ->  int
2281
2282
2283Syntax:
2284
2285
2286          val  cells  =  CellsOfScreen()  ;
2287
2288
2289Description:
2290
2291       The CellsOfScreen function returns the number of colormap cells in the default colormap
2292       of the screen.
2293
2294cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        33
2295
2296
2297
22982.4.7       ColormapExists,  CursorExists,  DrawableExists,  FontExists,
2299
2300            GCExists,  VisualExists
2301
2302
2303
2304Types:
2305
2306
2307          val  ColormapExists:  Colormap  ->  bool
2308          val  CursorExists:     Cursor     ->  bool
2309          val  DrawableExists:  Drawable  ->  bool
2310          val  FontExists:       Font       ->  bool
2311          val  GCExists:          GC          ->  bool
2312          val  VisualExists:     Visual     ->  bool
2313
2314
2315Description:
2316
2317       In Poly/ML all values may be committed to the database and then referenced in future
2318       Poly/ML sessions.  X resources are stored in the X server and are destroyed at the end
2319       of every Poly/ML session.  If the user attempts to use an ML value corresponding to an
2320       X  resource  that  existed  in  an  earlier  session,  then  exception  XWindows  is  raised  with
2321       "Non-existant resource" .  To allow programmers to detect old resources these functions
2322       return true only if the ML value passed in corresponds to an X resource created in this
2323       session, and return false otherwise.
23242.4.8       ColormapID,  CursorID,  DrawableID,  FontID,  GCID,  VisualID,
2325
2326            SameDrawable
2327
2328
2329
2330Types:
2331
2332
2333          type  Colormap  ;
2334          type  Cursor  ;
2335          type  Drawable  ;
2336          type  Font  ;
2337          type  GC  ;
2338          type  Visual  ;
2339
2340
2341          val  ColormapID:  Colormap  ->  int
2342          val  CursorID:     Cursor     ->  int
2343          val  DrawableID:  Drawable  ->  int
2344          val  FontID:       Font       ->  int
2345          val  GCID:          GC          ->  int
2346          val  VisualID:     Visual     ->  int
2347
2348
2349          val  SameDrawable:  Drawable  ->  Drawable  ->  bool
2350
2351
2352Description:
2353
2354       These functions return the X identifiers for the corresponding ML value.  In X, unique num-
2355       bers are generated for client resources such as windows and pixmaps, and these numbers
2356       are sent in the messages between the X server and the client to identify the resources.
2357
2358       If two resources have the same X identifier,  then they are the same resource.  Thus the
2359       convenience function SameDrawable is defined as:
2360
2361
2362          fun  SameDrawable  a  b  =  (DrawableID  a  =  DrawableID  b)
2363
236434                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
2365
2366
2367
23682.4.9       DefaultVisual
2369
2370
2371
2372Types:
2373
2374
2375          val  DefaultVisual:  unit  ->  Visual
2376
2377
2378Syntax:
2379
2380
2381          val  visual  =  DefaultVisual()  ;
2382
2383
2384Description:
2385
2386       The DefaultVisual function returns the default visual type for the screen.
23872.4.10        DisplayConnected
2388
2389
2390
2391Types:
2392
2393
2394          val  DisplayConnected:  unit  ->  bool
2395
2396
2397Description:
2398
2399       In release 1 of the X Window interface in Poly/ML, the display is connected to automati-
2400       cally when Poly/ML starts.  If -noDisplay was specified on the command line, or Poly/ML
2401       cannot connect to the display for whatever reason, then Poly/ML runs without a display
2402       connected.  An attempt to use an X function that needs the display will raise exception
2403       XWindows with "Display not connected" .  To allow programmers to avoid this situation,
2404       this function returns true only if the display is connected, and false otherwise.
24052.4.11        DisplayHeight,  DisplayHeightMM,  DisplayWidth,
2406
2407              DisplayWidthMM
2408
2409
2410
2411Types:
2412
2413
2414          val  DisplayHeight:     unit  ->  int
2415          val  DisplayHeightMM:  unit  ->  int
2416          val  DisplayWidth:      unit  ->  int
2417          val  DisplayWidthMM:   unit  ->  int
2418
2419
2420Syntax:
2421
2422
2423          val  height  =  DisplayHeight()  ;
2424          val  height  =  DisplayHeightMM()  ;
2425          val  width   =  DisplayWidth()  ;
2426          val  width   =  DisplayWidthMM()  ;
2427
2428
2429Description:
2430
2431       The DisplayHeight function returns the height of the specified screen in pixels.
2432
2433       The DisplayHeightMM function returns the height of the screen in millimeters.
2434
2435       The DisplayWidth function returns the width of the screen in pixels.
2436
2437       The DisplayWidthMM function returns the width of the specified screen in millimeters.
2438
2439cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        35
2440
2441
2442
24432.4.12        DisplayPlanes
2444
2445
2446
2447Types:
2448
2449
2450          val  DisplayPlanes:  unit  ->  int
2451
2452
2453Syntax:
2454
2455
2456          val  planes  =  DisplayPlanes()  ;
2457
2458
2459Description:
2460
2461       The DisplayPlanes function returns the depth of the root window of the screen.
24622.4.13        DisplayString
2463
2464
2465
2466Types:
2467
2468
2469          val  DisplayString:  unit  ->  string
2470
2471
2472Syntax:
2473
2474
2475          val  s  =  DisplayString()  ;
2476
2477
2478Description:
2479
2480       The DisplayString function returns the string that was passed to XOpenDisplay when
2481       the current display was opened.
24822.4.14        DoesBackingStore
2483
2484
2485
2486Types:
2487
2488
2489          val  DoesBackingStore:  unit  ->  BackingStore
2490
2491
2492Syntax:
2493
2494
2495          val  bs  =  DoesBackingStore()  ;
2496
2497
2498Argument Type:
2499
2500
2501          datatype  BackingStore  =  NotUseful  |  WhenMapped  |  Always
2502
2503
2504Description:
2505
2506       The  DoesBackingStore  function  returns  WhenMapped,  NotUseful,  or  Always,
2507       which indicate whether the screen supports backing stores.
2508
250936                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
2510
2511
2512
25132.4.15        DoesSaveUnders
2514
2515
2516
2517Types:
2518
2519
2520          val  DoesSaveUnders:  unit  ->  bool
2521
2522
2523Syntax:
2524
2525
2526          val  su  =  DoesSaveUnders()  ;
2527
2528
2529Description:
2530
2531       The  DoesSaveUnders  function  returns  a  bool  indicating  whether  the  screen  supports
2532       save unders.
25332.4.16        EventMaskOfScreen
2534
2535
2536
2537Types:
2538
2539
2540          val  EventMaskOfScreen:  unit  ->  EventMask  list
2541
2542
2543Syntax:
2544
2545
2546          val  mask  =  EventMaskOfScreen()  ;
2547
2548
2549Description:
2550
2551       The EventMaskOfScreen function returns the root event mask of the root window for
2552       the screen at connection setup.
25532.4.17        MinCmapsOfScreen
2554
2555
2556
2557Types:
2558
2559
2560          val  MinCmapsOfScreen:   unit  ->  int
2561
2562
2563Syntax:
2564
2565
2566          val  n  =  MinCmapsOfScreen()  ;
2567
2568
2569Description:
2570
2571       The MinCmapsOfScreen function returns the minimum number of installed colormaps
2572       supported by the screen.
2573
2574cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        37
2575
2576
2577
25782.4.18        MaxCmapsOfScreen
2579
2580
2581
2582Types:
2583
2584
2585          val  MaxCmapsOfScreen:   unit  ->  int
2586
2587
2588Syntax:
2589
2590
2591          val  n  =  MaxCmapsOfScreen()  ;
2592
2593
2594Description:
2595
2596       The MaxCmapsOfScreen function returns the maximum number of installed colormaps
2597       supported by the screen.
25982.4.19        NoColormap,  NoCursor,  NoDrawable,  NoFont,  NoVisual,
2599
2600              ParentRelative,  CopyFromParentDrawable,
2601
2602              CopyFromParentVisual,  PointerWindow,  InputFocus,
2603
2604              PointerRoot
2605
2606
2607
2608Types:
2609
2610
2611          val  NoColormap:                   Colormap
2612          val  NoCursor:                      Cursor
2613          val  NoDrawable:                   Drawable
2614          val  NoFont:                         Font
2615          val  NoVisual:                      Visual
2616          val  ParentRelative:             Drawable
2617          val  CopyFromParentDrawable:  Drawable
2618          val  CopyFromParentVisual:     Visual
2619          val  PointerWindow:               Drawable
2620          val  InputFocus:                   Drawable
2621          val  PointerRoot:                 Drawable
2622
2623
2624Description:
2625
2626       These names refer to constant values of the indicated type that may be used instead of
2627       passing a real, live instance of one of these types.  Typically they are used to indicate that
2628       some default action should take place.  For example, setting the background pixmap of a
2629       window to ParentRelative specifies that the background pixmap of the window's parent
2630       is to be used.
26312.4.20        ProtocolRevision
2632
2633
2634
2635Types:
2636
2637
2638          val  ProtocolRevision:  unit  ->  int
2639
2640
2641Syntax:
2642
2643
2644          val  rev  =  ProtocolRevision()  ;
2645
264638                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
2647
2648
2649
2650Description:
2651
2652       The  ProtocolRevision  function  returns  the  minor  protocol  revision  number  of  the  X
2653       server.
26542.4.21        ProtocolVersion
2655
2656
2657
2658Types:
2659
2660
2661          val  ProtocolVersion:  unit  ->  int
2662
2663
2664Syntax:
2665
2666
2667          val  v  =  ProtocolVersion()  ;
2668
2669
2670Description:
2671
2672       The ProtocolVersion function returns the major version number (11) of the X protocol
2673       associated with the connected display.
26742.4.22        RootWindow
2675
2676
2677
2678Types:
2679
2680
2681          val  RootWindow:  unit  ->  Drawable
2682
2683
2684Syntax:
2685
2686
2687          val  root  =  RootWindow()  ;
2688
2689
2690Description:
2691
2692       The RootWindow function returns the root window.
26932.4.23        ServerVendor
2694
2695
2696
2697Types:
2698
2699
2700          val  ServerVendor:  unit  ->  string
2701
2702
2703Syntax:
2704
2705
2706          val  s  =  ServerVendor()  ;
2707
2708
2709Description:
2710
2711       The ServerVendor function returns a string that provides some identification of the owner
2712       of the X server implementation.
2713
2714cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        39
2715
2716
2717
27182.4.24        VendorRelease
2719
2720
2721
2722Types:
2723
2724
2725          val  VendorRelease:  unit  ->  int
2726
2727
2728Syntax:
2729
2730
2731          val  n  =  VendorRelease()  ;
2732
2733
2734Description:
2735
2736       The  VendorRelease  function  returns  a  number  related  to  a  vendor's  release  of  the  X
2737       server.
27382.4.25        XQueryBestCursor,  XQueryBestSize,  XQueryBestStipple,
2739
2740              XQueryBestTile
2741
2742
2743
2744Types:
2745
2746
2747          val  XQueryBestSize:  ShapeClass  ->  Drawable  ->  XRectangle  ->  XRectangle
2748
2749
2750          val  XQueryBestCursor:   Drawable  ->  XRectangle  ->  XRectangle
2751          val  XQueryBestStipple:  Drawable  ->  XRectangle  ->  XRectangle
2752          val  XQueryBestTile:      Drawable  ->  XRectangle  ->  XRectangle
2753
2754
2755Syntax:
2756
2757
2758          val  bestSize  =  XQueryBestCursor   whichScreen  area  ;
2759          val  bestSize  =  XQueryBestSize      whichScreen  class  area  ;
2760          val  bestSize  =  XQueryBestStipple  whichScreen  area  ;
2761          val  bestSize  =  XQueryBestTile      whichScreen  area  ;
2762
2763
2764Argument Type:
2765
2766
2767          datatype  ShapeClass  =  CursorShape  |  TileShape  |  StippleShape
2768
2769
2770Arguments:
2771
2772
2773       class                      Specifies the class that you are interested in.  You can pass TileShape,
2774                                  CursorShape, or StippleShape.
2775
2776       whichScreen                Drawable to determine which screen.
2777
2778       area                       Specifies the width and height.
2779
2780       bestSize                   Returns  the  width  and  height  of  the  object  best  supported  by  the
2781                                  display hardware.
2782
278340                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
2784
2785
2786
2787Description:
2788
2789       The XQueryBestSize function returns the best or closest size to the specified size.  For
2790       CursorShape, this is the largest size that can be fully displayed on the screen specified by
2791       whichScreen.  For TileShape, this is the size that can be tiled fastest.  For StippleShape,
2792       this  is  the  size  that  can  be  stippled  fastest.  For  CursorShape,  the  drawable  indicates
2793       the desired screen.  For TileShape and StippleShape, the drawable indicates the screen
2794       and possibly the window class and depth.  An InputOnly window cannot be used as the
2795       drawable for TileShape or StippleShape, or a BadMatch error results.
2796
2797       The  XQueryBestTile  function  returns  the  best  or  closest  size,  that  is,  the  size  that
2798       can be tiled fastest on the screen specified by d.  The drawable indicates the screen and
2799       possibly the window class and depth.  If an InputOnly window is used as the drawable, a
2800       BadMatch error results.
2801
2802       The XQueryBestStipple function returns the best or closest size, that is, the size that
2803       can be stippled fastest on the screen specified by whichScreen.  The drawable indicates the
2804       screen and possibly the window class and depth.  If an InputOnly window is used as the
2805       drawable, a BadMatch error results.
2806
2807       Some displays allow larger cursors than other displays.  The XQueryBestCursor function
2808       provides a way to find out what size cursors are actually possible on the display.  It returns
2809       the  largest  size  that  can  be  displayed.   Applications  should  be  prepared  to  use  smaller
2810       cursors on displays that cannot support large ones.
2811
28122.5       Drawing  Primitives
2813
2814
2815
28162.5.1       XClearArea,  XClearWindow
2817
2818
2819
2820Types:
2821
2822
2823          val  XClearArea:     Drawable  ->  XRectangle  ->  bool  ->  unit
2824          val  XClearWindow:  Drawable  ->  unit
2825
2826
2827Syntax:
2828
2829
2830          XClearArea  w  area  exposures  ;
2831          XClearWindow  w  ;
2832
2833
2834Arguments:
2835
2836
2837       exposures              Specifies a bool that indicates if Expose events are to be generated.
2838
2839       area                   Specifies the area to be cleared in the window.
2840
2841       w                      Specifies the window.
2842
2843
2844Description:
2845
2846       The XClearArea function paints a rectangular area in the specified window according to
2847       the specified dimensions with the window's background pixel or pixmap.  The subwindow-
2848       mode  effectively  is  ClipByChildren.   If  width  is  zero,  it  is  replaced  with  the  current
2849       width of the window minus x.  If height is zero, it is replaced with the current height of
2850       the window minus y.  If the window has a defined background tile, the rectangle clipped
2851       by any children is filled with this tile.  If the window has background NoDrawable, the
2852
2853cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        41
2854
2855
2856
2857       contents of the window are not changed.  In either case, if exposures is true, one or more
2858       Expose events are generated for regions of the rectangle that are either visible or are being
2859       retained in a backing store.  If you specify a window whose class is InputOnlyClass, a
2860       BadMatch error results.
2861
2862       The XClearWindow function clears the entire area in the specified window and is equiv-
2863       alent to XClearArea  w  empty  false .  If the window has a defined background tile, the
2864       rectangle is tiled with a plane-mask of all ones and GXcopy function.  If the window has
2865       background NoDrawable, the contents of the window are not changed.  If you specify a
2866       window whose class is InputOnlyClass, a BadMatch error results.
28672.5.2       XCopyArea,  XCopyPlane
2868
2869
2870
2871Types:
2872
2873
2874          val  XCopyArea:   Drawable  ->  Drawable  ->  GC  ->
2875                                 XPoint  ->  XRectangle  ->  unit
2876
2877
2878          val  XCopyPlane:  Drawable  ->  Drawable  ->  GC  ->
2879                                 XPoint  ->  XRectangle  ->  int  ->  unit
2880
2881
2882Syntax:
2883
2884
2885          XCopyArea   src  dest  gc  srcPoint  destArea  ;
2886          XCopyPlane  src  dest  gc  srcPoint  destArea  plane  ;
2887
2888
2889Arguments:
2890
2891
2892       destArea              Specifies the destination rectangle
2893
2894       gc                    Specifies the GC.
2895
2896       plane                 Specifies the bit plane.  You must set exactly one bit to 1.
2897
2898       src                   Specifies the source
2899
2900       dest                  and destination drawables to be combined.
2901
2902       srcPoint              Specifies the upper-left corner of the source rectangle.
2903
2904
2905Description:
2906
2907       The XCopyArea function combines the specified rectangle of src with the specified rect-
2908       angle of dest.  The drawables must have the same root and depth, or a BadMatch error
2909       results.
2910
2911       If regions of the source rectangle are obscured and have not been retained in backing store
2912       or if regions outside the boundaries of the source drawable are specified, those regions are
2913       not  copied.   Instead,  the  following  occurs  on  all  corresponding  destination  regions  that
2914       are either visible or are retained in backing store.  If the destination is a window with a
2915       background other than NoDrawable, corresponding regions of the destination are tiled
2916       with that background (with plane-mask of all ones and GXcopy function).  Regardless of
2917       tiling or whether the destination is a window or a pixmap, if graphics-exposures is true,
2918       then GraphicsExpose events for all corresponding destination regions are generated.  If
2919       graphics-exposures is true but no GraphicsExpose events are generated, a NoExpose
2920       event is generated.  Note that by default graphics-exposures is true in new GCs.
2921
292242                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
2923
2924
2925
2926       This  function  uses  these  GC  components:   function,  plane-mask,  subwindow-mode,
2927       graphics-exposures, clip-origin, and clip-mask.
2928
2929       The XCopyPlane function uses a single bit plane of the specified source rectangle com-
2930       bined with the specified GC to modify the specified rectangle of dest.  The drawables must
2931       have the same root but need not have the same depth.  If the drawables do not have the
2932       same root, a BadMatch error results.  If plane does not have exactly one bit set to 1 and
2933       is less than 2  ^  n , where n is the depth of the drawables, a BadValue error results.
2934
2935       Effectively, XCopyPlane forms a pixmap of the same depth as the rectangle of dest and
2936       with  a  size  specified  by  the  source  region.  It  uses  the  foreground/background  pixels  in
2937       the GC (foreground everywhere the bit plane in src contains a bit set to 1, background
2938       everywhere the bit plane in src contains a bit set to 0) and the equivalent of a CopyArea
2939       protocol  request  is  performed  with  all  the  same  exposure  semantics.   This  can  also  be
2940       thought of as using the specified region of the source bit plane as a stipple with a fill-style
2941       of FillOpaqueStippled for filling a rectangular area of the destination.
2942
2943       This function uses these GC components:  function, plane-mask, foreground, background,
2944       subwindow-mode, graphics-exposures, clip-origin, and clip-mask.
29452.5.3       XDrawArc,  XDrawArcs
2946
2947
2948
2949Types:
2950
2951
2952          val  XDrawArc:                Drawable  ->  GC  ->  XArc  ->  unit
2953          val  XDrawArcs:               Drawable  ->  GC  ->  XArc  list  ->  unit
2954
2955
2956Syntax:
2957
2958
2959          XDrawArc  d  gc  (XArc  (area,angle1,angle2))  ;
2960          XDrawArcs  d  gc  arcs  ;
2961
2962
2963Arguments:
2964
2965
2966       angle1            Specifies the start of the arc relative to the three-o'clock position from the
2967                         center, in units of degrees * 64.
2968
2969       angle2            Specifies  the  path  and  extent  of  the  arc  relative  to  the  start  of  the  arc,  in
2970                         units of degrees * 64.
2971
2972       arcs              Specifies a list of arcs.
2973
2974       d                 Specifies the drawable.
2975
2976       gc                Specifies the GC.
2977
2978       area              Specifies the bounding rectangle of the area.  The x and y coordinates, which
2979                         are relative to the origin of the drawable, specify the upper-left corner of the
2980                         bounding rectangle.  The width and height are the major and minor axes of
2981                         the arc.
2982
2983
2984Argument Type:
2985
2986
2987          datatype  XArc  =  XArc  of  XRectangle  *  int  *  int
2988
2989cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        43
2990
2991
2992
2993Description:
2994
2995       XDrawArc  draws  a  single  circular  or  elliptical  arc,  and  XDrawArcs  draws  multiple
2996       circular or elliptical arcs.  Each arc is specified by a rectangle and two angles.  The center
2997       of  the  circle  or  ellipse  is  the  center  of  the  rectangle,  and  the  major  and  minor  axes  are
2998       specified by the width and height.  Positive angles indicate counterclockwise motion, and
2999       negative angles indicate clockwise motion.  If the magnitude of angle2 is greater than 360
3000       degrees, XDrawArc or XDrawArcs truncates it to 360 degrees.
3001
3002       For an arc specified as
3003
3004
3005             (XArc  (Area  {x,y,width,height}),angle1,angle2),
3006
3007
3008       the origin of the major and minor axes is at
3009
3010
3011             (x  +  width  div  2,y  +  height  div  2),
3012
3013
3014       and the infinitely thin path describing the entire circle or ellipse intersects the horizontal
3015       axis at
3016
3017
3018             (x,y  +  height  div  2)  and   (x  +  width,y  +  height  div  2)
3019
3020
3021       and intersects the vertical axis at
3022
3023
3024             (x  +  width  div  2,y)  and  (x  +  width  div  2,y  +  height)
3025
3026
3027       These coordinates can be fractional and so are not truncated to discrete coordinates.  The
3028       path should be defined by the ideal mathematical path.  For a wide line with line-width
3029       lw, the bounding outlines for filling are given by the two infinitely thin paths consisting of
3030       all points whose perpendicular distance from the path of the circle/ellipse is equal to lw/2
3031       (which may be a fractional value).  The cap-style and join-style are applied the same as for
3032       a line corresponding to the tangent of the circle/ellipse at the endpoint.
3033
3034       For an arc specified as
3035
3036
3037             (XArc  (Area  {x,y,width,height}),angle1,angle2),
3038
3039
3040       the angles must be specified in the effectively skewed coordinate system of the ellipse (for
3041       a circle, the angles and coordinate systems are identical).  The relationship between these
3042       angles and angles expressed in the normal coordinate system of the screen (as measured
3043       with a protractor) is as follows:
3044
3045
3046             skewed-angle  =  atan  (tan  normal-angle  *  width  div  height)  +  adjust
3047
3048
3049       The skewed-angle and normal-angle are expressed in radians (rather than in degrees scaled
3050       by 64) in the range (0,2*pi) and where atan returns a value in the range ("pi/2,pi/2) and
3051       adjust is:
3052
3053       0              for normal-angle in the range (0,pi/2)
3054
3055       pi             for normal-angle in the range (pi/2,3*pi/2)
3056
3057       2*pi           for normal-angle in the range (3*pi/2,2*pi)
3058
3059       For any given arc,  XDrawArc and XDrawArcs do not draw a pixel more than once.
3060       If two arcs join correctly and if the line-width is greater than zero and the arcs intersect,
3061       XDrawArc and XDrawArcs do not draw a pixel more than once.  Otherwise, the in-
3062       tersecting pixels of intersecting arcs are drawn multiple times.  Specifying an arc with one
3063
306444                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
3065
3066
3067
3068       endpoint and a clockwise extent draws the same pixels as specifying the other endpoint
3069       and an equivalent counterclockwise extent, except as it affects joins.
3070
3071       If the last point in one arc coincides with the first point in the following arc, the two arcs
3072       will  join  correctly.  If  the  first  point  in  the  first  arc  coincides  with  the  last  point  in  the
3073       last arc, the two arcs will join correctly.  By specifying one axis to be zero, a horizontal
3074       or vertical line can be drawn.  Angles are computed based solely on the coordinate system
3075       and ignore the aspect ratio.
3076
3077       Both  functions  use  these  GC  components:   foreground,  background,  tile,  stipple,  tile-
3078       stipple-origin, dash-offset, dash-list, function, plane-mask, line-width, line-style, cap-style,
3079       join-style, fill-style, subwindow-mode, clip-origin, and clip-mask.
30802.5.4       XDrawImageString,  XDrawImageString16
3081
3082
3083
3084Types:
3085
3086
3087          val  XDrawImageString:     Drawable  ->  GC  ->  XPoint  ->  string     ->  unit
3088          val  XDrawImageString16:  Drawable  ->  GC  ->  XPoint  ->  int  list  ->  unit
3089
3090
3091Syntax:
3092
3093
3094          XDrawImageString  d  gc  point  string  ;
3095          XDrawImageString16  d  gc  point  bigChars  ;
3096
3097
3098Arguments:
3099
3100
3101       d                     Specifies the drawable.
3102
3103       gc                    Specifies the GC.
3104
3105       string                Specifies the character string.
3106
3107       bigChars              Specifies the character string as a list of 16 bit integers.
3108
3109       point                 Specifies the x and y coordinates, which are relative to the origin of the
3110                             specified drawable and define the origin of the first character.
3111
3112
3113Description:
3114
3115       The XDrawImageString16 function is similar to XDrawImageString except that it
3116       uses 16-bit characters.  Both functions also use both the foreground and background pixels
3117       of the GC in the destination.
3118
3119       The effect is first to fill a destination rectangle with the background pixel defined in the
3120       GC and then to paint the text with the foreground pixel.  The upper-left corner of the
3121       filled rectangle is at (x,y-ascent), the width is overall, and the height is ascent+descent.
3122       The overall,  ascent,  and descent are as would be returned by XTextExtents using the
3123       font in the gc and string.  The function and fill-style defined in the GC are ignored for
3124       these functions.  The effective function is GXcopy, and the effective fill-style is FillSolid.
3125
3126       For fonts defined with 16-bit matrix indexing and used with XDrawImageString, each
3127       8-bit character in the string is used to form the least-significant 8-bits of the index,  the
3128       most-significant bits are taken to be zero.
3129
3130       Both  functions  use  these  GC  components:   plane-mask,  foreground,  background,  font,
3131       subwindow-mode, clip-origin, and clip-mask.
3132
3133cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        45
3134
3135
3136
31372.5.5       XDrawLine,  XDrawLines,  XDrawSegments
3138
3139
3140
3141Types:
3142
3143          val  XDrawLine:       Drawable  ->  GC  ->  XPoint  ->  XPoint  ->  unit
3144          val  XDrawLines:      Drawable  ->  GC  ->  XPoint  list  ->  CoordMode  ->  unit
3145          val  XDrawSegments:  Drawable  ->  GC  ->  (XPoint  *  XPoint)  list  ->  unit
3146
3147
3148Syntax:
3149
3150          XDrawLine  d  gc  point1  point2  ;
3151          XDrawLines  d  gc  points  mode  ;
3152          XDrawSegments  d  gc  segments  ;
3153
3154
3155Arguments:
3156
3157       d                     Specifies the drawable.
3158
3159       gc                    Specifies the GC.
3160
3161       mode                  Specifies the coordinate mode.  You can pass CoordModeOrigin or Co-
3162                             ordModePrevious.
3163
3164       points                Specifies a list of points.
3165
3166       segments              Specifies a list of pairs of points.
3167
3168       point1                Specifies the points
3169
3170       point2                to be connected.
3171
3172Argument Type:
3173
3174          datatype  CoordMode  =  CoordModeOrigin  |  CoordModePrevious
3175
3176
3177Description:
3178
3179       The XDrawLine function uses the components of the specified GC to draw a line between
3180       the specified set of points (x1,y1) and (x2,y2).  It does not perform joining at coincident
3181       endpoints.  For any given line, XDrawLine does not draw a pixel more than once.  If lines
3182       intersect, the intersecting pixels are drawn multiple times.
3183
3184       The XDrawLines function uses the components of the specified GC to draw npoints-1
3185       lines between each pair of points (point[i],point[i+1]) in the list of XPoint structures.  It
3186       draws the lines in the same order as the list.  The lines join correctly at all intermediate
3187       points, and if the first and last points coincide, the first and last lines also join correctly.
3188       For  any  given  line,  XDrawLines  does  not  draw  a  pixel  more  than  once.  If  thin  (zero
3189       line-width) lines intersect, the intersecting pixels are drawn multiple times.  If wide lines
3190       intersect, the intersecting pixels are drawn only once, as though the entire PolyLine pro-
3191       tocol  request  were  a  single,  filled  shape.   CoordModeOrigin  treats  all  coordinates  as
3192       relative to the origin, and CoordModePrevious treats all coordinates after the first as
3193       relative to the previous point.
3194
3195       The  XDrawSegments  function  draws  multiple,  unconnected  lines.   For  each  segment,
3196       XDrawSegments draws a line between (x1,y1) and (x2,y2).  It draws the lines in the same
3197       order as the list of pairs of points and does not perform joining at coincident endpoints.
3198       For  any  given  line,  XDrawSegments  does  not  draw  a  pixel  more  than  once.   If  lines
3199       intersect, the intersecting pixels are drawn multiple times.
3200
3201       All three functions use these GC components:  foreground, background, tile, stipple, tile-
3202       stipple-origin, dash-offset, dash-list, function, plane-mask, line-width, line-style, cap-style,
3203       fill-style,  subwindow-mode,  clip-origin,  and  clip-mask.  The  XDrawLines  function  also
3204       uses the join-style GC component.
3205
320646                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
3207
3208
3209
32102.5.6       XDrawPoint,  XDrawPoints
3211
3212
3213
3214Types:
3215
3216
3217          val  XDrawPoint:   Drawable  ->  GC  ->  XPoint  ->  unit
3218          val  XDrawPoints:  Drawable  ->  GC  ->  XPoint  list  ->  CoordMode  ->  unit
3219
3220
3221Syntax:
3222
3223
3224          XDrawPoint  d  gc  point  ;
3225          XDrawPoints  d  gc  points  mode  ;
3226
3227
3228Arguments:
3229
3230
3231       d                Specifies the drawable.
3232
3233       gc               Specifies the GC.
3234
3235       points           Specifies a list of points.
3236
3237       point            Specifies the point.
3238
3239       mode             Specifies the coordinate mode.  You can pass CoordModeOrigin or Coord-
3240                        ModePrevious.
3241
3242
3243Argument Type:
3244
3245
3246          datatype  CoordMode  =  CoordModeOrigin  |  CoordModePrevious
3247
3248
3249Description:
3250
3251       The  XDrawPoint  function  uses  the  foreground  pixel  and  function  components  of  the
3252       GC  to  draw  a  single  point  into  the  specified  drawable;  XDrawPoints  draws  multiple
3253       points this way.  CoordModeOrigin treats all coordinates as relative to the origin, and
3254       CoordModePrevious  treats  all  coordinates  after  the  first  as  relative  to  the  previous
3255       point.  XDrawPoints draws the points in the same order as the list.
3256
3257       Both functions use these GC components:  function, plane-mask, foreground, subwindow-
3258       mode, clip-origin, and clip-mask.
32592.5.7       XDrawRectangle,  XDrawRectangles
3260
3261
3262
3263Types:
3264
3265
3266          val  XDrawRectangle:       Drawable  ->  GC  ->  XRectangle  ->  unit
3267          val  XDrawRectangles:      Drawable  ->  GC  ->  XRectangle  list  ->  unit
3268
3269
3270Syntax:
3271
3272
3273          XDrawRectangle  d  gc  (Area{x=x,y=y,w=width,h=height})  ;
3274          XDrawRectangles  d  gc  rectangles  ;
3275
3276
3277Arguments:
3278
3279
3280       d                      Specifies the drawable.
3281
3282cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        47
3283
3284
3285
3286       gc                     Specifies the GC.
3287
3288       rectangles             Specifies a list of rectangles.
3289
3290       x,y                    Specifies the upper-left corner of the rectangle.
3291
3292       width                  Specifies the dimensions
3293
3294       height                 of the rectangle.
3295
3296
3297Description:
3298
3299       The XDrawRectangle and XDrawRectangles functions draw the outlines of the spec-
3300       ified rectangle or rectangles as if a five-point PolyLine protocol request were specified for
3301       each rectangle:
3302
3303
3304             [(x,y),(x+width,y),(x+width,y+height),(x,y+height),(x,y)]
3305
3306
3307       For the specified rectangle or rectangles,  these functions do not draw a pixel more than
3308       once.  XDrawRectangles draws the rectangles in the same order as the list.  If rectangles
3309       intersect, the intersecting pixels are drawn multiple times.
3310
3311       Both  functions  use  these  GC  components:   foreground,  background,  tile,  stipple,  tile-
3312       stipple-origin, dash-offset, dash-list, function, plane-mask, line-width, line-style, join-style,
3313       fill-style, subwindow-mode, clip-origin, and clip-mask.
33142.5.8       XDrawString,  XDrawString16
3315
3316
3317
3318Types:
3319
3320
3321          val  XDrawString:     Drawable  ->  GC  ->  XPoint  ->  string     ->  unit
3322          val  XDrawString16:  Drawable  ->  GC  ->  XPoint  ->  int  list  ->  unit
3323
3324
3325Syntax:
3326
3327
3328          XDrawString  d  gc  point  string  ;
3329          XDrawString16  d  gc  point  bigChars  ;
3330
3331
3332Arguments:
3333
3334
3335       d                     Specifies the drawable.
3336
3337       gc                    Specifies the GC.
3338
3339       string                Specifies the character string.
3340
3341       bigChars              Specifies the character string as a list of 16-bit integers.
3342
3343       point                 Specifies the x and y coordinates, which are relative to the origin of the
3344                             specified drawable and define the origin of the first character.
3345
3346
3347Description:
3348
3349       Each character image, as defined by the font in the GC, is treated as an additional mask
3350       for a fill operation on the drawable.  The drawable is modified only where the font character
3351       has a bit set to 1.
3352
3353       For fonts with 2-byte indexing rather than 16-bit linear indexing, pass byte 1 as the most-
3354       significant 8-bits and byte 2 as the least-significant 8-bits in the bigChars argument.
3355
335648                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
3357
3358
3359
3360       For  fonts  defined  with  16-bit  linear  indexing  and  used  with  XDrawString,  each  8-bit
3361       character in the string is used to form the least-significant 8-bits of the index, the most-
3362       significant bits are taken to be zero.
3363
3364       For fonts defined with 2-byte matrix indexing and used with XDrawString,  each 8-bit
3365       character in the string is used to form byte 2 of the index, byte 1 is taken to be zero.
3366
3367       Both  functions  use  these  GC  components:   foreground,  background,  tile,  stipple,  tile-
3368       stipple-origin, function, plane-mask, fill-style, font, subwindow-mode, clip-origin, and clip-
3369       mask.
33702.5.9       XDrawText,  XDrawText16
3371
3372
3373
3374Types:
3375
3376
3377          val  XDrawText:     Drawable  ->  GC  ->  XPoint  ->  XTextItem  list  ->  unit
3378          val  XDrawText16:  Drawable  ->  GC  ->  XPoint  ->  XTextItem16  list  ->  unit
3379
3380
3381Syntax:
3382
3383
3384          XDrawText  d  gc  point  items  ;
3385          XDrawText16  d  gc  point  items  ;
3386
3387
3388Arguments:
3389
3390
3391       d               Specifies the drawable.
3392
3393       gc              Specifies the GC.
3394
3395       point           Specifies the x and y coordinates, which are relative to the origin of the specified
3396                       drawable and define the origin of the first character.
3397
3398       items           Specifies a list of text items.
3399
3400
3401Argument Type:
3402
3403
3404          datatype  XTextItem     =  XTextItem     of  string     *  int  *  Font
3405          datatype  XTextItem16  =  XTextItem16  of  int  list  *  int  *  Font
3406
3407
3408Argument Description:
3409
3410       If the font member is not NoFont, the font is changed before printing and also is stored
3411       in the GC. If an error was generated during text drawing, the previous items may have
3412       been drawn.  The baseline of the characters are drawn starting at the x and y coordinates
3413       that you pass in the text drawing functions.
3414
3415       For example, consider the background rectangle drawn by XDrawImageString.  If you
3416       want the upper-left corner of the background rectangle to be at pixel coordinate (x,y), pass
3417       the (x,y+ascent) as the baseline origin coordinates to the text functions.  The ascent is the
3418       font ascent, as given in the XFontStruct structure.  If you want the lower-left corner of
3419       the background rectangle to be at pixel coordinate (x,y), pass the (x,y-descent+1) as the
3420       baseline origin coordinates to the text functions.  The descent is the font descent, as given
3421       in the XFontStruct structure.
3422
3423cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        49
3424
3425
3426
3427Description:
3428
3429       The XDrawText16 function is similar to XDrawText except that it uses 16-bit charac-
3430       ters.  Both functions allow complex spacing and font shifts between counted strings.
3431
3432       Each text item is processed in turn.  A font member other than NoFont in an item causes
3433       the font to be stored in the GC and used for subsequent text.  A text element delta specifies
3434       an additional change in the position along the x axis before the string is drawn.  The delta
3435       is always added to the character origin and is not dependent on any characteristics of the
3436       font.  Each character image, as defined by the font in the GC, is treated as an additional
3437       mask for a fill operation on the drawable.  The drawable is modified only where the font
3438       character has a bit set to 1.  If a text item generates a BadFont error, the previous text
3439       items may have been drawn.
3440
3441       For fonts with 2-byte indexing rather than 16-bit linear indexing, pass byte 1 as the high
3442       order 8-bits and byte 2 as the low order 8-bits in the XTextItem16 list.
3443
3444       Both  functions  use  these  GC  components:   foreground,  background,  tile,  stipple,  tile-
3445       stipple-origin, function, plane-mask, fill-style, font, subwindow-mode, clip-origin, and clip-
3446       mask.
34472.5.10        XFillArc,  XFillArcs,  XFillPolygon,  XFillRectangle,
3448
3449              XFillRectangles
3450
3451
3452
3453Types:
3454
3455
3456          val  XFillArc:            Drawable  ->  GC  ->  XArc  ->  unit
3457          val  XFillArcs:          Drawable  ->  GC  ->  XArc  list  ->  unit
3458          val  XFillRectangle:   Drawable  ->  GC  ->  XRectangle  ->  unit
3459          val  XFillRectangles:  Drawable  ->  GC  ->  XRectangle  list  ->  unit
3460
3461
3462          val  XFillPolygon:  Drawable  ->  GC  ->
3463                                    XPoint  list  ->  PolyShape  ->  CoordMode  ->  unit
3464
3465
3466Syntax:
3467
3468
3469          XFillArc  d  gc  (XArc  (area,angle1,angle2))  ;
3470          XFillArcs  d  gc  arcs  ;
3471          XFillPolygon  d  gc  points  shape  mode  ;
3472          XFillRectangle  d  gc  (Area{x=x,y=y,w=width,h=height})  ;
3473          XFillRectangles  d  gc  rectangles  ;
3474
3475
3476Argument Type:
3477
3478
3479          datatype  PolyShape  =  Complex  |  Nonconvex  |  Convex
3480
3481
3482          datatype  CoordMode  =  CoordModeOrigin  |  CoordModePrevious
3483
3484
3485Arguments:
3486
3487
3488       d                      Specifies the drawable.
3489
3490       gc                     Specifies the GC.
3491
349250                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
3493
3494
3495
3496       area                   Specifies the bounding rectangle of the area.  The x and y coordinates,
3497                              which  are  relative  to  the  origin  of  the  drawable,  specify  the  upper-left
3498                              corner of the bounding rectangle.  The width and height are the major
3499                              and minor axes of the arc.
3500
3501       angle1                 Specifies the start of the arc relative to the three-o'clock position from
3502                              the center, in units of degrees * 64.
3503
3504       angle2                 Specifies the path and extent of the arc relative to the start of the arc,
3505                              in units of degrees * 64.
3506
3507       arcs                   Specifies a list of arcs.
3508
3509       points                 Specifies a list of points.
3510
3511       shape                  Specifies a shape that helps the server to improve performance.  You can
3512                              pass Complex, Convex, or Nonconvex.
3513
3514       mode                   Specifies  the  coordinate  mode.   You  can  pass  CoordModeOrigin  or
3515                              CoordModePrevious.
3516
3517       x,y                    Specifies the upper-left corner of the rectangle.
3518
3519       width                  Specifies the dimensions
3520
3521       height                 of the rectangle.
3522
3523       rectangles             Specifies a list of rectangles.
3524
3525
3526Description:
3527
3528       The XFillRectangle and XFillRectangles functions fill the specified rectangle or rect-
3529       angles as if a four-point FillPolygon protocol request were specified for each rectangle:
3530
3531
3532             [(x,y),(x+width,y),(x+width,y+height),(x,y+height)]
3533
3534
3535       Each function uses the x and y coordinates, width and height dimensions, and GC you
3536       specify.
3537
3538       XFillRectangles fills the rectangles in the same order as the list.  For any given rectangle,
3539       XFillRectangle and XFillRectangles do not draw a pixel more than once.  If rectangles
3540       intersect, the intersecting pixels are drawn multiple times.
3541
3542       Both  functions  use  these  GC  components:   foreground,  background,  tile,  stipple,  tile-
3543       stipple-origin, function, plane-mask, fill-style, subwindow-mode, clip-origin, and clip-mask.
3544
3545       XFillPolygon fills the region closed by the specified path.  The path is closed automati-
3546       cally if the last point in the list does not coincide with the first point.  XFillPolygon does
3547       not draw a pixel of the region more than once.  CoordModeOrigin treats all coordinates
3548       as relative to the origin, and CoordModePrevious treats all coordinates after the first
3549       as relative to the previous point.
3550
3551       Depending on the specified shape, the following occurs:
3552
3553
3554
3555              If shape is Complex, the path may self-intersect.  Note that contiguous coincident
3556              points in the path are not treated as self-intersection.
3557              If  shape  is  Convex,  for  every  pair  of  points  inside  the  polygon,  the  line  segment
3558              connecting  them  does  not  intersect  the  path.   If  known  by  the  client,  specifying
3559              Convex  can  improve  performance.   If  you  specify  Convex  for  a  path  that  is  not
3560              convex, the graphics results are undefined.
3561              If shape is Nonconvex, the path does not self-intersect, but the shape is not wholly
3562              convex.   If  known  by  the  client,  specifying  Nonconvex  instead  of  Complex  may
3563              improve  performance.   If  you  specify  Nonconvex  for  a  self-intersecting  path,  the
3564              graphics results are undefined.
3565
3566cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        51
3567
3568
3569
3570       The fill-rule of the GC controls the filling behavior of self-intersecting polygons.
3571
3572       This  function  uses  these  GC  components:   foreground,  background,  tile,  stipple,  tile-
3573       stipple-origin,  function,  plane-mask,  fill-style,  fill-rule,  subwindow-mode,  clip-origin,  and
3574       clip-mask.
3575
3576       For each arc,  XFillArc or XFillArcs fills the region closed by the infinitely thin path
3577       described by the specified arc and, depending on the arc-mode specified in the GC, one or
3578       two line segments.  For ArcChord, the single line segment joining the endpoints of the arc
3579       is used.  For ArcPieSlice, the two line segments joining the endpoints of the arc with the
3580       center point are used.  XFillArcs fills the arcs in the same order as the list.  For any given
3581       arc, XFillArc and XFillArcs do not draw a pixel more than once.  If regions intersect,
3582       the intersecting pixels are drawn multiple times.
3583
3584       Both  functions  use  these  GC  components:   foreground,  background,  tile,  stipple,  tile-
3585       stipple-origin, function, plane-mask, fill-style, arc-mode, subwindow-mode, clip-origin, and
3586       clip-mask.
3587
35882.6       Exceptions
3589
3590
3591
35922.6.1       Range
3593
3594
3595Types:
3596
3597
3598          exception  Range
3599
3600
3601Description:
3602
3603       Range is raised when an argument to a function is not inside the allowable range of values.
3604       There are many restricted ranges for function arguments.  In brief:
3605
3606       x and y coordinates must lie between "32768 and 32767 inclusive, width and height values
3607       must be between 0 and 65535 inclusive.
3608
3609       This   means   that   Rect  {top,left,bottom,right}   must   have   right  >=  left   and
3610       bottom  >=  top .  Similarly, Area  {x,y,w,h} must have w  >=  0 and h  >=  0 .
3611
3612       Where an XRectangle is used to pass width and height values only, the x and y members
3613       must both be 0.
36142.6.2       XWindows
3615
3616
3617
3618Types:
3619
3620
3621          exception  XWindows  of  string
3622
3623
3624Arguments:
3625
3626
3627       "Display not connected"                                            Attempt to use X functions with no dis-
3628                                                                          play connected.
3629
3630       "Non-existant resource"                                            Attempt to use a resource value from a
3631                                                                          previous session.
3632
363352                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
3634
3635
3636
3637       "Not a window"                                                     Attempt to use a pixmap Drawable as
3638                                                                          a window
3639
3640       "Not a pixmap"                                                     Attempt to use a window Drawable as
3641                                                                          a pixmap
3642
3643       "Handler mismatch"                                                 Attempt to send a message to a window
3644                                                                          handler when the window has had a new
3645                                                                          handler installed with XSetHandler.
3646
3647       "<functionName> failed"                                            Xlib  detected  an  error  condition  when
3648                                                                          executing <functionName>
3649
3650       "Bad<className> in <functionName>"                                 The  X  server  detected  an  error  con-
3651                                                                          dition  occurred  when  executing  <func-
3652                                                                          tionName>.     This   is   only   reported
3653                                                                          when running synchronously.  For exam-
3654                                                                          ple, "BadMatch in XChangeWindowAt-
3655                                                                          tributes" .
3656
3657
3658Description:
3659
3660       exception XWindows is raised when an Xlib function returns an error condition.
3661
36622.7       Event  Handling
3663
3664
3665
36662.7.1       IsCursorKey,  IsFunctionKey,  IsKeypadKey,
3667
3668            IsMiscFunctionKey,  IsModifierKey,  IsPFKey
3669
3670
3671
3672Types:
3673
3674
3675          val  IsCursorKey:          int  ->  bool
3676          val  IsFunctionKey:       int  ->  bool
3677          val  IsKeypadKey:          int  ->  bool
3678          val  IsMiscFunctionKey:  int  ->  bool
3679          val  IsModifierKey:       int  ->  bool
3680          val  IsPFKey:                int  ->  bool
3681
3682
3683Description:
3684
3685       The IsCursorKey function returns true if the specified KeySym is a cursor key.
3686
3687       The IsFunctionKey function returns true if the KeySym is a function key.
3688
3689       The IsKeypadKey function returns true if the specified KeySym is a keypad key.
3690
3691       The IsMiscFunctionKey function returns true if the specified KeySym is a miscellaneous
3692       function key.
3693
3694       The IsModifierKey function returns true if the specified KeySym is a modifier key.
3695
3696       The IsPFKey function returns true if the specified KeySym is a PF key.
36972.7.2       ShiftDown,  ControlDown
3698
3699
3700
3701Types:
3702
3703cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        53
3704
3705
3706
3707          val  ShiftDown:     Modifier  list  ->  bool
3708          val  ControlDown:  Modifier  list  ->  bool
3709
3710
3711Syntax:
3712
3713
3714          ShiftDown     modifiers
3715          ControlDown  modifiers
3716
3717
3718Arguments:
3719
3720
3721       modifiers             Specifies the modifiers from a key event
3722
3723
3724Description:
3725
3726       The ShiftDown convenience function returns true if ShiftMask is in the modifiers list,
3727       and false otherwise.  This indicates if the Shift key was pressed when the key event was
3728       generated.
3729
3730       The ControlDown convenience function returns true if ControlMask is in the modifiers
3731       list, and false otherwise.  This indicates if the Control key was pressed when the key event
3732       was generated.
37332.7.3       XLookupString,  NoSymbol
3734
3735
3736
3737Types:
3738
3739
3740          val  XLookupString:  int  ->  Modifier  list  ->  (string  *  int)
3741          val  NoSymbol:         int
3742
3743
3744Syntax:
3745
3746
3747          val  (string,keysym)  =  XLookupString  keycode  modifiers  ;
3748
3749
3750Arguments:
3751
3752
3753       keycode               Specifies the keycode from a key event
3754
3755       modifiers             Specifies the modifiers from a key event
3756
3757       string                Returns the string for that combination
3758
3759       keysym                Returns the keysym for that combination
3760
3761
3762Description:
3763
3764       The  XLookupString  function  translates  a  key  event  to  a  KeySym  and  a  string.   The
3765       KeySym  is  obtained  by  using  the  standard  interpretation  of  the  Shift,  Lock,  and  group
3766       modifiers as defined in the X Protocol specification.  If the KeySym has been rebound, the
3767       bound string will be returned.  Otherwise, the KeySym is mapped, if possible, to an ISO
3768       Latin-1  character  or  (if  the  Control  modifier  is  on)  to  an  ASCII  control  character,  and
3769       that character is returned.  If no KeySym is defined for keycode, the KeySym returned is
3770       NoSymbol.
3771
377254                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
3773
3774
3775
37762.7.4       XSelectInput
3777
3778
3779
3780Types:
3781
3782
3783          val  XSelectInput:  Drawable  ->  EventMask  list  ->  unit
3784
3785
3786Syntax:
3787
3788
3789          XSelectInput  w  events  ;
3790
3791
3792Arguments:
3793
3794
3795       events            Specifies the list of events you wish to handle.
3796
3797       w                 Specifies the window.
3798
3799
3800Argument Type:
3801
3802
3803          datatype  EventMask  =  KeyPressMask                   |  KeyReleaseMask
3804                                     |  ButtonPressMask               |  ButtonReleaseMask
3805                                     |  EnterWindowMask               |  LeaveWindowMask
3806                                     |  PointerMotionMask            |  PointerMotionHintMask
3807                                     |  Button1MotionMask            |  Button2MotionMask
3808                                     |  Button3MotionMask            |  Button4MotionMask
3809                                     |  Button5MotionMask            |  ButtonMotionMask
3810                                     |  KeymapStateMask               |  ExposureMask
3811                                     |  VisibilityChangeMask       |  StructureNotifyMask
3812                                     |  ResizeRedirectMask          |  SubstructureNotifyMask
3813                                     |  SubstructureRedirectMask  |  FocusChangeMask
3814                                     |  PropertyChangeMask          |  ColormapChangeMask
3815                                     |  OwnerGrabButtonMask         |  ButtonClickMask
3816
3817
3818Description:
3819
3820       The XSelectInput function requests that the X server report the events associated with
3821       the  specified  event  mask.   Initially,  X  will  not  report  any  of  these  events.   Events  are
3822       reported relative to a window.  If a window is not interested in a device event, it usually
3823       propagates to the closest ancestor that is interested, unless the doNotPropagate attribute
3824       prohibits it.
3825
3826       Setting  the  event-mask  attribute  of  a  window  overrides  any  previous  call  for  the  same
3827       window but not for other clients.  Multiple clients can select for the same events on the
3828       same window with the following restrictions:
3829
3830
3831
3832              Multiple clients can select events on the same window because their event masks are
3833              disjoint.  When the X server generates an event, it reports it to all interested clients.
3834              Only  one  client  at  a  time  can  select  CirculateRequest,  ConfigureRequest,  or
3835              MapRequest events, which are associated with the event mask SubstructureRedi-
3836              rectMask.
3837              Only one client at a time can select a ResizeRequest event, which is associated with
3838              the event mask ResizeRedirectMask.
3839              Only one client at a time can select a ButtonPress event, which is associated with
3840              the event mask ButtonPressMask.
3841
3842       The server reports the event to all interested clients.
3843
3844cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        55
3845
3846
3847
38482.7.5       XSetHandler,  NullHandler
3849
3850
3851
3852Types:
3853
3854
3855          val  XSetHandler:  Drawable  ->
3856                                   ('a  XEvent  *  'state  ->  'state)  ->  'state  ->  (int  ->  'a  ->  unit)
3857
3858
3859          val  NullHandler:  'a  XEvent  *  'state  ->  'state
3860
3861
3862Syntax:
3863
3864
3865          val  sender  =  XSetHandler  w  Handler  initialState  ;
3866
3867
3868          sender  delay  message  ;
3869
3870
3871Arguments:
3872
3873
3874       w                        Specifies the window.
3875
3876       Handler                  Specifies the event handling function.
3877
3878       initialState             Specifies the initial state.
3879
3880       sender                   Returns a function that can send a strongly typed message to the win-
3881                                dow at any specified time in the future.
3882
3883       delay                    Specifies a delay in milliseconds before the message is sent.
3884
3885       message                  Specifies the message value.  The type of the message matches the type
3886                                of the XEvent processed by the event handling function.
3887
3888
3889Description:
3890
3891       When a window is created it is initially unhandled.  It can be used for drawing on, but it
3892       will not process any events.  An ML function can then be registered for that window, and
3893       an initial value supplied.  The registered function will transform the value to a new value
3894       every time an event arrives for that window.  In other words, a functional state machine
3895       is set up for each window.  We also implement strongly typed message passing between
3896       windows, and millisecond-resolution timer events.
3897
3898       XSetHandler installs a new event handling function for a window.  Event handlers typ-
3899       ically  pattern-match  on  the  XEvent  members,  choosing  to  match  events  that  they  are
3900       interested in, and then finish off with a default pattern match to provide a default action
3901       for all other events.  For example:
3902
3903
3904          fun  Handler  (Expose  {window,region,...},state)  =  ...
3905
3906
3907          |     Handler  (EnterNotify  {window,...},state)  =  ...
3908          |     Handler  (LeaveNotify  {window,...},state)  =  ...
3909
3910
3911          |     Handler  (MotionNotify  {window,pointer,...},state)  =  ...
3912
3913
3914          |     Handler  (_,state)  =  state  ;   (*  default  is  to  do  nothing  *)
3915
3916
3917       Underneath,  we have a process that maintains a current state and an event handler for
3918       every window, and manages the events from the X server.  As each event arrives it applies
3919       the  handler  for  that  window  to  the  event  and  the  current  state,  which  returns  a  new
3920       state,  which  replaces  the  original  state.   Because  only  one  process  handles  the  events,
3921
392256                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
3923
3924
3925
3926       we  guarantee  that  no  other  handler  function  can  run  at  the  same  time.  If  the  handler
3927       function  raises  an  exception,  instead  of  returning  a  new  state,  then  the  current  state  is
3928       left unchanged, and the exception is reported at the terminal.  In this way all events are
3929       handled in turn in a predictable order, and in much the same way that other X toolkits
3930       work.  The Poly/ML top level shell process is still available for debugging and control.
3931
3932       If a window has an operation that takes a long time to complete,  then the programmer
3933       can  use  Poly/ML  processes  to  do  the  computations  'in  the  background'  and  'send'  the
3934       result as a message to the window for display.  However, the use of processes in this way is
3935       discouraged as they are not standard.
3936
3937       If  a  window  function  loops,  then  all  other  windows  will  freeze.  Since  the  Poly/ML  top
3938       level shell is available the user can type ^C followed by 'f' to raise Interrupt in that window
3939       function.
3940
3941       The function returned by XSetHandler can be used to send messages to this window,
3942       if  messages  are  not  required  then  this  function  can  be  ignored.  The  message  value  will
3943       be  wrapped  up  in  a  Message  XEvent  and  passed  to  the  event  handling  function,  the
3944       type of the message value is guaranteed match the type of XEvent handled by the event
3945       handler.  The time the message arrives can be modified using the delay parameter, which
3946       is  the  delay  in  milliseconds.   This  is  often  useful  for  implementing  flashing  displays,  or
3947       auto-repeat functions.
39482.7.6       XSetInputFocus,  XGetInputFocus
3949
3950
3951
3952Types:
3953
3954
3955          val  XSetInputFocus:  Drawable  ->  RevertCode  ->  int  ->  unit
3956          val  XGetInputFocus:  unit  ->  (Drawable  *  RevertCode)
3957
3958
3959Syntax:
3960
3961
3962          XSetInputFocus  focus  revertTo  time  ;
3963          val  (focus,revertTo)  =  XGetInputFocus()  ;
3964
3965
3966Arguments:
3967
3968
3969       focus                Specifies or returns the window, PointerRoot, or NoDrawable.
3970
3971       revertTo             Specifies or returns where the input focus reverts to if the window becomes
3972                            not viewable.  You can pass RevertToParent, RevertToPointerRoot,
3973                            or RevertToNone.
3974
3975       time                 Specifies the time.  You can pass either a timestamp or CurrentTime.
3976
3977
3978Argument Type:
3979
3980
3981          datatype  RevertCode  =  RevertToParent  |  RevertToPointerRoot  |  RevertToNone
3982
3983
3984          val  CurrentTime:  int
3985
3986
3987Description:
3988
3989       The XSetInputFocus function changes the input focus and the last-focus-change time.  It
3990       has no effect if the specified time is earlier than the current last-focus-change time or is later
3991
3992cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        57
3993
3994
3995
3996       than the current X server time.  Otherwise, the last-focus-change time is set to the specified
3997       time (CurrentTime is replaced by the current X server time).  XSetInputFocus causes
3998       the X server to generate FocusIn and FocusOut events.
3999
4000       Depending on the focus argument, the following occurs:
4001
4002
4003
4004              If focus is NoDrawable, all keyboard events are discarded until a new focus window
4005              is set, and the revertTo argument is ignored.
4006
4007              If focus is a window, it becomes the keyboard's focus window.  If a generated keyboard
4008              event would normally be reported to this window or one of its inferiors, the event is
4009              reported as usual.  Otherwise, the event is reported relative to the focus window.
4010
4011              If focus is PointerRoot, the focus window is dynamically taken to be the root window
4012              of whatever screen the pointer is on at each keyboard event.  In this case, the revertTo
4013              argument is ignored.
4014
4015       The specified focus window must be viewable at the time XSetInputFocus is called, or
4016       a BadMatch error results.  If the focus window later becomes not viewable, the X server
4017       evaluates the revertTo argument to determine the new focus window as follows:
4018
4019
4020
4021              If revertTo is RevertToParent, the focus reverts to the parent (or the closest view-
4022              able ancestor), and the new revertTo value is taken to be RevertToNone.
4023
4024              If  revertTo  is  RevertToPointerRoot  or  RevertToNone,  the  focus  reverts  to
4025              PointerRoot or NoDrawable, respectively.  When the focus reverts, the X server
4026              generates FocusIn and FocusOut events, but the last-focus-change time is not af-
4027              fected.
4028
4029       The XGetInputFocus function returns the focus window and the current focus state.
40302.7.7       XSync,  XFlush
4031
4032
4033
4034Types:
4035
4036
4037          val  XSync:   bool  ->  unit
4038          val  XFlush:  unit  ->  unit
4039
4040
4041Syntax:
4042
4043
4044          XSync  discard  ;
4045          XFlush()  ;
4046
4047
4048Arguments:
4049
4050
4051       discard            Specifies  a  bool  that  indicates  whether  XSync  discards  all  events  on  the
4052                          event queue.
4053
4054
4055Description:
4056
4057       The XSync function flushes the output buffer and then waits until all requests have been
4058       received  and  processed  by  the  X  server.  Any  errors  generated  must  be  handled  by  the
4059       error handler.  For each error event received by Xlib, XSync calls the client application's
4060
406158                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
4062
4063
4064
4065       error handling routine.  Any events generated by the server are enqueued into the library's
4066       event queue.
4067
4068       If you passed false, XSync does not discard the events in the queue.  If you passed true,
4069       XSync  discards  all  events  in  the  queue,  including  those  events  that  were  on  the  queue
4070       before XSync was called.  Client applications seldom need to call XSync.
4071
4072       The XFlush function flushes the output buffer.  Most client applications need not use this
4073       function because the output buffer is automatically flushed internally as events are read.
40742.7.8       XSyncronise,  XSynchronize
4075
4076
4077
4078Types:
4079
4080
4081          val  XSyncronise:  int  ->  unit
4082
4083
4084Syntax:
4085
4086
4087          XSyncronise  flag  ;
4088
4089
4090Arguments:
4091
4092
4093       flag          Specifies that synchronization is enabled or disabled
4094
4095
4096Description:
4097
4098       If flag is non-zero, XSynchronize turns on synchronous behavior.  If flag is zero, XSynchro-
4099       nize turns off synchronous behavior.
4100
4101       NOTE that the current release has XSynchronize misspelled as XSyncronise.
41022.7.9       XTranslateCoordinates
4103
4104
4105
4106Types:
4107
4108
4109          val  XTranslateCoordinates:  Drawable  ->  Drawable  ->  XPoint  ->  XPoint  *  Drawable
4110
4111
4112Syntax:
4113
4114
4115          val  (dstPoint,child)  =  XTranslateCoordinates  srcWindow  destWindow  srcPoint  ;
4116
4117
4118Arguments:
4119
4120
4121       srcWindow                  Specifies the source window.
4122
4123       destWindow                 Specifies the destination window.
4124
4125       srcPoint                   Specifies the x and y coordinates within the source window
4126
4127       dstPoint                   Return the x and y coordinates within the destination window
4128
4129       child                      Returns the child if the coordinates are contained in a mapped child
4130                                  of the destination window.
4131
4132cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        59
4133
4134
4135
4136Description:
4137
4138       The  XTranslateCoordinates  function  takes  the  srcPoint  coordinates  relative  to  the
4139       source  window's  origin  and  returns  these  coordinates  to  dstPoint  relative  to  the  desti-
4140       nation window's origin.  If XTranslateCoordinates returns zero, srcWindow and dest-
4141       Window are on different screens, and dstPoint is (0,0).  If the coordinates are contained in
4142       a mapped child of destWindow, that child is returned as child.  Otherwise, child has the
4143       value NoDrawable.
4144
41452.8       Fonts
4146
4147
4148
41492.8.1       CharLBearing,  CharRBearing,  CharWidth,  CharAscent,
4150
4151            CharDescent,  CharAttributes
4152
4153
4154
4155Types:
4156
4157
4158          val  CharLBearing:     XCharStruct  ->  int
4159          val  CharRBearing:     XCharStruct  ->  int
4160          val  CharWidth:         XCharStruct  ->  int
4161          val  CharAscent:       XCharStruct  ->  int
4162          val  CharDescent:      XCharStruct  ->  int
4163          val  CharAttributes:  XCharStruct  ->  int
4164
4165
4166Argument Type:
4167
4168
4169          datatype  XCharStruct  =  XCharStruct  of  {  lbearing:     int,
4170                                                                    rbearing:     int,
4171                                                                    width:         int,
4172                                                                    ascent:       int,
4173                                                                    descent:      int,
4174                                                                    attributes:  int  }
4175
4176
4177Description:
4178
4179       These convenience functions return the individual fields of the XCharStruct datatype.
41802.8.2       FSFont,  FSDirection,  FSMinChar,  FSMaxChar,  FSMinByte1,
4181
4182            FSMaxByte1,  FSAllCharsExist,  FSAllCharsExist,
4183
4184            FSDefaultChar,  FSMinBounds,  FSMaxBounds,  PSPerChar,
4185
4186            FSPerChar,  FSAscent,  FSDescent,  FSAscent,  FSDescent,
4187
4188            FSMinWidth,  FSMaxWidth,  FSMinHeight,  FSMaxHeight
4189
4190
4191
4192Types:
4193
4194
4195          val  FSFont:               XFontStruct  ->  Font
4196          val  FSDirection:       XFontStruct  ->  FontDirection
4197          val  FSMinChar:          XFontStruct  ->  int
4198          val  FSMaxChar:          XFontStruct  ->  int
4199          val  FSMinByte1:         XFontStruct  ->  int
4200          val  FSMaxByte1:         XFontStruct  ->  int
4201
420260                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
4203
4204
4205
4206          val  FSAllCharsExist:  XFontStruct  ->  bool
4207          val  FSDefaultChar:     XFontStruct  ->  int
4208          val  FSMinBounds:       XFontStruct  ->  XCharStruct
4209          val  FSMaxBounds:       XFontStruct  ->  XCharStruct
4210          val  PSPerChar:          XFontStruct  ->  XCharStruct  list
4211          val  FSAscent:            XFontStruct  ->  int
4212          val  FSDescent:          XFontStruct  ->  int
4213
4214
4215          val  FSMinWidth:   XFontStruct  ->  int
4216          val  FSMaxWidth:   XFontStruct  ->  int
4217          val  FSMinHeight:  XFontStruct  ->  int
4218          val  FSMaxHeight:  XFontStruct  ->  int
4219
4220
4221Argument Type:
4222
4223
4224          datatype  XFontStruct  =  XFontStruct  of  {  font:               Font,
4225                                                                    direction:       FontDirection,
4226                                                                    minChar:          int,
4227                                                                    maxChar:          int,
4228                                                                    minByte1:         int,
4229                                                                    maxByte1:         int,
4230                                                                    allCharsExist:  bool,
4231                                                                    defaultChar:     int,
4232                                                                    minBounds:       XCharStruct,
4233                                                                    maxBounds:       XCharStruct,
4234                                                                    perChar:          XCharStruct  list,
4235                                                                    ascent:            int,
4236                                                                    descent:          int  }
4237
4238
4239Description:
4240
4241       These convenience functions return the individual fields of the XFontStruct datatype.
4242
4243       NOTE that the current release has FSPerChar misspelled as PSPerChar.
4244
4245       FSMinWidth, FSMaxWidth, FSMinHeight and FSMaxHeight are defined as:
4246
4247
4248
4249          fun  FSMinWidth   f  =  CharWidth   (FSMinBounds  f)  ;
4250          fun  FSMaxWidth   f  =  CharWidth   (FSMaxBounds  f)  ;
4251          fun  FSMinHeight  f  =  CharAscent  (FSMinBounds  f)  +  CharDescent  (FSMinBounds  f)  ;
4252          fun  FSMaxHeight  f  =  CharAscent  (FSMaxBounds  f)  +  CharDescent  (FSMaxBounds  f)  ;
4253
4254
42552.8.3       XListFonts,  XListFontsWithInfo
4256
4257
4258
4259Types:
4260
4261
4262          val  XListFonts:             string  ->  int  ->  string  list
4263          val  XListFontsWithInfo:  string  ->  int  ->  (string  list  *  XFontStruct  list)
4264
4265
4266Syntax:
4267
4268
4269          val  names  =  XListFonts  pattern  maxNames  ;
4270          val  (names,fonts)  =  XListFontsWithInfo  pattern  maxNames  ;
4271
4272cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        61
4273
4274
4275
4276Arguments:
4277
4278
4279       pattern                  Specifies the pattern string that can contain wildcard characters.
4280
4281       maxNames                 Specifies the maximum number of names to be returned.
4282
4283       names                    Specifies the list of font names returned.
4284
4285       fonts                    Specifies the list of font structures returned.
4286
4287
4288Description:
4289
4290       The  XListFonts  function  returns  a  list  of  available  font  names  (as  controlled  by  the
4291       font search path;  see XSetFontPath) that match the string you passed to the pattern
4292       argument.   The  string  should  be  ISO  Latin-1;  uppercase  and  lowercase  do  not  matter.
4293       The pattern string can contain any characters, but each asterisk "*" is a wildcard for any
4294       number of characters, and each question mark "?" is a wildcard for a single character.  The
4295       list of names is limited to size specified by maxNames.  If XListFonts fails then exception
4296       XWindows is raised with "XListFonts failed" .
4297
4298       The XListFontsWithInfo function returns a list of font names that match the specified
4299       pattern and their associated font information.  The list of names is limited to size speci-
4300       fied by maxNames.  The information returned for each font is identical to what XLoad-
4301       QueryFont  would  return  except  that  the  per-character  metrics  are  not  returned.  The
4302       pattern  string  can  contain  any  characters,  but  each  asterisk  "*"  is  a  wildcard  for  any
4303       number of characters, and each question mark "?" is a wildcard for a single character.  If
4304       XListFontsWithInfo fails then exception XWindows is raised with "XListFontsWith-
4305       Info failed" .
43062.8.4       XLoadFont,  XLoadQueryFont,  XQueryFont,  XFreeFont,
4307
4308            XUnloadFont
4309
4310
4311
4312Types:
4313
4314
4315          val  XLoadFont:         string  ->  Font
4316          val  XLoadQueryFont:  string  ->  XFontStruct
4317          val  XQueryFont:       Font  ->  XFontStruct
4318          val  XFreeFont:         XFontStruct  ->  unit
4319          val  XUnloadFont:      Font  ->  unit
4320
4321
4322Syntax:
4323
4324
4325          val  font  =  XLoadFont  name  ;
4326          val  fs  =  XLoadQueryFont  name  ;
4327          val  fs  =  XQueryFont  font  ;
4328          XFreeFont  fs  ;
4329          XUnloadFont  font  ;
4330
4331
4332Arguments:
4333
4334
4335       font          Specifies the font identifier.
4336
4337       fs            Specifies the font structure.
4338
4339       name          Specifies the name of the font.
4340
4341
4342Argument Type:
4343
434462                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
4345
4346
4347
4348          datatype  FontDirection  =  FontLeftToRight  |  FontRightToLeft
4349
4350
4351          datatype  XCharStruct  =  XCharStruct  of  {  lbearing:     int,
4352                                                                    rbearing:     int,
4353                                                                    width:         int,
4354                                                                    ascent:       int,
4355                                                                    descent:      int,
4356                                                                    attributes:  int  }
4357
4358
4359          datatype  XFontStruct  =  XFontStruct  of  {  font:               Font,
4360                                                                    direction:       FontDirection,
4361                                                                    minChar:          int,
4362                                                                    maxChar:          int,
4363                                                                    minByte1:         int,
4364                                                                    maxByte1:         int,
4365                                                                    allCharsExist:  bool,
4366                                                                    defaultChar:     int,
4367                                                                    minBounds:       XCharStruct,
4368                                                                    maxBounds:       XCharStruct,
4369                                                                    perChar:          XCharStruct  list,
4370                                                                    ascent:            int,
4371                                                                    descent:          int  }
4372
4373
4374Argument Description:
4375
4376       The XFontStruct structure contains all of the information for the font and consists of the
4377       font-specific information as well as a list of XCharStruct structures for the characters
4378       contained in the font.
4379
4380       X supports single byte/character, two bytes/character matrix, and 16-bit character text op-
4381       erations.  Note that any of these forms can be used with a font, but a single byte/character
4382       text request can only specify a single byte (that is,  the first row of a 2-byte font).  You
4383       should view 2-byte fonts as a two-dimensional matrix of defined characters: byte 1 specifies
4384       the range of defined rows and byte 2 defines the range of defined columns of the font.  Single
4385       byte/character fonts have one row defined, and the byte 2 range specified in the structure
4386       defines a range of characters.
4387
4388       The bounding box of a character is defined by the XCharStruct of that character.  When
4389       characters are absent from a font, the defaultChar is used.  When fonts have all characters
4390       of the same size, only the information in the XFontStruct min and max bounds are used.
4391
4392       The members of the XFontStruct have the following semantics:
4393
4394
4395
4396              The direction member can be either FontLeftToRight or FontRightToLeft.  It is
4397              just a hint as to whether most XCharStruct elements have a positive (FontLeft-
4398              ToRight) or a negative (FontRightToLeft) character width metric.  The core pro-
4399              tocol defines no support for vertical text.
4400
4401              If the minByte1 and maxByte1 members are both zero, minChar specifies the linear
4402              character index corresponding to the first element of the perChar list, and maxChar
4403              specifies the linear character index of the last element.
4404
4405              If either minByte1 or maxByte1 are non-zero, then both minChar and maxChar are
4406              less  than  256,  and  the  2-byte  character  index  values  corresponding  to  the  perChar
4407              list element N (counting from 0) are:
4408
4409
4410                   byte  1  =  N  div  D  +  minByte1
4411                   byte  2  =  N  mod  D  +  minChar
4412
4413cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        63
4414
4415              If the perChar list is empty, all glyphs between the first and last character indexes
4416              inclusive have the same information, as given by both minBounds and maxBounds.
4417
4418              If  allCharsExist  is  true,  all  characters  in  the  perChar  list  have  non-zero  bounding
4419              boxes.
4420
4421              The defaultChar member specifies the character that will be used when an undefined
4422              or nonexistent character is printed.  The defaultChar is a 16-bit character (not a 2-
4423              byte character).  For a font using 2-byte matrix format, the defaultChar has byte 1 in
4424              the most-significant byte and byte 2 in the least-significant byte.  If the defaultChar
4425              itself specifies an undefined or nonexistent character, no printing is performed for an
4426              undefined or nonexistent character.
4427
4428              The  minBounds  and  maxBounds  members  contain  the  most  extreme  values  of
4429              each  individual  XCharStruct  component  over  all  elements  of  this  list  (and  ig-
4430              nore  nonexistent  characters).   The  bounding  box  of  the  font  (the  smallest  rect-
4431              angle  enclosing  the  shape  obtained  by  superimposing  all  of  the  characters  at
4432              the  same  origin  (x,y))  has  its  upper-left  coordinate  at  (x+minBounds.lbearing,y-
4433              maxBounds.ascent).  Its width is (maxBounds.rbearing-minBounds.lbearing) and its
4434              height is (maxBounds.ascent+maxBounds.descent).
4435
4436              The ascent member is the logical extent of the font above the baseline that is used
4437              for determining line spacing.  Specific characters may extend beyond this.
4438
4439              The descent member is the logical extent of the font at or below the baseline that is
4440              used for determining line spacing.  Specific characters may extend beyond this.
4441
4442              If  the  baseline  is  at  Y-coordinate  y,  the  logical  extent  of  the  font  is  inclusive  be-
4443              tween the Y-coordinate values (y-font.ascent) and (y+font.descent-1).  Typically, the
4444              minimum interline spacing between rows of text is given by (ascent+descent).
4445
4446
4447       For  a  character  origin  at  (x,y),  the  bounding  box  of  a  character  (that  is,  the  smallest
4448       rectangle that encloses the character's shape) described in terms of XCharStruct com-
4449       ponents  is  a  rectangle  with  its  upper-left  corner  at  (x+lbearing,y-ascent).   Its  width  is
4450       (rbearing-lbearing) and its height is (ascent+descent).  The origin for the next character is
4451       defined to be (x+width,y) The lbearing member defines the extent of the left edge of the
4452       character ink from the origin.  The rbearing member defines the extent of the right edge of
4453       the character ink from the origin.  The ascent member defines the extent of the top edge of
4454       the character ink from the origin.  The descent member defines the extent of the bottom
4455       edge of the character ink from the origin.  The width member defines the logical width of
4456       the character.
4457
4458Description:
4459
4460       The  XLoadFont  function  loads  the  specified  font  and  returns  the  Font  value  for  it.
4461       The name should be ISO Latin-1 encoding; uppercase and lowercase do not matter.  The
4462       interpretation of characters "?" and "*" in the name is not defined by the core protocol but
4463       is reserved for future definition.  A structured format for font names is specified in the X
4464       Consortium standard X Logical Font Description Conventions.  If the font does not exist
4465       then exception XWindows is raised with "XLoadFont failed" .  Fonts are not associated
4466       with a particular screen and can be stored as a component of any GC. When the font is
4467       no longer needed, call XUnloadFont.
4468
4469       The XQueryFont function returns an XFontStruct structure, which contains informa-
4470       tion associated with the font.  If XQueryFont fails then exception XWindows is raised
4471       with "XQueryFont failed" .
4472
4473       The  XLoadQueryFont  function  provides  the  most  common  way  for  accessing  a  font.
4474       XLoadQueryFont  both  opens  (loads)  the  specified  font  and  returns  the  appropriate
4475
447664                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
4477
4478
4479
4480       XFontStruct structure.  If the font does not exist then exception XWindows is raised
4481       with "XLoadQueryFont failed" .
4482
4483       The  XFreeFont  function  deletes  the  association  between  the  Font  value  in  the
4484       XFontStruct  and  the  specified  font  in  the  server.   The  font  itself  will  be  freed  when
4485       no other resource references it.  The XFontStruct and the font should not be referenced
4486       again.
4487
4488       The XUnloadFont function deletes the association between the Font value and the spec-
4489       ified font in the server.  The font itself will be freed when no other resource references it.
4490       The font should not be referenced again.
44912.8.5       XSetFontPath,  XGetFontPath
4492
4493
4494
4495Types:
4496
4497
4498          val  XSetFontPath:  string  list  ->  unit
4499          val  XGetFontPath:  unit  ->  string  list
4500
4501
4502Syntax:
4503
4504
4505          XSetFontPath  directories  ;
4506          val  directories  =  XGetFontPath()  ;
4507
4508
4509Arguments:
4510
4511
4512       directories             Specifies the directory path used to look for a font.  Setting the path to
4513                               the empty list restores the default path defined for the X server.
4514
4515
4516Description:
4517
4518       The XSetFontPath function defines the directory search path for font lookup.  There is
4519       only one search path per X server, not one per client.  The interpretation of the strings is
4520       operating system dependent, but they are intended to specify directories to be searched in
4521       the order listed.  Also, the contents of these strings are operating system dependent and are
4522       not intended to be used by client applications.  Usually, the X server is free to cache font
4523       information internally rather than having to read fonts from files.  In addition, the X server
4524       is guaranteed to flush all cached information about fonts which are currently referenced by
4525       an application.  The meaning of an error from this request is operating system dependent.
4526
4527       The  XGetFontPath  function  returns  a  list  of  strings  containing  the  search  path.   If
4528       XGetFontPath fails then exception XWindows is raised with "XGetFontPath failed" .
45292.8.6       XTextExtents,  XTextExtents16
4530
4531
4532
4533Types:
4534
4535
4536          val  XTextExtents:  XFontStruct  ->
4537                                    string         ->  (FontDirection  *  int  *  int  *  XCharStruct)
4538
4539
4540          val  XTextExtents16:  XFontStruct  ->
4541                                       int  list      ->  (FontDirection  *  int  *  int  *  XCharStruct)
4542
4543cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        65
4544
4545
4546
4547Syntax:
4548
4549
4550          val  (direction,ascent,descent,overall)  =  XTextExtents  fs  string  ;
4551          val  (direction,ascent,descent,overall)  =  XTextExtents16  fs  bigChars  ;
4552
4553
4554Arguments:
4555
4556
4557       direction             Returns the value of the direction hint (FontLeftToRight or FontRight-
4558                             ToLeft).
4559
4560       fs                    Specifies the XFontStruct to use.
4561
4562       ascent                Returns the font ascent.
4563
4564       descent               Returns the font descent.
4565
4566       string                Specifies the character string.
4567
4568       bigChars              Specifies the character string as a list of 16 bit integers.
4569
4570       overall               Returns the overall size in a XCharStruct structure.
4571
4572
4573Description:
4574
4575       The  XTextExtents  and  XTextExtents16  functions  perform  the  size  computation  lo-
4576       cally using the XFontStruct provided. Both functions return an XCharStruct structure,
4577       whose members are set to the values as follows.
4578
4579       The ascent member is set to the maximum of the ascent metrics of all characters in the
4580       string.  The  descent  member  is  set  to  the  maximum  of  the  descent  metrics.  The  width
4581       member  is  set  to  the  sum  of  the  character-width  metrics  of  all  characters  in  the  string.
4582       For each character in the string, let W be the sum of the character-width metrics of all
4583       characters preceding it in the string.  Let L be the left-side-bearing metric of the character
4584       plus  W.  Let  R  be  the  right-side-bearing  metric  of  the  character  plus  W.  The  lbearing
4585       member is set to the minimum L of all characters in the string.  The rbearing member is
4586       set to the maximum R.
4587
4588       For fonts defined with 2-byte matrix indexing rather than 16-bit linear indexing, the most-
4589       significant 8-bits of each int in bigChars is used as byte 1, and the least-significant 8-bits
4590       is used as byte 2.
4591
4592       If the font has no defined default character, undefined characters in the string are taken
4593       to have all zero metrics.
4594
4595       Characters with all zero metrics are ignored.  If the font has no defined defaultChar, the
4596       undefined characters in the string are also ignored.
45972.8.7       XTextWidth,  XTextWidth16
4598
4599
4600
4601Types:
4602
4603
4604          val  XTextWidth:     XFontStruct  ->  string     ->  int
4605          val  XTextWidth16:  XFontStruct  ->  int  list  ->  int
4606
4607
4608Syntax:
4609
4610
4611          val  width  =  XTextWidth  fs  string  ;
4612          val  width  =  XTextWidth16  fs  bigChars  ;
4613
461466                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
4615
4616
4617
4618Arguments:
4619
4620
4621       fs                    Specifies the XFontStruct to use.
4622
4623       string                Specifies the character string.
4624
4625       bigChars              Specifies the character string as a list of 16 bit integers.
4626
4627       width                 Returns the width in pixels.
4628
4629
4630Description:
4631
4632       The XTextWidth and XTextWidth16 functions return the width of the specified 8-bit
4633       or 2-byte character strings.
4634
46352.9       Geometry
4636
4637
4638
46392.9.1       AddPoint,  SubtractPoint
4640
4641
4642
4643Types:
4644
4645
4646          infix  AddPoint  SubtractPoint
4647
4648
4649          val  AddPoint:         (XPoint  *  XPoint)  ->  XPoint
4650          val  SubtractPoint:  (XPoint  *  XPoint)  ->  XPoint
4651
4652
4653Description:
4654
4655       AddPoint takes two points and adds the x coordinates together and the y coordinates
4656       together to make the resulting point.  In vector arithmetic this is equivalent to adding two
4657       vectors.
4658
4659       SubtractPoint subtracts the x coordinate of the second point from the x coordinate of
4660       the first, and subtracts the y coordinate of the second point from the y coordinate of the
4661       first.  In vector arithmetic this is equivalent to vector subtraction.
46622.9.2       Inside,  Overlap,  Within,  LeftOf,  RightOf,  AboveOf,  BelowOf,
4663
4664            HorizontallyAbutting,  VerticallyAbutting
4665
4666
4667
4668Types:
4669
4670
4671          infix  Inside  Overlap  Within
4672          infix  LeftOf  RightOf  AboveOf  BelowOf
4673          infix  HorizontallyAbutting  VerticallyAbutting
4674
4675
4676          val  Inside:                      (XRectangle  *  XRectangle)  ->  bool
4677          val  Overlap:                    (XRectangle  *  XRectangle)  ->  bool
4678          val  Within:                      (XPoint       *  XRectangle)  ->  bool
4679          val  LeftOf:                      (XPoint       *  XRectangle)  ->  bool
4680          val  RightOf:                    (XPoint       *  XRectangle)  ->  bool
4681          val  AboveOf:                    (XPoint       *  XRectangle)  ->  bool
4682          val  BelowOf:                    (XPoint       *  XRectangle)  ->  bool
4683          val  HorizontallyAbutting:  (XRectangle  *  XRectangle)  ->  bool
4684          val  VerticallyAbutting:     (XRectangle  *  XRectangle)  ->  bool
4685
4686cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        67
4687
4688
4689
4690Description:
4691
4692       a  Inside  b is true if rectangle a is totally enclosed by b.
4693
4694       a  Overlap  b is true if the two rectangles intersect.
4695
4696       a  Within  b is true if point a is inside rectangle b.
4697
4698       a  LeftOf  b is true if point a is outside and to the left of rectangle b.
4699
4700       a  RightOf  b is true if point a is outside and to the right of rectangle b.
4701
4702       a  AboveOf  b is true if point a is outside and above rectangle b.
4703
4704       a  BelowOf  b is true if point a is outside and below rectangle b.
4705
4706       a  HorizontallyAbutting  b is true if the left edge of a touches the right edge of b, or the
4707       right edge of a touches the left edge of b.
4708
4709       a  VerticallyAbutting  b is true if the top edge of a touches the bottom edge of b, or the
4710       bottom edge of a touches the top edge of b.
47112.9.3       Intersection,  Union,  Section
4712
4713
4714
4715Types:
4716
4717
4718          val  Intersection:  XRectangle  ->  XRectangle   ->  Section
4719          val  Union:            XRectangle  ->  XRectangle   ->  XRectangle
4720
4721
4722Argument Type:
4723
4724
4725          datatype  Section  =  Nothing  |  Section  of  XRectangle
4726
4727
4728Description:
4729
4730       Intersection  computes  the  intersection  of  the  two  rectangles.  If  the  rectangles  do  not
4731       intersect then it returns Nothing, otherwise it returns Section of the intersection.
4732
4733       Union computes the bounding rectangle for the union of the two rectangles.
47342.9.4       Left,  Right,  Top,  Bottom,  Width,  Height,  TopLeft,  TopRight,
4735
4736            BottomLeft,  BottomRight,  XRectangle,  Area,  Rect,
4737
4738            DestructRect,  DestructArea,  empty
4739
4740
4741
4742Types:
4743
4744
4745          eqtype  XRectangle
4746
4747
4748          val  Rect:  {left:int,right:int,top:int,bottom:int}  ->  XRectangle
4749          val  Area:  {x:int,y:int,w:int,h:int}                      ->  XRectangle
4750
4751
4752          val  DestructRect:  XRectangle  ->  {left:int,right:int,top:int,bottom:int}
4753          val  DestructArea:  XRectangle  ->  {x:int,y:int,w:int,h:int}
4754
4755
4756          exception  XRectangle  of  {top:int,left:int,bottom:int,right:int}
4757
4758
4759          val  Left:     XRectangle  ->  int
4760
476168                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
4762
4763
4764
4765          val  Right:   XRectangle  ->  int
4766          val  Top:      XRectangle  ->  int
4767          val  Bottom:  XRectangle  ->  int
4768          val  Width:   XRectangle  ->  int
4769          val  Height:  XRectangle  ->  int
4770
4771
4772          val  TopLeft:       XRectangle  ->  XPoint
4773          val  TopRight:      XRectangle  ->  XPoint
4774          val  BottomLeft:   XRectangle  ->  XPoint
4775          val  BottomRight:  XRectangle  ->  XPoint
4776
4777
4778          val  empty  =  Area  {x=0,y=0,w=0,h=0}
4779
4780
4781Syntax:
4782
4783
4784          val  area  =  Area  {  x  =  0,  y  =  0,  w  =  100,  h  =  200  }  ;
4785          val  {x,y,w,h}  =  DestructArea  area  ;
4786          val  left  =  Left  area  ;
4787
4788
4789Description:
4790
4791       XRectangles are used to represent pixel areas.  For example, an Expose event on a window
4792       will contain the position and size of the rectangular area which needs refreshing.  XRect-
4793       angles may also represent size only.  For example,  the coordinate system of a window is
4794       represented as an XRectangle which has width and height, but the top left corner of the
4795       rectangle is at (0,0).
4796
4797       XRectangles representing pixel areas can be thought of in two ways.
4798
4799       The  first  way  is  to  call  the  top  left  pixel  in  the  rectangle  (x,y)  and  the  width  and
4800       height of the rectangle are (width,height) .  Then, an empty rectangle has width  =  0
4801       and  height  =  0  ,  and  the  point  (a,b)  is  in  a  non-empty  rectangle  only  if  a  >=  x  and
4802       a  <  (x+width) and b  >=  y and b  <  (y+height) .
4803
4804       The  second  way  is  to  call  the  top  left  pixel  inside  the  area  (top,left)  and  to  call
4805       the  outside  bottom  right  pixel  (bottom,right)  .    Then,  the  empty  rectangle  has
4806       (top,left)  =  (bottom,right)  ,  and  the  point  (x,y)  is  in  a  non-empty  rectangle  if
4807       x  >=  left  and  x  <  right  and  y  >=  top  and  y  <  bottom  .  NOTE  that  in  X,  y  coordi-
4808       nates increase down the screen, so top  <=  bottom .
4809
4810       You should be careful not to generate coordinates out of range.  x and y coordinates must
4811       lie between "32768 and 32767 inclusive, width and height values must be between 0 and
4812       65535 inclusive.
4813
4814       This   means   that   Rect  {top,left,bottom,right}   must   have   right  >=  left   and
4815       bottom  >=  top  .   Similarly,  Area  {x,y,w,h}  must  have  w  >=  0  and  h  >=  0  .   If  these
4816       constraints are not met then exception XRectangle is raised.
4817
4818       Convenience  functions  exist  to  destruct  XRectangles.   Left,  Right,  Top  and  Bottom
4819       return  the  single  coordinate  for  an  edge  of  an  XRectangle.   Width  and  Height  re-
4820       turn the width and height of an XRectangle.  TopLeft, TopRight, BottomLeft and
4821       BottomRight return the coordinates of a corner of an XRectangle as points.
4822
4823       empty is a rectangle with zero area.
48242.9.5       MakeRect,  SplitRect
4825
4826
4827
4828Types:
4829
4830cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        69
4831
4832
4833
4834          val  MakeRect:   XPoint  ->  XPoint  ->  XRectangle
4835          val  SplitRect:  XRectangle   ->  (XPoint  *  XPoint)
4836
4837
4838Syntax:
4839
4840
4841          val  (topLeft,bottomRight)  =  SplitRect  r  ;
4842          val  r  =  MakeRect  corner1  corner2  ;
4843
4844
4845Description:
4846
4847       MakeRect  constructs  an  XRectangle  given  two  points  corresponding  to  any  pair  of
4848       opposite corners of the rectangle.  This is useful when the order of the two points is not
4849       known, for example when dragging a rubber-banded box on the screen.
4850
4851       SplitRect returns the pair of points corresponding to the top-left and bottom-right corners
4852       of the XRectangle.  It will always be the case that left  <=  right and top  <=  bottom .
48532.9.6       NegativePoint
4854
4855
4856
4857Types:
4858
4859
4860          val  NegativePoint:  XPoint  ->  XPoint
4861
4862
4863Description:
4864
4865       NegativePoint negates both the x and y coordinates of the point.  This is equivalent to
4866       reflecting about the x axis and the y axis.
48672.9.7       OutsetRect,  OffsetRect,  IncludePoint
4868
4869
4870
4871Types:
4872
4873
4874          val  OutsetRect:     int  ->  XRectangle  ->  XRectangle
4875          val  OffsetRect:     XRectangle  ->  XPoint  ->  XRectangle
4876          val  IncludePoint:  XPoint  ->  XRectangle  ->  XRectangle
4877
4878
4879Description:
4880
4881       OutsetRect  n  R takes rectangle R and expands its area by n units in all four directions.
4882       Typically n is positive and this function is used to expand areas to incorporate borders of
4883       the same width all around.  With a negative n it can be used to shrink an area towards
4884       the centre of the area.  If n is more negative than half the width or height of the area then
4885       exception XRectangle is raised.
4886
4887       OffsetRect  R  (XPoint{x,y}) adds x to both x coordinates and y to both y coordinates
4888       of R. This is typically used to move a rectangle by an (x,y) offset or vector.
4889
4890       IncludePoint  p  R is used to expand the area of R to include the point p.  If p is already
4891       inside the rectange R then R is returned unchanged.  If p is outside the rectangle R then
4892       R is expanded in the direction of p so that p is now just inside R.
4893
489470                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
4895
4896
4897
48982.9.8       Reflect
4899
4900
4901
4902Types:
4903
4904
4905          val  Reflect:  XRectangle  ->  XRectangle
4906
4907
4908Description:
4909
4910       Reflect takes an XRectangle and swaps the x and y coordinates over;  left is swapped
4911       with  top  and  right  is  swapped  with  bottom.  This  is  equivalent  to  reflecting  the  points
4912       about the 45-degree line that has the equation y = x.
49132.9.9       XPoint
4914
4915
4916Types:
4917
4918
4919          datatype  XPoint  =  XPoint  of  {  x:int,y:int  }
4920
4921
4922          val  origin  =  XPoint  {x=0,y=0}
4923
4924
4925Syntax:
4926
4927
4928          XPoint  {  x=100,y=200  }
4929
4930
4931Description:
4932
4933       XPoints are used to represent the coordinates of pixels.  For example, the position of the
4934       top left pixel of a window on the screen is represented as an XPoint.
4935
4936       You should be careful not to generate coordinates out of range.  x and y coordinates must
4937       lie between "32768 and 32767 inclusive.
4938
4939       origin  is  the  point  (0,0),  and  is  typically  used  to  refer  to  the  origin  of  the  coordinate
4940       system.  In X, the origin is the top left corner of a window.
4941
49422.10         GC  -  Graphics  Context
4943
4944
4945
49462.10.1        DefaultGC
4947
4948
4949
4950Types:
4951
4952
4953          val  DefaultGC:  unit  ->  GC
4954
4955
4956Syntax:
4957
4958
4959          val  gc  =  DefaultGC()  ;
4960
4961
4962Description:
4963
4964       The DefaultGC function returns the default GC for the root window of the screen.
4965
4966cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        71
4967
4968
4969
49702.10.2        XCreateGC,  XChangeGC,  XFreeGC
4971
4972
4973
4974Types:
4975
4976
4977          val  XCreateGC:  Drawable  ->  XGCValue  list  ->  GC
4978          val  XChangeGC:  GC  ->  XGCValue  list  ->  unit
4979          val  XFreeGC:     GC  ->  unit
4980
4981
4982Syntax:
4983
4984
4985          val  gc  =  XCreateGC  d  values  ;
4986          XChangeGC  gc  values  ;
4987          XFreeGC  gc  ;
4988
4989
4990Arguments:
4991
4992
4993       d                 Specifies the drawable.
4994
4995       gc                Specifies the GC.
4996
4997       values            Specifies which components in the GC are to be set or changed.
4998
4999
5000Argument Type:
5001
5002
5003          datatype  XGCValue  =  GCFunction               of  GCFunction
5004                                    |  GCPlaneMask             of  int
5005                                    |  GCForeground            of  int
5006                                    |  GCBackground            of  int
5007                                    |  GCLineWidth             of  int
5008                                    |  GCLineStyle             of  GCLineStyle
5009                                    |  GCCapStyle               of  GCCapStyle
5010                                    |  GCJoinStyle             of  GCJoinStyle
5011                                    |  GCFillStyle             of  GCFillStyle
5012                                    |  GCFillRule               of  GCFillRule
5013                                    |  GCTile                    of  Drawable
5014                                    |  GCStipple                of  Drawable
5015                                    |  GCTSOrigin               of  XPoint
5016                                    |  GCFont                    of  Font
5017                                    |  GCSubwindowMode       of  GCSubwindowMode
5018                                    |  GCGraphicsExposures  of  bool
5019                                    |  GCClipOrigin            of  XPoint
5020                                    |  GCClipMask               of  Drawable
5021                                    |  GCDashOffset            of  int
5022                                    |  GCDashList               of  int
5023                                    |  GCArcMode                of  GCArcMode
5024
5025
5026Argument Description:
5027
5028       The GCFunction attributes of a GC are used when you update a section of a drawable
5029       (the  destination)  with  bits  from  somewhere  else  (the  source).   The  function  in  a  GC
5030       defines how the new destination bits are to be computed from the source bits and the old
5031       destination bits.  GXcopy is typically the most useful because it will work on a colour
5032       display,  but  special  applications  may  use  other  functions,  particularly  in  concert  with
5033       particular planes of a colour display.  The 16 GC functions are:
5034
503572                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
5036
5037
5038
5039          datatype  GCFunction  =  GXclear            |  GXand            |  GXandReverse  |  GXcopy
5040                                       |  GXandInverted   |  GXnoop          |  GXxor            |  GXor
5041                                       |  GXnor               |  GXequiv         |  GXinvert       |  GXorReverse
5042                                       |  GXcopyInverted  |  GXorInverted  |  GXnand          |  GXset
5043
5044
5045       Many  graphics  operations  depend  on  either  pixel  values  or  planes  in  a  GC.  The  GC-
5046       PlaneMask attribute is an int, and it specifies which planes of the destination are to be
5047       modified,  one bit per plane.  A monochrome display has only one plane and will be the
5048       least-significant bit of the word.  As planes are added to the display hardware, they will
5049       occupy more significant bits in the plane mask.
5050
5051       In graphics operations, given a source and destination pixel, the result is computed bitwise
5052       on corresponding bits of the pixels.  That is, a Boolean operation is performed in each bit
5053       plane.  The plane-mask restricts the operation to a subset of planes.  The value AllPlanes
5054       can be used to refer to all planes of the screen simultaneously.  The result is computed by
5055       the following:
5056
5057
5058             ((src  GC-FUNCTION  dst)  AND  plane-mask)  OR  (dst  AND  (NOT  plane-mask))
5059
5060
5061       Range checking is not performed on the values for foreground, background, or plane-mask.
5062       They are simply truncated to the appropriate number of bits.  The line-width is measured
5063       in pixels and either can be greater than or equal to one (wide line) or can be the special
5064       value zero (thin line).
5065
5066       Wide  lines  are  drawn  centered  on  the  path  described  by  the  graphics  request.   Unless
5067       otherwise  specified  by  the  join-style  or  cap-style,  the  bounding  box  of  a  wide  line  with
5068       endpoints (x1,y1), (x2,y2) and width w is a rectangle with vertices at the following real
5069       coordinates:
5070
5071
5072             (x1-(w*sn/2),y1+(w*cs/2)),
5073             (x1+(w*sn/2),y1-(w*cs/2)),
5074             (x2-(w*sn/2),y2+(w*cs/2)),
5075             (x2+(w*sn/2),y2-(w*cs/2))
5076
5077
5078       Here sn is the sine of the angle of the line, and cs is the cosine of the angle of the line.  A
5079       pixel is part of the line and so is drawn if the center of the pixel is fully inside the bounding
5080       box (which is viewed as having infinitely thin edges).  If the center of the pixel is exactly
5081       on the bounding box, it is part of the line if and only if the interior is immediately to its
5082       right (x increasing direction).  Pixels with centers on a horizontal edge are a special case
5083       and are part of the line if and only if the interior or the boundary is immediately below
5084       (y increasing direction) and the interior or the boundary is immediately to the right (x
5085       increasing direction).
5086
5087       Thin lines (zero line-width) are one-pixel-wide lines drawn using an unspecified,  device-
5088       dependent algorithm.  There are only two constraints on this algorithm.
5089
5090       If a line is drawn unclipped from (x1,y1) to (x2,y2) and if another line is drawn unclipped
5091       from (x1+dx,y1+dy) to (x2+dx,y2+dy), a point (x,y) is touched by drawing the first line
5092       if and only if the point (x+dx,y+dy) is touched by drawing the second line.
5093
5094       The  effective  set  of  points  comprising  a  line  cannot  be  affected  by  clipping.  That  is,  a
5095       point is touched in a clipped line if and only if the point lies inside the clipping region and
5096       the point would be touched by the line when drawn unclipped.
5097
5098       A  wide  line  drawn  from  (x1,y1)  to  (x2,y2)  always  draws  the  same  pixels  as  a  wide  line
5099       drawn from (x2,y2) to (x1,y1), not counting cap-style and join-style.  It is recommended
5100       that this property be true for thin lines, but this is not required.  A line-width of zero may
5101       differ from a line-width of one in which pixels are drawn.  This permits the use of many
5102
5103cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        73
5104
5105
5106
5107       manufacturers' line drawing hardware, which may run many times faster than the more
5108       precisely specified wide lines.
5109
5110       In general, drawing a thin line will be faster than drawing a wide line of width one.  How-
5111       ever, because of their different drawing algorithms, thin lines may not mix well aesthetically
5112       with wide lines.  If it is desirable to obtain precise and uniform results across all displays,
5113       a client should always use a line-width of one rather than a line-width of zero.
5114
5115
5116          datatype  GCLineStyle  =  LineSolid  |  LineOnOffDash  |  LineDoubleDash
5117
5118
5119       The line-style defines which sections of a line are drawn:
5120
5121       LineSolid                        The full path of the line is drawn.
5122
5123       LineDoubleDash                   The full path of the line is drawn, but the even dashes are filled
5124                                        differently than the odd dashes (see fill-style) with CapButt style
5125                                        used where even and odd dashes meet.
5126
5127       LineOnOffDash                    Only the even dashes are drawn, and cap-style applies to all inter-
5128                                        nal ends of the individual dashes, except CapNotLast is treated
5129                                        as CapButt.
5130
5131
5132
5133          datatype  GCCapStyle  =  CapNotLast  |  CapButt  |  CapRound  |  CapProjecting
5134
5135
5136       The cap-style defines how the endpoints of a path are drawn:
5137
5138       CapNotLast                    This is equivalent to CapButt except that for a line-width of zero
5139                                     the final endpoint is not drawn.
5140
5141       CapButt                       The line is square at the endpoint (perpendicular to the slope of the
5142                                     line) with no projection beyond.
5143
5144       CapRound                      The  line  has  a  circular  arc  with  the  diameter  equal  to  the  line-
5145                                     width, centered on the endpoint.  (This is equivalent to CapButt
5146                                     for line-width of zero).
5147
5148       CapProjecting                 The line is square at the end,  but the path continues beyond the
5149                                     endpoint for a distance equal to half the line-width.  (This is equiv-
5150                                     alent to CapButt for line-width of zero).
5151
5152
5153
5154          datatype  GCJoinStyle  =  JoinMiter  |  JoinRound  |  JoinBevel
5155
5156
5157       The join-style defines how corners are drawn for wide lines:
5158
5159       JoinMiter              The outer edges of two lines extend to meet at an angle.  However, if the
5160                              angle is less than 11 degrees, then a JoinBevel join-style is used instead.
5161
5162
5163
5164       JoinRound              The  corner  is  a  circular  arc  with  the  diameter  equal  to  the  line-width,
5165                              centered on the joinpoint.
5166
5167       JoinBevel              The corner has CapButt endpoint styles with the triangular notch filled.
5168
5169
5170
5171       For a line with coincident endpoints (x1=x2,y1=y2), when the cap-style is applied to both
5172       endpoints, the semantics depends on the line-width and the cap-style:
5173
517474                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
5175
5176
5177
5178              CapNotLast              thin       The results are device-dependent, but the desired ef-
5179                                                 fect is that nothing is drawn.
5180                   CapButt            thin       The results are device-dependent, but the desired ef-
5181                                                 fect is that a single pixel is drawn.
5182                CapRound              thin       The results are the same as for CapButt/thin.
5183          CapProjecting               thin       The results are the same as for CapButt/thin.
5184                   CapButt           wide        nothing is drawn.
5185                CapRound             wide        The closed path is a circle, centered at the endpoint,
5186                                                 and with the diameter equal to the line-width.
5187          CapProjecting              wide        The  closed  path  is  a  square,  aligned  with  the  coor-
5188                                                 dinate axes,  centered at the endpoint,  and with the
5189                                                 sides equal to the line-width.
5190
5191       For a line with coincident endpoints (x1=x2, y1=y2), when the join-style is applied at one
5192       or both endpoints, the effect is as if the line was removed from the overall path.  However,
5193       if the total path consists of or is reduced to a single point joined with itself, the effect is
5194       the same as when the cap-style is applied at both endpoints.
5195
5196       The tile/stipple and clip origins are interpreted relative to the origin of whatever destina-
5197       tion drawable is specified in a graphics request.  The tile pixmap must have the same root
5198       and depth as the GC, or a BadMatch error results.  The stipple pixmap must have depth
5199       one and must have the same root as the GC, or a BadMatch error results.  For stipple
5200       operations where the fill-style is FillStippled but not FillOpaqueStippled, the stipple
5201       pattern is tiled in a single plane and acts as an additional clip mask to be ANDed with
5202       the clip-mask.  Although some sizes may be faster to use than others, any size pixmap can
5203       be used for tiling or stippling.
5204
5205
5206          datatype  GCFillStyle  =  FillSolid      |  FillTiled
5207                                        |  FillStippled  |  FillOpaqueStippled
5208
5209
5210       The fill-style defines the contents of the source for line, text, and fill requests.  For all text
5211       and fill requests, for line requests with line-style LineSolid, and for the even dashes for line
5212       requests with line-style LineOnOffDash or LineDoubleDash, the following apply:
5213
5214       FillSolid                             Foreground
5215
5216       FillTiled                             Tile
5217
5218       FillOpaqueStippled                    A  tile  with  the  same  width  and  height  as  stipple,  but  with
5219                                             background everywhere stipple has a zero and with foreground
5220                                             everywhere stipple has a one
5221
5222       FillStippled                          Foreground masked by stipple
5223
5224       When drawing lines with line-style LineDoubleDash, the odd dashes are controlled by
5225       the fill-style in the following manner:
5226
5227       FillSolid                             Background
5228
5229       FillTiled                             Same as for even dashes
5230
5231       FillOpaqueStippled                    Same as for even dashes
5232
5233       FillStippled                          Background masked by stipple
5234
5235       Storing a pixmap in a GC might or might not result in a copy being made.  If the pixmap
5236       is later used as the destination for a graphics request, the change might or might not be
5237       reflected in the GC. If the pixmap is used simultaneously in a graphics request both as a
5238       destination and as a tile or stipple, the results are undefined.
5239
5240       For optimum performance, you should draw as much as possible with the same GC (with-
5241       out changing its components).  The costs of changing GC components relative to using
5242
5243cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        75
5244
5245
5246
5247       different GCs depend upon the display hardware and the server implementation.  It is quite
5248       likely that some amount of GC information will be cached in display hardware and that
5249       such hardware can only cache a small number of GCs.
5250
5251       The dashes value is actually a simplified form of the more general patterns that can be set
5252       with XSetDashes.  Specifying a value of N is equivalent to specifying the two-element list
5253       [N,N] in XSetDashes.  The value must be non-zero, or a BadValue error results.  The
5254       value must be less than 256 or exception Range is raised.
5255
5256       The  clip-mask  restricts  writes  to  the  destination  drawable.   If  the  clip-mask  is  set  to  a
5257       pixmap,  it  must  have  depth  one  and  have  the  same  root  as  the  GC,  or  a  BadMatch
5258       error results.  If clip-mask is set to NoDrawable, the pixels are always drawn regardless
5259       of the clip origin.  The clip-mask also can be set by calling the XSetClipRectangles or
5260       XSetRegion functions.  Only pixels where the clip-mask has a bit set to 1 are drawn.  Pixels
5261       are not drawn outside the area covered by the clip-mask or where the clip-mask has a bit
5262       set to 0.  The clip-mask affects all graphics requests.  The clip-mask does not clip sources.
5263       The clip-mask origin is interpreted relative to the origin of whatever destination drawable
5264       is specified in a graphics request.
5265
5266
5267          datatype  GCSubwindowMode  =  ClipByChildren  |  IncludeInferiors
5268
5269
5270       You can set the subwindow-mode to ClipByChildren or IncludeInferiors.  For Clip-
5271       ByChildren, both source and destination windows are additionally clipped by all viewable
5272       InputOutputClass children.  For IncludeInferiors, neither source nor destination win-
5273       dow is clipped by inferiors.  This will result in including subwindow contents in the source
5274       and drawing through subwindow boundaries of the destination.  The use of IncludeInfe-
5275       riors on a window of one depth with mapped inferiors of differing depth is not illegal, but
5276       the semantics are undefined by the core protocol.
5277
5278
5279          datatype  GCFillRule  =  EvenOddRule  |  WindingRule
5280
5281
5282       The fill-rule defines what pixels are inside (drawn) for paths given in XFillPolygon re-
5283       quests and can be set to EvenOddRule or WindingRule.  For EvenOddRule, a point
5284       is inside if an infinite ray with the point as origin crosses the path an odd number of times.
5285       For WindingRule, a point is inside if an infinite ray with the point as origin crosses an
5286       unequal number of clockwise and counterclockwise directed path segments.  A clockwise
5287       directed path segment is one that crosses the ray from left to right as observed from the
5288       point.  A  counterclockwise  segment  is  one  that  crosses  the  ray  from  right  to  left  as  ob-
5289       served from the point.  The case where a directed line segment is coincident with the ray
5290       is uninteresting because you can simply choose a different ray that is not coincident with
5291       a segment.
5292
5293       For both EvenOddRule and WindingRule, a point is infinitely small, and the path is
5294       an infinitely thin line.  A pixel is inside if the center point of the pixel is inside and the
5295       center point is not on the boundary.  If the center point is on the boundary, the pixel is
5296       inside if and only if the polygon interior is immediately to its right (x increasing direction).
5297       Pixels with centers on a horizontal edge are a special case and are inside if and only if the
5298       polygon interior is immediately below (y increasing direction).
5299
5300
5301          datatype  GCArcMode  =  ArcChord  |  ArcPieSlice
5302
5303
5304       The arc-mode controls filling in the XFillArcs function and can be set to ArcPieSlice
5305       or ArcChord.  For ArcPieSlice,  the arcs are pie-slice filled.  For ArcChord,  the arcs
5306       are chord filled.
5307
5308       The graphics-exposure flag controls GraphicsExpose event generation for XCopyArea
5309       and XCopyPlane requests (and any similar requests defined by extensions).
5310
531176                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
5312
5313
5314
5315Description:
5316
5317       The  XCreateGC  function  creates  a  graphics  context  and  returns  a  GC.  The  GC  can
5318       be used with any destination drawable having the same root and depth as the specified
5319       drawable.  Use with other drawables results in a BadMatch error.
5320
5321       The XChangeGC function changes the components specified by values for the specified
5322       GC. The values argument contains the values to be set.  The values and restrictions are the
5323       same as for XCreateGC. Changing the clip-mask overrides any previous XSetClipRect-
5324       angles request on the context.  Changing the dash-offset or dash-list overrides any previous
5325       XSetDashes request on the context.  The order in which components are verified and al-
5326       tered is server-dependent.  If an error is generated, a subset of the components may have
5327       been altered.
5328
5329       The XFreeGC function destroys the specified GC.
53302.10.3        XSetArcMode
5331
5332
5333
5334Types:
5335
5336
5337          val  XSetArcMode:  GC  ->  GCArcMode  ->  unit
5338
5339
5340Syntax:
5341
5342
5343          XSetArcMode  gc  mode  ;
5344
5345
5346Arguments:
5347
5348       gc              Specifies the GC.
5349
5350       mode            Specifies the arc mode.  You can pass ArcChord or ArcPieSlice.
5351
5352Argument Type:
5353
5354
5355          datatype  GCArcMode  =  ArcChord  |  ArcPieSlice
5356
5357
5358Description:
5359
5360       The XSetArcMode function sets the arc mode in the specified GC.
53612.10.4        XSetBackground
5362
5363
5364
5365Types:
5366
5367
5368          val  XSetBackground:  GC  ->  int  ->  unit
5369
5370
5371Syntax:
5372
5373
5374          XSetBackground  gc  background  ;
5375
5376
5377Arguments:
5378
5379       background                Specifies the background pixel.
5380
5381       gc                        Specifies the GC.
5382
5383Description:
5384
5385       The XSetBackground function sets the background pixel in the specified GC.
5386
5387cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        77
5388
5389
5390
53912.10.5        XSetClipMask
5392
5393
5394
5395Types:
5396
5397
5398          val  XSetClipMask:  GC  ->  Drawable  ->  unit
5399
5400
5401Syntax:
5402
5403
5404          XSetClipMask  gc  pixmap  ;
5405
5406
5407Arguments:
5408
5409
5410       gc                 Specifies the GC.
5411
5412       pixmap             Specifies the pixmap or NoDrawable.
5413
5414
5415Description:
5416
5417       The  XSetClipMask  function  sets  the  clip-mask  in  the  specified  GC  to  the  specified
5418       pixmap. If the clip-mask is set to NoDrawable, the pixels are are always drawn (regardless
5419       of the clip-origin).
54202.10.6        XSetClipOrigin
5421
5422
5423
5424Types:
5425
5426
5427          val  XSetClipOrigin:  GC  ->  XPoint  ->  unit
5428
5429
5430Syntax:
5431
5432
5433          XSetClipOrigin  gc  origin  ;
5434
5435
5436Arguments:
5437
5438
5439       gc               Specifies the GC.
5440
5441       origin           Specifies the x and y coordinates of the clip-mask origin.
5442
5443
5444Description:
5445
5446       The  XSetClipOrigin  function  sets  the  clip  origin  in  the  specified  GC.  The  clip-mask
5447       origin is interpreted relative to the origin of whatever destination drawable is specified in
5448       the graphics request.
54492.10.7        XSetClipRectangles
5450
5451
5452
5453Types:
5454
5455
5456          val  XSetClipRectangles:  GC  ->  XPoint  ->  XRectangle  list  ->  GCOrder  ->  unit
5457
5458
5459Syntax:
5460
546178                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
5462
5463
5464
5465          XSetClipRectangles  gc  origin  rectangles  ordering  ;
5466
5467
5468Arguments:
5469
5470
5471       gc                     Specifies the GC.
5472
5473       origin                 Specifies the x and y coordinates of the clip-mask origin.
5474
5475       rectangles             Specifies a list of rectangles that define the clip-mask.
5476
5477       ordering               Specifies  the  ordering  relations  on  the  rectangles.   You  can  pass  Un-
5478                              sorted, YSorted, YXSorted, or YXBanded.
5479
5480
5481Argument Type:
5482
5483
5484          datatype  GCOrder  =  Unsorted  |  YSorted  |  YXSorted  |  YXBanded
5485
5486
5487Description:
5488
5489       The  XSetClipRectangles  function  changes  the  clip-mask  in  the  specified  GC  to  the
5490       specified list of rectangles and sets the clip origin.  The output is clipped to remain con-
5491       tained within the rectangles.  The clip-origin is interpreted relative to the origin of what-
5492       ever destination drawable is specified in a graphics request.  The rectangle coordinates are
5493       interpreted  relative  to  the  clip-origin.  The  rectangles  should  be  nonintersecting,  or  the
5494       graphics results will be undefined.  Note that the list of rectangles can be empty,  which
5495       effectively disables output.  This is the opposite of passing NoDrawable as the clip-mask
5496       in XCreateGC, XChangeGC, and XSetClipMask.
5497
5498       If  known  by  the  client,  ordering  relations  on  the  rectangles  can  be  specified  with  the
5499       ordering  argument.   This  may  provide  faster  operation  by  the  server.   If  an  incorrect
5500       ordering is specified, the X server may generate a BadMatch error, but it is not required
5501       to do so.  If no error is generated, the graphics results are undefined.  Unsorted means the
5502       rectangles are in arbitrary order.  YSorted means that the rectangles are nondecreasing
5503       in their Y origin.  YXSorted additionally constrains YSorted order in that all rectangles
5504       with  an  equal  Y  origin  are  nondecreasing  in  their  X  origin.   YXBanded  additionally
5505       constrains YXSorted by requiring that, for every possible Y scanline, all rectangles that
5506       include that scanline have an identical Y origins and Y extents.
55072.10.8        XSetColours
5508
5509
5510
5511Types:
5512
5513
5514          val  XSetColours:  GC  ->  int  ->  int  ->  unit
5515
5516
5517Syntax:
5518
5519
5520          XSetColours  gc  foreground  background  ;
5521
5522
5523Arguments:
5524
5525
5526       background                Specifies the background pixel.
5527
5528       foreground                Specifies the foreground pixel.
5529
5530       gc                        Specifies the GC.
5531
5532
5533Description:
5534
5535       The XSetColours convenience function sets the foreground and background components
5536       for the specified GC.
5537
5538cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        79
5539
5540
5541
55422.10.9        XSetDashes
5543
5544
5545
5546Types:
5547
5548
5549          val  XSetDashes:  GC  ->  int  ->  int  list  ->  unit
5550
5551
5552Syntax:
5553
5554
5555          XSetDashes  offset  dashes  ;
5556
5557
5558Arguments:
5559
5560
5561       dashes            Specifies the dash-list for the dashed line-style you want to set for the specified
5562                         GC.
5563
5564       offset            Specifies the phase of the pattern for the dashed line-style you want to set
5565                         for the specified GC.
5566
5567
5568Description:
5569
5570       The  XSetDashes  function  sets  the  dash-offset  and  dash-list  attributes  for  dashed  line
5571       styles in the specified GC. There must be at least one element in the specified dash-list,
5572       or a BadValue error results.  The initial and alternating elements (second, fourth, and so
5573       on) of the dash-list are the even dashes, and the others are the odd dashes.  Each element
5574       specifies a dash length in pixels.  All of the elements must be non-zero, or a BadValue
5575       error  results.   All  of  the  elements  must  be  less  than  256  or  exception  Range  is  raised.
5576       Specifying an odd-length list is equivalent to specifying the same list concatenated with
5577       itself to produce an even-length list.
5578
5579       The dash-offset defines the phase of the pattern, specifying how many pixels into the dash-
5580       list the pattern should actually begin in any single graphics request.  Dashing is continuous
5581       through path elements combined with a join-style but is reset to the dash-offset between
5582       each sequence of joined lines.
5583
5584       The unit of measure for dashes is the same for the ordinary coordinate system.  Ideally, a
5585       dash length is measured along the slope of the line, but implementations are only required
5586       to  match  this  ideal  for  horizontal  and  vertical  lines.   Failing  the  ideal  semantics,  it  is
5587       suggested that the length be measured along the major axis of the line.  The major axis is
5588       defined as the x axis for lines drawn at an angle of between -45 and +45 degrees or between
5589       315 and 225 degrees from the x axis.  For all other lines, the major axis is the y axis.
55902.10.10         XSetFillRule
5591
5592
5593
5594Types:
5595
5596
5597          val  XSetFillRule:  GC  ->  GCFillRule  ->  unit
5598
5599
5600Syntax:
5601
5602
5603          XSetFillRule  gc  rule  ;
5604
5605
5606Arguments:
5607
560880                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
5609
5610
5611
5612       gc            Specifies the GC.
5613
5614       rule          Specifies the fill-rule you want to set for the specified GC. You can pass Even-
5615                     OddRule or WindingRule.
5616
5617
5618Argument Type:
5619
5620
5621          datatype  GCFillRule  =  EvenOddRule  |  WindingRule
5622
5623
5624Description:
5625
5626       The XSetFillRule function sets the fill-rule in the specified GC.
56272.10.11         XSetFillStyle
5628
5629
5630
5631Types:
5632
5633
5634          val  XSetFillStyle:  GC  ->  GCFillStyle  ->  unit
5635
5636
5637Syntax:
5638
5639
5640          XSetFillStyle  gc  style  ;
5641
5642
5643Arguments:
5644
5645
5646       gc             Specifies the GC.
5647
5648       style          Specifies the fill-style you want to set for the specified GC. You can pass Fill-
5649                      Solid, FillTiled, FillStippled, or FillOpaqueStippled.
5650
5651
5652Argument Type:
5653
5654
5655          datatype  GCFillStyle  =  FillSolid      |  FillTiled
5656                                        |  FillStippled  |  FillOpaqueStippled
5657
5658
5659Description:
5660
5661       The XSetFillStyle function sets the fill-style in the specified GC.
56622.10.12         XSetFont
5663
5664
5665
5666Types:
5667
5668
5669          val  XSetFont:  GC  ->  Font  ->  unit
5670
5671
5672Syntax:
5673
5674
5675          XSetFont  gc  font  ;
5676
5677
5678Arguments:
5679
5680
5681       gc            Specifies the GC.
5682
5683       font          Specifies the font.
5684
5685
5686Description:
5687
5688       The XSetFont function sets the current font in the specified GC.
5689
5690cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        81
5691
5692
5693
56942.10.13         XSetForeground
5695
5696
5697
5698Types:
5699
5700
5701          val  XSetForeground:  GC  ->  int  ->  unit
5702
5703
5704Syntax:
5705
5706
5707          XSetForeground  gc  foreground  ;
5708
5709
5710Arguments:
5711
5712
5713       foreground               Specifies the foreground pixel.
5714
5715       gc                       Specifies the GC.
5716
5717
5718Description:
5719
5720       The XSetForeground function sets the foreground pixel in the specified GC.
57212.10.14         XSetFunction
5722
5723
5724
5725Types:
5726
5727
5728          val  XSetFunction:  GC  ->  GCFunction   ->  unit
5729
5730
5731Syntax:
5732
5733
5734          XSetFunction  gc  function  ;
5735
5736
5737Arguments:
5738
5739
5740       function             Specifies the drawing function.
5741
5742       gc                   Specifies the GC.
5743
5744
5745Description:
5746
5747       XSetFunction sets the drawing function in the specified GC.
57482.10.15         XSetGraphicsExposures
5749
5750
5751
5752Types:
5753
5754
5755          val  XSetGraphicsExposures:  GC  ->  bool  ->  unit
5756
5757
5758Syntax:
5759
5760
5761          XSetGraphicsExposures  gc  exposures  ;
5762
5763
5764Arguments:
5765
576682                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
5767
5768
5769
5770       gc                     Specifies the GC.
5771
5772       exposures              Specifies  a  bool  that  indicates  whether  you  want  GraphicsExpose
5773                              and  NoExpose  events  to  be  reported  when  calling  XCopyArea  and
5774                              XCopyPlane with this GC.
5775
5776Description:
5777
5778       The XSetGraphicsExposures function sets the graphics-exposures flag in the specified
5779       GC.
57802.10.16         XSetLineAttributes
5781
5782
5783
5784Types:
5785
5786
5787          val  XSetLineAttributes:  GC  ->  int             ->
5788                                                     GCLineStyle  ->
5789                                                     GCCapStyle   ->
5790                                                     GCJoinStyle  ->  unit
5791
5792
5793Syntax:
5794
5795
5796          XSetLineAttributes  gc  lineWidth  lineStyle  capStyle  joinStyle  ;
5797
5798
5799Arguments:
5800
5801       capStyle             Specifies the line-style and cap-style you want to set for the specified GC.
5802                            You can pass CapNotLast, CapButt, CapRound, or CapProjecting.
5803
5804       joinStyle            Specifies the line join-style you want to set for the specified GC. You can
5805                            pass JoinMiter, JoinRound, or JoinBevel.
5806
5807       lineStyle            Specifies the line-style you want to set for the specified GC. You can pass
5808                            LineSolid, LineOnOffDash, or LineDoubleDash.
5809
5810       lineWidth            Specifies the line-width you want to set for the specified GC.
5811
5812Description:
5813
5814       The XSetLineAttributes function sets the line drawing components in the specified GC.
58152.10.17         XSetPlaneMask
5816
5817
5818
5819Types:
5820
5821
5822          val  XSetPlaneMask:  GC  ->  int  ->  unit
5823
5824
5825Syntax:
5826
5827
5828          XSetPlaneMask  gc  planeMask  ;
5829
5830
5831Arguments:
5832
5833       gc                       Specifies the GC.
5834
5835       planeMask                Specifies the plane mask.
5836
5837Description:
5838
5839       The XSetPlaneMask function sets the plane mask in the specified GC.
5840
5841cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        83
5842
5843
5844
58452.10.18         XSetState
5846
5847
5848
5849Types:
5850
5851
5852          val  XSetState:  GC  ->  int  ->  int  ->  GCFunction  ->  int  ->  unit
5853
5854
5855Syntax:
5856
5857
5858          XSetState  gc  foreground  background  function  planeMask  ;
5859
5860
5861Arguments:
5862
5863
5864       background                Specifies the background pixel.
5865
5866       foreground                Specifies the foreground pixel.
5867
5868       function                  Specifies the drawing function.
5869
5870       gc                        Specifies the GC.
5871
5872       planeMask                 Specifies the plane mask.
5873
5874
5875Description:
5876
5877       The XSetState function sets the foreground, background, plane mask, and function com-
5878       ponents for the specified GC.
58792.10.19         XSetStipple
5880
5881
5882
5883Types:
5884
5885
5886          val  XSetStipple:  GC  ->  Drawable  ->  unit
5887
5888
5889Syntax:
5890
5891
5892          XSetStipple  gc  stipple  ;
5893
5894
5895Arguments:
5896
5897
5898       gc                Specifies the GC.
5899
5900       stipple           Specifies the stipple you want to set for the specified GC.
5901
5902
5903Description:
5904
5905       The XSetStipple function sets the stipple in the specified GC. The stipple and GC must
5906       have the same depth, or a BadMatch error results.
5907
590884                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
5909
5910
5911
59122.10.20         XSetSubwindowMode
5913
5914
5915
5916Types:
5917
5918
5919          val  XSetSubwindowMode:  GC  ->  GCSubwindowMode  ->  unit
5920
5921
5922Syntax:
5923
5924
5925          XSetSubwindowMode  gc  mode  ;
5926
5927
5928Arguments:
5929
5930
5931       gc              Specifies the GC.
5932
5933       mode            Specifies the subwindow mode.  You can pass ClipByChildren or Include-
5934                       Inferiors.
5935
5936
5937Argument Type:
5938
5939
5940          datatype  GCSubwindowMode  =  ClipByChildren  |  IncludeInferiors
5941
5942
5943Description:
5944
5945       The XSetSubwindowMode function sets the subwindow mode in the specified GC.
59462.10.21         XSetTile
5947
5948
5949
5950Types:
5951
5952
5953          val  XSetTile:  GC  ->  Drawable  ->  unit
5954
5955
5956Syntax:
5957
5958
5959          XSetTile  gc  tile  ;
5960
5961
5962Arguments:
5963
5964
5965       gc           Specifies the GC.
5966
5967       tile         Specifies the fill tile you want to set for the specified GC.
5968
5969
5970Description:
5971
5972       The XSetTile function sets the fill tile in the specified GC. The tile and GC must have
5973       the same depth, or a BadMatch error results.
5974
5975cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        85
5976
5977
5978
59792.10.22         XSetTSOrigin
5980
5981
5982
5983Types:
5984
5985
5986          val  XSetTSOrigin:  GC  ->  XPoint  ->  unit
5987
5988
5989Syntax:
5990
5991
5992          XSetTSOrigin  gc  origin  ;
5993
5994
5995Arguments:
5996
5997
5998       gc               Specifies the GC.
5999
6000       origin           Specifies the x and y coordinates of the tile and stipple origin.
6001
6002
6003Description:
6004
6005       The XSetTSOrigin function sets the tile/stipple origin in the specified GC. When graph-
6006       ics requests call for tiling or stippling,  the parent's origin will be interpreted relative to
6007       whatever destination drawable is specified in the graphics request.
6008
60092.11         Images
6010
6011
6012
60132.11.1        ImageByteOrder,  ImageDepth,  ImageSize
6014
6015
6016
6017Types:
6018
6019
6020          val  ImageByteOrder:  XImage  ->  ImageOrder
6021          val  ImageDepth:       XImage  ->  int
6022          val  ImageSize:         XImage  ->  XRectangle
6023
6024
6025Argument Type:
6026
6027
6028          datatype  ImageOrder  =  LSBFirst  |  MSBFirst
6029
6030
6031Syntax:
6032
6033
6034          val  order  =  ImageByteOrder  image  ;
6035          val  depth  =  ImageDepth  image  ;
6036          val  area   =  ImageSize  image  ;
6037
6038
6039Description:
6040
6041       The ImageByteOrder function returns the byte order value of an XImage.
6042
6043       The ImageSize function returns the size in pixels of an XImage.
6044
6045       The ImageDepth function returns the depth value of an XImage.
6046
604786                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
6048
6049
6050
60512.11.2        VisualRedMask,  VisualGreenMask,  VisualBlueMask
6052
6053
6054
6055Types:
6056
6057
6058          val  VisualRedMask:     Visual  ->  int
6059          val  VisualGreenMask:  Visual  ->  int
6060          val  VisualBlueMask:   Visual  ->  int
6061
6062
6063Syntax:
6064
6065
6066          val  redMask     =  VisualRedMask     visual  ;
6067          val  greenMask  =  VisualGreenMask  visual  ;
6068          val  blueMask   =  VisualBlueMask   visual  ;
6069
6070
6071Arguments:
6072
6073
6074       visual           Specifies the visual.
6075
6076
6077Description:
6078
6079       These functions return the masks used for Z format images.
60802.11.3        XCreateImage,  XGetPixel,  XPutPixel,  XSubImage,
6081
6082              XAddPixel
6083
6084
6085
6086Types:
6087
6088
6089          val  XGetPixel:  XImage  ->  XPoint  ->  int
6090          val  XPutPixel:  XImage  ->  XPoint  ->  int  ->  unit
6091          val  XSubImage:  XImage  ->  XRectangle  ->  XImage
6092          val  XAddPixel:  XImage  ->  int  ->  unit
6093
6094
6095          val  XCreateImage:  Visual         ->  int  ->
6096                                    ImageFormat  ->  int  ->
6097                                    string         ->  XRectangle  ->  int  ->  int  ->  XImage
6098
6099
6100Syntax:
6101
6102
6103          val  image  =  XCreateImage  visual  depth  format  offset
6104                                              data  area  bitmapPad  bytesPerLine  ;
6105
6106
6107          val  pixel  =  XGetPixel  image  point  ;
6108          val  image  =  XSubImage  image  subArea  ;
6109
6110
6111          XPutPixel  image  point  pixel  ;
6112          XAddPixel  image  value  ;
6113
6114
6115Arguments:
6116
6117
6118       bitmapPad                   Specifies the quantum of a scanline (8, 16, or 32 bits).  In other words,
6119                                   the start of one scanline is separated in client memory from the start
6120                                   of the next scanline by an integer multiple of this many bits.
6121
6122cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        87
6123
6124
6125
6126       bytesPerLine                Specifies the number of bytes in the client image between the start of
6127                                   one scanline and the start of the next.
6128
6129       data                        Specifies the image data.
6130
6131       depth                       Specifies the depth of the image.
6132
6133       format                      Specifies the format for the image.  You can pass XYBitmap, XYP-
6134                                   ixmap, or ZPixmap.
6135
6136       area                        Specifies the width and height of the image, in pixels.
6137
6138       offset                      Specifies the number of pixels to ignore at the beginning of the scan-
6139                                   line.
6140
6141       pixel                       Specifies the new pixel value.
6142
6143       subArea                     Specifies the position and size of the new subimage, in pixels.
6144
6145       value                       Specifies the constant value that is to be added.
6146
6147       visual                      Specifies the visual.
6148
6149       ximage                      Specifies the image.
6150
6151       point                       Specifies the x and y coordinates.
6152
6153
6154Argument Type:
6155
6156
6157          datatype  ImageFormat  =  XYBitmap  |  XYPixmap  |  ZPixmap
6158
6159
6160          datatype  ImageOrder  =  LSBFirst  |  MSBFirst
6161
6162
6163          type  ImageData
6164
6165
6166          val  Data:  string  ->  ImageData
6167
6168
6169          datatype  XImage  =  XImage  of  {  data:                 ImageData,
6170                                                     size:                 XRectangle,
6171                                                     depth:                int,
6172                                                     format:               ImageFormat,
6173                                                     xoffset:             int,
6174                                                     bitmapPad:          int,
6175                                                     byteOrder:          ImageOrder,
6176                                                     bitmapUnit:         int,
6177                                                     bitsPerPixel:      int,
6178                                                     bytesPerLine:      int,
6179                                                     visualRedMask:     int,
6180                                                     bitmapBitOrder:   ImageOrder,
6181                                                     visualBlueMask:   int,
6182                                                     visualGreenMask:  int  }
6183
6184
6185Description:
6186
6187       The  XCreateImage  function  initializes  the  XImage  byteOrder,  bitmapBitOrder,  and
6188       bitmapUnit values from the display and returns an XImage structure.  The red,  green,
6189       and  blue  mask  values  are  defined  for  Z  format  images  only  and  are  derived  from  the
6190       Visual structure passed in.  Other values also are passed in.  The offset permits the rapid
6191       displaying  of  the  image  without  requiring  each  scanline  to  be  shifted  into  position.   If
6192       you pass a zero value in bytesPerLine, Xlib assumes that the scanlines are contiguous in
6193       memory and calculates the value of bytesPerLine itself.
6194
619588                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
6196
6197
6198
6199       The  XGetPixel  function  returns  the  specified  pixel  from  the  named  image.  The  pixel
6200       value is returned in normalized format (that is, the least-significant byte of the int is the
6201       least-significant byte of the pixel).  The image must contain the x and y coordinates.
6202
6203       The XPutPixel function overwrites the pixel in the named image with the specified pixel
6204       value.  The input pixel value must be in normalized format (that is, the least-significant
6205       byte of the int is the least-significant byte of the pixel).  The image must contain the x and
6206       y coordinates.
6207
6208       The XSubImage function creates a new image that is a subsection of an existing one.  The
6209       data is copied from the source image, and the image must contain the rectangle defined
6210       by subArea.  If XSubImage fails then exception XWindows is raised with "XSubImage
6211       failed" .
6212
6213       The XAddPixel function adds a constant value to every pixel in an image.  It is useful
6214       when you have a base pixel value from allocating colour resources and need to manipulate
6215       the image to that form.
62162.11.4        XPutImage,  XGetImage,  XGetSubImage
6217
6218
6219
6220Types:
6221
6222
6223          val  XPutImage:  Drawable  ->  GC  ->  XImage  ->  XPoint  ->  XRectangle  ->  unit
6224          val  XGetImage:  Drawable  ->  XRectangle  ->  int  ->  ImageFormat  ->  XImage
6225
6226
6227          val  XGetSubImage:  Drawable  ->  XRectangle  ->  int  ->  ImageFormat  ->
6228                                    XImage  ->  XPoint  ->  unit
6229
6230
6231Syntax:
6232
6233
6234          val  image  =  XGetImage  d  area  planeMask  format  ;
6235          XGetSubImage  d  area  planeMask  format  destImage  destPoint  ;
6236          XPutImage  d  gc  image  srcPoint  destArea  ;
6237
6238
6239Arguments:
6240
6241
6242       d                       Specifies the drawable.
6243
6244       destImage               Specifies the destination image.
6245
6246       destPoint               Specifies the x and y coordinates, which are relative to the origin of the
6247                               drawable and are the coordinates of the subimage or which are relative
6248                               to the origin of the destination rectangle,  specify its upper-left corner,
6249                               and determine where the subimage is placed in the destination image.
6250
6251       format                  Specifies the format for the image.  You can pass XYBitmap,  XYP-
6252                               ixmap, or ZPixmap.
6253
6254       gc                      Specifies the GC.
6255
6256       image                   Specifies the image you want combined with the rectangle.
6257
6258       planeMask               Specifies the plane mask.
6259
6260       srcPoint                Specifies the offsets from the left and top edges of the image defined by
6261                               the XImage structure.
6262
6263       area                    Specifies the position and size of the subimage,
6264
6265cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        89
6266
6267
6268
6269       destArea                Specifies coordinates relative to the origin of the drawable to define the
6270                               destination rectangle.
6271
6272
6273Description:
6274
6275       The XPutImage function combines an image in memory with a rectangle of the specified
6276       drawable.  If XYBitmap format is used, the depth must be one, or a BadMatch error
6277       results. The foreground pixel in the GC defines the source for the one bits in the image, and
6278       the background pixel defines the source for the zero bits.  For XYPixmap and ZPixmap,
6279       the  depth  must  match  the  depth  of  the  drawable,  or  a  BadMatch  error  results.   The
6280       section of the image defined by the srcPoint and area arguments is drawn on the specified
6281       part of the drawable at the position specified by destArea
6282
6283       This function uses these GC components:  foreground, background, function, plane-mask,
6284       subwindow-mode, clip-origin, and clip-mask.
6285
6286       The  XGetImage  function  returns  an  XImage  structure.   This  structure  provides  you
6287       with the contents of the specified rectangle of the drawable in the format you specify.  If
6288       the format argument is XYPixmap, the image contains only the bit planes you passed to
6289       the planeMask argument.  If the planeMask argument only requests a subset of the planes
6290       of the display,  the depth of the returned image will be the number of planes requested.
6291       If the format argument is ZPixmap, XGetImage returns as zero the bits in all planes
6292       not specified in the planeMask argument.  The function performs no range checking on the
6293       values in planeMask and ignores extraneous bits.
6294
6295       XGetImage returns the depth of the image to the depth member of the XImage struc-
6296       ture.  The depth of the image is as specified when the drawable was created, except when
6297       getting  a  subset  of  the  planes  in  XYPixmap  format,  when  the  depth  is  given  by  the
6298       number of bits set to 1 in planeMask.
6299
6300       If  the  drawable  is  a  pixmap,  the  given  rectangle  must  be  wholly  contained  within  the
6301       pixmap, or a BadMatch error results.  If the drawable is a window, the window must be
6302       viewable, and it must be the case that if there were no inferiors or overlapping windows, the
6303       specified rectangle of the window would be fully visible on the screen and wholly contained
6304       within  the  outside  edges  of  the  window,  or  a  BadMatch  error  results.   Note  that  the
6305       borders  of  the  window  can  be  included  and  read  with  this  request.   If  the  window  has
6306       backing-store, the backing-store contents are returned for regions of the window that are
6307       obscured by noninferior windows.  If the window does not have backing-store, the returned
6308       contents of such obscured regions are undefined.  The returned contents of visible regions
6309       of inferiors of a different depth than the specified window's depth are also undefined.  The
6310       pointer cursor image is not included in the returned contents.  If XGetImage fails then
6311       exception XWindows is raised with "XGetImage failed" .
6312
6313       The XGetSubImage function updates destImage with the specified subimage in the same
6314       manner as XGetImage.  If the format argument is XYPixmap, the image contains only
6315       the bit planes you passed to the planeMask argument. If the format argument is ZPixmap,
6316       XGetSubImage  returns  as  zero  the  bits  in  all  planes  not  specified  in  the  planeMask
6317       argument.   The  function  performs  no  range  checking  on  the  values  in  planeMask  and
6318       ignores extraneous bits.
6319
6320       The depth of the destination XImage structure must be the same as that of the drawable.
6321       If the specified subimage does not fit at the specified location on the destination image, the
6322       right and bottom edges are clipped.  If the drawable is a pixmap, the given rectangle must
6323       be wholly contained within the pixmap,  or a BadMatch error results.  If the drawable
6324       is  a  window,  the  window  must  be  viewable,  and  it  must  be  the  case  that  if  there  were
6325       no inferiors or overlapping windows, the specified rectangle of the window would be fully
6326       visible on the screen and wholly contained within the outside edges of the window, or a
6327       BadMatch error results.  If the window has backing-store, then the backing-store contents
6328
632990                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
6330
6331
6332
6333       are returned for regions of the window that are obscured by noninferior windows.  If the
6334       window does not have backing-store,  the returned contents of such obscured regions are
6335       undefined.  The returned contents of visible regions of inferiors of a different depth than
6336       the specified window's depth are also undefined.
6337
63382.12         Properties  and  Selections
6339
6340
6341
63422.12.1        XDeleteProperty
6343
6344
6345
6346Types:
6347
6348
6349          val  XDeleteProperty:  Drawable  ->  int  ->  unit
6350
6351
6352Syntax:
6353
6354
6355          XDeleteProperty  w  property  ;
6356
6357
6358Arguments:
6359
6360
6361       property             Specifies the property name.
6362
6363       w                    Specifies the window containing the property.
6364
6365
6366Description:
6367
6368       The XDeleteProperty function deletes the specified property only if the property was
6369       defined on the specified window and causes the X server to generate a PropertyNotify event
6370       on the window unless the property does not exist.
63712.12.2        XInternAtom,  XGetAtomName
6372
6373
6374
6375Types:
6376
6377
6378          val  XInternAtom:  string  ->  bool  ->  int
6379          val  XGetAtomName:  int  ->  string
6380
6381
6382Syntax:
6383
6384
6385          val  atom  =  XInternAtom  name  onlyIfExists  ;
6386          val  name  =  XGetAtomName  atom  ;
6387
6388
6389Arguments:
6390
6391
6392       atom                      Specifies the atom whose name you want returned.
6393
6394       name                      Specifies the name associated with the atom you want returned.
6395
6396       onlyIfExists              Specifies  a  bool  that  indicates  whether  XInternAtom  creates  the
6397                                 atom.
6398
6399cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        91
6400
6401
6402
6403Description:
6404
6405       The  XInternAtom  function  returns  the  atom  identifier  associated  with  the  specified
6406       name  string.  If  onlyIfExists  is  false,  the  atom  is  created  if  it  does  not  exist,  otherwise,
6407       XInternAtom returns zero. You should use an ISO Latin-1 string for name. Case matters;
6408       the strings "thing" , "Thing" , and "thinG" all designate different atoms.  The atom will
6409       remain  defined  even  after  the  client's  connection  closes.   It  will  become  undefined  only
6410       when the last connection to the X server closes.
6411
6412       The  XGetAtomName  function  returns  the  name  associated  with  the  specified  atom.
6413       If  XGetAtomName  fails  then  exception  XWindows  is  raised  with  "XGetAtomName
6414       failed" .
64152.12.3        XSetProperty,  XGetTextProperty
6416
6417
6418
6419Types:
6420
6421
6422          val  XSetProperty:  Drawable  ->  int  ->  PropertyValue  ->  int  ->  unit
6423          val  XGetTextProperty:  Drawable  ->  int  ->  (string  *  int  *  int  *  int)
6424
6425
6426Syntax:
6427
6428
6429          XSetProperty  w  propertyAtom  propertyValue  propertyTypeAtom  ;
6430          val  (value,encoding,format,nitems)  =  XGetTextProperty  w  propertyAtom  ;
6431
6432
6433Arguments:
6434
6435
6436       w                                     Specifies the window
6437
6438       propertyAtom                          Specifies the property name as an Atom.
6439
6440       propertyValue                         Specifies the property value as one of the predefined types.
6441
6442       propertyTypeAtom                      Specifies the name of the property type as an Atom.
6443
6444       value                                 Returns the contents of the property as chars/bytes.
6445
6446       encoding                              Returns the property type atom
6447
6448       format                                Returns the property format which is 1, 2 or 4 bytes per item.
6449
6450       nitems                                Returns the number of items in the value
6451
6452
6453Argument Type:
6454
6455
6456          datatype  PropertyValue  =  PropertyArc             of  XArc  list
6457                                           |  PropertyAtom            of  int  list
6458                                           |  PropertyBitmap         of  Drawable  list
6459                                           |  PropertyColormap      of  Colormap  list
6460                                           |  PropertyCursor         of  Cursor  list
6461                                           |  PropertyDrawable      of  Drawable  list
6462                                           |  PropertyFont            of  Font  list
6463                                           |  PropertyInteger       of  int  list
6464                                           |  PropertyPixmap         of  Drawable  list
6465                                           |  PropertyPoint          of  XPoint  list
6466                                           |  PropertyRectangle     of  XRectangle  list
6467                                           |  PropertyRGBColormap  of  XStandardColormap  list
6468                                           |  PropertyString         of  string
6469
647092                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
6471
6472
6473
6474                                           |  PropertyVisual         of  Visual  list
6475                                           |  PropertyWindow         of  Drawable  list
6476                                           |  PropertyWMHints       of  XWMHint  list
6477                                           |  PropertyWMSizeHints  of  XWMSizeHint  list
6478                                           |  PropertyWMIconSizes  of  (XRectangle  *
6479                                                                                XRectangle  *
6480                                                                                XRectangle)  list
6481
6482
6483Properties:
6484
6485
6486       WM__CLIENT__MACHINE                             The string name of the machine on which the client
6487                                                       application is running.
6488
6489       WM__COMMAND                                     The  command  and  arguments,  separated  by  ASCII
6490                                                       nulls, used to invoke the application.
6491
6492       WM__ICON__NAME                                  Name to be used in icon.
6493
6494       WM__NAME                                        Name of the application.
6495
6496
6497Description:
6498
6499       The XSetProperty function replaces the existing, specified property for the named win-
6500       dow with the value and type specified.  If the property does not already exist, XSetProp-
6501       erty creates it for the specified window.
6502
6503       The  XGetTextProperty  function  reads  the  specified  property  from  the  window.  The
6504       particular interpretation of the property's encoding and value as 'text' is left to the call-
6505       ing  application.  If  the  specified  property  does  not  exist  on  the  window,  then  exception
6506       XWindows is raised with "XGetTextProperty failed" .
65072.12.4        XSetSelectionOwner,  XGetSelectionOwner,
6508
6509              XConvertSelection,  XSendSelectionNotify
6510
6511
6512
6513Types:
6514
6515
6516          val  XSetSelectionOwner:  int  ->  Drawable  ->  int  ->  unit
6517          val  XGetSelectionOwner:  int  ->  Drawable
6518
6519
6520          val  XConvertSelection:  {  selection:  int,
6521                                              target:      int,
6522                                              property:   int,
6523                                              requestor:  Drawable,
6524                                              time:         int  }  ->  unit
6525
6526
6527          val  XSendSelectionNotify:  {  selection:  int,
6528                                                  target:      int,
6529                                                  property:   int,
6530                                                  requestor:  Drawable,
6531                                                  time:         int  }  ->  unit
6532
6533
6534Syntax:
6535
6536
6537          XSetSelectionOwner  selection  owner  time  ;
6538          val  owner  =  XGetSelectionOwner  selection  ;
6539          XConvertSelection      {selection,target,property,requestor,time}  ;
6540          XSendSelectionNotify  {selection,target,property,requestor,time}  ;
6541
6542cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        93
6543
6544
6545
6546Arguments:
6547
6548
6549       selection            Specifies the selection atom.
6550
6551       owner                Specifies/returns the owner of the specified selection atom.  You can pass
6552                            a window or NoDrawable.
6553
6554       time                 Specifies the time.  You can pass either a timestamp or CurrentTime.
6555
6556       target               Specifies the target atom.
6557
6558       property             Specifies the property name.  You also can pass zero.
6559
6560       requestor            Specifies the requestor.
6561
6562
6563Argument Type:
6564
6565
6566          val  CurrentTime:  int
6567
6568
6569Description:
6570
6571       The XSetSelectionOwner function changes the owner and last-change time for the spec-
6572       ified selection and has no effect if the specified time is earlier than the current last-change
6573       time of the specified selection or is later than the current X server time.  Otherwise, the
6574       last-change time is set to the specified time, with CurrentTime replaced by the current
6575       server  time.   If  the  owner  window  is  specified  as  NoDrawable,  then  the  owner  of  the
6576       selection becomes NoDrawable (that is, no owner).  Otherwise, the owner of the selection
6577       becomes the client executing the request.
6578
6579       If the new owner (whether a client or NoDrawable) is not the same as the current owner
6580       of the selection and the current owner is not NoDrawable, the current owner is sent a
6581       SelectionClear event.  If the client that is the owner of a selection is later terminated
6582       (that  is,  its  connection  is  closed)  or  if  the  owner  window  it  has  specified  in  the  request
6583       is later destroyed, the owner of the selection automatically reverts to NoDrawable, but
6584       the last-change time is not affected.  The selection atom is uninterpreted by the X server.
6585       XGetSelectionOwner  returns  the  owner  window,  which  is  reported  in  SelectionRe-
6586       quest and SelectionClear events.  Selections are global to the X server.
6587
6588       The XGetSelectionOwner function returns the Drawable associated with the window
6589       that  currently  owns  the  specified  selection.   If  no  selection  was  specified,  the  function
6590       returns the constant NoDrawable.  If NoDrawable is returned, there is no owner for the
6591       selection.
6592
6593       XConvertSelection  requests  that  the  specified  selection  be  converted  to  the  specified
6594       target type:
6595
6596
6597
6598              If the specified selection has an owner, the X server sends a SelectionRequest event
6599              to that owner.
6600
6601              If no owner for the specified selection exists, the X server generates a SelectionNotify
6602              event to the requestor with property zero.
6603
6604       The arguments are passed on unchanged in either of the events.  There are two predefined
6605       selection atoms:  XA__PRIMARY and XA__SECONDARY.
6606
6607       XSendSelectionNotify  is  called  when  you  have  received  a  SelectionRequest  event
6608       asking for the selection, which you currently own, to be converted to some desired type.
6609       When you have completed the conversion you store the converted value in the indicated
6610       property on the window. Then you call XSendSelectionNotify with the same parameters
6611       as the SelectionRequest event to indicate that the conversion was successful.  If cannot
6612
661394                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
6614
6615
6616
6617       perform the conversion then you call XSendSelectionNotify with property set to zero to
6618       indicate that the conversion failed.  If the conversion was successful then the requestor will
6619       read the value from the property on the window, and will delete the property to indicate
6620       that the transfer has been completed.
6621
66222.13         Screen  Saver
6623
6624
6625
66262.13.1        XSetScreenSaver,  XForceScreenSaver,  XActivateScreenSaver,
6627
6628              XResetScreenSaver,  XGetScreenSaver
6629
6630
6631
6632Types:
6633
6634
6635          val  XSetScreenSaver:         int  ->  int  ->  Blanking  ->  Exposures  ->  unit
6636          val  XForceScreenSaver:      SaveMode  ->  unit
6637          val  XActivateScreenSaver:  unit  ->  unit
6638          val  XResetScreenSaver:      unit  ->  unit
6639          val  XGetScreenSaver:         unit  ->  (int  *  int  *  Blanking  *  Exposures)
6640
6641
6642Syntax:
6643
6644
6645          XSetScreenSaver  timeout  interval  preferBlanking  allowExposures  ;
6646          XForceScreenSaver  mode  ;
6647          XActivateScreenSaver()  ;
6648          XResetScreenSaver()  ;
6649          val  (timeout,interval,preferBlanking,allowExposures)  =  XGetScreenSaver()  ;
6650
6651
6652Arguments:
6653
6654
6655       allowExposures                  Specifies/returns  the  screen  save  control  values.   You  can  pass
6656                                       DontAllowExposures,  AllowExposures,  or  DefaultExpo-
6657                                       sures.
6658
6659       interval                        Specifies/returns the interval, in seconds, between screen saver al-
6660                                       terations.
6661
6662       mode                            Specifies the mode that is to be applied.  You can pass Screen-
6663                                       SaverActive or ScreenSaverReset.
6664
6665       preferBlanking                  Specifies/returns  how  to  enable  screen  blanking.   You  can  pass
6666                                       DontPreferBlanking, PreferBlanking, or DefaultBlanking.
6667
6668       timeout                         Specifies the timeout, in seconds, until the screen saver turns on.
6669
6670
6671Argument Type:
6672
6673
6674          datatype  SaveMode   =  ScreenSaverReset     |  ScreenSaverActive
6675          datatype  Blanking   =  DontPreferBlanking  |  PreferBlanking  |  DefaultBlanking
6676          datatype  Exposures  =  DontAllowExposures  |  AllowExposures  |  DefaultExposures
6677
6678
6679Description:
6680
6681       Timeout and interval are specified in seconds.  A timeout of 0 disables the screen saver
6682       (but  an  activated  screen  saver  is  not  deactivated),  and  a  timeout  of  "1  restores  the  de-
6683       fault.  Other negative values generate a BadValue error.  If the timeout value is non-zero,
6684
6685cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        95
6686
6687
6688
6689       XSetScreenSaver enables the screen saver.  An interval of 0 disables the random-pattern
6690       motion.  If no input from devices (keyboard, mouse, and so on) is generated for the specified
6691       number of timeout seconds once the screen saver is enabled, the screen saver is activated.
6692
6693       For  each  screen,  if  blanking  is  preferred  and  the  hardware  supports  video  blanking,  the
6694       screen  simply  goes  blank.   Otherwise,  if  either  exposures  are  allowed  or  the  screen  can
6695       be  regenerated  without  sending  Expose  events  to  clients,  the  screen  is  tiled  with  the
6696       root window background tile randomly re-origined each interval minutes.  Otherwise, the
6697       screens' state do not change,  and the screen saver is not activated.  The screen saver is
6698       deactivated, and all screen states are restored at the next keyboard or pointer input or at
6699       the next call to XForceScreenSaver with mode ScreenSaverReset.
6700
6701       If the server-dependent screen saver method supports periodic change, the interval argu-
6702       ment serves as a hint about how long the change period should be, and zero hints that no
6703       periodic change should be made.  Examples of ways to change the screen include scram-
6704       bling the colormap periodically, moving an icon image around the screen periodically, or
6705       tiling the screen with the root window background tile, randomly re-origined periodically.
6706
6707       If the specified mode is ScreenSaverActive and the screen saver currently is deactivated,
6708       XForceScreenSaver activates the screen saver even if the screen saver had been disabled
6709       with a timeout of zero.  If the specified mode is ScreenSaverReset and the screen saver
6710       currently is enabled, XForceScreenSaver deactivates the screen saver if it was activated,
6711       and the activation timer is reset to its initial state (as if device input had been received).
6712
6713       The XActivateScreenSaver function activates the screen saver.
6714
6715       The XResetScreenSaver function resets the screen saver.
6716
6717       The XGetScreenSaver function gets the current screen saver values.
6718
67192.14         Tiles,  Stipples,  Bitmaps  and  Pixmaps
6720
6721
6722
67232.14.1        XCreatePixmap,  XFreePixmap
6724
6725
6726
6727Types:
6728
6729
6730          val  XCreatePixmap:  Drawable  ->  XRectangle  ->  int  ->  Drawable
6731          val  XFreePixmap:     Drawable  ->  unit
6732
6733
6734Syntax:
6735
6736
6737          val  pixmap  =  XCreatePixmap  d  area  depth  ;
6738          XFreePixmap  pixmap  ;
6739
6740
6741Arguments:
6742
6743
6744       d                  Specifies which screen the pixmap is created on.
6745
6746       depth              Specifies the depth of the pixmap.
6747
6748       pixmap             Specifies the pixmap.
6749
6750       area               Specifies the width and height, which define the dimensions of the pixmap.
6751
675296                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
6753
6754
6755
6756Description:
6757
6758       The  XCreatePixmap  function  creates  a  pixmap  of  the  width,  height,  and  depth  you
6759       specified and returns a Drawable that identifies it.  It is valid to pass an InputOnlyClass
6760       window to the drawable argument.  The width and height arguments must be non-zero, or
6761       a BadValue error results.  The depth argument must be one of the depths supported by
6762       the screen of the specified drawable, or a BadValue error results.
6763
6764       The server uses the specified drawable to determine on which screen to create the pixmap.
6765       The pixmap can be used only on this screen and only with other drawables of the same
6766       depth (see XCopyPlane for an exception to this rule).  The initial contents of the pixmap
6767       are undefined.
6768
6769       The  XFreePixmap  function  first  deletes  the  association  between  the  Drawable  value
6770       and the pixmap in the server.  Then, the X server frees the pixmap storage when there are
6771       no references to it.  The pixmap should never be referenced again.
67722.14.2        XReadBitmapFile,  XWriteBitmapFile,
6773
6774              XCreatePixmapFromBitmapData,  XCreateBitmapFromData
6775
6776
6777
6778Types:
6779
6780
6781          val  XReadBitmapFile:  Drawable  ->  string  ->  BitmapStatus
6782
6783
6784          val  XWriteBitmapFile:  string  ->  Drawable  ->
6785                                          XRectangle  ->  XPoint  ->  BitmapStatus
6786
6787
6788          val  XCreatePixmapFromBitmapData:  Drawable  ->  string  ->  XRectangle  ->
6789                                                          int  ->  int  ->  int  ->  Drawable
6790
6791
6792          val  XCreateBitmapFromData:  Drawable  ->  string  ->  XRectangle  ->  Drawable
6793
6794
6795Syntax:
6796
6797
6798          val  status  =  XReadBitmapFile  d  filename  ;
6799          val  status  =  XWriteBitmapFile  filename  bitmap  area  hotspot  ;
6800          val  pixmap  =  XCreatePixmapFromBitmapData  d  data  area  fg  bg  depth  ;
6801          val  bitmap  =  XCreateBitmapFromData  d  data  area  ;
6802
6803
6804Arguments:
6805
6806
6807       bitmap               Specifies the bitmap.
6808
6809       status               Returns the bitmap that is created, or an error condition.
6810
6811       d                    Specifies the drawable that indicates the screen.
6812
6813       data                 Specifies the data in bitmap format.
6814
6815       depth                Specifies the depth of the pixmap.
6816
6817       fg                   Specifies the foreground and
6818
6819       bg                   background pixel values to use.
6820
6821       filename             Specifies the file name to use.
6822
6823       area                 Specifies the width and height.
6824
6825cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        97
6826
6827
6828
6829       hotspot              Specifies  where  to  place  the  hotspot  coordinates,  or  ("1,"1)  if  none  are
6830                            present in the file.
6831
6832
6833Argument Type:
6834
6835
6836          datatype  BitmapStatus  =  BitmapOpenFailed
6837                                          |  BitmapFileInvalid
6838                                          |  BitmapNoMemory
6839                                          |  BitmapSuccess  of  Drawable  *  XRectangle  *  XPoint
6840
6841
6842Description:
6843
6844       The XReadBitmapFile function reads in a file containing a bitmap.  The ability to read
6845       other than the standard format is implementation dependent.  If the file cannot be opened,
6846       XReadBitmapFile returns BitmapOpenFailed.  If the file can be opened but does not
6847       contain valid bitmap data, it returns BitmapFileInvalid.  If insufficient working storage
6848       is allocated, it returns BitmapNoMemory.  If the file is readable and valid, it returns
6849       BitmapSuccess.
6850
6851       XReadBitmapFile reads the bitmap's height and width from the file.  It then creates a
6852       pixmap of the appropriate size and reads the bitmap data from the file into the pixmap.
6853       The  caller  must  free  the  bitmap  using  XFreePixmap  when  finished.  If  the  hotspot  is
6854       defined in the bitmap file, XReadBitmapFile returns the hotspot in the status as well,
6855       otherwise it returns ("1,"1).
6856
6857       The XWriteBitmapFile function writes a bitmap out to a file in the X version 11 format.
6858       If  the  file  cannot  be  opened  for  writing,  it  returns  BitmapOpenFailed.  If  insufficient
6859       memory  is  allocated,  XWriteBitmapFile  returns  BitmapNoMemory;  otherwise,  on
6860       no error, it returns BitmapSuccess.  If the hotspot is not ("1,"1), XWriteBitmapFile
6861       writes it out as the hotspot coordinates for the bitmap.
6862
6863       The XCreatePixmapFromBitmapData function creates a pixmap of the given depth
6864       and  then  does  a  bitmap-format  XPutImage  of  the  data  into  it.   The  depth  must  be
6865       supported by the screen of the specified drawable, or a BadMatch error results.
6866
6867       The  XCreateBitmapFromData  function  allows  you  to  include  a  bitmap  file  without
6868       reading in the bitmap file.  The following example creates a weave bitmap:
6869
6870
6871             val  data  =  [17,   17,  184,  184,  124,  124,  58,   58,
6872                              17,   17,  163,  163,  199,  199,  139,  139,
6873                              17,   17,  184,  184,  124,  124,  58,   58,
6874                              17,   17,  163,  163,  199,  199,  139,  139]  ;
6875
6876
6877             fun  MakeData  []       =  ""
6878             |     MakeData  (H::T)  =  chr  H  ^  MakeData  T  ;
6879
6880
6881             val  wideWeave  =  XCreateBitmapFromData  root  (MakeData  data)
6882                                                                           (Area{x=0,y=0,w=16,h=16})  ;
6883
6884
6885       If   insufficient   working   storage   was   allocated,   XCreateBitmapFromData   returns
6886       NoDrawable.   It  is  your  responsibility  to  free  the  bitmap  using  XFreePixmap  when
6887       finished.
6888
688998                                                        X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
6890
6891
6892
68932.15         User  Preferences
6894
6895
6896
68972.15.1        XAutoRepeatOn,  XAutoRepeatOff,  XBell,  XQueryKeymap
6898
6899
6900
6901Types:
6902
6903
6904          val  XAutoRepeatOff:  unit  ->  unit
6905          val  XAutoRepeatOn:   unit  ->  unit
6906          val  XBell:               int   ->  unit
6907          val  XQueryKeymap:     unit  ->  bool  list  (*  256  bools  *)
6908
6909
6910Syntax:
6911
6912
6913          XAutoRepeatOn()  ;
6914          XAutoRepeatOff()  ;
6915          XBell  percent  ;
6916          val  keymap  =  XQueryKeymap()  ;
6917
6918
6919Arguments:
6920
6921
6922       percent            Specifies the volume for the bell, which can range from "100 to 100 inclusive.
6923
6924       keymap             Returns the keyboard state vector
6925
6926
6927Description:
6928
6929       The XAutoRepeatOn function turns on auto-repeat for the keyboard.
6930
6931       The XAutoRepeatOff function turns off auto-repeat for the keyboard.
6932
6933       The  XBell  function  rings  the  bell  on  the  keyboard  on  the  specified  display,  if  possible.
6934       The specified volume is relative to the base volume for the keyboard.  If the value for the
6935       percent argument is not in the range "100 to 100 inclusive, a BadValue error results.  The
6936       volume at which the bell rings when the percent argument is nonnegative is:
6937
6938
6939                      base  -  (base  *  percent)  /  100  +  percent
6940
6941
6942       The volume at which the bell rings when the percent argument is negative is:
6943
6944
6945                      base  +  (base  *  percent)  /  100
6946
6947
6948       To change the base volume of the bell, use XChangeKeyboardControl.
6949
6950       The XQueryKeymap function returns a bit vector for the logical state of the keyboard.
6951       The vector is returned as a list of 256 bools, representing the keys 0 to 255 in that order.
6952       Each bool set to true indicates that the corresponding key is currently pressed.
6953
6954       Note that the logical state of a device (as seen by client applications) may lag the physical
6955       state if device event processing is frozen.
69562.15.2        XGetDefault
6957
6958
6959
6960Types:
6961
6962
6963          val  XGetDefault:  string  ->  string  ->  string
6964
6965cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                        99
6966
6967
6968
6969Syntax:
6970
6971
6972          val  default  =  XGetDefault  program  option  ;
6973
6974
6975Arguments:
6976
6977
6978       option               Specifies the option name.
6979
6980       program              Specifies the program name.
6981
6982
6983Description:
6984
6985       XGetDefault returns the value for the program and option entry in the user's defaults
6986       database.  If XGetDefault fails then exception XWindows is raised with "XGetDefault
6987       failed" .
6988
69892.16         Windows
6990
6991
6992
69932.16.1        XCreateWindow,  XCreateSimpleWindow
6994
6995
6996
6997Types:
6998
6999
7000          val  XCreateWindow:  Drawable  ->  XPoint  ->  XRectangle  ->
7001                                     int  ->  int  ->  WindowClass  ->  Visual  ->
7002                                     XSetWindowAttributes  list  ->  Drawable
7003
7004
7005          val  XCreateSimpleWindow:  Drawable  ->  XPoint  ->  XRectangle  ->
7006                                              int  ->  int  ->  int  ->  Drawable
7007
7008
7009Syntax:
7010
7011
7012          val  window  =  XCreateWindow  parent  point  area
7013                             borderWidth  depth  class  visual  attributes  ;
7014
7015
7016          val  window  =  XCreateSimpleWindow  parent  point  area
7017                             borderWidth  borderPixel  backgroundPixel  ;
7018
7019
7020Arguments:
7021
7022
7023       attributes                        Specifies the initial values for the window's attributes.
7024
7025       backgroundPixel                   Specifies the background pixel value of the window.
7026
7027       borderPixel                       Specifies the border pixel value of the window.
7028
7029       borderWidth                       Specifies the width of the window's border in pixels.
7030
7031       class                             Specifies  the  window's  class.    You  can  pass  InputOutput-
7032                                         Class, InputOnlyClass, or CopyFromParentClass.  A class
7033                                         of  CopyFromParentClass  means  the  class  is  taken  from  the
7034                                         parent.
7035
7036       depth                             Specifies the window's depth.  A depth of zero means the depth
7037                                         is taken from the parent.
7038
7039       parent                            Specifies the parent window.
7040
7041100                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
7042
7043
7044
7045       visual                            Specifies the visual type.  A visual of CopyFromParentVisual
7046                                         means the visual type is taken from the parent.
7047
7048       area                              Specifies the width and height,  which are the created window's
7049                                         inside dimensions and do not include the created window's bor-
7050                                         ders.
7051
7052       point                             Specifies the x and y coordinates, which are the top-left outside
7053                                         corner of the window's borders and are relative to the inside of
7054                                         the parent window's borders.
7055
7056
7057Argument Type:
7058
7059
7060          datatype  XSetWindowAttributes  =  CWBackPixmap          of  Drawable
7061                                                     |  CWBackPixel            of  int
7062                                                     |  CWBorderPixmap       of  Drawable
7063                                                     |  CWBorderPixel         of  int
7064                                                     |  CWBitGravity          of  Gravity
7065                                                     |  CWWinGravity          of  Gravity
7066                                                     |  CWBackingStore       of  BackingStore
7067                                                     |  CWBackingPlanes      of  int
7068                                                     |  CWBackingPixel       of  int
7069                                                     |  CWOverrideRedirect  of  bool
7070                                                     |  CWSaveUnder            of  bool
7071                                                     |  CWEventMask            of  EventMask  list
7072                                                     |  CWDontPropagate      of  EventMask  list
7073                                                     |  CWColormap             of  Colormap
7074                                                     |  CWCursor                of  Cursor
7075
7076
7077          datatype  BackingStore  =  NotUseful  |  WhenMapped  |  Always
7078
7079
7080          datatype  WindowClass  =  CopyFromParentClass
7081                                        |  InputOutputClass
7082                                        |  InputOnlyClass
7083
7084
7085Description:
7086
7087       The XCreateWindow function creates an unmapped subwindow for a specified parent
7088       window, returns the Drawable value for the created window, and causes the X server to
7089       generate  a  CreateNotify  event.   The  created  window  is  placed  on  top  in  the  stacking
7090       order with respect to siblings.
7091
7092       The borderWidth for an InputOnlyClass window must be zero, or a BadMatch error
7093       results.  For class InputOutputClass, the visual type and depth must be a combination
7094       supported  for  the  screen,  or  a  BadMatch  error  results.   The  depth  need  not  be  the
7095       same as the parent, but the parent must not be a window of class InputOnlyClass, or
7096       a BadMatch error results.  For an InputOnlyClass window,  the depth must be zero,
7097       and  the  visual  must  be  one  supported  by  the  screen.   If  either  condition  is  not  met,  a
7098       BadMatch error results.  The parent window, however, may have any depth and class.  If
7099       you specify any invalid window attribute for a window, a BadMatch error results.
7100
7101       The created window is not yet displayed (mapped) on the user's display.  To display the
7102       window, call XMapWindow.  The new window initially uses the same cursor as its parent.
7103       A new cursor can be defined for the new window by calling XDefineCursor.  The window
7104       will not be visible on the screen unless it and all of its ancestors are mapped and it is not
7105       obscured by any of its ancestors.
7106
7107       If  XCreateWindow  fails  then  exception  XWindows  is  raised  with  "XCreateWindow
7108       failed" .
7109
7110cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      101
7111
7112
7113
7114       The XCreateSimpleWindow function creates an unmapped InputOutputClass sub-
7115       window for a specified parent window, returns the Drawable value for the created window,
7116       and causes the X server to generate a CreateNotify event.  The created window is placed
7117       on top in the stacking order with respect to siblings.  Any part of the window that extends
7118       outside  its  parent  window  is  clipped.   The  borderWidth  for  an  InputOnlyClass  win-
7119       dow must be zero, or a BadMatch error results.  XCreateSimpleWindow inherits its
7120       depth, class, and visual from its parent.  All other window attributes, except background
7121       and border, have their default values.  If XCreateSimpleWindow fails then exception
7122       XWindows is raised with "XCreateSimpleWindow failed" .
71232.16.2        XDestroyWindow,  XDestroySubwindows
7124
7125
7126
7127Types:
7128
7129
7130          val  XDestroyWindow:       Drawable  ->  unit
7131          val  XDestroySubwindows:  Drawable  ->  unit
7132
7133
7134Syntax:
7135
7136
7137          XDestroyWindow  w  ;
7138          XDestroySubwindows  w  ;
7139
7140
7141Arguments:
7142
7143
7144       w          Specifies the window.
7145
7146
7147Description:
7148
7149       The XDestroyWindow function destroys the specified window as well as all of its sub-
7150       windows and causes the X server to generate a DestroyNotify event for each window.
7151       The window should never be referenced again.  If the window specified by the w argument
7152       is  mapped,  it  is  unmapped  automatically.   The  ordering  of  the  DestroyNotify  events
7153       is such that for any given window being destroyed, DestroyNotify is generated on any
7154       inferiors of the window before being generated on the window itself.  The ordering among
7155       siblings and across subhierarchies is not otherwise constrained.  If the window you specified
7156       is a root window, no windows are destroyed.  Destroying a mapped window will generate
7157       Expose events on other windows that were obscured by the window being destroyed.
7158
7159       The XDestroySubwindows function destroys all inferior windows of the specified win-
7160       dow, in bottom-to-top stacking order.  It causes the X server to generate a DestroyNotify
7161       event for each window.  If any mapped subwindows were actually destroyed, XDestroy-
7162       Subwindows  causes  the  X  server  to  generate  Expose  events  on  the  specified  window.
7163       This is much more efficient than deleting many windows one at a time because much of
7164       the work need be performed only once for all of the windows, rather than for each window.
7165       The subwindows should never be referenced again.  If XDestroySubwindows fails then
7166       exception XWindows is raised with "XDestroySubwindows failed" .
71672.16.3        XGetGeometry,  XGetWindowAttributes
7168
7169
7170
7171Types:
7172
7173102                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
7174
7175
7176
7177          val  XGetGeometry:  Drawable  ->  (Drawable  *  XPoint  *  XRectangle  *  int  *  int)
7178
7179
7180          val  XGetWindowAttributes:  Drawable  ->  XWindowAttributes
7181
7182
7183Syntax:
7184
7185
7186          val  (root,position,size,borderWidth,depth)  =  XGetGeometry  w  ;
7187          val  attributes  =  XGetWindowAttributes  w  ;
7188
7189
7190Arguments:
7191
7192
7193       d                           Specifies the drawable, which can be a window or a pixmap.
7194
7195       root                        Returns the root window
7196
7197       position                    Returns the x and y coordinates that define the location of the draw-
7198                                   able.   For  a  window,  these  coordinates  specify  the  upper-left  outer
7199                                   corner relative to its parent's origin.  For pixmaps, these coordinates
7200                                   are always zero.
7201
7202       size                        Returns the drawable's dimensions (width and height).
7203
7204       borderWidth                 Returns the border width in pixels.
7205
7206       depth                       Returns the depth of the drawable (bits per pixel for the object).
7207
7208
7209Argument Type:
7210
7211
7212          datatype  WindowClass  =  CopyFromParentClass
7213                                        |  InputOutputClass
7214                                        |  InputOnlyClass
7215
7216
7217          datatype  MapState  =  IsUnmapped  |  IsUnviewable  |  IsViewable
7218
7219
7220          datatype  Gravity  =  ForgetGravity      |  NorthWestGravity  |  NorthGravity
7221                                   |  NorthEastGravity  |  WestGravity         |  CenterGravity
7222                                   |  EastGravity         |  SouthWestGravity  |  SouthGravity
7223                                   |  SouthEastGravity  |  StaticGravity
7224
7225
7226          val  UnmapGravity:  Gravity      (*  same  as  ForgetGravity  *)
7227
7228
7229          datatype  BackingStore  =  NotUseful  |  WhenMapped  |  Always
7230
7231
7232          val  NoColormap:  Colormap
7233
7234
7235          datatype  XWindowAttributes  =  XWindowAttributes  of
7236                                                    {
7237                                                       position:                XPoint,
7238                                                       size:                      XRectangle,
7239                                                       borderWidth:            int,
7240                                                       depth:                    int,
7241                                                       visual:                   Visual,
7242                                                       root:                      Drawable,
7243                                                       class:                    WindowClass,
7244                                                       bitGravity:             Gravity,
7245                                                       winGravity:             Gravity,
7246                                                       backingStore:          BackingStore,
7247                                                       backingPlanes:         int,
7248                                                       backingPixel:          int,
7249
7250cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      103
7251
7252
7253
7254                                                       saveUnder:               bool,
7255                                                       colormap:                Colormap,
7256                                                       mapInstalled:          bool,
7257                                                       mapState:                MapState,
7258                                                       allEventMasks:         EventMask  list,
7259                                                       yourEventMask:         EventMask  list,
7260                                                       doNotPropagateMask:  EventMask  list,
7261                                                       overrideRedirect:     bool
7262                                                    }
7263
7264
7265Argument Description:
7266
7267       The position member is set to the upper-left outer corner relative to the parent window's
7268       origin.  The size member is set to the inside size of the window, not including the border.
7269       The borderWidth member is set to the window's border width in pixels. The depth member
7270       is set to the depth of the window (that is, bits per pixel for the object).  The visual member
7271       the screen's associated Visual structure.  The root member is set to the root window of
7272       the screen containing the window.  The class member is set to the window's class and can
7273       be either InputOutputClass or InputOnlyClass.
7274
7275       The bitGravity member is set to the window's bit gravity and can be one of the following:
7276
7277
7278
7279          ForgetGravity      EastGravity         NorthWestGravity
7280          SouthWestGravity  NorthGravity       SouthGravity
7281          NorthEastGravity  SouthEastGravity  WestGravity
7282          StaticGravity      CenterGravity
7283
7284
7285       The  winGravity  member  is  set  to  the  window's  window  gravity  and  can  be  one  of  the
7286       following:
7287
7288
7289          UnmapGravity       EastGravity         NorthWestGravity
7290          SouthWestGravity  NorthGravity       SouthGravity
7291          NorthEastGravity  SouthEastGravity  WestGravity
7292          StaticGravity      CenterGravity
7293
7294
7295       The backingStore member is set to indicate how the X server should maintain the contents
7296       of  a  window  and  can  be  WhenMapped,  Always,  or  NotUseful.  The  backingPlanes
7297       member is set to indicate (with bits set to 1) which bit planes of the window hold dynamic
7298       data that must be preserved in backing-stores and during save-unders.  The backingPixel
7299       member is set to indicate what values to use for planes not set in backingPlanes.
7300
7301       The saveUnder member is set to true or false.  The colormap member is set to the colormap
7302       for the specified window and can be a Colormap or NoColormap.  The mapInstalled
7303       member  is  set  to  indicate  whether  the  colormap  is  currently  installed  and  can  be  true
7304       or  false.   The  mapState  member  is  set  to  indicate  the  state  of  the  window  and  can  be
7305       IsUnmapped, IsUnviewable, or IsViewable.  IsUnviewable is used if the window is
7306       mapped but some ancestor is unmapped.
7307
7308       The allEventMasks member is set to the event masks selected on the window by all clients.
7309       The yourEventMask member is set to the event masks selected by the querying client.  The
7310       doNotPropagateMask member is set to the list of events that should not propagate.
7311
7312       The overrideRedirect member is set to indicate whether this window overrides structure
7313       control  facilities  and  can  be  true  or  false.   Window  manager  clients  should  ignore  the
7314       window if this member is true.
7315
7316104                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
7317
7318
7319
7320Description:
7321
7322       The XGetWindowAttributes function returns the current attributes for the specified
7323       window as an XWindowAttributes structure.
7324
7325       If XGetWindowAttributes fails then exception XWindows is raised with "XGetWin-
7326       dowAttributes failed" .
7327
7328       The XGetGeometry function returns the root window and the current geometry of the
7329       drawable.   The  geometry  of  the  drawable  includes  the  position  as  x  and  y  coordinates,
7330       the size as width and height, the border width, and the depth.  These are described in the
7331       argument list.  It is legal to pass to this function a window whose class is InputOnlyClass.
7332       If XGetGeometry fails then exception XWindows is raised with "XGetGeometry failed"
7333       .
73342.16.4        XGetWindowRoot,  XGetWindowPosition,  XGetWindowSize,
7335
7336              XGetWindowBorderWidth,  XGetWindowDepth,
7337
7338              XGetWindowParent,  XGetWindowChildren
7339
7340
7341
7342Types:
7343
7344
7345          val  XGetWindowRoot:            Drawable  ->  Drawable
7346          val  XGetWindowPosition:      Drawable  ->  XPoint
7347          val  XGetWindowSize:            Drawable  ->  XRectangle
7348          val  XGetWindowBorderWidth:  Drawable  ->  int
7349          val  XGetWindowDepth:          Drawable  ->  int
7350          val  XGetWindowParent:         Drawable  ->  Drawable
7351          val  XGetWindowChildren:      Drawable  ->  Drawable  list
7352
7353
7354Description:
7355
7356       These convenience functions return the individual attributes returned in bulk by XGet-
7357       Geometry and XQueryTree.
7358
7359       XGetWindowRoot returns the root window for the drawable.  XGetWindowPosition
7360       returns the coordinates of the outer top left corner of the window.  XGetWindowSize
7361       returns the inside size of the window.  XGetWindowBorderWidth returns the border
7362       width in pixels of the window.  XGetWindowDepth returns the depth of the window.
7363       XGetWindowParent returns the parent window of the specified window.  XGetWin-
7364       dowChildren returns the children of the specified window.
73652.16.5        XChangeWindowAttributes,  XSetWindowBackground,
7366
7367              XSetWindowBackgroundPixmap,  XSetWindowBorder,
7368
7369              XSetWindowBorderPixmap
7370
7371
7372
7373Types:
7374
7375
7376          val  XChangeWindowAttributes:      Drawable  ->  XSetWindowAttributes  list  ->  unit
7377          val  XSetWindowBackground:          Drawable  ->  int         ->  unit
7378          val  XSetWindowBackgroundPixmap:  Drawable  ->  Drawable  ->  unit
7379          val  XSetWindowBorder:                Drawable  ->  int         ->  unit
7380          val  XSetWindowBorderPixmap:       Drawable  ->  Drawable  ->  unit
7381
7382cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      105
7383
7384
7385
7386Syntax:
7387
7388
7389          XChangeWindowAttributes  w  attributes  ;
7390          XSetWindowBackground  w  backgroundPixel  ;
7391          XSetWindowBackgroundPixmap  w  backgroundPixmap  ;
7392          XSetWindowBorder  w  borderPixel  ;
7393          XSetWindowBorderPixmap  w  borderPixmap  ;
7394
7395
7396Arguments:
7397
7398
7399       attributes                            Specifies the list of attributes to change.
7400
7401       backgroundPixel                       Specifies the pixel that is to be used for the background.
7402
7403       backgroundPixmap                      Specifies   the   background   pixmap,   ParentRelative,   or
7404                                             NoDrawable.
7405
7406       borderPixel                           Specifies the entry in the colormap.
7407
7408       borderPixmap                          Specifies the border pixmap or CopyFromParentDrawable.
7409
7410       w                                     Specifies the window.
7411
7412
7413Argument Type:
7414
7415
7416          datatype  XSetWindowAttributes  =  CWBackPixmap          of  Drawable
7417                                                     |  CWBackPixel            of  int
7418                                                     |  CWBorderPixmap       of  Drawable
7419                                                     |  CWBorderPixel         of  int
7420                                                     |  CWBitGravity          of  Gravity
7421                                                     |  CWWinGravity          of  Gravity
7422                                                     |  CWBackingStore       of  BackingStore
7423                                                     |  CWBackingPlanes      of  int
7424                                                     |  CWBackingPixel       of  int
7425                                                     |  CWOverrideRedirect  of  bool
7426                                                     |  CWSaveUnder            of  bool
7427                                                     |  CWEventMask            of  EventMask  list
7428                                                     |  CWDontPropagate      of  EventMask  list
7429                                                     |  CWColormap             of  Colormap
7430                                                     |  CWCursor                of  Cursor
7431Description:
7432
7433       The   XChangeWindowAttributes   function   uses   the   window   attributes   in   the
7434       XSetWindowAttributes list to change the specified window attributes.  Changing the
7435       background does not cause the window contents to be changed.  To repaint the window
7436       and its background, use XClearWindow.  Setting the border or changing the background
7437       such that the border tile origin changes causes the border to be repainted.  Changing the
7438       background of a root window to NoDrawable or ParentRelative restores the default
7439       background pixmap.  Changing the border of a root window to CopyFromParentDraw-
7440       able  restores  the  default  border  pixmap.  Changing  the  win-gravity  does  not  affect  the
7441       current  position  of  the  window.   Changing  the  backing-store  of  an  obscured  window  to
7442       WhenMapped or Always, or changing the backing-planes, backing-pixel, or save-under
7443       of a mapped window may have no immediate effect.  Changing the colormap of a window
7444       (that is, defining a new map, not changing the contents of the existing map) generates a
7445       ColormapNotify event.  Changing the colormap of a visible window may have no imme-
7446       diate effect on the screen because the map may not be installed (see XInstallColormap).
7447
7448106                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
7449
7450
7451
7452       Changing the cursor of a root window to NoCursor restores the default cursor.  Whenever
7453       possible, you are encouraged to share colormaps.
7454
7455       Multiple clients can select input on the same window.  Their event masks are maintained
7456       separately.  When an event is generated, it is reported to all interested clients.  However,
7457       only one client at a time can select for SubstructureRedirectMask, ResizeRedirect-
7458       Mask, and ButtonPressMask.  If a client attempts to select any of these event masks
7459       and some other client has already selected one, a BadAccess error results.  There is only
7460       one do-not-propagate-mask for a window, not one per client.
7461
7462       The XSetWindowBackground function sets the background of the window to the spec-
7463       ified  pixel  value.   Changing  the  background  does  not  cause  the  window  contents  to  be
7464       changed.   XSetWindowBackground  uses  a  pixmap  of  undefined  size  filled  with  the
7465       pixel  value  you  passed.   If  you  try  to  change  the  background  of  an  InputOnlyClass
7466       window, a BadMatch error results.
7467
7468       The  XSetWindowBackgroundPixmap  function  sets  the  background  pixmap  of  the
7469       window  to  the  specified  pixmap.   The  background  pixmap  can  immediately  be  freed  if
7470       no further explicit references to it are to be made.  If ParentRelative is specified,  the
7471       background  pixmap  of  the  window's  parent  is  used,  or  on  the  root  window,  the  default
7472       background  is  restored.   If  you  try  to  change  the  background  of  an  InputOnlyClass
7473       window, a BadMatch error results.  If the background is set to NoDrawable, the window
7474       has no defined background.
7475
7476       The XSetWindowBorder function sets the border of the window to the pixel value you
7477       specify.  If you attempt to perform this on an InputOnlyClass window,  a BadMatch
7478       error results.
7479
7480       The XSetWindowBorderPixmap function sets the border pixmap of the window to the
7481       pixmap you specify.  The border pixmap can be freed immediately if no further explicit
7482       references  to  it  are  to  be  made.   If  you  specify  CopyFromParentDrawable,  a  copy
7483       of  the  parent  window's  border  pixmap  is  used.   If  you  attempt  to  perform  this  on  an
7484       InputOnlyClass window, a BadMatch error results.
74852.16.6        XConfigureWindow,  XMoveWindow,  XResizeWindow,
7486
7487              XMoveResizeWindow,  XSetWindowBorderWidth
7488
7489
7490
7491Types:
7492
7493
7494          val  XConfigureWindow:         Drawable  ->  XWindowChanges  list  ->  unit
7495          val  XMoveWindow:                Drawable  ->  XPoint  ->  unit
7496          val  XResizeWindow:             Drawable  ->  XRectangle  ->  unit
7497          val  XMoveResizeWindow:       Drawable  ->  XPoint  ->  XRectangle  ->  unit
7498          val  XSetWindowBorderWidth:  Drawable  ->  int  ->  unit
7499
7500
7501Syntax:
7502
7503
7504          XConfigureWindow  w  changes  ;
7505          XMoveWindow  w  origin  ;
7506          XResizeWindow  w  area  ;
7507          XMoveResizeWindow  w  origin  area  ;
7508          XSetWindowBorderWidth  w  borderWidth  ;
7509
7510
7511Arguments:
7512
7513cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      107
7514
7515
7516
7517       changes                     Specifies a list of XWindowChanges.
7518
7519       w                           Specifies the window to be reconfigured.
7520
7521       borderWidth                 Specifies the width of the window border.
7522
7523       area                        Specifies the interior dimensions of the window.
7524
7525       origin                      Specifies  the  x  and  y  coordinates,  which  define  the  new  location  of
7526                                   the top-left pixel of the window's border or the window itself if it has
7527                                   no border relative to its parent.
7528
7529
7530Argument Type:
7531
7532
7533          datatype  XWindowChanges  =  CWPosition      of  XPoint
7534                                             |  CWSize            of  XRectangle
7535                                             |  CWBorderWidth  of  int
7536                                             |  CWStackMode     of  StackMode
7537                                             |  CWSibling       of  Drawable
7538
7539
7540          datatype  StackMode  =  Above  |  Below  |  TopIf  |  BottomIf  |  Opposite
7541
7542
7543Argument Description:
7544
7545       The  CWPosition  member  is  used  to  set  the  window's  x  and  y  coordinates,  which  are
7546       relative to the parent's origin and indicate the position of the upper-left outer corner of
7547       the  window.   The  CWSize  member  is  used  to  set  the  inside  size  of  the  window,  not
7548       including the border, and must be non-zero, or a BadValue error results.  Attempts to
7549       configure a root window have no effect.
7550
7551       The CWBorderWidth member is used to set the width of the border in pixels.  Note
7552       that  setting  just  the  border  width  leaves  the  outer-left  corner  of  the  window  in  a  fixed
7553       position  but  moves  the  absolute  position  of  the  window's  origin.  If  you  attempt  to  set
7554       the border-width attribute of an InputOnlyClass window non-zero, a BadMatch error
7555       results.
7556
7557       The CWSibling member is used to set the sibling window for stacking operations.  The
7558       CWStackMode member is used to set how the window is to be restacked and can be set
7559       to Above, Below, TopIf, BottomIf, or Opposite.
7560
7561Description:
7562
7563       The XConfigureWindow function uses the values specified in the XWindowChanges
7564       list to reconfigure a window's size, position, border, and stacking order. Values not specified
7565       are taken from the existing geometry of the window.
7566
7567       If a sibling is specified without a stack-mode or if the window is not actually a sibling, a
7568       BadMatch error results.  Note that the computations for BottomIf, TopIf, and Oppo-
7569       site are performed with respect to the window's final geometry (as controlled by the other
7570       arguments passed to XConfigureWindow), not its initial geometry.  Any backing store
7571       contents of the window, its inferiors, and other newly visible windows are either discarded
7572       or changed to reflect the current screen contents (depending on the implementation).
7573
7574       The XMoveWindow function moves the specified window to the specified x and y coor-
7575       dinates, but it does not change the window's size, raise the window, or change the mapping
7576       state of the window.  Moving a mapped window may or may not lose the window's contents
7577       depending on if the window is obscured by nonchildren and if no backing store exists.  If
7578       the  contents  of  the  window  are  lost,  the  X  server  generates  Expose  events.   Moving  a
7579       mapped window generates Expose events on any formerly obscured windows.
7580
7581108                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
7582
7583
7584
7585       If the override-redirect flag of the window is false and some other client has selected Sub-
7586       structureRedirectMask  on  the  parent,  the  X  server  generates  a  ConfigureRequest
7587       event, and no further processing is performed.  Otherwise, the window is moved.
7588
7589       The XResizeWindow function changes the inside dimensions of the specified window, not
7590       including its borders.  This function does not change the window's upper-left coordinate
7591       or the origin and does not restack the window.  Changing the size of a mapped window
7592       may lose its contents and generate Expose events.  If a mapped window is made smaller,
7593       changing its size generates Expose events on windows that the mapped window formerly
7594       obscured.
7595
7596       If the override-redirect flag of the window is false and some other client has selected Sub-
7597       structureRedirectMask  on  the  parent,  the  X  server  generates  a  ConfigureRequest
7598       event, and no further processing is performed.  If either width or height is zero, a Bad-
7599       Value error results.
7600
7601       The XMoveResizeWindow function changes the size and location of the specified win-
7602       dow without raising it.  Moving and resizing a mapped window may generate an Expose
7603       event on the window.  Depending on the new size and location parameters,  moving and
7604       resizing  a  window  may  generate  Expose  events  on  windows  that  the  window  formerly
7605       obscured.
7606
7607       If the override-redirect flag of the window is false and some other client has selected Sub-
7608       structureRedirectMask  on  the  parent,  the  X  server  generates  a  ConfigureRequest
7609       event, and no further processing is performed.  Otherwise, the window size and location
7610       are changed.
7611
7612       The XSetWindowBorderWidth function sets the specified window's border width to
7613       the specified width.
76142.16.7        XMapWindow,  XMapRaised,  XMapSubwindows
7615
7616
7617
7618Types:
7619
7620
7621          val  XMapWindow:       Drawable  ->  unit
7622          val  XMapRaised:       Drawable  ->  unit
7623          val  XMapSubwindows:  Drawable  ->  unit
7624
7625
7626Syntax:
7627
7628
7629          XMapWindow  w  ;
7630          XMapRaised  w  ;
7631          XMapSubwindows  w  ;
7632
7633
7634Arguments:
7635
7636
7637       w          Specifies the window.
7638
7639
7640Description:
7641
7642       The XMapWindow function maps the window and all of its subwindows that have had
7643       map requests.  Mapping a window that has an unmapped ancestor does not display the
7644       window but marks it as eligible for display when the ancestor becomes mapped.  Such a
7645       window  is  called  unviewable.  When  all  its  ancestors  are  mapped,  the  window  becomes
7646       viewable and will be visible on the screen if it is not obscured by another window.  This
7647       function has no effect if the window is already mapped.
7648
7649cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      109
7650
7651
7652
7653       If the override-redirect of the window is false and if some other client has selected Sub-
7654       structureRedirectMask on the parent window, then the X server generates a MapRe-
7655       quest event, and the XMapWindow function does not map the window.  Otherwise, the
7656       window is mapped, and the X server generates a MapNotify event.
7657
7658       If  the  window  becomes  viewable  and  no  earlier  contents  for  it  are  remembered,  the  X
7659       server tiles the window with its background.  If the window's background is undefined, the
7660       existing screen contents are not altered, and the X server generates zero or more Expose
7661       events.   If  backing-store  was  maintained  while  the  window  was  unmapped,  no  Expose
7662       events are generated.  If backing-store will now be maintained, a full-window exposure is
7663       always  generated.   Otherwise,  only  visible  regions  may  be  reported.   Similar  tiling  and
7664       exposure take place for any newly viewable inferiors.
7665
7666       If  the  window  is  an  InputOutputClass  window,  XMapWindow  generates  Expose
7667       events on each InputOutputClass window that it causes to be displayed.  If the client
7668       maps  and  paints  the  window  and  if  the  client  begins  processing  events,  the  window  is
7669       painted twice.  To avoid this, first ask for Expose events and then map the window, so the
7670       client processes input events as usual.  The event list will include Expose for each window
7671       that has appeared on the screen.  The client's normal response to an Expose event should
7672       be to repaint the window.  This method usually leads to simpler programs and to proper
7673       interaction with window managers.
7674
7675       The XMapRaised function essentially is similar to XMapWindow in that it maps the
7676       window and all of its subwindows that have had map requests.  However, it also raises the
7677       specified window to the top of the stack.
7678
7679       The XMapSubwindows function maps all subwindows for a specified window in top-to-
7680       bottom stacking order.  The X server generates Expose events on each newly displayed
7681       window.  This  may  be  much  more  efficient  than  mapping  many  windows  one  at  a  time
7682       because the server needs to perform much of the work only once, for all of the windows,
7683       rather than for each window.
76842.16.8        XQueryPointer
7685
7686
7687
7688Types:
7689
7690
7691          val  XQueryPointer:  Drawable  ->  (bool  *
7692                                                        Drawable  *  Drawable  *
7693                                                        XPoint  *  XPoint  *  Modifier  list)
7694
7695
7696Syntax:
7697
7698
7699          val  (sameScreen,root,child,rootPointer,pointer,modifiers)  =  XQueryPointer  w  ;
7700
7701
7702Arguments:
7703
7704
7705       sameScreen                Returns true if the pointer is on the same screen as the specified window.
7706
7707       child                     Returns the child window that the pointer is located in, if any.
7708
7709       modifiers                 Returns the current state of the modifier keys and pointer buttons.
7710
7711       root                      Returns the root window that the pointer is in.
7712
7713       rootPointer               Return the pointer coordinates relative to the root window's origin.
7714
7715       w                         Specifies the window.
7716
7717110                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
7718
7719
7720
7721       pointer                   Return the pointer coordinates relative to the specified window.
7722
7723
7724Description:
7725
7726       The  XQueryPointer  function  returns  the  root  window  the  pointer  is  logically  on  and
7727       the  pointer  coordinates  relative  to  the  root  window's  origin.  If  sameScreen  is  false,  the
7728       pointer is not on the same screen as the specified window, and XQueryPointer returns
7729       NoDrawable  to  child  and  (0,0)  to  pointer.   If  sameScreen  is  true,  the  pointer  coordi-
7730       nates returned to pointer are relative to the origin of the specified window.  In this case,
7731       XQueryPointer returns the child that contains the pointer, if any, or else NoDrawable
7732       to child.
7733
7734       XQueryPointer returns the current logical state of the keyboard buttons and the modifier
7735       keys in modifiers.  It sets modifiers to the list of button or modifier key masks to match
7736       the current state of the mouse buttons and the modifier keys.
77372.16.9        XQueryTree
7738
7739
7740
7741Types:
7742
7743
7744          val  XQueryTree:  Drawable  ->  (Drawable  *  Drawable  *  Drawable  list)
7745
7746
7747Syntax:
7748
7749
7750          val  (root,parent,children)  =  XQueryTree  w  ;
7751
7752
7753Arguments:
7754
7755
7756       children             Returns a list of children.
7757
7758       parent               Returns the parent window.
7759
7760       root                 Returns the root window.
7761
7762       w                    Specifies the window whose list of children, root, and parent you want to
7763                            obtain.
7764
7765
7766Description:
7767
7768       The  XQueryTree  function  returns  the  root  window,  the  parent  window,  and  a  list  of
7769       children  windows  for  the  specified  window.   The  children  are  listed  in  current  stacking
7770       order, from bottom-most (first) to top-most (last). If it fails, XQueryTree raises exception
7771       XWindows with "XQueryTree failed" .
77722.16.10         XRaiseWindow,  XLowerWindow,  XCirculateSubwindows,
7773
7774                XCirculateSubwindowsDown,  XCirculateSubwindowsUp,
7775
7776                XRestackWindows
7777
7778
7779
7780Types:
7781
7782
7783          val  XRaiseWindow:                   Drawable  ->  unit
7784          val  XLowerWindow:                   Drawable  ->  unit
7785          val  XCirculateSubwindows:       Drawable  ->  CirculateDirection  ->  unit
7786          val  XCirculateSubwindowsDown:  Drawable  ->  unit
7787          val  XCirculateSubwindowsUp:     Drawable  ->  unit
7788          val  XRestackWindows:               Drawable  list  ->  unit
7789
7790cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      111
7791
7792
7793
7794Syntax:
7795
7796
7797          XRaiseWindow  w  ;
7798          XLowerWindow  w  ;
7799          XCirculateSubwindows  w  direction  ;
7800          XCirculateSubwindowsDown  w  ;
7801          XCirculateSubwindowsUp  w  ;
7802          XRestackWindows  windows  ;
7803
7804
7805Arguments:
7806
7807
7808       direction             Specifies the direction (up or down) that you want to circulate the window.
7809                             You can pass RaiseLowest or LowerHighest.
7810
7811       w                     Specifies the window.
7812
7813       windows               Specifies the list of windows to be restacked.
7814
7815
7816Argument Type:
7817
7818
7819          datatype  CirculateDirection  =  RaiseLowest  |  LowerHighest
7820
7821
7822Description:
7823
7824       The XRaiseWindow function raises the specified window to the top of the stack so that
7825       no sibling window obscures it.  If the windows are regarded as overlapping sheets of paper
7826       stacked on a desk, then raising a window is analogous to moving the sheet to the top of the
7827       stack but leaving its x and y location on the desk constant.  Raising a mapped window may
7828       generate Expose events for the window and any mapped subwindows that were formerly
7829       obscured.
7830
7831       If  the  override-redirect  attribute  of  the  window  is  false  and  some  other  client  has  se-
7832       lected SubstructureRedirectMask on the parent, the X server generates a Configur-
7833       eRequest event, and no processing is performed.  Otherwise, the window is raised.
7834
7835       The XLowerWindow function lowers the specified window to the bottom of the stack so
7836       that it does not obscure any sibling windows.  If the windows are regarded as overlapping
7837       sheets of paper stacked on a desk, then lowering a window is analogous to moving the sheet
7838       to the bottom of the stack but leaving its x and y location on the desk constant.  Lowering
7839       a mapped window will generate Expose events on any windows it formerly obscured.
7840
7841       If  the  override-redirect  attribute  of  the  window  is  false  and  some  other  client  has  se-
7842       lected SubstructureRedirectMask on the parent, the X server generates a Configur-
7843       eRequest event, and no processing is performed.  Otherwise, the window is lowered to the
7844       bottom of the stack.
7845
7846       The XCirculateSubwindows function circulates children of the specified window in the
7847       specified direction.  If you specify RaiseLowest, XCirculateSubwindows raises the low-
7848       est mapped child (if any) that is occluded by another child to the top of the stack.  If you
7849       specify  LowerHighest,  XCirculateSubwindows  lowers  the  highest  mapped  child  (if
7850       any) that occludes another child to the bottom of the stack.  Exposure processing is then
7851       performed on formerly obscured windows.  If some other client has selected Substructur-
7852       eRedirectMask on the window, the X server generates a CirculateRequest event, and
7853       no further processing is performed.  If a child is actually restacked, the X server generates
7854       a CirculateNotify event.
7855
7856       The XCirculateSubwindowsUp function raises the lowest mapped child of the specified
7857       window that is partially or completely occluded by another child.  Completely unobscured
7858
7859112                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
7860
7861
7862
7863       children are not affected.  This is a convenience function equivalent to XCirculateSub-
7864       windows with RaiseLowest specified.
7865
7866       The XCirculateSubwindowsDown function lowers the highest mapped child of the spec-
7867       ified window that partially or completely occludes another child.  Completely unobscured
7868       children are not affected.  This is a convenience function equivalent to XCirculateSub-
7869       windows with LowerHighest specified.
7870
7871       The XRestackWindows function restacks the windows in the order specified, from top
7872       to bottom.  The stacking order of the first window in the windows list is unaffected, but the
7873       other windows in the list are stacked underneath the first window, in the order of the list.
7874       The stacking order of the other windows is not affected.  For each window in the window
7875       list that is not a child of the specified window, a BadMatch error results.
7876
7877       If the override-redirect attribute of a window is false and some other client has selected
7878       SubstructureRedirectMask on the parent, the X server generates ConfigureRequest
7879       events for each window whose override-redirect flag is not set, and no further processing is
7880       performed.  Otherwise, the windows will be restacked in top to bottom order.
78812.16.11         XReparentWindow
7882
7883
7884
7885Types:
7886
7887
7888          val  XReparentWindow:  Drawable  ->  Drawable  ->  XPoint  ->  unit
7889
7890
7891Syntax:
7892
7893
7894          XReparentWindow  w  parent  topLeft  ;
7895
7896
7897Arguments:
7898
7899
7900       parent             Specifies the parent window.
7901
7902       w                  Specifies the window.
7903
7904       topLeft            Specifies the x and y coordinates of the position in the new parent window.
7905
7906
7907Description:
7908
7909       If the specified window is mapped, XReparentWindow automatically performs an Un-
7910       mapWindow request on it, removes it from its current position in the hierarchy, and inserts
7911       it as the child of the specified parent.  The window is placed in the stacking order on top
7912       with respect to sibling windows.
7913
7914       After reparenting the specified window, XReparentWindow causes the X server to gen-
7915       erate a ReparentNotify event.  The overrideRedirect member returned in this event is set
7916       to the window's corresponding attribute.  Window manager clients usually should ignore
7917       this window if this member is set to true.  Finally, if the specified window was originally
7918       mapped, the X server automatically performs a MapWindow request on it.
7919
7920       The X server performs normal exposure processing on formerly obscured windows.  The
7921       X server might not generate Expose events for regions from the initial UnmapWindow
7922       request that are immediately obscured by the final MapWindow request.  A BadMatch
7923       error results if the new parent window is not on the same screen as the old parent window,
7924       or if the new parent window is the specified window or an inferior of the specified window,
7925       or if the specified window has a ParentRelative background, and the new parent window
7926       is not the same depth as the specified window.
7927
7928cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      113
7929
7930
7931
79322.16.12         XUnmapWindow,  XUnmapSubwindows
7933
7934
7935
7936Types:
7937
7938
7939          val  XUnmapWindow:       Drawable  ->  unit
7940          val  XUnmapSubwindows:  Drawable  ->  unit
7941
7942
7943Syntax:
7944
7945
7946          XUnmapWindow  w  ;
7947          XUnmapSubwindows  w  ;
7948
7949
7950Arguments:
7951
7952
7953       w          Specifies the window.
7954
7955
7956Description:
7957
7958       The XUnmapWindow function unmaps the specified window and causes the X server to
7959       generate an UnmapNotify event.  If the specified window is already unmapped, XUn-
7960       mapWindow has no effect.  Normal exposure processing on formerly obscured windows
7961       is performed.  Any child window will no longer be visible until another map call is made on
7962       the parent.  In other words, the subwindows are still mapped but are not visible until the
7963       parent is mapped.  Unmapping a window will generate Expose events on windows that
7964       were formerly obscured by it.
7965
7966       The XUnmapSubwindows function unmaps all subwindows for the specified window in
7967       bottom-to-top stacking order.  It causes the X server to generate an UnmapNotify event
7968       on each subwindow and Expose events on formerly obscured windows.  Using this function
7969       is much more efficient than unmapping multiple windows one at a time because the server
7970       needs to perform much of the work only once, for all of the windows, rather than for each
7971       window.
7972
79732.17         Window  Manager
7974
7975
7976
79772.17.1        XSetIconSizes,  XGetIconSizes
7978
7979
7980
7981Types:
7982
7983
7984          val  XSetIconSizes:  Drawable  ->
7985                                     (XRectangle  *  XRectangle  *  XRectangle)  list  ->  unit
7986
7987
7988          val  XGetIconSizes:  Drawable  ->
7989                                     (XRectangle  *  XRectangle  *  XRectangle)  list
7990
7991
7992Syntax:
7993
7994
7995          XSetIconSizes  w  sizes  ;
7996          val  sizes  =  XGetIconSizes  w  ;
7997
7998
7999Arguments:
8000
8001114                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
8002
8003
8004
8005       sizes          Specifies the size list.
8006
8007       w              Specifies the window.
8008
8009
8010Description:
8011
8012       The XSetIconSizes function is used only by window managers to set the supported icon
8013       sizes.  The size is specified as (minimum size,maximum size,size increment).
8014
8015       The XGetIconSizes function returns the empty list if a window manager has not set icon
8016       sizes, otherwise it returns a list of supported sizes.  XGetIconSizes should be called by
8017       an application that wants to find out what icon sizes would be most appreciated by the
8018       window manager under which the application is running.  The application should then use
8019       XSetWMHints to supply the window manager with an icon pixmap or window in one
8020       of the supported sizes.
80212.17.2        XSetTransientForHint,  XGetTransientForHint
8022
8023
8024
8025Types:
8026
8027
8028          val  XSetTransientForHint:  Drawable  ->  Drawable  ->  unit
8029          val  XGetTransientForHint:  Drawable  ->  Drawable
8030
8031
8032Syntax:
8033
8034
8035          XSetTransientForHint  transientWindow  mainWindow  ;
8036          val  mainWindow  =  XGetTransientForHint  transientWindow  ;
8037
8038
8039Arguments:
8040
8041
8042       transientWindow                   Specifies the transient window.
8043
8044       mainWindow                        Specifies a more permanent window in the application.
8045
8046
8047Properties:
8048
8049
8050       WM__TRANSIENT__FOR                            Set by application programs to indicate to the window
8051                                                     manager a transient top-level window, such as a dialog
8052                                                     box.
8053
8054
8055Description:
8056
8057       The XSetTransientForHint function sets the WM__TRANSIENT__FOR property of
8058       transientWindow to mainWindow.
8059
8060       The XGetTransientForHint function returns the WM__TRANSIENT__FOR property
8061       for the specified transientWindow.  If the property does not exist then exception XWin-
8062       dows is raised with "XGetTransientForHint failed" .
80632.17.3        XSetWMClass,  XGetWMClass
8064
8065
8066
8067Types:
8068
8069
8070          val  XSetWMClass:  Drawable  ->  string  list  ->  unit
8071          val  XGetWMClass:  Drawable  ->  string  list
8072
8073cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      115
8074
8075
8076
8077Syntax:
8078
8079
8080          XSetWMClass  w  class  ;
8081          val  class  =  XGetWMClass  w  ;
8082
8083
8084Arguments:
8085
8086
8087       class          Specifies the class names for the window
8088
8089       w              Specifies the window
8090
8091
8092Properties:
8093
8094
8095       WM__CLASS                  Set by application programs to allow window and session managers to
8096                                  obtain the application's resources from the resource database.
8097
8098
8099Description:
8100
8101       XSetWMClass sets the WM__CLASS property on the specified window.  XGetWM-
8102       Class returns the WM__CLASS property on the specified window.
81032.17.4        XSetWMClientMachine,  XGetWMClientMachine
8104
8105
8106
8107Types:
8108
8109
8110          val  XSetWMClientMachine:  Drawable  ->  string  ->  unit
8111          val  XGetWMClientMachine:  Drawable  ->  string
8112
8113
8114Syntax:
8115
8116
8117          XSetWMClientMachine  w  machine  ;
8118          val  machine  =  XGetWMClientMachine  w  ;
8119
8120
8121Arguments:
8122
8123
8124       w                    Specifies the window
8125
8126       machine              Specifies the name of the machine on which the application is running.
8127
8128
8129Properties:
8130
8131
8132       WM__CLIENT__MACHINE                             The string name of the machine on which the client
8133                                                       application is running.
8134
8135
8136Description:
8137
8138       The XSetWMClientMachine convenience function performs a XSetProperty on the
8139       WM__CLIENT__MACHINE property.
8140
8141       The XGetWMClientMachine convenience function performs an XGetTextProperty
8142       on the WM__CLIENT__MACHINE property.
8143
8144116                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
8145
8146
8147
81482.17.5        XSetWMColormapWindows,  XGetWMColormapWindows
8149
8150
8151
8152Types:
8153
8154
8155          val  XSetWMColormapWindows:  Drawable  ->  Drawable  list  ->  unit
8156          val  XGetWMColormapWindows:  Drawable  ->  Drawable  list
8157
8158
8159Syntax:
8160
8161
8162          XSetWMColormapWindows  topWindow  colormapWindows  ;
8163          val  colormapWindows  =  XGetWMColormapWindows  topWindow  ;
8164
8165
8166Arguments:
8167
8168
8169       colormapWindows                     Specifies the list of windows.
8170
8171       topWindow                           Specifies one of the application's top level windows.
8172
8173
8174Properties:
8175
8176
8177       WM__COLORMAP__WINDOWS                                    List of windows that may need a different col-
8178                                                                ormap than that of their top-level window.
8179
8180
8181Description:
8182
8183       The                                                                             XSetWMColormapWin-
8184       dows function replaces the WM__COLORMAP__WINDOWS property on the specified
8185       window with the list of windows specified by the colormapWindows argument.  The prop-
8186       erty is stored with a type of XA__WINDOW and a format of 32.  If it cannot intern the
8187       WM__COLORMAP__WINDOWS atom, XSetWMColormapWindows raises excep-
8188       tion XWindows with "XSetWMColormapWindows failed" .
8189
8190       The XGetWMColormapWindows function returns the list of window identifiers stored
8191       in the WM__COLORMAP__WINDOWS property on the specified window.  These iden-
8192       tifiers  indicate  the  colormaps  that  the  window  manager  may  need  to  install  for  this
8193       window.   If  the  property  exists,  is  of  type  WINDOW,  is  of  format  32,  and  the  atom
8194       WM__COLORMAP__WINDOWS  can  be  interned,  XGetWMColormapWindows
8195       returns the list of windows.  Otherwise, it returns the empty list.
81962.17.6        XSetWMCommand,  XGetWMCommand
8197
8198
8199
8200Types:
8201
8202
8203          val  XSetWMCommand:  Drawable  ->  string  list  ->  unit
8204          val  XGetWMCommand:  Drawable  ->  string  list
8205
8206
8207Syntax:
8208
8209
8210          XSetWMCommand  w  commands  ;
8211          val  commands  =  XGetWMCommand  w  ;
8212
8213
8214Arguments:
8215
8216cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      117
8217
8218
8219
8220       w                       Specifies the window.
8221
8222       commands                Specifies the list of strings.
8223
8224
8225Description:
8226
8227       The XSetWMCommand function sets the WM__COMMAND property on the speci-
8228       fied window.  Typically it is set to the command and arguments used to invoke the appli-
8229       cation.
8230
8231       The  XGetWMCommand  function  reads  the  WM__COMMAND  property  from  the
8232       specified window and returns a string list.  If the WM__COMMAND property exists, and
8233       it is of type XA__STRING and format 8 then it is returned as a string list.  Otherwise, it
8234       raises exception XWindows with "XGetWMCommand" .
82352.17.7        XSetWMHints,  XGetWMHints
8236
8237
8238
8239Types:
8240
8241
8242          val  XSetWMHints:  Drawable  ->  XWMHint  list  ->  unit
8243          val  XGetWMHints:  Drawable  ->  XWMHint  list
8244
8245
8246Syntax:
8247
8248
8249          XSetWMHints  w  hints  ;
8250          val  hints  =  XGetWMHints  w  ;
8251
8252
8253Arguments:
8254
8255
8256       w               Specifies the window
8257
8258       hints           Specifies the list of XWMHint values
8259
8260
8261Argument Type:
8262
8263
8264          datatype  XWMStateHint  =  DontCareState  |  NormalState  |  ZoomState
8265                                          |  IconicState     |  InactiveState
8266
8267
8268          datatype  XWMHint  =  InputHint            of  bool
8269                                   |  StateHint            of  XWMStateHint
8270                                   |  IconPixmapHint     of  Drawable
8271                                   |  IconWindowHint     of  Drawable
8272                                   |  IconPositionHint  of  XPoint
8273                                   |  IconMaskHint       of  Drawable
8274
8275
8276Argument Description:
8277
8278       The InputHint member is used to communicate to the window manager the input focus
8279       model  used  by  the  application.   Applications  that  expect  input  but  never  explicitly  set
8280       focus  to  any  of  their  subwindows  (that  is,  use  the  push  model  of  focus  management),
8281       such as X10-style applications that use real-estate driven focus,  should set this member
8282       to  true.   Similarly,  applications  that  set  input  focus  to  their  subwindows  only  when  it
8283       is given to their top-level window by a window manager should also set this member to
8284       true.  Applications that manage their own input focus by explicitly setting focus to one
8285       of their subwindows whenever they want keyboard input (that is,  use the pull model of
8286
8287118                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
8288
8289
8290
8291       focus management) should set this member to false.  Applications that never expect any
8292       keyboard input also should set this member to false.
8293
8294       Pull model window managers should make it possible for push model applications to get
8295       input by setting input focus to the top-level windows of applications whose input member
8296       is  true.   Push  model  window  managers  should  make  sure  that  pull  model  applications
8297       do not break them by resetting input focus to PointerRoot when it is appropriate (for
8298       example, whenever an application whose input member is false sets input focus to one of
8299       its subwindows).
8300
8301       Possible values for the StateHint member are
8302
8303       DontCareState                  (* don't know or care *)
8304
8305       NormalState                    (* most applications want to start this way *)
8306
8307       ZoomState                      (* application wants to start zoomed *)
8308
8309       IconicState                    (* application wants to start as an icon *)
8310
8311       InactiveState                  (* application wants to start invisibly *)
8312
8313       The  IconMaskHint  member  specifies  which  pixels  of  the  IconPixmapHint  member
8314       should  be  used  as  the  icon.    This  allows  for  nonrectangular  icons.    Both  the  Icon-
8315       PixmapHint  member  and  the  IconMaskHint  member  must  be  bitmaps.   The  Icon-
8316       WindowHint member lets an application provide a window for use as an icon for window
8317       managers that support such use.  The IconPositionHint member specifies a position on
8318       the screen for the icon.
8319
8320Description:
8321
8322       The XSetWMHints function sets the window manager hints that include icon informa-
8323       tion and location,  the initial state of the window,  and whether the application relies on
8324       the window manager to get keyboard input.
8325
8326       The XGetWMHints function reads the window manager hints and returns the empty
8327       list if no WM__HINTS property was set on the window or returns a list of XWMHints if
8328       it succeeds.
83292.17.8        XSetWMIconName,  XGetWMIconName
8330
8331
8332
8333Types:
8334
8335
8336          val  XSetWMIconName:  Drawable  ->  string  ->  unit
8337          val  XGetWMIconName:  Drawable  ->  string
8338
8339
8340Syntax:
8341
8342
8343          XSetWMIconName  w  iconName  ;
8344          val  iconName  =  XGetWMIconName  w  ;
8345
8346
8347Arguments:
8348
8349
8350       iconName               Specifies the icon name
8351
8352       w                      Specifies the window
8353
8354cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      119
8355
8356
8357
8358Description:
8359
8360       The  XSetWMIconName  convenience  function  performs  a  XSetProperty  on  the
8361       WM__ICON__NAME  property.   The  XSetWMIconName  function  sets  the  name  to
8362       be displayed in a window's icon.
8363
8364       The  XGetWMIconName  convenience  function  performs  an  XGetTextProperty  on
8365       the  WM__ICON__NAME  property.   The  XGetWMIconName  function  returns  the
8366       name to be displayed in the specified window's icon.  If it succeeds, it returns the name,
8367       otherwise, if no icon name has been set for the window, it raises exception XWindows
8368       with "XGetWMIconName" .
83692.17.9        XSetWMName,  XGetWMName
8370
8371
8372
8373Types:
8374
8375
8376          val  XSetWMName:  Drawable  ->  string  ->  unit
8377          val  XGetWMName:  Drawable  ->  string
8378
8379
8380Syntax:
8381
8382
8383          XSetWMName  w  windowName  ;
8384          windowName  =  XGetWMName  w  ;
8385
8386
8387Arguments:
8388
8389
8390       windowName                   Specifies the window name
8391
8392       w                            Specifies the window
8393
8394
8395Description:
8396
8397       The   XSetWMName   convenience   function   performs   a   XSetProperty   on   the
8398       WM__NAME property.  The XSetWMName function assigns the name passed to win-
8399       dowName to the specified window.  A window manager can display the window name in
8400       some prominent place, such as the title bar, to allow users to identify windows easily.  Some
8401       window managers may display a window's name in the window's icon, although they are
8402       encouraged to use the window's icon name if one is provided by the application.
8403
8404       The  XGetWMName  convenience  function  performs  an  XGetTextProperty  on  the
8405       WM__NAME property.  The XGetWMName function returns the name of the specified
8406       window. If the WM__NAME property has not been set for this window, XGetWMName
8407       raises exception XWindows with "XGetWMName" .
84082.17.10         XSetWMProperties
8409
8410
8411
8412Types:
8413
8414
8415          val  XSetWMProperties:  Drawable  ->
8416                                          string  ->  string  ->  string  list  ->
8417                                          XWMSizeHint  list  ->  XWMHint  list  ->
8418                                          string  list  ->  unit
8419
8420120                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
8421
8422
8423
8424Syntax:
8425
8426
8427          XSetWMProperties  w  windowName  iconName  commands  normalHints  wmHints  class  ;
8428
8429
8430Arguments:
8431
8432
8433       w                          Specifies the window
8434
8435       windowName                 Specifies the window name
8436
8437       iconName                   Specifies the icon name
8438
8439       commands                   Specifies the list of strings used to invoke the window
8440
8441       normalHints                Specifies the list of XWMSizeHint values for the window
8442
8443       wmHints                    Specifies the list of XWMHint values for the window
8444
8445       class                      Specifies the class names for the window
8446
8447
8448Properties:
8449
8450
8451       WM__CLASS                                       Set by application programs to allow window and ses-
8452                                                       sion  managers  to  obtain  the  application's  resources
8453                                                       from the resource database.
8454
8455       WM__CLIENT__MACHINE                             The string name of the machine on which the client
8456                                                       application is running.
8457
8458       WM__COMMAND                                     The  command  and  arguments,  separated  by  ASCII
8459                                                       nulls, used to invoke the application.
8460
8461       WM__HINTS                                       Additional hints set by client for use by the window
8462                                                       manager. The ML type of this property is XWMHints.
8463
8464
8465
8466       WM__ICON__NAME                                  Name to be used in icon.
8467
8468       WM__NAME                                        Name of the application.
8469
8470       WM__NORMAL__HINTS                               Size hints for a window in its normal state.  The ML
8471                                                       type of this property is XWMSizeHint.
8472
8473
8474Description:
8475
8476       The XSetWMProperties convenience function provides a single programming interface
8477       for setting those essential window properties that are used for communicating with other
8478       clients (particularly window and session managers).
8479
8480       If  the  windowName  argument  is  not  empty,  XSetWMProperties  calls  XSetWM-
8481       Name,  which,  in  turn,  sets  the  WM__NAME  property.     If  the  iconName  argu-
8482       ment  is  not  empty,  XSetWMProperties  calls  XSetWMIconName,  which  sets  the
8483       WM__ICON__NAME  property.   If  the  commands  argument  is  not  empty,  XSetWM-
8484       Properties calls XSetWMCommand, which sets the WM__COMMAND property.
8485
8486       If the normalHints argument is not empty, XSetWMProperties calls XSetWMNor-
8487       malHints, which sets the WM__NORMAL__HINTS property.  If the wmHints argument
8488       is not empty, XSetWMProperties calls XSetWMHints, which sets the WM__HINTS
8489       property.   If  the  class  argument  is  not  empty,  XSetWMProperties  calls  XSetWM-
8490       Class, which sets the WM__CLASS property.
8491
8492cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      121
8493
8494
8495
84962.17.11         XSetWMSizeHints,  XGetWMSizeHints,
8497
8498                XSetWMNormalHints,  XGetWMNormalHints
8499
8500
8501
8502Types:
8503
8504
8505          val  XSetWMSizeHints:  Drawable  ->  int  ->  XWMSizeHint  list  ->  unit
8506          val  XGetWMSizeHints:  Drawable  ->  int  ->  XWMSizeHint  list
8507          val  XSetWMNormalHints:  Drawable  ->  XWMSizeHint  list  ->  unit
8508          val  XGetWMNormalHints:  Drawable  ->  XWMSizeHint  list
8509
8510
8511Syntax:
8512
8513
8514          XSetWMSizeHints  w  property  hints  ;
8515          val  hints  =  XGetWMSizeHints  w  property  ;
8516          XSetWMNormalHints  w  hints  ;
8517          val  hints  =  XGetWMNormalHints  w  ;
8518
8519
8520Arguments:
8521
8522
8523       w                    Specifies the window
8524
8525       property             Specifies the property atom
8526
8527       hints                Specifies the list of XWMSizeHint values
8528
8529
8530Argument Type:
8531
8532
8533          datatype  XWMSizeHint  =  PPosition     of  XPoint
8534                                        |  PSize          of  XRectangle
8535                                        |  PMinSize      of  XRectangle
8536                                        |  PMaxSize      of  XRectangle
8537                                        |  PResizeInc   of  XRectangle
8538                                        |  PAspect       of  XPoint  *  XPoint
8539                                        |  PBaseSize     of  XRectangle
8540                                        |  PWinGravity  of  Gravity
8541
8542
8543Argument Description:
8544
8545       The PPosition and PSize members are now obsolete and are left solely for compatibility
8546       reasons.  The PMinSize member specifies the minimum window size that still allows the
8547       application  to  be  useful.  The  PMaxSize  member  specifies  the  maximum  window  size.
8548       The PResizeInc member defines a size increment which the window prefers to be resized
8549       to.  The two points in the PAspect member give minimum and maximum aspect ratios.
8550       They are expressed as ratios of x and y, and they allow an application to specify the range
8551       of aspect ratios it prefers.  The PBaseSize member defines the desired size of the window.
8552       The PWinGravity member defines the region of the window that is to be retained when
8553       it is resized.
8554
8555Description:
8556
8557       The  XSetWMSizeHints  function  replaces  the  size  hints  for  the  specified  property  on
8558       the named window.  If the specified property does not already exist, XSetWMSizeHints
8559       sets the size hints for the specified property on the named window.  The property is stored
8560       with a type of WM__SIZE__HINTS and a format of 32.  To set a window's normal size
8561       hints, you can use the XSetWMNormalHints function.
8562
8563122                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
8564
8565
8566
8567       The XGetWMSizeHints function returns the size hints stored in the specified property
8568       on the named window.  If the property is of type WM__SIZE__HINTS, of format 32, and is
8569       long enough to contain either an old (pre-ICCCM) or new size hints structure, XGetWM-
8570       SizeHints returns the list of fields that were supplied by the user.  Otherwise, it returns the
8571       empty list.  To get a window's normal size hints, you can use the XGetWMNormalHints
8572       function.
8573
8574       If XGetWMSizeHints returns successfully and a pre-ICCCM size hints property is read,
8575       the list returned may contain the following members:
8576
8577
8578             [PPosition,PSize,PMinSize,PMaxSize,PResizeInc,PAspect]
8579
8580
8581       If the property is large enough to contain the base size and window gravity fields as well,
8582       the list returned may contain the following members:
8583
8584
8585             [PBaseSize,PWinGravity]
8586
8587
8588       The                    XSetWMNormalHints                    function                    replaces
8589       the  size  hints  for  the  WM__NORMAL__HINTS  property  on  the  specified  window.   If
8590       the property does not already exist, XSetWMNormalHints sets the size hints for the
8591       WM__NORMAL__HINTS property on the specified window.  The property is stored with
8592       a type of WM__SIZE__HINTS and a format of 32.
8593
8594       The   XGetWMNormalHints   function   returns   the   size   hints   stored   in   the
8595       WM__NORMAL__HINTS property on the specified window.  If the property is of type
8596       WM__SIZE__HINTS,  of  format  32,  and  is  long  enough  to  contain  either  an  old  (pre-
8597       ICCCM) or new size hints structure,  XGetWMNormalHints returns the list of fields
8598       that were supplied by the user.  Otherwise, it returns the empty list.
8599
8600       If XGetWMNormalHints returns successfully and a pre-ICCCM size hints property is
8601       read, the list returned may contain the following members:
8602
8603
8604             [PPosition,PSize,PMinSize,PMaxSize,PResizeInc,PAspect]
8605
8606
8607       If the property is large enough to contain the base size and window gravity fields as well,
8608       the list returned may contain the following members:
8609
8610
8611             [PBaseSize,PWinGravity]
8612
8613
86142.17.12         XWMGeometry
8615
8616
8617
8618Types:
8619
8620
8621          val  XWMGeometry:  string  ->  string  ->  int  ->
8622                                   XWMSizeHint  list  ->  XPoint  *  XRectangle  *  Gravity
8623
8624
8625Syntax:
8626
8627
8628          val  (topLeft,area,gravity)  =  XWMGeometry  userGeometry
8629                                                                     defaultGeometry
8630                                                                     borderWidth
8631                                                                     sizeHints  ;
8632
8633
8634Arguments:
8635
8636cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      123
8637
8638
8639
8640       userGeometry                      Specifies the user-specified geometry or empty string.
8641
8642       borderWidth                       Specifies the border width.
8643
8644       defaultGeometry                   Specifies the application's default geometry or empty string.
8645
8646       sizeHints                         Specifies the size hints for the window in its normal state.
8647
8648       topLeft                           Return the x and y offsets.
8649
8650       area                              Return the width and height determined.
8651
8652       gravity                           Returns the window gravity.
8653
8654
8655Description:
8656
8657       The XWMGeometry function combines any geometry information (given in the format
8658       used by XParseGeometry) specified by the user and by the calling program with size hints
8659       (usually the ones to be stored in WM__NORMAL__HINTS) and returns the position, size,
8660       and gravity (NorthWestGravity, NorthEastGravity, SouthEastGravity or South-
8661       WestGravity) that describe the window.  If the base size is not set in the XWMSizeHint
8662       list, the minimum size is used if set.  Otherwise, a base size of 0 is assumed.  If no minimum
8663       size is set in the hints list, the base size is used.
8664
8665       Note that invalid geometry specifications can cause a width or height of 0 to be returned.
8666
8667124                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
8668
8669
8670Chapter  3
8671
8672
8673
8674Event   Reference
86753.1       XEvent
8676
8677
8678
8679Types:
8680
8681
8682          datatype  'a  XEvent  =  ButtonPress         of  ...  |  ButtonRelease      of  ...
8683                                     |  ButtonClick         of  ...  |  CirculateNotify   of  ...
8684                                     |  CirculateRequest  of  ...  |  ColormapNotify     of  ...
8685                                     |  ConfigureNotify   of  ...  |  ConfigureRequest  of  ...
8686                                     |  CreateNotify       of  ...  |  DestroyNotify      of  ...
8687                                     |  EnterNotify         of  ...  |  LeaveNotify         of  ...
8688                                     |  Expose                of  ...  |  FocusIn               of  ...
8689                                     |  FocusOut             of  ...  |  GraphicsExpose     of  ...
8690                                     |  NoExpose             of  ...  |  GravityNotify      of  ...
8691                                     |  KeymapNotify       of  ...  |  KeyPress             of  ...
8692                                     |  KeyRelease          of  ...  |  MapNotify            of  ...
8693                                     |  UnmapNotify         of  ...  |  MapRequest          of  ...
8694                                     |  MotionNotify       of  ...  |  ReparentNotify     of  ...
8695                                     |  ResizeRequest      of  ...  |  SelectionClear     of  ...
8696                                     |  SelectionNotify   of  ...  |  SelectionRequest  of  ...
8697                                     |  VisibilityNotify  of  ...  |  DeleteRequest      of  ...
8698                                     |  Message               of  ...
8699
8700
8701Description:
8702
8703       The XEvent type is a union of the individual types returned for each different type of
8704       event.   Event  handlers  typically  pattern-match  on  the  XEvent  members,  choosing  to
8705       match events that they are interested in, and then a default pattern match to provide a
8706       default action for all other events.  For example:
8707
8708
8709          fun  Handler  (Expose  {window,region,...},state)  =  ...
8710
8711
8712          |     Handler  (EnterNotify  {window,...},state)  =  ...
8713          |     Handler  (LeaveNotify  {window,...},state)  =  ...
8714
8715
8716          |     Handler  (MotionNotify  {window,pointer,...},state)  =  ...
8717
8718
8719          |     Handler  (_,state)  =  state  ;   (*  default  is  to  do  nothing  *)
8720
8721
8722
8723                                                             125
8724
8725126                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
8726
8727
8728
8729       All the event types have a sendEvent member which is set to true if the event came from
8730       a SendEvent protocol request.  Most events also contain a time member, which is the time
8731       at which the event occurred.
8732
87333.2       ButtonPress,  ButtonRelease,  KeyPress,  KeyRelease,
8734
8735          MotionNotify
8736
8737
8738
8739Types:
8740
8741
8742          datatype  Modifier  =  ShiftMask     |  LockMask      |  ControlMask
8743                                    |  Mod1Mask      |  Mod2Mask      |  Mod3Mask
8744                                    |  Mod4Mask      |  Mod5Mask
8745                                    |  Button1Mask  |  Button2Mask  |  Button3Mask
8746                                    |  Button4Mask  |  Button5Mask
8747                                    |  AnyModifier  ;
8748
8749
8750          datatype  ButtonName  =  Button1  |  Button2  |  Button3
8751                                       |  Button4  |  Button5  |  AnyButton  ;
8752
8753
8754          ButtonPress     of  {  sendEvent:     bool,
8755                                     window:         Drawable,
8756                                     root:            Drawable,
8757                                     subwindow:     Drawable,
8758                                     time:            int,
8759                                     pointer:       XPoint,
8760                                     rootPointer:  XPoint,
8761                                     modifiers:     Modifier  list,
8762                                     button:         ButtonName  }
8763
8764
8765          ButtonRelease  of  {  sendEvent:     bool,
8766                                     window:         Drawable,
8767                                     root:            Drawable,
8768                                     subwindow:     Drawable,
8769                                     time:            int,
8770                                     pointer:       XPoint,
8771                                     rootPointer:  XPoint,
8772                                     modifiers:     Modifier  list,
8773                                     button:         ButtonName  }
8774
8775
8776          ButtonClick  of  {  sendEvent:     bool,
8777                                   window:         Drawable,
8778                                   root:            Drawable,
8779                                   subwindow:     Drawable,
8780                                   time:            int,
8781                                   pointer:       XPoint,
8782                                   rootPointer:  XPoint,
8783                                   modifiers:     Modifier  list,
8784                                   button:         ButtonName,
8785                                   up:               int,                (*  number  of  up     transitions  *)
8786                                   down:            int  }               (*  number  of  down  transitions  *)
8787
8788
8789          KeyPress         of  {  sendEvent:     bool,
8790                                     window:         Drawable,
8791                                     root:            Drawable,
8792
8793cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      127
8794
8795
8796
8797                                     subwindow:     Drawable,
8798                                     time:            int,
8799                                     pointer:       XPoint,
8800                                     rootPointer:  XPoint,
8801                                     modifiers:     Modifier  list,
8802                                     keycode:       int  }
8803
8804
8805          KeyRelease      of  {  sendEvent:     bool,
8806                                     window:         Drawable,
8807                                     root:            Drawable,
8808                                     subwindow:     Drawable,
8809                                     time:            int,
8810                                     pointer:       XPoint,
8811                                     rootPointer:  XPoint,
8812                                     modifiers:     Modifier  list,
8813                                     keycode:       int  }
8814
8815
8816          MotionNotify   of  {  sendEvent:     bool,
8817                                     window:         Drawable,
8818                                     root:            Drawable,
8819                                     subwindow:     Drawable,
8820                                     time:            int,
8821                                     pointer:       XPoint,
8822                                     rootPointer:  XPoint,
8823                                     modifiers:     Modifier  list,
8824                                     isHint:         bool  }
8825
8826
8827Description:
8828
8829       These structures have the following common members:  window,  root,  subwindow,  time,
8830       pointer, rootPointer, and modifiers.  The window member is set to the window on which
8831       the  event  was  generated  and  is  referred  to  as  the  event  window.   The  root  member  is
8832       set to the source window's root window.  The rootPointer member is set to the pointer's
8833       coordinates relative to the root window's origin at the time of the event.
8834
8835       If  the  source  window  is  an  inferior  of  the  event  window,  the  subwindow  member  of  the
8836       structure is set to the child of the event window that is the source member or an ancestor
8837       of it.  Otherwise,  the X server sets the subwindow member to NoDrawable.  The time
8838       member is set to the time when the event was generated and is expressed in milliseconds.
8839
8840       If the event window is on the same screen as the root window, the pointer member is set
8841       to the coordinates relative to the event window's origin.  Otherwise, this member is set to
8842       (0,0).
8843
8844       The modifiers member is set to indicate the state of the pointer buttons and modifier keys
8845       just prior to the event.  It is a list of button or modifier key masks:  Button1Mask, But-
8846       ton2Mask, Button3Mask, Button4Mask, Button5Mask, ShiftMask, LockMask,
8847       ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask.
8848
8849       KeyPress and KeyRelease events have a member called keycode.  It is set to a number
8850       that represents a physical key on the keyboard.  The keycode is an arbitrary representation
8851       for any key on the keyboard.
8852
8853       ButtonPress and ButtonRelease events have a member called button.  It represents the
8854       pointer button that changed state and can be Button1, Button2, Button3, Button4,
8855       or Button5.
8856
8857       The ButtonClick event can be used as an alternative to the ButtonPress and Button-
8858       Release combinations.  It returns the number of up and down transitions of the pointer
8859
8860128                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
8861
8862
8863
8864       button in a small predetermined time interval.  In this way it is easy to detect double and
8865       triple clicks.
8866
8867       MotionNotify events have a member called isHint.  It can be set to true or false.
8868
88693.3       CirculateNotify
8870
8871
8872
8873Types:
8874
8875
8876          datatype  Placement  =  PlaceOnTop  |  PlaceOnBottom  ;
8877
8878
8879          CirculateNotify  of  {  sendEvent:  bool,
8880                                        event:       Drawable,
8881                                        window:      Drawable,
8882                                        place:       Placement  }
8883
8884
8885Description:
8886
8887       The event member is set either to the restacked window or to its parent,  depending on
8888       whether StructureNotifyMask or SubstructureNotifyMask was selected.  The win-
8889       dow member is set to the window that was restacked.  The place member is set to the win-
8890       dow's position after the restack occurs and is either PlaceOnTop or PlaceOnBottom.
8891       If it is PlaceOnTop, the window is now on top of all siblings.  If it is PlaceOnBottom,
8892       the window is now below all siblings.
8893
88943.4       CirculateRequest
8895
8896
8897
8898Types:
8899
8900
8901          datatype  Placement  =  PlaceOnTop  |  PlaceOnBottom  ;
8902
8903
8904          CirculateRequest  of  {  sendEvent:  bool,
8905                                          parent:      Drawable,
8906                                          window:      Drawable,
8907                                          place:       Placement  }
8908
8909
8910Description:
8911
8912       The parent member is set to the parent window.  The window member is set to the sub-
8913       window to be restacked.  The place member is set to what the new position in the stacking
8914       order should be and is either PlaceOnTop or PlaceOnBottom.  If it is PlaceOnTop,
8915       the subwindow should be on top of all siblings.  If it is PlaceOnBottom, the subwindow
8916       should be below all siblings.
8917
89183.5       ColormapNotify
8919
8920
8921
8922Types:
8923
8924cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      129
8925
8926
8927
8928          ColormapNotify  of  {  sendEvent:  bool,
8929                                       window:      Drawable,
8930                                       colormap:   Colormap,
8931                                       new:          bool,
8932                                       installed:  bool  }
8933
8934
8935Description:
8936
8937       The window member is set to the window whose associated colormap is changed, installed,
8938       or  uninstalled.   For  a  colormap  that  is  changed,  installed,  or  uninstalled,  the  colormap
8939       member is set to the colormap associated with the window.  For a colormap that is changed
8940       by a call to XFreeColormap, the colormap member is set to NoColormap.  The new
8941       member is set to indicate whether the colormap for the specified window was changed or
8942       installed or uninstalled and can be true or false.  If it is true, the colormap was changed.
8943       If it is false, the colormap was installed or uninstalled.  The installed member is always set
8944       to indicate whether the colormap is installed or uninstalled.
8945
89463.6       ConfigureNotify
8947
8948
8949
8950Types:
8951
8952
8953          ConfigureNotify  of  {  sendEvent:            bool,
8954                                        event:                 Drawable,
8955                                        window:                Drawable,
8956                                        position:             XPoint,
8957                                        size:                   XRectangle,
8958                                        borderWidth:         int,
8959                                        above:                 Drawable,
8960                                        overrideRedirect:  bool  }
8961
8962
8963Description:
8964
8965       The  event  member  is  set  either  to  the  reconfigured  window  or  to  its  parent,  depending
8966       on  whether  StructureNotifyMask  or  SubstructureNotifyMask  was  selected.   The
8967       window member is set to the window whose size, position, border, and/or stacking order
8968       was changed.
8969
8970       The position member is set to the coordinates relative to the parent window's origin and
8971       indicates the position of the upper-left outside corner of the window.  The size member is
8972       set to the inside size of the window, not including the border.  The borderWidth member
8973       is set to the width of the window's border, in pixels.
8974
8975       The above member is set to the sibling window and is used for stacking operations.  If the
8976       X server sets this member to NoDrawable, the window whose state was changed is on
8977       the bottom of the stack with respect to sibling windows.  However, if this member is set
8978       to a sibling window, the window whose state was changed is placed on top of this sibling
8979       window.
8980
8981       The overrideRedirect member is set to the override-redirect attribute of the window.  Win-
8982       dow manager clients normally should ignore this window if the overrideRedirect member
8983       is true.
8984
8985130                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
8986
8987
8988
89893.7       ConfigureRequest
8990
8991
8992
8993Types:
8994
8995
8996          datatype  StackMode  =  Above  |  Below  |  TopIf  |  BottomIf  |  Opposite  ;
8997
8998
8999          ConfigureRequest  of  {  sendEvent:     bool,
9000                                          parent:         Drawable,
9001                                          window:         Drawable,
9002                                          position:      XPoint,
9003                                          size:            XRectangle,
9004                                          borderWidth:  int,
9005                                          above:          Drawable,
9006                                          detail:         StackMode  }
9007
9008
9009Description:
9010
9011       The parent member is set to the parent window.  The window member is set to the window
9012       whose size, position, border width, and/or stacking order is to be reconfigured.
9013
90143.8       CreateNotify
9015
9016
9017
9018Types:
9019
9020
9021          CreateNotify  of  {  sendEvent:            bool,
9022                                    parent:                Drawable,
9023                                    window:                Drawable,
9024                                    position:             XPoint,
9025                                    size:                   XRectangle,
9026                                    borderWidth:         int,
9027                                    overrideRedirect:  bool  }
9028
9029
9030Description:
9031
9032       The parent member is set to the created window's parent.  The window member specifies
9033       the  created  window.   The  position  member  is  set  to  the  created  window's  coordinates
9034       relative to the parent window's origin and indicates the position of the upper-left outside
9035       corner  of  the  created  window.  The  size  member  is  set  to  the  inside  size  of  the  created
9036       window (not including the border) and is always nonzero.  The borderWidth member is
9037       set to the width of the created window's border, in pixels.  The overrideRedirect member
9038       is set to the override-redirect attribute of the window.  Window manager clients normally
9039       should ignore this window if the overrideRedirect member is true.
9040
90413.9       DeleteRequest
9042
9043
9044
9045Types:
9046
9047
9048              DeleteRequest  of  {  window:  Drawable  }
9049
9050cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      131
9051
9052
9053
9054Description:
9055
9056       This  event  is  generated  when  the  window  manager  tries  to  destroy  a  top  level  window.
9057       Instead of the window being destroyed the window manager sends this event to the ap-
9058       plication.  The application can either ignore the event,  or,  typically,  it can will perform
9059       some save operations and then destroy the window itself.  The window member is set to
9060       the window that is to be destroyed.
9061
90623.10         DestroyNotify
9063
9064
9065
9066Types:
9067
9068
9069          DestroyNotify  of  {  sendEvent:  bool,
9070                                     event:       Drawable,
9071                                     window:      Drawable  }
9072
9073
9074Description:
9075
9076       The event member is set either to the destroyed window or to its parent,  depending on
9077       whether StructureNotifyMask or SubstructureNotifyMask was selected.  The win-
9078       dow member is set to the window that is destroyed.
9079
90803.11         EnterNotify,  LeaveNotify,  NotifyMode,  NotifyDetail
9081
9082
9083
9084Types:
9085
9086
9087          datatype  NotifyMode  =  NotifyNormal
9088                                       |  NotifyGrab
9089                                       |  NotifyUngrab
9090                                       |  NotifyWhileGrabbed  ;
9091
9092
9093          datatype  NotifyDetail  =  NotifyAncestor             |  NotifyVirtual
9094                                          |  NotifyInferior             |  NotifyNonLinear
9095                                          |  NotifyNonLinearVirtual  |  NotifyPointer
9096                                          |  NotifyPointerRoot         |  NotifyDetailNone  ;
9097
9098
9099          EnterNotify  of  {  sendEvent:     bool,
9100                                   window:         Drawable,
9101                                   root:            Drawable,
9102                                   subwindow:     Drawable,
9103                                   time:            int,
9104                                   pointer:       XPoint,
9105                                   rootPointer:  XPoint,
9106                                   mode:            NotifyMode,
9107                                   detail:         NotifyDetail,
9108                                   focus:          bool,
9109                                   modifiers:     Modifier  list  }
9110
9111
9112          LeaveNotify  of  {  sendEvent:     bool,
9113                                   window:         Drawable,
9114                                   root:            Drawable,
9115                                   subwindow:     Drawable,
9116
9117132                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
9118
9119
9120
9121                                   time:            int,
9122                                   pointer:       XPoint,
9123                                   rootPointer:  XPoint,
9124                                   mode:            NotifyMode,
9125                                   detail:         NotifyDetail,
9126                                   focus:          bool,
9127                                   modifiers:     Modifier  list  }
9128
9129
9130Description:
9131
9132       The window member is set to the window on which the EnterNotify or LeaveNotify
9133       event was generated and is referred to as the event window.  This is the window used by
9134       the X server to report the event, and is relative to the root window on which the event
9135       occurred.  The root member is set to the root window of the screen on which the event
9136       occurred.
9137
9138       For a LeaveNotify event, if a child of the event window contains the initial position of
9139       the pointer, the subwindow component is set to that child.  Otherwise, the X server sets
9140       the  subwindow  member  to  NoDrawable.  For  an  EnterNotify  event,  if  a  child  of  the
9141       event window contains the final pointer position, the subwindow component is set to that
9142       child or NoDrawable.
9143
9144       The  time  member  is  set  to  the  time  when  the  event  was  generated  and  is  expressed  in
9145       milliseconds.  The pointer member is set to the coordinates of the pointer position in the
9146       event window.  This position is always the pointer's final position, not its initial position.
9147       If  the  event  window  is  on  the  same  screen  as  the  root  window,  pointer  is  the  pointer
9148       coordinates relative to the event window's origin.  Otherwise, pointer is set to (0,0).  The
9149       rootPointer member is set to the pointer's coordinates relative to the root window's origin
9150       at the time of the event.
9151
9152       The focus member is set to indicate whether the event window is the focus window or an
9153       inferior of the focus window.  The X server can set this member to either true or false.  If
9154       true, the event window is the focus window or an inferior of the focus window.  If false, the
9155       event window is not the focus window or an inferior of the focus window.
9156
9157       The modifiers member is set to indicate the state of the pointer buttons and modifier keys
9158       just prior to the event.  It is a list of button or modifier key masks:  Button1Mask, But-
9159       ton2Mask, Button3Mask, Button4Mask, Button5Mask, ShiftMask, LockMask,
9160       ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask.
9161
9162       The mode member is set to indicate whether the events are normal events, pseudo-motion
9163       events when a grab activates, or pseudo-motion events when a grab deactivates.  The X
9164       server can set this member to NotifyNormal, NotifyGrab, or NotifyUngrab.
9165
9166       The detail member is set to indicate the notify detail and can be NotifyAncestor, No-
9167       tifyVirtual, NotifyInferior, NotifyNonLinear, or NotifyNonLinearVirtual.
9168
91693.12         Expose
9170
9171
9172
9173Types:
9174
9175
9176          Expose  of  {  sendEvent:  bool,
9177                           window:      Drawable,
9178                           region:      XRectangle,
9179                           count:       int  }
9180
9181cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      133
9182
9183
9184
9185Description:
9186
9187       The  window  member  is  set  to  the  exposed  (damaged)  window.   The  region  member  is
9188       set to the damaged area within the window.  The count member is set to the number of
9189       Expose  events  that  are  to  follow.   If  count  is  zero,  no  more  Expose  events  follow  for
9190       this window.  However, if count is nonzero, at least that number of Expose events (and
9191       possibly more) follow for this window.  Simple applications that do not want to optimize
9192       redisplay  by  distinguishing  between  subareas  of  its  window  can  just  ignore  all  Expose
9193       events with nonzero counts and perform full redisplays on events with zero counts.
9194
91953.13         FocusIn,  FocusOut
9196
9197
9198
9199Types:
9200
9201
9202          FocusIn  of  {  sendEvent:  bool,
9203                             window:      Drawable,
9204                             mode:         NotifyMode,
9205                             detail:      NotifyDetail  }
9206
9207
9208          FocusOut  of  {  sendEvent:  bool,
9209                              window:      Drawable,
9210                              mode:         NotifyMode,
9211                              detail:      NotifyDetail  }
9212
9213
9214Description:
9215
9216       The window member is set to the window on which the FocusIn or FocusOut event was
9217       generated.  This is the window used by the X server to report the event.  The mode mem-
9218       ber is set to indicate whether the focus events are normal focus events, focus events while
9219       grabbed, focus events when a grab activates, or focus events when a grab deactivates.  The
9220       X server can set the mode member to NotifyNormal, NotifyWhileGrabbed, Notify-
9221       Grab, or NotifyUngrab.
9222
9223       All FocusOut events caused by a window unmap are generated after any UnmapNotify
9224       event; however, the X protocol does not constrain the ordering of FocusOut events with
9225       respect to generated EnterNotify, LeaveNotify, VisibilityNotify, and Expose events.
9226
9227       Depending on the event mode, the detail member is set to indicate the notify detail and
9228       can  be  NotifyAncestor,  NotifyVirtual,  NotifyInferior,  NotifyNonLinear,  Noti-
9229       fyNonLinearVirtual, NotifyPointer, NotifyPointerRoot, or NotifyDetailNone.
9230
92313.14         GraphicsExpose,  NoExpose
9232
9233
9234
9235Types:
9236
9237
9238          datatype  GraphicsCode  =  CopyArea  |  CopyPlane  ;
9239
9240
9241          GraphicsExpose  of  {  sendEvent:  bool,
9242                                       window:      Drawable,
9243                                       region:      XRectangle,
9244                                       count:       int,
9245                                       code:         GraphicsCode  }
9246
9247134                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
9248          NoExpose  of  {  sendEvent:  bool,
9249                              window:      Drawable,
9250                              code:         GraphicsCode  }
9251
9252
9253Description:
9254
9255       Both structures have drawable and code as common members.  The drawable member is
9256       set  to  the  drawable  of  the  destination  region  on  which  the  graphics  request  was  to  be
9257       performed.  The code member is set to the graphics request initiated by the client and can
9258       be either CopyArea or CopyPlane.  If it is CopyArea, a call to XCopyArea initiated
9259       the request.  If it is CopyPlane, a call to XCopyPlane initiated the request.
9260
9261       The GraphicsExpose structure has these additional members:  region, and count.  The
9262       region member is set to the area within the drawable.  The count member is set to the
9263       number of GraphicsExpose events to follow.  If count is zero, no more GraphicsExpose
9264       events  follow  for  this  window.   However,  if  count  is  nonzero,  at  least  that  number  of
9265       GraphicsExpose events (and possibly more) are to follow for this window.
9266
92673.15         GravityNotify
9268
9269
9270
9271Types:
9272
9273
9274          GravityNotify  of  {  sendEvent:  bool,
9275                                     event:       Drawable,
9276                                     window:      Drawable,
9277                                     position:   XPoint  }
9278
9279
9280Description:
9281
9282       The event member is set either to the window that was moved or to its parent, depending
9283       on  whether  StructureNotifyMask  or  SubstructureNotifyMask  was  selected.   The
9284       window member is set to the child window that was moved.  The position member is set
9285       to the coordinates relative to the new parent window's origin and indicates the position of
9286       the upper-left outside corner of the window.
9287
92883.16         KeymapNotify
9289
9290
9291
9292Types:
9293
9294
9295          KeymapNotify  of  {  sendEvent:  bool,
9296                                    window:      Drawable,
9297                                    keyVector:  bool  list  (*  256  bools  *)  }
9298
9299
9300Description:
9301
9302       The keyVector member is set to the bit vector of the keyboard.  The vector is returned
9303       as a list of 256 bools, representing the keys 0 to 255 in that order.  Each bool set to true
9304       indicates that the corresponding key is currently pressed.
9305
9306cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      135
9307
9308
9309
93103.17         MapNotify
9311
9312
9313
9314Types:
9315
9316
9317          MapNotify  of  {  sendEvent:            bool,
9318                                event:                 Drawable,
9319                                window:                Drawable,
9320                                overrideRedirect:  bool  }
9321
9322
9323Description:
9324
9325       The event member is set either to the window that was mapped or to its parent, depending
9326       on  whether  StructureNotifyMask  or  SubstructureNotifyMask  was  selected.   The
9327       window  member  is  set  to  the  window  that  was  mapped.  The  overrideRedirect  member
9328       is set to the override-redirect attribute of the window.  Window manager clients normally
9329       should ignore this window if the override-redirect attribute is true, because these events
9330       usually are generated from pop-ups, which override structure control.
9331
93323.18         MapRequest
9333
9334
9335
9336Types:
9337
9338
9339          MapRequest  of  {  sendEvent:  bool,
9340                                 parent:      Drawable,
9341                                 window:      Drawable  }
9342
9343
9344Description:
9345
9346       The parent member is set to the parent window.  The window member is set to the window
9347       to be mapped.
9348
93493.19         Message
9350
9351
9352
9353Types:
9354
9355
9356              Message  of  {  window:  Drawable,  message:  'a  }  ;
9357
9358
9359Description:
9360
9361       This event is received when a message is sent to a window.  The only way to send a message
9362       to a window is to call the message-sender function returned by XSetHandler.  This will
9363       only allow a strongly typed messages to be sent.
9364
93653.20         ReparentNotify
9366
9367
9368
9369Types:
9370
9371136                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
9372
9373
9374
9375          ReparentNotify  of  {  sendEvent:            bool,
9376                                       event:                 Drawable,
9377                                       window:                Drawable,
9378                                       parent:                Drawable,
9379                                       position:             XPoint,
9380                                       overrideRedirect:  bool  }
9381
9382
9383Description:
9384
9385       The event member is set either to the reparented window or to the old or the new par-
9386       ent,  depending on whether StructureNotifyMask or SubstructureNotifyMask was
9387       selected.   The  window  member  is  set  to  the  window  that  was  reparented.   The  parent
9388       member is set to the new parent window.  The position member is set to the reparented
9389       window's coordinates relative to the new parent window's origin and defines the upper-left
9390       outer corner of the reparented window.  The overrideRedirect member is set to the override-
9391       redirect attribute of the window specified by the window member.  Window manager clients
9392       normally should ignore this window if the overrideRedirect member is true.
9393
93943.21         ResizeRequest
9395
9396
9397
9398Types:
9399
9400
9401          ResizeRequest  of  {  sendEvent:  bool,
9402                                     window:      Drawable,
9403                                     size:         XRectangle  }
9404
9405
9406Description:
9407
9408       The window member is set to the window whose size another client attempted to change.
9409       The size member is set to the inside size of the window, excluding the border.
9410
94113.22         SelectionClear
9412
9413
9414
9415Types:
9416
9417
9418          SelectionClear  of  {  sendEvent:  bool,
9419                                       window:      Drawable,
9420                                       selection:  int,
9421                                       time:         int  }
9422
9423
9424Description:
9425
9426       The window member is set to the window losing ownership of the selection.  The selection
9427       member  is  set  to  the  selection  atom.   The  time  member  is  set  to  the  last  change  time
9428       recorded  for  the  selection.  The  owner  member  is  the  window  that  was  specified  by  the
9429       current owner in its XSetSelectionOwner call.
9430
9431cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      137
9432
9433
9434
94353.23         SelectionNotify
9436
9437
9438
9439Types:
9440
9441
9442          SelectionNotify  of  {  sendEvent:  bool,
9443                                        requestor:  Drawable,
9444                                        selection:  int,
9445                                        target:      int,
9446                                        property:   int,
9447                                        time:         int  }
9448
9449
9450Description:
9451
9452       The  requestor  member  is  set  to  the  window  associated  with  the  requestor  of  the  selec-
9453       tion.  The selection member is set to the atom that indicates the selection.  For example,
9454       XA__PRIMARY is used for the primary selection.  The target member is set to the atom
9455       that indicates the converted type.  For example, XA__PIXMAP is used for a pixmap.  The
9456       property member is set to the atom that indicates which property the result was stored
9457       on.  If the conversion failed, the property member is set to zero.  The time member is set
9458       to the time the conversion took place and can be a timestamp or CurrentTime.
9459
94603.24         SelectionRequest
9461
9462
9463
9464Types:
9465
9466
9467          SelectionRequest  of  {  sendEvent:  bool,
9468                                          owner:       Drawable,
9469                                          requestor:  Drawable,
9470                                          selection:  int,
9471                                          target:      int,
9472                                          property:   int,
9473                                          time:         int  }
9474
9475
9476Description:
9477
9478       The owner member is set to the window owning the selection and is the window that was
9479       specified by the current owner in its XSetSelectionOwner call.  The requestor member
9480       is  set  to  the  window  requesting  the  selection.  The  selection  member  is  set  to  the  atom
9481       that names the selection.  For example, XA__PRIMARY is used to indicate the primary
9482       selection.  The target member is set to the atom that indicates the type the selection is
9483       desired in.  The property member can be a property name or zero.  The time member is set
9484       to the time and is a timestamp or CurrentTime from the XConvertSelection request.
9485
94863.25         UnmapNotify
9487
9488
9489
9490Types:
9491
9492
9493          UnmapNotify  of  {  sendEvent:       bool,
9494                                   event:             Drawable,
9495                                   window:            Drawable,
9496                                   fromConfigure:  bool  }
9497
9498138                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
9499
9500
9501
9502Description:
9503
9504       The event member is set either to the unmapped window or to its parent, depending on
9505       whether StructureNotifyMask or SubstructureNotifyMask was selected.  This is the
9506       window used by the X server to report the event.  The window member is set to the window
9507       that was unmapped.  The fromConfigure member is set to true if the event was generated
9508       as a result of a resizing of the window's parent when the window itself had a winGravity
9509       of UnmapGravity.
9510
95113.26         VisibilityNotify
9512
9513
9514
9515Types:
9516
9517
9518          datatype  Visibility  =  VisibilityUnobscured
9519                                       |  VisibilityPartiallyObscured
9520                                       |  VisibilityObscured  ;
9521
9522
9523          VisibilityNotify  of  {  sendEvent:   bool,
9524                                          window:       Drawable,
9525                                          visibility:  Visibility  }
9526
9527
9528Description:
9529
9530       The window member is set to the window whose visibility state changes.  The state member
9531       is set to the state of the window's visibility and can be VisibilityUnobscured, Visibil-
9532       ityPartiallyObscured, or VisibilityObscured.  The X server ignores all of a window's
9533       subwindows when determining the visibility state of the window and processes Visibili-
9534       tyNotify events according to the following:
9535
9536
9537
9538              When the window changes state from partially obscured, fully obscured, or not view-
9539              able to viewable and completely unobscured, the X server generates the event with
9540              the state member of the VisibilityNotify structure set to VisibilityUnobscured.
9541
9542              When  the  window  changes  state  from  viewable  and  completely  unobscured  or  not
9543              viewable to viewable and partially obscured,  the X server generates the event with
9544              the state member of the VisibilityNotify structure set to VisibilityPartiallyOb-
9545              scured.
9546
9547              When the window changes state from viewable and completely unobscured, viewable
9548              and partially obscured, or not viewable to viewable and fully obscured, the X server
9549              generates the event with the state member of the VisibilityNotify structure set to
9550              VisibilityObscured.
9551
9552
9553Chapter  4
9554
9555
9556
9557Protocol   Error   Messages
95584.1       BadAccess
9559
9560
9561
9562Description:
9563
9564
9565       XFreeColors                           pixel not allocated.
9566
9567       XSelectInput                          selecting  event  that  can  only  be  selected  by  one  client  at  a
9568                                             time, when another client already has it selected.
9569
9570       XStoreColors                          pixel not allocated, or allocated read-only.
9571
9572       XStoreNamedColor                      pixel not allocated, or allocated read-only.
9573
95744.2       BadAlloc
9575
9576
9577
9578Description:
9579
9580       The server failed to allocate the requested resource.
9581
95824.3       BadAtom
9583
9584
9585
9586Description:
9587
9588       A value for an atom argument does not name a defined atom.
9589
95904.4       BadColor
9591
9592
9593
9594Description:
9595
9596       A value for a Colormap argument does not name a defined Colormap.  ML type-checking
9597       should avoid this error.
9598
9599                                                             139
9600
9601140                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
9602
9603
9604
96054.5       BadCursor
9606
9607
9608
9609Description:
9610
9611       A  value  for  a  Cursor  argument  does  not  name  a  defined  Cursor.   ML  type-checking
9612       should avoid this error.
9613
96144.6       BadDrawable
9615
9616
9617
9618Description:
9619
9620       A  value  for  a  Drawable  argument  does  not  name  a  defined  Window  or  Pixmap.   ML
9621       type-checking should avoid this error.
9622
96234.7       BadFont
9624
9625
9626
9627Description:
9628
9629       A value for a Font argument does not name a defined Font.  ML type-checking should
9630       avoid this error.
9631
96324.8       BadGC
9633
9634
9635
9636Description:
9637
9638       A value for a GC argument does not name a defined GC. ML type-checking should avoid
9639       this error.
9640
96414.9       BadImplementation
9642
9643
9644
9645Description:
9646
9647       The  server  does  not  implement  some  aspect  of  the  request.  This  should  never  occur  in
9648       Xlib since only standard requests are made.
9649
96504.10         BadIDChoice,  BadLength
9651
9652
9653
9654Description:
9655
9656       Internal Xlib error.
9657
9658cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      141
9659
9660
9661
96624.11         BadMatch
9663
9664
9665
9666Description:
9667
9668       Some argument, or arguments, have the correct type and range, but fail to 'match' in some
9669       other way.
9670
9671       XChangeWindowAtrributes                                     Changing the background or border of an In-
9672                                                                   putOnlyClass window.
9673
9674       XClearArea                                                  InputOnlyClass window specified.
9675
9676       XClearWindow                                                InputOnlyClass window specified.
9677
9678       XConfigureWindow                                            Sibling incorrectly specified, or changing the
9679                                                                   background or border of an InputOnlyClass
9680                                                                   window.
9681
9682       XCopyArea                                                   The drawables must have the same root and
9683                                                                   depth.
9684
9685       XCopyPlane                                                  The drawables must have the same root.
9686
9687       XCreateColormap                                             Visual  type  not  supported,  or  bad  Alloc-
9688                                                                   Type.
9689
9690       XSetWindowColormap                                          Colormap has different visual type to win-
9691                                                                   dow.
9692
9693       XCreatePixmapCursor                                         Masks must have depth of 1, and must be the
9694                                                                   same  size,  and  the  hotspot  must  be  within
9695                                                                   that size.
9696
9697       XChangeGC                                                   Tile  pixmap  must  have  the  same  root  and
9698                                                                   depth as the GC. Stipple pixmap must have
9699                                                                   depth of 1 and must have the same root as the
9700                                                                   GC. Clip-mask pixmap must have depth of 1
9701                                                                   and must have the same root as the GC. Us-
9702                                                                   ing a GC with a Drawable of different root
9703                                                                   or depth results in BadMatch.
9704
9705       XPutImage                                                   If XYBitmap format is used, the depth must
9706                                                                   be  1.   For  XYPixmap  and  ZPixmap,  the
9707                                                                   depth must match the depth of the drawable.
9708
9709
9710
9711       XGetImage                                                   Specified area not within the source drawable.
9712
9713
9714
9715       XGetSubImage                                                Specified area not within the source drawable.
9716
9717
9718
9719       XRestackWindows                                             Specified window is not child window.
9720
9721       XCreatePixmapFromBitmapData                                 Depth must be supported by screen.
9722
9723       XReparentWindow                                             New parent is not on same screen as old par-
9724                                                                   ent.
9725
9726       XSetClipRectangles                                          Incorrect ordering.
9727
9728       XSetInputFocus                                              Focus window must be viewable.
9729
9730142                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
9731
9732
9733
97344.12         BadPixmap
9735
9736
9737
9738Description:
9739
9740       A value for a Pixmap does not name a defined Pixmap.  ML type-checking should avoid
9741       this error.
9742
97434.13         BadRequest
9744
9745
9746
9747Description:
9748
9749       This should never occur in Xlib since only standard requests are made.
9750
97514.14         BadValue
9752
9753
9754
9755Description:
9756
9757       Some numeric value falls outside the range of values accepted by the request.
9758
9759       XAllocColorCells                         Number  of  colours  must  be  positive  and  planes  must  be
9760                                                non-negative.
9761
9762       XAllocColorPlanes                        Number  of  colours  must  be  positive,  and  reds,  green  and
9763                                                blues must be non-negative
9764
9765       XFreeColors                              Specified pixel is not a valid index into the colormap.
9766
9767       XBell                                    Percent must be "100 to 100.
9768
9769       XResizeWindow                            Window width must be non-zero.
9770
9771       XCopyPlane                               Plane  must  have  one  bit  set  to  1,  and  specify  an  existing
9772                                                plane.
9773
9774       XCreateGlyphCursor                       Source char and mask char must exist in the font.
9775
9776       XSetDashes                               Dash elements must be positive and less than 256.
9777
9778       XCreatePixmap                            Specified width must be non-zero, and depth must be sup-
9779                                                ported.
9780
9781       XSetScreenSaver                          Incorrect timeout value.
9782
9783       XStoreColors                             Specified pixel is not a valid index into the colormap.
9784
97854.15         BadWindow
9786
9787
9788
9789Description:
9790
9791       A value for a Window does not name a defined Window.  ML type-checking should avoid
9792       this error.
9793
9794
9795Index
9796
9797
9798               A                                                    BitmapOpenFailed                              97
9799Above                                       107, 130                BitmapPad                                        31
9800AboveOf                                       66, 67                BitmapStatus                                96, 97
9801AddPoint                                          66                BitmapSuccess                                   97
9802AllocAll                                       24, 25               BitmapUnit                                       32
9803AllocNone                                     24, 25                BlackPixel                                    15, 16
9804AllocType                                   24, 141                 Blanking                                           94
9805AllowExposures                             11, 94                   Bottom                                        67, 68
9806AllPlanes                                      31, 72               BottomIf                                   107, 130
9807Always                    35, 100, 102, 103, 105                    BottomLeft                                   67, 68
9808And                                                  15             BottomRight                                 67, 68
9809AnyButton                                       126                 Button1                                    126, 127
9810AnyModifier                                     126                 Button1Mask                       126, 127, 132
9811ArcChord                                51, 75, 76                  Button1MotionMask                            54
9812ArcPieSlice                              51, 75, 76                 Button2                                    126, 127
9813Area                   43, 46, 49, 51, 67, 68, 97                   Button2Mask                       126, 127, 132
9814                                                                    Button2MotionMask                            54
9815                                                                    Button3                                    126, 127
9816               B                                                    Button3Mask                       126, 127, 132
9817BackingStore                  35, 100, 102, 105                     Button3MotionMask                            54
9818BadAccess                       19, 22, 106, 139                    Button4                                    126, 127
9819BadAlloc                                         139                Button4Mask                       126, 127, 132
9820BadAtom                                         139                 Button4MotionMask                            54
9821BadColor                                         139                Button5                                    126, 127
9822BadCursor                                       140                 Button5Mask                       126, 127, 132
9823BadDrawable                                    140                  Button5MotionMask                            54
9824BadFont                                     49, 140                 ButtonClick                         125, 126, 127
9825BadGC                                            140                ButtonClickMask                                54
9826BadIDChoice                                    140                  ButtonMotionMask                             54
9827BadImplementation                           140                     ButtonName                                     126
9828BadLength                                       140                 ButtonPress                    54, 125, 126, 127
9829BadMatch      24, 25, 29, 40, 41, 42, 57, 74,                       ButtonPressMask                         54, 106
9830            75, 76, 78, 83, 84, 89, 97, 100, 101,                   ButtonRelease                      125, 126, 127
9831            106, 107, 112, 141                                      ButtonReleaseMask                             54
9832BadPixmap                                      142                  ByteOrder                                         32
9833BadRequest                                      142
9834BadValue  18, 19, 22, 29, 42, 75, 79, 94, 96,
9835            98, 107, 108, 142                                                      C
9836BadWindow                                     142                   CapButt                                  73, 74, 82
9837Below                                       107, 130                CapNotLast                             73, 74, 82
9838BelowOf                                       66, 67                CapProjecting                          73, 74, 82
9839BitmapBitOrder                                 31                   CapRound                               73, 74, 82
9840BitmapFileInvalid                               97                  CellsOfScreen                                     32
9841BitmapNoMemory                              97                      CenterGravity                            102, 103
9842
9843
9844
9845                                                             143
9846
9847144                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
9848
9849
9850
9851CharAscent                                   59, 60                 CWWinGravity                          100, 105
9852CharAttributes                                   59
9853CharDescent                                 59, 60
9854CharLBearing                                    59                                 D
9855CharRBearing                                    59                  Data                                                 87
9856CharWidth                                   59, 60                  DefaultBlanking                                 94
9857CirculateDirection                       110, 111                   DefaultColormap                                22
9858CirculateNotify                    111, 125, 128                    DefaultDepth                                22, 23
9859CirculateRequest             54, 111, 125, 128                      DefaultExposures                                94
9860ClipByChildren                         40, 75, 84                   DefaultGC                                         70
9861ColormapChangeMask                         54                       DefaultVisual                                     34
9862ColormapExists                                  33                  DeleteRequest                            125, 130
9863ColormapID                                       33                 DestroyNotify                      101, 125, 131
9864ColormapNotify          25, 26, 105, 125, 128                       DestructArea                                67, 68
9865Complex                                       49, 50                DestructRect                                      67
9866ConfigureNotify                          125, 129                   DirectColor                    18, 19, 23, 24, 25
9867ConfigureRequest     54, 108, 111, 112, 125,                        DisplayCells                                       23
9868            130                                                     DisplayConnected                               34
9869ControlDown                                 52, 53                  DisplayHeight                                    34
9870ControlMask                   53, 126, 127, 132                     DisplayHeightMM                               34
9871Convex                                        49, 50                DisplayPlanes                                     35
9872CoordMode                              45, 46, 49                   DisplayString                                     35
9873CoordModeOrigin                45, 46, 49, 50                       DisplayWidth                                     34
9874CoordModePrevious             45, 46, 49, 50                        DisplayWidthMM                               34
9875CopyArea                             42, 133, 134                   DoesBackingStore                               35
9876CopyFromParentClass             99, 100, 102                        DoesSaveUnders                                 36
9877CopyFromParentDrawable       37, 105, 106                           DontAllowExposures                           94
9878CopyFromParentVisual                  37, 100                       DontCareState                           117, 118
9879CopyPlane                                 133, 134                  DontPreferBlanking                             94
9880CreateNotify                 100, 101, 125, 130                     DrawableExists                              14, 33
9881CurrentTime                      56, 57, 93, 137                    DrawableID                                       33
9882CursorExists                                 14, 33
9883CursorID                                           33                              E
9884CursorShape                                 39, 40                  EastGravity                               102, 103
9885CWBackingPixel                         100, 105                     EnterNotify              55, 125, 131, 132, 133
9886CWBackingPlanes                       100, 105                      EnterWindowMask                              54
9887CWBackingStore                        100, 105                      EvenOddRule                                75, 80
9888CWBackPixel                             100, 105                    EventMask                36, 54, 100, 102, 105
9889CWBackPixmap                         100, 105                       EventMaskOfScreen                            36
9890CWBitGravity                            100, 105                    Expose      40, 41, 55, 68, 95, 101, 107, 108,
9891CWBorderPixel                          100, 105                                 109, 111, 112, 113, 125, 132, 133
9892CWBorderPixmap                       100, 105                       ExposureMask                                    54
9893CWBorderWidth                               107                     Exposures                                          94
9894CWColormap                             100, 105
9895CWCursor                                 100, 105
9896CWDontPropagate                      100, 105                                      F
9897CWEventMask                           100, 105                      FillOpaqueStippled                    42, 74, 80
9898CWOverrideRedirect                   100, 105                       FillSolid                                  44, 74, 80
9899CWPosition                                      107                 FillStippled                                   74, 80
9900CWSaveUnder                            100, 105                     FillTiled                                  11, 74, 80
9901CWSibling                                       107                 FocusChangeMask                               54
9902CWSize                                           107                FocusIn                                57, 125, 133
9903CWStackMode                                  107                    FocusOut                              57, 125, 133
9904
9905cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      145
9906
9907
9908
9909FontDirection                      59, 60, 61, 64                   GrayScale                 18, 23, 24, 25, 27, 29
9910FontExists                                    14, 33                GXand                                              71
9911FontID                                              33              GXandInverted                                   71
9912FontLeftToRight                       61, 62, 65                    GXandReverse                                   71
9913FontRightToLeft                       61, 62, 65                    GXclear                                            71
9914ForgetGravity                             102, 103                  GXcopy                                   41, 44, 71
9915FSAllCharsExist                                 59                  GXcopyInverted                                 71
9916FSAscent                                           59               GXequiv                                           71
9917FSDefaultChar                                   59                  GXinvert                                           71
9918FSDescent                                         59                GXnand                                            71
9919FSDirection                                       59                GXnoop                                            71
9920FSFont                                             59               GXnor                                              71
9921FSMaxBounds                               59, 60                    GXor                                                71
9922FSMaxByte1                                      59                  GXorInverted                                     71
9923FSMaxChar                                       59                  GXorReverse                                      71
9924FSMaxHeight                                59, 60                   GXset                                               71
9925FSMaxWidth                                59, 60                    GXxor                                              71
9926FSMinBounds                               59, 60
9927FSMinByte1                                      59
9928FSMinChar                                        59                                H
9929FSMinHeight                                 59, 60                  Height                                          67, 68
9930FSMinWidth                                 59, 60                   HorizontallyAbutting                      66, 67
9931
9932
9933
9934               G                                                    IconicState    I                           117, 118
9935GCArcMode                             71, 75, 76                    IconMaskHint                             117, 118
9936GCBackground                                   71                   IconPixmapHint                         117, 118
9937GCCapStyle                             71, 73, 82                   IconPositionHint                         117, 118
9938GCClipMask                                      71                  IconWindowHint                         117, 118
9939GCClipOrigin                                     71                 ImageByteOrder                                 85
9940GCDashList                                       71                 ImageData                                         87
9941GCDashOffset                                    71                  ImageDepth                                       85
9942GCExists                                      14, 33                ImageFormat                            86, 87, 88
9943GCFillRule                         71, 75, 79, 80                   ImageOrder                         31, 32, 85, 87
9944GCFillStyle                              71, 74, 80                 ImageSize                                          85
9945GCFont                                             71               InactiveState                              117, 118
9946GCForeground                                    71                  IncludeInferiors                              75, 84
9947GCFunction                             71, 81, 83                   IncludePoint                                      69
9948GCGraphicsExposures                         71                      InputFocus                                        37
9949GCID                                               33               InputHint                                        117
9950GCJoinStyle                             71, 73, 82                  InputOnlyClass     41, 96, 99, 100, 101, 102,
9951GCLineStyle                            71, 73, 82                               103, 104, 106, 107, 141
9952GCLineWidth                                    71                   InputOutputClass      75, 99, 100, 101, 102,
9953GCOrder                                      77, 78                             103, 109
9954GCPlaneMask                               71, 72                    Inside                                          66, 67
9955GCStipple                                         71                Intersection                                        67
9956GCSubwindowMode                  71, 75, 84                         IsCursorKey                                       52
9957GCTile                                             71               IsFunctionKey                                    52
9958GCTSOrigin                                      71                  IsKeypadKey                                     52
9959GraphicsCode                                   133                  IsMiscFunctionKey                              52
9960GraphicsExpose     41, 75, 82, 125, 133, 134                        IsModifierKey                                    52
9961Gravity                  100, 102, 105, 121, 122                    IsPFKey                                            52
9962GravityNotify                             125, 134                  IsUnmapped                              102, 103
9963
9964146                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
9965
9966
9967
9968IsUnviewable                              102, 103                  NoDrawable                   28, 37, 40, 41, 56,
9969IsViewable                                 102, 103                             57, 59, 75, 77, 78, 93, 97, 105, 106,
9970                                                                                110, 127, 129, 132
9971                                                                    NoExpose                        41, 82, 125, 133
9972               J                                                    NoFont                               28, 37, 48, 49
9973JoinBevel                                     73, 82                Nonconvex                                    49, 50
9974JoinMiter                                11, 73, 82                 NormalState                              117, 118
9975JoinRound                                    73, 82                 NorthEastGravity                 102, 103, 123
9976
9977                                                                    NorthGravity                             102, 103
9978
9979               K                                                    NorthWestGravity                102, 103, 123
9980KeymapNotify                            125, 134                    NoSymbol                                          53
9981KeymapStateMask                              54                     Not                                             15, 52
9982KeyPress                             125, 126, 127                  Nothing                                            67
9983KeyPressMask                                    54                  NotifyAncestor                     131, 132, 133
9984KeyRelease                          125, 126, 127                   NotifyDetail                               131, 133
9985KeyReleaseMask                                 54                   NotifyDetailNone                        131, 133
9986                                                                    NotifyGrab                          131, 132, 133
9987                                                                    NotifyInferior                       131, 132, 133
9988               L                                                    NotifyMode                               131, 133
9989LeaveNotify              55, 125, 131, 132, 133                     NotifyNonLinear                   131, 132, 133
9990LeaveWindowMask                              54                     NotifyNonLinearVirtual         131, 132, 133
9991Left                                             67, 68             NotifyNormal                       131, 132, 133
9992LeftOf                                          66, 67              NotifyPointer                             131, 133
9993LineDoubleDash                       73, 74, 82                     NotifyPointerRoot                       131, 133
9994LineOnOffDash                         73, 74, 82                    NotifyUngrab                       131, 132, 133
9995LineSolid                                 73, 74, 82                NotifyVirtual                       131, 132, 133
9996LockMask                           126, 127, 132                    NotifyWhileGrabbed                   131, 133
9997LowerHighest                             111, 112                   NotUseful                       35, 100, 102, 103
9998LSBFirst                            31, 32, 85, 87                  NoVisual                                           37
9999                                                                    NullHandler                                       55
10000
10001               M
10002MakeRect                                     68, 69                                O
10003MapNotify                          109, 125, 135                    OffsetRect                                         69
10004MapRequest                   54, 109, 125, 135                      Opposite                                   107, 130
10005MapState                                         102                Or                                                    15
10006MaxCmapsOfScreen                            37                      OutsetRect                                        69
10007Message                               56, 125, 135                  Overlap                                        66, 67
10008MinCmapsOfScreen                             36                     OwnerGrabButtonMask                       54
10009Mod1Mask                          126, 127, 132
10010Mod2Mask                          126, 127, 132                                    P
10011Mod3Mask                          126, 127, 132                     ParentRelative                37, 105, 106, 112
10012Mod4Mask                          126, 127, 132                     PAspect                                    121, 122
10013Mod5Mask                          126, 127, 132                     PBaseSize                                  121, 122
10014Modifier                    52, 53, 109, 126, 131                   Pixel                                                16
10015MotionNotify                  55, 125, 126, 128                     Placement                                        128
10016MSBFirst                           31, 32, 85, 87                   PlaceOnBottom                                128
10017
10018                                                                    PlaceOnTop                                     128
10019
10020               N                                                    PMaxSize                                  121, 122
10021NegativePoint                                    69                 PMinSize                                   121, 122
10022NoColormap              25, 37, 102, 103, 129                       PointerMotionHintMask                       54
10023NoCursor                          29, 30, 37, 106                   PointerMotionMask                             54
10024                                                                    PointerRoot                       37, 56, 57, 118
10025
10026cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      147
10027
10028
10029
10030PointerWindow                                   37                  ScreenSaverActive                          94, 95
10031PolyShape                                         49                ScreenSaverReset                           94, 95
10032PPosition                                  121, 122                 Section                                              67
10033PreferBlanking                                   94                 SelectionClear                       93, 125, 136
10034PResizeInc                                 121, 122                 SelectionNotify                      93, 125, 137
10035PropertyArc                                       91                SelectionRequest                    93, 125, 137
10036PropertyAtom                                    91                  ServerVendor                                     38
10037PropertyBitmap                                 91                   ShapeClass                                        39
10038PropertyChangeMask                          54                      ShiftDown                                    52, 53
10039PropertyColormap                              91                    ShiftMask                       53, 126, 127, 132
10040PropertyCursor                                  91                  SouthEastGravity                 102, 103, 123
10041PropertyDrawable                               91                   SouthGravity                             102, 103
10042PropertyFont                                     91                 SouthWestGravity                102, 103, 123
10043PropertyInteger                                  91                 SplitRect                                      68, 69
10044PropertyPixmap                                 91                   StackMode                                 107, 130
10045PropertyPoint                                    91                 StateHint                                  117, 118
10046PropertyRectangle                              91                   StaticColor                              23, 24, 25
10047PropertyRGBColormap                        91                       StaticGravity                             102, 103
10048PropertyString                                   91                 StaticGray                          23, 24, 25, 29
10049PropertyValue                                    91                 StippleShape                                 39, 40
10050PropertyVisual                                   91                 StructureNotifyMask 54, 128, 129, 131, 134,
10051PropertyWindow                                91                                135, 136, 138
10052PropertyWMHints                              91                     SubstructureNotifyMask   54, 128, 129, 131,
10053PropertyWMIconSizes                         91                                  134, 135, 136, 138
10054PropertyWMSizeHints                         91                      SubstructureRedirectMask      54, 106, 108,
10055ProtocolRevision                            37, 38                              109, 111, 112
10056ProtocolVersion                                  38                 SubtractPoint                                     66
10057PseudoColor                   18, 19, 23, 24, 25
10058PSize                                        121, 122
10059PSPerChar                                   59, 60                                 T
10060PWinGravity                             121, 122                    TileShape                                     39, 40
10061                                                                    Top                                             67, 68
10062                                                                    TopIf                                        107, 130
10063               R                                                    TopLeft                                        67, 68
10064RaiseLowest                               111, 112                  TopRight                                      67, 68
10065Rect                                       51, 67, 68               TrueColor                                23, 24, 25
10066Reflect                                              70
10067ReparentNotify                    112, 125, 135
10068ResizeRedirectMask                      54, 106                                    U
10069ResizeRequest                       54, 125, 136                    Union                                               67
10070RevertCode                                        56                UnmapGravity                     102, 103, 138
10071RevertToNone                               56, 57                   UnmapNotify                113, 125, 133, 137
10072RevertToParent                             56, 57                   Unsorted                                           78
10073RevertToPointerRoot                      56, 57
10074RGB_COLOR_MAP                       27, 28                                         V
10075RGB_DEFAULT_MAP                    27, 28                           VendorRelease                                    39
10076Right                                           67, 68              VerticallyAbutting                         66, 67
10077RightOf                                        66, 67               Visibility                                          138
10078RootWindow                                      38                  VisibilityChangeMask                          54
10079
10080                                                                    VisibilityNotify                    125, 133, 138
10081               S                                                    VisibilityObscured                             138
10082SameDrawable                                    33                  VisibilityPartiallyObscured                  138
10083SaveMode                                          94                VisibilityUnobscured                          138
10084
10085148                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
10086
10087
10088
10089VisualBlueMask                                  86                  XConfigureWindow               106, 107, 141
10090VisualClass                                   23, 24                XConvertSelection                   92, 93, 137
10091VisualExists                                       33               XCopyArea                 41, 75, 82, 134, 141
10092VisualGreenMask                                86                   XCopyColormapAndFree                 24, 25
10093VisualID                                           33               XCopyPlane41, 42, 75, 82, 96, 134, 141, 142
10094VisualRedMask                                  86                   XCreateBitmapFromData                96, 97
10095                                                                    XCreateColormap               24, 25, 27, 141
10096
10097               W                                                    XCreateFontCursorXCreateGC                    28        71, 76,*
10098 * 78
10099WestGravity                              102, 103                   XCreateGlyphCursor                28, 29, 142
10100WhenMapped           35, 100, 102, 103, 105                         XCreateImage                               86, 87
10101WhitePixel                                   15, 16                 XCreatePixmap                       95, 96, 142
10102Width                                          67, 68               XCreatePixmapCursor              28, 29, 141
10103WindingRule                                 75, 80                  XCreatePixmapFromBitmapData     96, 97,
10104WindowClass                        99, 100, 102                                 141
10105Within                                         66, 67               XCreateSimpleWindow             26, 99, 101
10106WM_CLASS                               115, 120                     XCreateWindow                 25, 26, 99, 100
10107WM_CLIENT_MACHINE        92, 115, 120                               XDefineCursor                        29, 30, 100
10108WM_COLORMAP_WINDOWS           116                                   XDeleteProperty                                 90
10109WM_COMMAND                  92, 117, 120                            XDestroySubwindows                         101
10110WM_HINTS                               118, 120                     XDestroyWindow                         13, 101
10111WM_ICON_NAME                 92, 119, 120                           XDrawArc                                    42, 43
10112WM_NAME                          92, 119, 120                       XDrawArcs                                   42, 43
10113WM_NORMAL_HINTS         120, 122, 123                               XDrawImageString                         44, 48
10114WM_SIZE_HINTS                       121, 122                        XDrawImageString16                           44
10115WM_TRANSIENT_FOR                     114                            XDrawLine                                        45
10116
10117                                                                    XDrawLines                                  11, 45
10118               X                                                    XDrawPoint                                       46
10119XActivateScreenSaver                     94, 95                     XDrawPoints                                     46
10120XAddPixel                                    86, 88                 XDrawRectangle                            46, 47
10121XAllocColor                   17, 18, 19, 20, 25                    XDrawRectangles                           46, 47
10122XAllocColorCells           17, 18, 19, 25, 142                      XDrawSegments                                 45
10123XAllocColorPlanes    17, 18, 19, 25, 27, 142                        XDrawString                                 47, 48
10124XAllocNamedColor          17, 18, 19, 20, 25                        XDrawString16                                   47
10125XArc                                 42, 43, 49, 91                 XDrawText                                   48, 49
10126XAutoRepeatOff                                 98                   XDrawText16                                48, 49
10127XAutoRepeatOn                                 98                    XEvent                                  55, 56, 125
10128XA_PIXMAP                                   137                     XFillArc                                       49, 51
10129XA_PRIMARY                        11, 93, 137                       XFillArcs                                 49, 51, 75
10130XA_SECONDARY                              93                        XFillPolygon                            49, 50, 75
10131XA_STRING                               11, 117                     XFillRectangle                              49, 50
10132XA_WINDOW                                  116                      XFillRectangles                             49, 50
10133XBell                                         98, 142               XFlush                                         57, 58
10134XChangeGC                      71, 76, 78, 141                      XFontStruct    48, 59, 60, 61, 62, 63, 64, 65,
10135XChangeWindowAttributes 25, 26, 104, 105                                        66
10136XCharStruct         59, 60, 61, 62, 63, 64, 65                      XForceScreenSaver                         94, 95
10137XCirculateSubwindows          110, 111, 112                         XFreeColormap                  13, 24, 25, 129
10138XCirculateSubwindowsDown   110, 111, 112                            XFreeColors           13, 17, 19, 25, 139, 142
10139XCirculateSubwindowsUp             110, 111                         XFreeCursor                                 13, 30
10140XClearArea                            40, 41, 141                   XFreeFont                               29, 61, 64
10141XClearWindow                 40, 41, 105, 141                       XFreeGC                                 13, 71, 76
10142XColor 13, 16, 17, 18, 19, 20, 21, 22, 24, 28,                      XFreePixmap                      13, 95, 96, 97
10143            29, 30                                                  XGCValue                                         71
10144
10145cOAbstract Hardware Ltd 1991,1994    X Reference 1.1                                                      149
10146
10147
10148
10149XGetAtomName                            90, 91                      XQueryBestStipple                         39, 40
10150XGetDefault                            20, 98, 99                   XQueryBestTile                             39, 40
10151XGetFontPath                                    64                  XQueryColor                                 19, 20
10152XGetGeometry                     101, 102, 104                      XQueryColors                               19, 20
10153XGetIconSizes                            113, 114                   XQueryFont                                  61, 63
10154XGetImage                             88, 89, 141                   XQueryKeymap                                  98
10155XGetInputFocus                            56, 57                    XQueryPointer                           109, 110
10156XGetPixel                                    86, 88                 XQueryTree                               104, 110
10157XGetRGBColormaps                      26, 28                        XRaiseWindow                           110, 111
10158XGetScreenSaver                           94, 95                    XReadBitmapFile                          96, 97
10159XGetSelectionOwner                       92, 93                     XRecolorCursor                             29, 30
10160XGetSubImage                        88, 89, 141                     XReparentWindow                      112, 141
10161XGetTextProperty             91, 92, 115, 119                       XResetScreenSaver                         94, 95
10162XGetTransientForHint                        114                     XResizeWindow                   106, 108, 142
10163XGetWindowAttributes         101, 102, 104                          XRestackWindows          110, 111, 112, 141
10164XGetWindowBorderWidth                  104                          XSelectInput                               54, 139
10165XGetWindowChildren                        104                       XSendSelectionNotify                 92, 93, 94
10166XGetWindowDepth                           104                       XSetArcMode                                    76
10167XGetWindowParent                           104                      XSetBackground                                 76
10168XGetWindowPosition                         104                      XSetClipMask                               77, 78
10169XGetWindowRoot                             104                      XSetClipOrigin                                   77
10170XGetWindowSize                              104                     XSetClipRectangles        75, 76, 77, 78, 141
10171XGetWMClass                           114, 115                      XSetColours                                       78
10172XGetWMClientMachine                      115                        XSetDashes                       75, 76, 79, 142
10173XGetWMColormapWindows               116                             XSetFillRule                                 79, 80
10174XGetWMCommand                     116, 117                          XSetFillStyle                                      80
10175XGetWMHints                           117, 118                      XSetFont                                           80
10176XGetWMIconName                     118, 119                         XSetFontPath                               61, 64
10177XGetWMName                                 119                      XSetForeground                                  81
10178XGetWMNormalHints                 121, 122                          XSetFunction                                     81
10179XGetWMSizeHints                      121, 122                       XSetGraphicsExposures                  81, 82
10180XImage                         85, 86, 87, 88, 89                   XSetHandler                      52, 55, 56, 135
10181XInstallColormap                    25, 26, 105                     XSetIconSizes                             113, 114
10182XInternAtom                                90, 91                   XSetInputFocus                      56, 57, 141
10183XListFonts                                    60, 61                XSetLineAttributes                             82
10184XListFontsWithInfo                        60, 61                    XSetPlaneMask                                  82
10185XListInstalledColormaps                 25, 26                      XSetProperty                   91, 92, 115, 119
10186XLoadFont                                   61, 63                  XSetRGBColormaps                       26, 27
10187XLoadQueryFont                      11, 61, 63                      XSetScreenSaver                      94, 95, 142
10188XLookupColor                               19, 20                   XSetSelectionOwner          92, 93, 136, 137
10189XLookupString                                   53                  XSetState                                          83
10190XLowerWindow                          110, 111                      XSetStipple                                       83
10191XMapRaised                              108, 109                    XSetSubwindowMode                          84
10192XMapSubwindows                       108, 109                       XSetTile                                           84
10193XMapWindow                      100, 108, 109                       XSetTransientForHint                        114
10194XMoveResizeWindow                   106, 108                        XSetTSOrigin                                    85
10195XMoveWindow                           106, 107                      XSetWindowAttributes     99, 100, 104, 105
10196Xor                                                  15             XSetWindowBackground        104, 105, 106
10197XParseColor                                      20                 XSetWindowBackgroundPixmap   104, 105,
10198XPutImage                        88, 89, 97, 141                                106
10199XPutPixel                                    86, 88                 XSetWindowBorder              104, 105, 106
10200XQueryBestCursor                         39, 40                     XSetWindowBorderPixmap    104, 105, 106
10201XQueryBestSize                             39, 40                   XSetWindowBorderWidth            106, 108
10202
10203150                                                      X Reference 1.1    Oc Abstract Hardware Ltd 1991,1994
10204
10205
10206
10207XSetWindowColormap    11, 24, 25, 26, 141
10208XSetWMClass                     114, 115, 120
10209XSetWMClientMachine                      115
10210XSetWMColormapWindows                116
10211XSetWMCommand               116, 117, 120
10212XSetWMHints               114, 117, 118, 120
10213XSetWMIconName               118, 119, 120
10214XSetWMName                           119, 120
10215XSetWMNormalHints           120, 121, 122
10216XSetWMProperties                     119, 120
10217XSetWMSizeHints                             121
10218XStandardColormap                  26, 27, 91
10219XStoreColor                        19, 20, 21, 22
10220XStoreColors               19, 21, 22, 139, 142
10221XStoreNamedColor             19, 21, 22, 139
10222XSubImage                                   86, 88
10223XSync                                          57, 58
10224XSyncronise                                       58
10225XTextExtents                           44, 64, 65
10226XTextExtents16                             64, 65
10227XTextItem                                         48
10228XTextItem16                                 48, 49
10229XTextWidth                                 65, 66
10230XTextWidth16                              65, 66
10231XTranslateCoordinates                    58, 59
10232XUndefineCursor                           29, 30
10233XUninstallColormap                       25, 26
10234XUnloadFont                       13, 61, 63, 64
10235XUnmapSubwindows                         113
10236XUnmapWindow                               113
10237XWindowAttributes              101, 102, 104
10238XWindowChanges                       106, 107
10239XWindows 18, 19, 20, 21, 26, 33, 34, 51, 52,
10240            61, 63, 64, 88, 89, 91, 92, 99, 100,
10241            101, 104, 110, 114, 116, 117, 119
10242XWMGeometry                          122, 123
10243XWMHint                      91, 117, 119, 120
10244XWMSizeHint    91, 119, 120, 121, 122, 123
10245XWMStateHint                                 117
10246XWriteBitmapFile                          96, 97
10247XYBitmap                         87, 88, 89, 141
10248XYPixmap                        87, 88, 89, 141
10249
10250
10251
10252               Y
10253YSorted                                            78
10254YXBanded                                         78
10255YXSorted                                          78
10256
10257
10258
10259               Z
10260ZoomState                                 117, 118
10261ZPixmap                           87, 88, 89, 141
10262