| 1 |
<pre>Network Working Group Robert W. Scheifler |
| 2 |
Request for Comments: 1013 June 1987 |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
<span class="h1">X WINDOW SYSTEM PROTOCOL, VERSION 11</span> |
| 7 |
<span class="h1">Alpha Update</span> |
| 8 |
<span class="h1">April 1987</span> |
| 9 |
Copyright (c) 1986, 1987 Massachusetts Institute of Technology |
| 10 |
X Window System is a trademark of M.I.T. |
| 11 |
|
| 12 |
|
| 13 |
Status of this Memo |
| 14 |
|
| 15 |
This RFC is distributed to the Internet community for information |
| 16 |
only. It does not establish an Internet standard. The X window |
| 17 |
system has been widely reviewed and tested. The internet community |
| 18 |
is encouraged to experiment with it. Distribution of this memo is |
| 19 |
unlimited (see copyright notice on page 2). |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
<span class="grey">M.I.T. [Page 1]</span></pre> |
| 56 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span> |
| 57 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 58 |
|
| 59 |
|
| 60 |
Permission to use, copy, modify, and distribute this document for any |
| 61 |
purpose and without fee is hereby granted, provided that the above |
| 62 |
copyright notice appear in all copies and that both that copyright |
| 63 |
notice and this permission notice are retained, and that the name of |
| 64 |
M.I.T. not be used in advertising or publicity pertaining to this |
| 65 |
document without specific, written prior permission. M.I.T. makes no |
| 66 |
representations about the suitability of this document or the |
| 67 |
protocol defined in this document for any purpose. It is provided |
| 68 |
"as is" without express or implied warranty. |
| 69 |
|
| 70 |
Author: Robert W. Scheifler |
| 71 |
Laboratory for Computer Science |
| 72 |
545 Technology Square, Room 418 |
| 73 |
Cambridge, MA 02139 |
| 74 |
|
| 75 |
Contributors: |
| 76 |
Dave Carver (Digital HPW) |
| 77 |
Branko Gerovac (Digital HPW) |
| 78 |
Jim Gettys (MIT/Project Athena, Digital) |
| 79 |
Phil Karlton (Digital WSL) |
| 80 |
Scott McGregor (Digital SSG) |
| 81 |
Ram Rao (Digital UEG) |
| 82 |
David Rosenthal (Sun) |
| 83 |
Dave Winchell (Digital UEG) |
| 84 |
|
| 85 |
Implementors of initial server who provided useful input: |
| 86 |
Susan Angebranndt (Digital) |
| 87 |
Raymond Drewry (Digital) |
| 88 |
Todd Newman (Digital) |
| 89 |
|
| 90 |
Invited reviewers who provided useful input: |
| 91 |
Andrew Cherenson (Berkeley) |
| 92 |
Burns Fisher (Digital) |
| 93 |
Dan Garfinkel (HP) |
| 94 |
Leo Hourvitz (Next) |
| 95 |
Brock Krizan (HP) |
| 96 |
David Laidlaw (Stellar) |
| 97 |
Dave Mellinger (Interleaf) |
| 98 |
Ron Newman (MIT) |
| 99 |
John Ousterhout (Berkeley) |
| 100 |
Andrew Palay (ITC CMU) |
| 101 |
Ralph Swick (MIT) |
| 102 |
Craig Taylor (Sun) |
| 103 |
Jeffery Vroom (Stellar) |
| 104 |
|
| 105 |
This document does not attempt to provide the rationale or pragmatics |
| 106 |
required to fully understand the protocol or to place it in |
| 107 |
perspective within a complete system. Knowledge of X Version 10 |
| 108 |
will certainly aid in understanding this document. |
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
<span class="grey">M.I.T. [Page 2]</span></pre> |
| 115 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span> |
| 116 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 117 |
|
| 118 |
|
| 119 |
The protocol contains many management mechanisms that are not |
| 120 |
intended for normal applications. Not all mechanisms are needed to |
| 121 |
build a particular user interface. It is important to keep in mind |
| 122 |
that the protocol is intended to provide mechanism, not policy. |
| 123 |
|
| 124 |
This document does not attempt to define precise formats or bit |
| 125 |
encodings. |
| 126 |
|
| 127 |
------------------------------------------------------------------- |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
<span class="grey">M.I.T. [Page 3]</span></pre> |
| 174 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span> |
| 175 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 176 |
|
| 177 |
|
| 178 |
<a href="#section-1">SECTION 1</a>. TERMINOLOGY |
| 179 |
|
| 180 |
|
| 181 |
Access control list |
| 182 |
X maintains a list of hosts from which client programs may be |
| 183 |
run. By default, only programs on the local host may use the |
| 184 |
display, plus any hosts specified in an initial list read by |
| 185 |
the server. This "access control list" can be changed by |
| 186 |
clients on the local host. Some server implementations may |
| 187 |
also implement other authorization mechanisms. |
| 188 |
|
| 189 |
Active grab |
| 190 |
A grab is "active" when the pointer or keyboard is actually |
| 191 |
owned by the single grabbing client. |
| 192 |
|
| 193 |
Ancestors |
| 194 |
If W is an inferior of A, then A is an "ancestor" of W. |
| 195 |
|
| 196 |
Atom |
| 197 |
An "atom" is a unique id corresponding to a string name. |
| 198 |
Atoms are used to identify properties, types, and selections. |
| 199 |
|
| 200 |
Backing store |
| 201 |
When a server maintains the contents of a window, the |
| 202 |
off-screen saved pixels are known as a "backing store". |
| 203 |
|
| 204 |
Bit gravity |
| 205 |
When a window is resized, the contents of the window are |
| 206 |
not necessarily discarded. It is possible to request the |
| 207 |
server (though no guarantees are made) to relocate the |
| 208 |
previous contents to some region of the window. This |
| 209 |
attraction of window contents for some location of a window |
| 210 |
is known as "bit gravity". |
| 211 |
|
| 212 |
Bitmap |
| 213 |
A "bitmap" is a pixmap of depth one. |
| 214 |
|
| 215 |
Button grabbing |
| 216 |
Buttons on the pointer may be passively "grabbed" by a |
| 217 |
client. When the button is pressed, the pointer is then |
| 218 |
actively grabbed by the client. |
| 219 |
|
| 220 |
Byte order |
| 221 |
For image (pixmap/bitmap) data, byte order is defined by |
| 222 |
the server, and clients with different native byte ordering |
| 223 |
must swap bytes as necessary. For all other parts of the |
| 224 |
protocol, the byte order is defined by the client, and the |
| 225 |
server swaps bytes as necessary. |
| 226 |
|
| 227 |
Children |
| 228 |
The "children" of a window are its first-level subwindows. |
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
<span class="grey">M.I.T. [Page 4]</span></pre> |
| 233 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span> |
| 234 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 235 |
|
| 236 |
|
| 237 |
Client |
| 238 |
An application program connects to the window system server |
| 239 |
by some interprocess communication (IPC) path, such as a TCP |
| 240 |
connection or a shared memory buffer. This program is the |
| 241 |
window system server. More precisely, the client is the IPC |
| 242 |
path itself; a program with multiple paths open to the server |
| 243 |
is viewed as multiple clients by the protocol. Resource |
| 244 |
lifetimes are controlled by connection lifetimes, not by |
| 245 |
program lifetimes. |
| 246 |
|
| 247 |
Clipping regions |
| 248 |
In a graphics context, a bitmap or list of rectangles can |
| 249 |
be specified to restrict output to a particular region of |
| 250 |
the window. The image defined by the bitmap or rectangles |
| 251 |
is called a "clipping region". |
| 252 |
|
| 253 |
Color cell |
| 254 |
An entry in a colormap is known as a "color cell". An entry |
| 255 |
contains three values specifying red, green and blue |
| 256 |
intensities. These values are always viewed as 16 bit |
| 257 |
unsigned numbers, with zero being minimum intensity. The |
| 258 |
values are scaled by the server to match the display |
| 259 |
hardware. The components of a cell are coincident with |
| 260 |
components of other cells in DirectColor and TrueColor |
| 261 |
colormaps. |
| 262 |
|
| 263 |
Colormap |
| 264 |
A "colormap" consists of a set of color cells. A pixel value |
| 265 |
indexes the color map to produce intensities to be displayed. |
| 266 |
Depending on hardware limitations, one or more colormaps may |
| 267 |
be installed at one time, such that windows associated with |
| 268 |
those maps display with true colors. |
| 269 |
|
| 270 |
Connection |
| 271 |
The IPC path between the server and client program is known |
| 272 |
as a "connection". A client program typically (but not |
| 273 |
necessarily) has one connection to the server over which |
| 274 |
requests and events are sent. |
| 275 |
|
| 276 |
Containment |
| 277 |
A window "contains" the pointer if the window is viewable and |
| 278 |
the hotspot of the cursor is within a visible region of the |
| 279 |
window or a visible region of one of its inferiors. The |
| 280 |
border of the window is included as part of the window for |
| 281 |
containment. The pointer is "in" a window if the window |
| 282 |
contains the pointer but no inferior contains the pointer. |
| 283 |
|
| 284 |
Coordinate system |
| 285 |
The coordinate system has X horizontal and Y vertical, with |
| 286 |
the origin [0, 0] at the upper left. Coordinates are |
| 287 |
discrete, and in terms of pixels. Each window and pixmap has |
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
<span class="grey">M.I.T. [Page 5]</span></pre> |
| 292 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span> |
| 293 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 294 |
|
| 295 |
|
| 296 |
its own coordinate system. For a window, the origin is at |
| 297 |
the inside upper left, inside the border. |
| 298 |
|
| 299 |
Cursor |
| 300 |
A "cursor" is the visible shape of the pointer on a screen. |
| 301 |
It consist of a hot spot, a source bitmap, a shape bitmap, |
| 302 |
and a pair of colors. The cursor defined for a window |
| 303 |
controls the visible appearance when the pinter is in that |
| 304 |
window. |
| 305 |
|
| 306 |
Depth |
| 307 |
The "depth" of a window or pixmap is number of bits per pixel |
| 308 |
it has. The depth of a gcontext is the depth of the root of |
| 309 |
the gcontext. |
| 310 |
|
| 311 |
Device |
| 312 |
Keyboards, mice, tablets, track-balls, button boxes, etc. are |
| 313 |
all collectively known as input "devices". The core protocol |
| 314 |
only deals with two devices, "the keyboard" and "the |
| 315 |
pointer". |
| 316 |
|
| 317 |
Drawable |
| 318 |
Both windows and pixmaps may be used as sources and |
| 319 |
destinations in graphics operations. These are collectively |
| 320 |
known as "drawables". However, an InputOnly window cannot be |
| 321 |
used as a source or destination in a graphics operation. |
| 322 |
|
| 323 |
Event |
| 324 |
Clients are informed of information asynchronously via |
| 325 |
"events". These events may be either asynchronously generated |
| 326 |
from devices, or generated as side effects of client |
| 327 |
requests. Events are grouped into types; events are never |
| 328 |
sent to a client by the server unless the client has |
| 329 |
specificially asked to be informed of that type of event, |
| 330 |
but other clients can force events to be sent to other |
| 331 |
clients. Events are typically reported relative to a window. |
| 332 |
|
| 333 |
Event mask |
| 334 |
Events are requested relative to a window. The set of event |
| 335 |
types a client requests relative to a window described using |
| 336 |
an "event mask". |
| 337 |
|
| 338 |
Event sychronization |
| 339 |
There are certain race conditions possible when |
| 340 |
demultiplexing device events to clients (in particular |
| 341 |
deciding where pointer and keyboard events should be sent |
| 342 |
when in the middle of window management operations). The |
| 343 |
event synchronization mechanism allows synchronous processing |
| 344 |
of device events. |
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
<span class="grey">M.I.T. [Page 6]</span></pre> |
| 351 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span> |
| 352 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 353 |
|
| 354 |
|
| 355 |
Event propagation |
| 356 |
Device-related events "propagate" from the source window to |
| 357 |
ancestor windows until some client has expressed interest in |
| 358 |
handling that type of event, or until the event is discarded |
| 359 |
explicitly. |
| 360 |
|
| 361 |
Event source |
| 362 |
The smallest window containing the pointer is the "source" |
| 363 |
of a device related event. |
| 364 |
|
| 365 |
Exposure event |
| 366 |
Servers do not guarantee to preserve the contents of windows |
| 367 |
when windows are obscured or reconfigur contents of regions |
| 368 |
of windows have been lost. |
| 369 |
|
| 370 |
Extension |
| 371 |
Named "extensions" to the core protocol can be defined to |
| 372 |
extend the system. Extension to output requests, resources, |
| 373 |
and event types are all possible, and expected. |
| 374 |
|
| 375 |
Font |
| 376 |
A "font" is an array of glyphs (typically characters). The |
| 377 |
protocol does no translation or interpretation of character |
| 378 |
sets. The client simply indicates values used to index the |
| 379 |
glyph array. A font contains additional metric information |
| 380 |
to determine inter-glyph and inter-line spacing. |
| 381 |
|
| 382 |
Glyph |
| 383 |
A "glyph" is an image, typically of a character, in a font. |
| 384 |
|
| 385 |
Grab |
| 386 |
Keyboard keys, the keyboard, pointer buttons, the pointer, |
| 387 |
and the server can be "grabbed" for exclusive use by a |
| 388 |
client. In general, these facilities are not intended to be |
| 389 |
used by normal applications, but are intended for various |
| 390 |
input and window managers to implement various styles of |
| 391 |
user interfaces. |
| 392 |
|
| 393 |
Graphics context |
| 394 |
Various information for graphics output is stored in "GC"'s, |
| 395 |
such as foreground pixel, background pixel, line width, |
| 396 |
clipping region, etc. |
| 397 |
|
| 398 |
Hotspot |
| 399 |
A cursor has an associated "hot spot" which defines a point |
| 400 |
in the cursor that corresponds to the coordinates reported |
| 401 |
for the pointer. |
| 402 |
|
| 403 |
Identifier |
| 404 |
Each resource has an "identifier", a unique value associated |
| 405 |
with it that clients use to name the resource. An identifier |
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
<span class="grey">M.I.T. [Page 7]</span></pre> |
| 410 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span> |
| 411 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 412 |
|
| 413 |
|
| 414 |
can be used over any connection to name the resource. |
| 415 |
|
| 416 |
Inferiors |
| 417 |
The "inferiors" of a window are all of the subwindows nested |
| 418 |
below it: the children, the children's children, etc. |
| 419 |
|
| 420 |
Input focus |
| 421 |
The "input focus" is nominally where keyboard input goes. |
| 422 |
Keyboard events are by default sent to the client expressing |
| 423 |
interest on the window the pointer is in. This is said to be |
| 424 |
a "real estate driven" input focus. It is also possible to |
| 425 |
attach the keyboard input to a specific window; events will |
| 426 |
then be sent to the appropriate client independent of the |
| 427 |
pointer position. |
| 428 |
|
| 429 |
Input manager |
| 430 |
Control over keyboard input is typically provided by an |
| 431 |
"input manager" client. |
| 432 |
|
| 433 |
InputOnly window |
| 434 |
A window that cannot be used for graphics requests. |
| 435 |
InputOnly windows are "invisible", and can be used to control |
| 436 |
such things as cursors, input event generation, and grabbing. |
| 437 |
|
| 438 |
InputOutput window |
| 439 |
The "normal" kind of opaque window, used for both input |
| 440 |
and output. |
| 441 |
|
| 442 |
Key grabbing |
| 443 |
Keys on the keyboard may be passively "grabbed" by a client. |
| 444 |
When the key is pressed, the keyboard is then actively |
| 445 |
grabbed by the client. |
| 446 |
|
| 447 |
Keyboard grabbing |
| 448 |
A client can actively "grab" control of the keyboard, and key |
| 449 |
events will be sent to that client rather than the client the |
| 450 |
events would normally have been sent to. |
| 451 |
|
| 452 |
Mapping |
| 453 |
A window is said to be "mapped" if a map call has been |
| 454 |
performed on it. Unmapped windows are never viewable or |
| 455 |
visible. |
| 456 |
|
| 457 |
Modifier keys |
| 458 |
Shift, Control, Meta, Super, Hyper, ALT, Compose, Apple, |
| 459 |
CapsLock, ShiftLock, and similar keys are called "modifier" |
| 460 |
keys. |
| 461 |
|
| 462 |
Obscures |
| 463 |
Window A "obscures" window B if both are viewable |
| 464 |
InputOutput windows and A is higher in the global stacking |
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
<span class="grey">M.I.T. [Page 8]</span></pre> |
| 469 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span> |
| 470 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 471 |
|
| 472 |
|
| 473 |
order, and the rectangle defined by the outside edges of |
| 474 |
intersects the rectangle defined by the outside edges of B. |
| 475 |
Note the (fine) distinction with "occludes". Also note that |
| 476 |
window borders are included in the calculation. |
| 477 |
|
| 478 |
Occludes |
| 479 |
Window A "occludes" window B if both are mapped and A is |
| 480 |
higher in the global stacking order, and the rectangle |
| 481 |
defined by the outside edges of A intersects the rectangle |
| 482 |
defined by the outside edges of B. Note the (fine) |
| 483 |
distinction with "obscures". Also note that window borders |
| 484 |
are included in the calculation. |
| 485 |
|
| 486 |
Padding |
| 487 |
Some padding bytes are inserted in the data stream to |
| 488 |
maintain alignment of the protocol requests on natural |
| 489 |
boundaries. This increases ease of portability to some |
| 490 |
machine architectures. |
| 491 |
|
| 492 |
Parent window |
| 493 |
If C is a child of P, then P is the "parent" of C. |
| 494 |
|
| 495 |
Passive grab |
| 496 |
Grabbing a key or button is a "passive" grab. The grab |
| 497 |
activates when the key or button is actually pressed. |
| 498 |
|
| 499 |
Pixel value |
| 500 |
A "pixel" is an N-bit value, where N is the number of bit |
| 501 |
planes used in a particular window or pixmap. For a window, |
| 502 |
a pixel value indexes a colormap to derive an actual color |
| 503 |
to be displayed. |
| 504 |
|
| 505 |
Pixmap |
| 506 |
A "pixmap" is a three dimensional array of bits. A pixmap |
| 507 |
is normally thought of as a two dimensional array of pixels, |
| 508 |
where each pixel can be a value from 0 to (2^N)-1, where N |
| 509 |
is the depth (z axis) of the pixmap. A pixmap can also be |
| 510 |
thought of as a stack of N bitmaps. |
| 511 |
|
| 512 |
Plane mask |
| 513 |
Graphics operations can be restricted to only affect a |
| 514 |
subset of bit planes of a destination. A "plane mask" is |
| 515 |
a bit mask describing which planes are to be modified, and |
| 516 |
is stored in a graphics context. |
| 517 |
|
| 518 |
Pointer |
| 519 |
The "pointer" is the pointing device attached to the cursor, |
| 520 |
and tracked on the screens. |
| 521 |
|
| 522 |
Pointer grabbing |
| 523 |
A client can actively "grab" control of the pointer, and |
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
<span class="grey">M.I.T. [Page 9]</span></pre> |
| 528 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span> |
| 529 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 530 |
|
| 531 |
|
| 532 |
button and motion events will be sent to that client rather |
| 533 |
than the client the events would normally have been sent to. |
| 534 |
|
| 535 |
Pointing device |
| 536 |
A "pointing device" is typically a mouse or tablet, or some |
| 537 |
other device with effective dimensional motion. There is |
| 538 |
only one visible cursor is defined by the core protocol, |
| 539 |
and it tracks whatever pointing device is attached as the |
| 540 |
pointer. |
| 541 |
|
| 542 |
Property |
| 543 |
Windows may have associated "properties", consisting of a |
| 544 |
name, a type, a data format, and some data. The protocol |
| 545 |
places no interpretation on properties, they are intended |
| 546 |
as a general-purpose naming mechanism for clients. For |
| 547 |
example, clients might share information such as resize |
| 548 |
hints, program names, and icon formats with a window |
| 549 |
manager via properties. |
| 550 |
|
| 551 |
Property list |
| 552 |
The "property list" of a window is the list of properties |
| 553 |
that have been defined for the window. |
| 554 |
|
| 555 |
Redirecting control |
| 556 |
Window managers (or client programs) may wish to enforce |
| 557 |
window layout policy in various ways. When a client |
| 558 |
attempts to change the size or position of a window, the |
| 559 |
operation may be "redirected" to a specified client, |
| 560 |
rather than the operation actually being performed. |
| 561 |
|
| 562 |
Reply |
| 563 |
Information requested by a client program is sent back to |
| 564 |
the client with a "reply". Both events and replys are |
| 565 |
multipexed on the same connection. Most requests do not |
| 566 |
generate replies. |
| 567 |
|
| 568 |
Request |
| 569 |
A command to the server is called a "request". It is a |
| 570 |
single block of data sent over a connection. |
| 571 |
|
| 572 |
Resource |
| 573 |
Windows, pixmaps, cursors, fonts, graphics contexts, and |
| 574 |
colormaps are known as "resources". They all have unique |
| 575 |
identifiers associated with them for naming purposes. The |
| 576 |
lifetime of a resource is bounded by the lifetime of the |
| 577 |
connection over which the resource was created. |
| 578 |
|
| 579 |
Root |
| 580 |
The "root" of a pixmap or gcontext is the same as the root |
| 581 |
of whatever drawable was used when the pixmap or gcontext |
| 582 |
was created. The "root" of a window is the root window |
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
<span class="grey">M.I.T. [Page 10]</span></pre> |
| 587 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span> |
| 588 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 589 |
|
| 590 |
|
| 591 |
under which the window was created. |
| 592 |
|
| 593 |
Root window |
| 594 |
Each screen has a "root window" covering it. It cannot be |
| 595 |
reconfigured or unmapped, but otherwise acts as a full |
| 596 |
fledged window. A root window has no parent. |
| 597 |
|
| 598 |
Save set |
| 599 |
The "save set" of a client is a list of other client's |
| 600 |
windows which, if they are inferiors of one of the client's |
| 601 |
windows at connection close, should not be destroyed, and |
| 602 |
which should be remapped if it is unmapped. Save sets are |
| 603 |
typically used by window managers to avoid lost windows if |
| 604 |
the manager should terminate abnormally. |
| 605 |
|
| 606 |
Screen |
| 607 |
A server may provide several independent "screens", which |
| 608 |
typically have physically independent monitors. This would |
| 609 |
be the expected configuration when there is only a single |
| 610 |
keyboard and pointer shared among the screens. |
| 611 |
|
| 612 |
Server |
| 613 |
The "server" provides the basic windowing mechanism. It |
| 614 |
handles IPC connections from clients, demultipexes graphics |
| 615 |
requests onto the screens, and multiplexes input back to the |
| 616 |
appropriate clients. |
| 617 |
|
| 618 |
Server grabbing |
| 619 |
The server can be "grabbed" by a single client for exclusive |
| 620 |
use. This prevents processing of any requests from other |
| 621 |
client connections until the grab is complete. This is |
| 622 |
typically only a transient state for such things as |
| 623 |
rubber-banding and pop-up menus, or to execute requests |
| 624 |
indivisibly. |
| 625 |
|
| 626 |
Sibling |
| 627 |
Children of the same parent window are known as "sibling" |
| 628 |
windows. |
| 629 |
|
| 630 |
Stacking order |
| 631 |
Sibling windows may "stack" on top of each other. Windows |
| 632 |
above both obscure and occlude lower windows. This is |
| 633 |
similar to paper on a desk. The relationship between |
| 634 |
sibling windows is known as the "stacking order". |
| 635 |
|
| 636 |
Stipple |
| 637 |
A "stipple pattern" is a bitmap that is used to tile a |
| 638 |
region to serve as an additional clip mask for a fill |
| 639 |
operation with the foreground color. |
| 640 |
|
| 641 |
|
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
<span class="grey">M.I.T. [Page 11]</span></pre> |
| 646 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span> |
| 647 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 648 |
|
| 649 |
|
| 650 |
Tile |
| 651 |
A pixmap can be replicated in two dimensions to "tile" |
| 652 |
a region. The pixmap itself is also known as a "tile". |
| 653 |
|
| 654 |
Timestamp |
| 655 |
A time value, expressed in milliseconds, typically since |
| 656 |
the last server reset. Timestamp values wrap around (after |
| 657 |
about 49.7 days). The server, given its current time is |
| 658 |
represented by timestamp T, always interprets timestamps |
| 659 |
from clients by treating half of the timestamp space as |
| 660 |
being earlier in time than T, and half of the timestamp |
| 661 |
space as being later in time than T. One timestamp value |
| 662 |
(named CurrentTime) is never generated by the server; |
| 663 |
this value is reserved for use in requests to represent |
| 664 |
the current server time. |
| 665 |
|
| 666 |
Type |
| 667 |
A type is an arbitrary atom used to identify the |
| 668 |
interpretation of property data. Types are completely |
| 669 |
uninterpreted by the server; they are solely for the |
| 670 |
benefit of clients. |
| 671 |
|
| 672 |
Unviewable |
| 673 |
A window is "unviewable" if it is mapped but some ancestor is |
| 674 |
unmapped. |
| 675 |
|
| 676 |
Viewable |
| 677 |
A window is "viewable" if it and all of its ancestors are |
| 678 |
mapped. This does not imply that any portion of the window |
| 679 |
is actually visible. |
| 680 |
|
| 681 |
Visible |
| 682 |
A region of a window is "visible" if someone looking at the |
| 683 |
screen can actually "see" it: the window is viewable and the |
| 684 |
region is not occluded by any other window. |
| 685 |
|
| 686 |
Window gravity |
| 687 |
When windows are resized, subwindows may be repositioned |
| 688 |
automatically relative to some position in the window. This |
| 689 |
attraction of a subwindow to some part of its parent is known |
| 690 |
as "window gravity". |
| 691 |
|
| 692 |
Window manager |
| 693 |
Manipulation of windows on the screen, and much of the user |
| 694 |
interface (policy) is typically provided by a "window |
| 695 |
manager" client. |
| 696 |
|
| 697 |
XYFormat |
| 698 |
The data for a pixmap is said to be in "XYFormat" if it is |
| 699 |
organized as a set of bitmaps representing individual bit |
| 700 |
planes. |
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
<span class="grey">M.I.T. [Page 12]</span></pre> |
| 705 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span> |
| 706 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 707 |
|
| 708 |
|
| 709 |
ZFormat |
| 710 |
The data for a pixmap is said to be in "ZFormat" if it is |
| 711 |
organized as a set of pixel values in scanline order. |
| 712 |
|
| 713 |
<a href="#section-2">SECTION 2</a>. PROTOCOL FORMATS |
| 714 |
|
| 715 |
|
| 716 |
Request Format |
| 717 |
|
| 718 |
Every request contains an 8-bit "major" opcode, and a 16-bit length |
| 719 |
field expressed in units of 4 bytes. Every request consists of 4 |
| 720 |
bytes of header containing the major opcode, the length field, and a |
| 721 |
data byte) followed by zero or more additional bytes of data; the |
| 722 |
length field defines the total length of the request, including the |
| 723 |
header. The length field in a request must equal the minimum length |
| 724 |
required to contain the request; if the specified length is smaller |
| 725 |
or larger than the required length, an error is enerated. Unused |
| 726 |
bytes in a request are not required to be zero. Major opcodes 128 |
| 727 |
through 255 are reserved for extensions. Extensions are intended |
| 728 |
to contain multiple requests, so extension requests typically have |
| 729 |
an additional minor opcode encoded in the "spare" data byte in the |
| 730 |
request header, but the placement and interpretation of this minor |
| 731 |
opcode, and all other fields in extension requests, are not defined |
| 732 |
by the core protocol. Every request is implicitly assigned a sequence |
| 733 |
number, starting with one,used in replies, errors, and events. |
| 734 |
|
| 735 |
Reply Format |
| 736 |
|
| 737 |
Every reply contains a 32-bit length field expressed in units of 4 |
| 738 |
bytes. Every reply consists of 32 bytes, followed by zero or more |
| 739 |
additional bytes of data, as specified in the length field. Unused |
| 740 |
bytes within a reply are not guaranteed to be zero. Every reply |
| 741 |
also contains the least significant 16 bits of the sequence number |
| 742 |
of the corresponding request. |
| 743 |
|
| 744 |
Error Format |
| 745 |
|
| 746 |
Error reports are 32 bytes long. Every error includes an 8-bit error |
| 747 |
code. Error codes 128 through 255 are reserved for extensions. Every |
| 748 |
error also includes the major and minor opcodes of the failed |
| 749 |
request, and the least significant 16 bits of the sequence number of |
| 750 |
the request. For the following errors (see <a href="#section-5">Section 5</a>), the failing |
| 751 |
resource id is also returned: Colormap, Cursor, Drawable, Font, |
| 752 |
GContext, IDChoice, Pixmap, and Window. For Atom errors, the failing |
| 753 |
atom is returned. For Value errors, the failing value is returned. |
| 754 |
Other core errors return no additional data. Unused bytes within |
| 755 |
an error are not guaranteed to be zero. |
| 756 |
|
| 757 |
Event Format |
| 758 |
|
| 759 |
Events are 32 bytes long. Unused bytes within an event are not |
| 760 |
|
| 761 |
|
| 762 |
|
| 763 |
<span class="grey">M.I.T. [Page 13]</span></pre> |
| 764 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span> |
| 765 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 766 |
|
| 767 |
|
| 768 |
guaranteed to be zero. Every event contains an 8-bit type code. The |
| 769 |
most significant bit in this code is set if the event was generated |
| 770 |
from a SendEvent request. Event codes 64 through 127 are reserved for |
| 771 |
extensions, although the core protocol does not define a mechanism |
| 772 |
for selecting interest in such events. Every core event (with the |
| 773 |
exception of KeymapNotify) also contains the least significant 16 |
| 774 |
bits of the sequence number of the last request issued by the client |
| 775 |
that was (or is currently being) processed by the server. |
| 776 |
|
| 777 |
|
| 778 |
<a href="#section-3">SECTION 3</a>. SYNTAX |
| 779 |
|
| 780 |
|
| 781 |
The syntax {...} encloses a set of alternatives. |
| 782 |
|
| 783 |
The syntax [...] encloses a set of structure components. |
| 784 |
|
| 785 |
In general, TYPEs are in upper case and AlternativeValues are |
| 786 |
capitalized. |
| 787 |
|
| 788 |
Requests in <a href="#section-10">Section 10</a> are described in the following format: |
| 789 |
|
| 790 |
RequestName |
| 791 |
arg1: type1 |
| 792 |
... |
| 793 |
argN: typeN |
| 794 |
=> |
| 795 |
result1: type1 |
| 796 |
... |
| 797 |
resultM: typeM |
| 798 |
|
| 799 |
Errors: kind1, ..., kindK |
| 800 |
|
| 801 |
Description. |
| 802 |
|
| 803 |
If no => is present in the description, then the request has no |
| 804 |
reply (it is asynchronous), although errors may still be reported. |
| 805 |
|
| 806 |
Events in <a href="#section-12">Section 12</a> are described in the following format: |
| 807 |
|
| 808 |
EventName |
| 809 |
value1: type1 |
| 810 |
... |
| 811 |
valueN: typeN |
| 812 |
|
| 813 |
Description. |
| 814 |
|
| 815 |
|
| 816 |
|
| 817 |
|
| 818 |
|
| 819 |
|
| 820 |
|
| 821 |
|
| 822 |
<span class="grey">M.I.T. [Page 14]</span></pre> |
| 823 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span> |
| 824 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 825 |
|
| 826 |
|
| 827 |
<a href="#section-4">SECTION 4</a>. COMMON TYPES |
| 828 |
|
| 829 |
|
| 830 |
LISTofFOO |
| 831 |
|
| 832 |
A type name of the form LISTofFOO means a counted list of elements |
| 833 |
of type FOO; the size of the length field may vary (it is not |
| 834 |
necessarily the same size as a FOO), in some cases may be implicit, |
| 835 |
and is not fully specified in this document. |
| 836 |
|
| 837 |
BITMASK and LISTofVALUE |
| 838 |
|
| 839 |
The types BITMASK and LISTofVALUE are somewhat special. Various |
| 840 |
requests contain arguments of the form: |
| 841 |
value-mask: BITMASK |
| 842 |
value-list: LISTofVALUE |
| 843 |
used to allow the client to specify a subset of a heterogeneous |
| 844 |
collection of "optional" arguments. The value-mask specifies which |
| 845 |
arguments are to be provided; each such argument is assigned a unique |
| 846 |
bit position. The representation of the BITMASK will typically |
| 847 |
contain more bits than there are defined arguments; unused bits in |
| 848 |
the value-mask must be zero (or the server generates a Value error). |
| 849 |
The value-list contains one value for each one bit in the mask, from |
| 850 |
least to most significant bit in the mask. Each value is represented |
| 851 |
with 4 bytes, but the actual value occupies only the least |
| 852 |
significant bytes as required; the values of the unused bytes do not |
| 853 |
matter. |
| 854 |
|
| 855 |
Or Types |
| 856 |
|
| 857 |
A type of the form "T1 or ... or Tn" means the union of the indicated |
| 858 |
types; a single-element type is given as the element without |
| 859 |
enclosing braces. |
| 860 |
|
| 861 |
DEVICE: 32-bit id (<class,model,manufacturer,unit> 8 bits each) |
| 862 |
WINDOW: 32-bit id |
| 863 |
PIXMAP: 32-bit id |
| 864 |
CURSOR: 32-bit id |
| 865 |
FONT: 32-bit id |
| 866 |
GCONTEXT: 32-bit id |
| 867 |
COLORMAP: 32-bit id |
| 868 |
DRAWABLE: WINDOW or PIXMAP |
| 869 |
ATOM: 32-bit id (top 3 bits guaranteed to be zero) |
| 870 |
VISUALID: 32-bit id (top 3 bits guaranteed to be zero) |
| 871 |
VALUE: 32-bit quantity (used only in LISTofVALUE) |
| 872 |
INT8: 8-bit signed integer |
| 873 |
INT16: 16-bit signed integer |
| 874 |
INT32: 32-bit signed integer |
| 875 |
CARD8: 8-bit unsigned integer |
| 876 |
CARD16: 16-bit unsigned integer |
| 877 |
CARD32: 32-bit unsigned integer |
| 878 |
|
| 879 |
|
| 880 |
|
| 881 |
<span class="grey">M.I.T. [Page 15]</span></pre> |
| 882 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span> |
| 883 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 884 |
|
| 885 |
|
| 886 |
TIMESTAMP: CARD32 |
| 887 |
BITGRAVITY: {Forget, Static, |
| 888 |
NorthWest, North, NorthEast, |
| 889 |
West, Center, East, |
| 890 |
SouthWest, South, SouthEast} |
| 891 |
WINGRAVITY: {Unmap, Static, |
| 892 |
NorthWest, North, NorthEast, |
| 893 |
West, Center, East, |
| 894 |
SouthWest, South, SouthEast} |
| 895 |
BOOL: {True, False} |
| 896 |
EVENT: {KeyPress, KeyRelease, |
| 897 |
OwnerGrabButton, |
| 898 |
ButtonPress, ButtonRelease, EnterWindow, LeaveWindow, |
| 899 |
PointerMotion, PointerMotionHint, |
| 900 |
Button1Motion, Button2Motion, Button3Motion, |
| 901 |
Button4Motion, Button5Motion, ButtonMotion |
| 902 |
Exposure, VisibilityChange, |
| 903 |
StructureNotify, ResizeRedirect, |
| 904 |
SubstructureNotify, SubstructureRedirect, |
| 905 |
FocusChange, |
| 906 |
PropertyChange, ColormapChange, |
| 907 |
KeymapState} |
| 908 |
POINTEREVENT: {ButtonPress, ButtonRelease, EnterWindow, LeaveWindow, |
| 909 |
PointerMotion, PointerMotionHint, |
| 910 |
Button1Motion, Button2Motion, Button3Motion, |
| 911 |
Button4Motion, Button5Motion, ButtonMotion |
| 912 |
KeymapState} |
| 913 |
DEVICEEVENT: {KeyPress, KeyRelease, |
| 914 |
ButtonPress, ButtonRelease, |
| 915 |
PointerMotion, |
| 916 |
Button1Motion, Button2Motion, Button3Motion, |
| 917 |
Button4Motion, Button5Motion, ButtonMotion} |
| 918 |
KEYCODE: CARD8 |
| 919 |
BUTTON: CARD8 |
| 920 |
KEYMASK: {Shift, CapsLock, Control, Mod1, Mod2, Mod3, Mod4, Mod5} |
| 921 |
BUTMASK: {Button1, Button2, Button3, Button4, Button5} |
| 922 |
KEYBUTMASK: KEYMASK or BUTMASK |
| 923 |
STRING8: LISTofCARD8 |
| 924 |
STRING16: LISTofCHAR2B |
| 925 |
CHAR2B: [byte1, byte2: CARD8] |
| 926 |
POINT: [x, y: INT16] |
| 927 |
RECTANGLE: [x, y: INT16, |
| 928 |
width, height: CARD16] |
| 929 |
ARC: [x, y: INT16, |
| 930 |
width, height: CARD16, |
| 931 |
angle1, angle2: INT16] |
| 932 |
HOST: [family: {Internet, NS, ECMA, Datakit, DECnet} |
| 933 |
address: LISTofCARD8] |
| 934 |
|
| 935 |
The [x,y] coordinates of a RECTANGLE specify the upper left corner. |
| 936 |
|
| 937 |
|
| 938 |
|
| 939 |
|
| 940 |
<span class="grey">M.I.T. [Page 16]</span></pre> |
| 941 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span> |
| 942 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 943 |
|
| 944 |
|
| 945 |
The primary interpretation of "large" characters in a STRING16 is |
| 946 |
that they are composed of two bytes used to index a 2-D matrix; |
| 947 |
hence the use of CHAR2B rather than CARD16. This corresponds to |
| 948 |
the JIS/ISO method of indexing two-byte characters. It is expected |
| 949 |
that most "large" fonts will be defined with two-byte matrix |
| 950 |
indexing. For large fonts constructed with linear indexing, a |
| 951 |
CHAR2B can be interpreted as a 16-bit number by treating byte1 as |
| 952 |
the most significant byte; this means that clients should always |
| 953 |
transmit such 16-bit character values most significant byte first, |
| 954 |
as the server will never byte-swap CHAR2B quantities. |
| 955 |
|
| 956 |
The length, format, and interpretation of a HOST address are specific |
| 957 |
to the family. |
| 958 |
|
| 959 |
|
| 960 |
<a href="#section-5">SECTION 5</a>. ERRORS |
| 961 |
|
| 962 |
In general, when a request terminates with an error, the request has |
| 963 |
no side effects (i.e., there is no partial execution). The only |
| 964 |
requests for which this is not true are ChangeWindowAttributes, |
| 965 |
ChangeGC, PolyText8, PolyText16, FreeColors, StoreColors, and |
| 966 |
ChangeKeyboardControl. |
| 967 |
|
| 968 |
The following error codes can be returned by the various requests: |
| 969 |
|
| 970 |
Access |
| 971 |
An attempt to grab a key/button combination already grabbed |
| 972 |
by another client. |
| 973 |
|
| 974 |
An attempt to free a colormap entry not allocated by the |
| 975 |
client. |
| 976 |
|
| 977 |
An attempt to store into a read-only or an unallocated |
| 978 |
colormap entry. |
| 979 |
|
| 980 |
An attempt to modify the access control list from other than |
| 981 |
the local (or otherwise authorized) host. |
| 982 |
|
| 983 |
An attempt to select an event type, that at most one client |
| 984 |
can select at a time, when another client has already |
| 985 |
selected it. |
| 986 |
|
| 987 |
Alloc |
| 988 |
The server failed to allocate the requested resource. |
| 989 |
|
| 990 |
Note that this only covers allocation errors at a very coarse |
| 991 |
level, and is not intended to (nor can it in practice hope |
| 992 |
to) cover all cases of a server running out of allocation |
| 993 |
space in the middle of service. |
| 994 |
|
| 995 |
|
| 996 |
|
| 997 |
|
| 998 |
|
| 999 |
<span class="grey">M.I.T. [Page 17]</span></pre> |
| 1000 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span> |
| 1001 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1002 |
|
| 1003 |
|
| 1004 |
The semantics when a server runs out of allocation space are |
| 1005 |
left unspecified. |
| 1006 |
|
| 1007 |
Atom |
| 1008 |
A value for an ATOM argument does not name a defined ATOM. |
| 1009 |
|
| 1010 |
Colormap |
| 1011 |
A value for a COLORMAP argument does not name a defined |
| 1012 |
COLORMAP. |
| 1013 |
|
| 1014 |
Cursor |
| 1015 |
A value for a CURSOR argument does not name a defined CURSOR. |
| 1016 |
|
| 1017 |
Drawable |
| 1018 |
A value for a DRAWABLE argument does not name a defined |
| 1019 |
WINDOW or PIXMAP. |
| 1020 |
|
| 1021 |
Font |
| 1022 |
A value for a FONT or <FONT or GCONTEXT> argument does not |
| 1023 |
name a defined FONT. |
| 1024 |
|
| 1025 |
GContext |
| 1026 |
A value for a GCONTEXT argument does not name a defined |
| 1027 |
GCONTEXT. |
| 1028 |
|
| 1029 |
IDChoice |
| 1030 |
The value chosen for a resource identifier is either not |
| 1031 |
included in the range assigned to the client, or is already |
| 1032 |
in use. |
| 1033 |
|
| 1034 |
Implementation |
| 1035 |
The server does not implement some aspect of the request. A |
| 1036 |
server which generates this error for a core request is |
| 1037 |
deficient. As such, this error is not listed for any of the |
| 1038 |
requests, but clients should be prepared to receive such |
| 1039 |
errors, and handle or discard them. |
| 1040 |
|
| 1041 |
Length |
| 1042 |
The length of a request is shorter or longer than that |
| 1043 |
required to minimally contain the arguments. |
| 1044 |
|
| 1045 |
Match |
| 1046 |
An InputOnly window is used as a DRAWABLE. |
| 1047 |
|
| 1048 |
Some argument (or pair of arguments) has the correct type and |
| 1049 |
range, but fails to "match" in some other way required by the |
| 1050 |
request. |
| 1051 |
|
| 1052 |
Name |
| 1053 |
A font or color of the specified name does not exist. |
| 1054 |
|
| 1055 |
|
| 1056 |
|
| 1057 |
|
| 1058 |
<span class="grey">M.I.T. [Page 18]</span></pre> |
| 1059 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span> |
| 1060 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1061 |
|
| 1062 |
|
| 1063 |
Pixmap |
| 1064 |
A value for a PIXMAP argument does not name a defined PIXMAP. |
| 1065 |
|
| 1066 |
Property |
| 1067 |
The requested property does not exist for the specified |
| 1068 |
window. |
| 1069 |
|
| 1070 |
Request |
| 1071 |
The major or minor opcode does not specify a valid request. |
| 1072 |
|
| 1073 |
Value |
| 1074 |
Some numeric value falls outside the range of values accepted |
| 1075 |
by the request. Unless a specific range is specified for an |
| 1076 |
argument, the full range defined by the argument's type is |
| 1077 |
accepted. Any argument defined as a set of alternatives can |
| 1078 |
generate this error. |
| 1079 |
|
| 1080 |
Window |
| 1081 |
A value for a WINDOW argument does not name a defined WINDOW. |
| 1082 |
|
| 1083 |
|
| 1084 |
Note: the Atom, Colormap, Cursor, Drawable, Font, GContext, Pixmap, |
| 1085 |
and Window errors are also used when the argument type is extended |
| 1086 |
by union with a set of fixed alternatives, e.g.,<Window or |
| 1087 |
PointerRoot or None>. |
| 1088 |
|
| 1089 |
<a href="#section-6">SECTION 6</a>. KEYBOARDS |
| 1090 |
|
| 1091 |
Keycodes are always in the inclusive range [8,255]. |
| 1092 |
|
| 1093 |
For keyboards with both left-side and right-side modifier keys (e.g., |
| 1094 |
Shift and Control), the mask bits in the protocol always define the |
| 1095 |
OR of the keys. If electronically distinguishable, they can have |
| 1096 |
separate up/down events generated, and clients that want to |
| 1097 |
distinguish can track the individual states manually. |
| 1098 |
|
| 1099 |
<As part of the core we need to define a universal association |
| 1100 |
between keycaps and keycodes. A keycap is the graphical information |
| 1101 |
imprinted on a keyboard key, e.g., "$ 4", "T", "+ =".> |
| 1102 |
|
| 1103 |
|
| 1104 |
<a href="#section-7">SECTION 7</a>. POINTERS |
| 1105 |
|
| 1106 |
Buttons are always numbered starting with one. |
| 1107 |
|
| 1108 |
|
| 1109 |
<a href="#section-8">SECTION 8</a>. PREDEFINED ATOMS |
| 1110 |
|
| 1111 |
Predefined atoms are not strictly necessary, and may not be useful in |
| 1112 |
all environments, but will eliminate many InternAtom requests in most |
| 1113 |
applications. The core protocol imposes no semantics on these names, |
| 1114 |
|
| 1115 |
|
| 1116 |
|
| 1117 |
<span class="grey">M.I.T. [Page 19]</span></pre> |
| 1118 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span> |
| 1119 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1120 |
|
| 1121 |
|
| 1122 |
except as they are used in FONTPROP structures (see QueryFont). Note |
| 1123 |
that upper/lower case matters. |
| 1124 |
|
| 1125 |
BITMAP ICON_SIZE RGB_GREEN_MAP |
| 1126 |
COMMAND ITALIC_ANGLE RGB_RED_MAP |
| 1127 |
COPYRIGHT MAX_SPACE SECONDARY |
| 1128 |
CUT_BUFFER0 MIN_SPACE SIZE_HINTS |
| 1129 |
CUT_BUFFER1 NAME STRIKEOUT_ASCENT |
| 1130 |
CUT_BUFFER2 NORMAL_HINTS STRIKEOUT_DESCENT |
| 1131 |
CUT_BUFFER3 NORM_SPACE STRING |
| 1132 |
CUT_BUFFER4 PIXMAP SUBSCRIPT_X |
| 1133 |
CUT_BUFFER5 POINT_SIZE SUBSCRIPT_Y |
| 1134 |
CUT_BUFFER6 PRIMARY SUPERSCRIPT_X |
| 1135 |
CUT_BUFFER7 QUAD_WIDTH SUPERSCRIPT_Y |
| 1136 |
DEFAULT_CHAR RECTANGLE UNDERLINE_POSITION |
| 1137 |
END_SPACE RESIZE_HINT UNDERLINE_THICKNESS |
| 1138 |
FACE_NAME RESOLUTION WEIGHT |
| 1139 |
FAMILY_NAME RGB_BEST_MAP WINDOW |
| 1140 |
FONT_ASCENT RGB_BLUE_MAP WM_HINTS |
| 1141 |
FONT_DESCENT RGB_COLOR_MAP X_HEIGHT |
| 1142 |
ICON RGB_DEFAULT_MAP ZOOM_HINTS |
| 1143 |
ICON_NAME |
| 1144 |
|
| 1145 |
|
| 1146 |
<a href="#section-9">SECTION 9</a>. CONNECTION SETUP |
| 1147 |
|
| 1148 |
For remote clients, the X protocol can be built on top of any |
| 1149 |
reliable byte stream. For TCP connections, displays on a given host |
| 1150 |
a numbered starting from 0, and the server for display N listens and |
| 1151 |
accepts connections on port 6000+N. |
| 1152 |
|
| 1153 |
The client must send an initial byte of data to identify the byte |
| 1154 |
order to be employed. The value of the byte must be octal 102 or |
| 1155 |
154. The value 102 (ASCII uppercase B) means values are transmitted |
| 1156 |
most significant byte first, and value 154 (ASCII lowercase l) means |
| 1157 |
values are transmitted least significant byte first. Except where |
| 1158 |
explicitly noted in the protocol, all 16-bit and 32-bit quantities |
| 1159 |
sent by the client must be transmitted with this byte order, and all |
| 1160 |
16-bit and 32-bit quantities returned by the server will be |
| 1161 |
transmitted with this byte order. |
| 1162 |
|
| 1163 |
Following the byte-order byte, the following information is sent by |
| 1164 |
the client at connection setup: |
| 1165 |
|
| 1166 |
protocol-major-version: CARD16 |
| 1167 |
protocol-minor-version: CARD16 |
| 1168 |
authorization-protocol-name: STRING8 |
| 1169 |
authorization-protocol-data: STRING8 |
| 1170 |
|
| 1171 |
The version numbers indicate what version of the protocol the |
| 1172 |
client expects the server to implement. See below for an |
| 1173 |
|
| 1174 |
|
| 1175 |
|
| 1176 |
<span class="grey">M.I.T. [Page 20]</span></pre> |
| 1177 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span> |
| 1178 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1179 |
|
| 1180 |
|
| 1181 |
explanation. The authorization name indicates what |
| 1182 |
authorization protocol the client expects the server to use, |
| 1183 |
and the data is specific to that protocol. Specification of |
| 1184 |
valid authorization mechanisms is not part of the core X |
| 1185 |
protocol. It is hoped that eventually one authorization |
| 1186 |
protocol will be agreed upon. In the mean time, a server |
| 1187 |
that implements a different protocol than the client expects, |
| 1188 |
or a server that only implements the host-based mechanism, |
| 1189 |
will simply ignore this information. |
| 1190 |
|
| 1191 |
Received by the client at connection setup: |
| 1192 |
success: BOOL |
| 1193 |
protocol-major-version: CARD16 |
| 1194 |
protocol-minor-version: CARD16 |
| 1195 |
length: CARD16 |
| 1196 |
|
| 1197 |
Length is the amount of additional data to follow, in units |
| 1198 |
of 4 bytes. The version numbers are an escape hatch in case |
| 1199 |
future revisions of the protocol are necessary. In general, |
| 1200 |
the major version would increment for incompatible changes, |
| 1201 |
and the minor version would increment for small upward |
| 1202 |
compatible changes. Barring changes, the major version |
| 1203 |
will be eleven, and the minor version will be zero. The |
| 1204 |
protocol version numbers returned indicate the protocol the |
| 1205 |
server actually supports. This might not equal the version |
| 1206 |
sent by the client. The server can (but need not) refuse |
| 1207 |
connections from clients that offer a different version |
| 1208 |
than the server supports. A server can (but need not) |
| 1209 |
support more than one version simultaneously. |
| 1210 |
|
| 1211 |
Additional data received if authorization fails: |
| 1212 |
reason: STRING8 |
| 1213 |
|
| 1214 |
Additional data received if authorization is accepted: |
| 1215 |
vendor: STRING8 |
| 1216 |
release-number: CARD32 |
| 1217 |
resource-id-base, resource-id-mask: CARD32 |
| 1218 |
image-byte-order: {LSBFirst, MSBFirst} |
| 1219 |
bitmap-format-scanline-unit: {8, 16, 32} |
| 1220 |
bitmap-format-scanline-pad: {8, 16, 32} |
| 1221 |
bitmap-format-bit-order: {LeastSignificant, MostSignificant} |
| 1222 |
pixmap-formats: LISTofFORMAT |
| 1223 |
roots: LISTofSCREEN |
| 1224 |
keyboard: DEVICE |
| 1225 |
pointer: DEVICE |
| 1226 |
motion-buffer-size: CARD32 |
| 1227 |
maximum-request-length: CARD16 |
| 1228 |
|
| 1229 |
where |
| 1230 |
|
| 1231 |
FORMAT: [depth: CARD8, |
| 1232 |
|
| 1233 |
|
| 1234 |
|
| 1235 |
<span class="grey">M.I.T. [Page 21]</span></pre> |
| 1236 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span> |
| 1237 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1238 |
|
| 1239 |
|
| 1240 |
bits-per-pixel: {4, 8, 16, 24, 32} |
| 1241 |
scanline-pad: {8, 16, 32}] |
| 1242 |
SCREEN: [root: WINDOW |
| 1243 |
device: DEVICE |
| 1244 |
width-in-pixels, height-in-pixels: CARD16 |
| 1245 |
width-in-millimeters,height-in-millimeters:CARD16 |
| 1246 |
allowed-depths: LISTofDEPTH |
| 1247 |
root-depth: CARD8 |
| 1248 |
root-visual: VISUALID |
| 1249 |
default-colormap: COLORMAP |
| 1250 |
white-pixel, black-pixel: CARD32 |
| 1251 |
min-installed-maps, max-installed-maps: CARD16 |
| 1252 |
backing-stores: {Never, WhenMapped, Always} |
| 1253 |
save-unders: BOOL |
| 1254 |
current-input-masks: SETofEVENT] |
| 1255 |
DEPTH: [depth: CARD8 |
| 1256 |
visuals: LISTofVISUALTYPE] |
| 1257 |
VISUALTYPE: [visual-id: VISUALID |
| 1258 |
class: {StaticGray, StaticColor, |
| 1259 |
TrueColor,GrayScale, PseudoColor, |
| 1260 |
DirectColor} |
| 1261 |
red-mask, green-mask, blue-mask: CARD32 |
| 1262 |
bits-per-rgb-value: CARD8 |
| 1263 |
colormap-entries: CARD16] |
| 1264 |
|
| 1265 |
Per server information: |
| 1266 |
|
| 1267 |
The vendor string gives some indentification of the owner of the |
| 1268 |
server implementation. The semantics of the release-number is |
| 1269 |
controlled by the vendor. |
| 1270 |
|
| 1271 |
The resource-id-mask contains a single contiguous set of bits (at |
| 1272 |
least 18); the client allocates resource ids by choosing a value |
| 1273 |
with (only) some subset of these bits set, and ORing it with |
| 1274 |
resource-id-base. Only values constructed in this way can be |
| 1275 |
used to name newly created resources over this connection. |
| 1276 |
Resource ids never have the top 3 bits set. The client is not |
| 1277 |
restricted to linear or contiguous allocation of resource ids. |
| 1278 |
Once an id has been freed, it can be reused, but this should not |
| 1279 |
be necessary. An id must be unique with respect to the ids of |
| 1280 |
all other resources, not just other resources of the same type. |
| 1281 |
|
| 1282 |
Although the server is in general responsible for byte swapping |
| 1283 |
data to match the client, images are always transmitted and |
| 1284 |
received in formats (including byte order) specified by the |
| 1285 |
server. The byte order for images is given by image-byte-order, |
| 1286 |
and applies to each scanline unit in XYFormat (bitmap) format, |
| 1287 |
and to each pixel value in ZFormat. |
| 1288 |
|
| 1289 |
A bitmap is represented in scanline order. Each scanline is padded |
| 1290 |
to a multiple of bits as given by bitmap-format-scanline-pad. The |
| 1291 |
|
| 1292 |
|
| 1293 |
|
| 1294 |
<span class="grey">M.I.T. [Page 22]</span></pre> |
| 1295 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span> |
| 1296 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1297 |
|
| 1298 |
|
| 1299 |
pad bits are of arbitrary value. The scanline is quantized in |
| 1300 |
multiples of bits as given by bitmap-format-scanline-unit. Within |
| 1301 |
each unit, the leftmost bit in the bitmap is either the least or |
| 1302 |
most significant bit in the unit, as given by |
| 1303 |
bitmap-format-bit-order. If a pixmap is represented in XYFormat, |
| 1304 |
each plane is represented as a bitmap, and the planes appear from |
| 1305 |
most to least significant in bit order. |
| 1306 |
|
| 1307 |
For each pixmap depth supported by some screen, pixmap-formats lists |
| 1308 |
the ZFormat used to represent images of that depth. In ZFormat, the |
| 1309 |
pixels are in scanline order, left to right within a scanline. The |
| 1310 |
number of bits used to hold each pixel is given by bits-per-pixel, |
| 1311 |
and may be larger than strictly required by the depth. When the |
| 1312 |
bits-per-pixel is 4, the order of nibbles in the byte is the same as |
| 1313 |
the image byte-order. Each scanline is padded to a multiple of bits |
| 1314 |
as given by scanline-pad. |
| 1315 |
|
| 1316 |
How a pointing device roams the screens is up to the server |
| 1317 |
implementation, and is transparent to the protocol. No geometry |
| 1318 |
among screens is defined. |
| 1319 |
|
| 1320 |
The server may retain the recent history of pointer motion, and to a |
| 1321 |
finer granularity than is reported by MotionNotify events. Such |
| 1322 |
history is available via the GetPointerMotions request. The |
| 1323 |
approximate size of the history buffer is given by |
| 1324 |
motion-buffer-size. |
| 1325 |
|
| 1326 |
Maximum-request-length specifies the maximum length of a request, in |
| 1327 |
4-byte units, accepted by the server; i.e., this is the maximum value |
| 1328 |
that can appear in the length field of a request. Requests larger |
| 1329 |
than this generate a Length error, and the server will read and |
| 1330 |
simply discard the entire request. Maximum-request-length will |
| 1331 |
always be at least 4096 (i.e., requests of length up to and including |
| 1332 |
16384 bytes will be accepted by all servers). |
| 1333 |
|
| 1334 |
Per screen information: |
| 1335 |
|
| 1336 |
The allowed-depths specifies what pixmap and window depths are |
| 1337 |
supported. Pixmaps are supported for each depth listed, and windows |
| 1338 |
of that depth are supported if at least one visual type is listed for |
| 1339 |
the depth. A pixmap depth of one is always supported and listed, but |
| 1340 |
windows of depth one might not be supported. A depth of zero is |
| 1341 |
never listed, but zero-depth InputOnly windows are always supported. |
| 1342 |
|
| 1343 |
Root-depth and root-visual specify the depth and visual type of the |
| 1344 |
root window. Width-in-pixels and height-in-pixels specify the size |
| 1345 |
of the root window (which cannot be changed). The class of the root |
| 1346 |
window is always InputOutput. Width-in-millimeters and |
| 1347 |
height-in-millimeters can be used to determine the physical size and |
| 1348 |
the aspect ratio. |
| 1349 |
|
| 1350 |
|
| 1351 |
|
| 1352 |
|
| 1353 |
<span class="grey">M.I.T. [Page 23]</span></pre> |
| 1354 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span> |
| 1355 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1356 |
|
| 1357 |
|
| 1358 |
The default-colormap is the one initially associated with the root |
| 1359 |
window. Clients with minimal color requirements creating windows of |
| 1360 |
the same depth as the root may want to allocate from this map by |
| 1361 |
default. |
| 1362 |
|
| 1363 |
Black-pixel and white-pixel can be used in implementing a |
| 1364 |
"monochrome" application. These pixel values are for permanently |
| 1365 |
allocated entries in the default-colormap; the actual RGB values may |
| 1366 |
be settable on some screens. |
| 1367 |
|
| 1368 |
The border of the root window is initially a pixmap filled with the |
| 1369 |
black-pixel. The initial background of the root window is a pixmap |
| 1370 |
filled with some unspecified two-color pattern using black-pixel and |
| 1371 |
white-pixel. |
| 1372 |
|
| 1373 |
Min-installed-maps specifies the number of maps that can be |
| 1374 |
guaranteed to installed simultaneously (with InstallColormap), |
| 1375 |
regardless of the number of entries allocated in each map. |
| 1376 |
Max-installed-maps specifies the maximum number of maps that might |
| 1377 |
possibly be installed simultaneously, depending on their |
| 1378 |
allocations. For the typical case of a single hardware colormap, |
| 1379 |
both values will be one. |
| 1380 |
|
| 1381 |
Backing-stores indicates when the server supports backing stores for |
| 1382 |
this screen, although it may be storage limited in the number of |
| 1383 |
windows it can support at once. If save-unders is True, then the a |
| 1384 |
server can support the save-under mode in CreateWindow and |
| 1385 |
ChangeWindowAttributes, although again it may be storage limited. |
| 1386 |
|
| 1387 |
The current-input-events is what GetWindowAttributes would return for |
| 1388 |
the all-event-masks for the root window. |
| 1389 |
|
| 1390 |
Per visual-type information: |
| 1391 |
|
| 1392 |
A given visual type might be listed for more than one depth, or for |
| 1393 |
more than one screen. |
| 1394 |
|
| 1395 |
For PseudoColor, a pixel value indexes a colormap to produce |
| 1396 |
independent RGB values; the RGB values can be changed dynamically. |
| 1397 |
GrayScale is treated the same as PseudoColor, except which primary |
| 1398 |
drives the screen is undefined, so the client should always store |
| 1399 |
the same value for red, green, and blue in colormaps. For |
| 1400 |
DirectColor, a pixel value is decomposed into separate RGB |
| 1401 |
subfields, and each subfield separately indexes the colormap for |
| 1402 |
the corresponding value; The RGB values can be changed dynamically. |
| 1403 |
TrueColor is treated the same as DirectColor, except the colormap |
| 1404 |
has predefined read-only RGB values, which are server-dependent, |
| 1405 |
but provide (near-)linear ramps in each primary. StaticColor is |
| 1406 |
treated the same as PseudoColor, except the colormap has |
| 1407 |
predefined read-only RGB values, which are server-dependent. |
| 1408 |
StaticGray is treated the same as StaticColor, except the red, |
| 1409 |
|
| 1410 |
|
| 1411 |
|
| 1412 |
<span class="grey">M.I.T. [Page 24]</span></pre> |
| 1413 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span> |
| 1414 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1415 |
|
| 1416 |
|
| 1417 |
green, and blue values are equal for any single pixel value, |
| 1418 |
resulting in shades of gray. StaticGray with a two-entry colormap |
| 1419 |
can be thought of as "monochrome". |
| 1420 |
|
| 1421 |
The red-mask, green-mask, and blue-mask are only defined for |
| 1422 |
DirectColor and TrueColor; each has one contiguous set of bits, with |
| 1423 |
no intersections. |
| 1424 |
|
| 1425 |
The bits-per-rgb-value specifies the log base 2 of the approximate |
| 1426 |
number of distinct color values (individually) of red, green, and |
| 1427 |
blue. Actual RGB values are always passed in the protocol within a |
| 1428 |
16-bit spectrum. |
| 1429 |
|
| 1430 |
The colormap-entries defines the number of available colormap entries |
| 1431 |
in a newly created colormap. For DirectColor and TrueColor, this |
| 1432 |
will usually be the size of an individual pixel subfield. |
| 1433 |
|
| 1434 |
<a href="#section-10">SECTION 10</a>. REQUESTS |
| 1435 |
|
| 1436 |
|
| 1437 |
CreateWindow |
| 1438 |
wid, parent: WINDOW |
| 1439 |
class: {InputOutput, InputOnly, CopyFromParent} |
| 1440 |
depth: CARD8 |
| 1441 |
visual: VISUALID or CopyFromParent |
| 1442 |
x, y: INT16 |
| 1443 |
width, height, border-width: CARD16 |
| 1444 |
value-mask: BITMASK |
| 1445 |
value-list: LISTofVALUE |
| 1446 |
|
| 1447 |
Errors: IDChoice, Window, Pixmap, Colormap, Cursor, Match, |
| 1448 |
Value, Alloc |
| 1449 |
|
| 1450 |
Creates an unmapped window, and assigns the identifier wid |
| 1451 |
to it. |
| 1452 |
|
| 1453 |
A class of CopyFromParent means the class is taken from the |
| 1454 |
parent. A depth of zero for class InputOutput or |
| 1455 |
CopyFromParent means the depth is taken from the parent. |
| 1456 |
A visual of CopyFromParent means the visual type is taken |
| 1457 |
from the parent. For class InputOutput, the visual type |
| 1458 |
and depth must be a combination supported for the screen |
| 1459 |
(else a Match error); the depth need not be the same as the |
| 1460 |
parent, but the parent must not be of class InputOnly (else |
| 1461 |
a Match error). For class InputOnly, the depth must be |
| 1462 |
zero (else a Match error), and the visual must be one |
| 1463 |
supported for the screen (else a Match error), but the |
| 1464 |
parent may have any depth and class. |
| 1465 |
|
| 1466 |
The server essentially acts as if InputOnly windows do not |
| 1467 |
exist for the purposes of graphics requests, exposure |
| 1468 |
|
| 1469 |
|
| 1470 |
|
| 1471 |
<span class="grey">M.I.T. [Page 25]</span></pre> |
| 1472 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span> |
| 1473 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1474 |
|
| 1475 |
|
| 1476 |
processing, and VisibilityNotify events. An InputOnly window |
| 1477 |
cannot be used as a drawable (as a source or destination for |
| 1478 |
graphics requests). InputOnly and InputOutput windows act |
| 1479 |
identically in other respects (properties, grabs, input |
| 1480 |
control, and so on). |
| 1481 |
|
| 1482 |
The window is placed on top in the stacking order with |
| 1483 |
respect to siblings. The x and y coordinates are relative |
| 1484 |
to the parent's origin, and specify the position of the upper |
| 1485 |
left outer corner of the window (not the origin). The width |
| 1486 |
and height specify the inside size, not including the border, |
| 1487 |
and must be non-zero. The border-width for an InputOnly |
| 1488 |
window must be zero (else a Match error). |
| 1489 |
|
| 1490 |
The value-mask and value-list specify attributes of the |
| 1491 |
window that are to be explicitly initialized. The possible |
| 1492 |
values are: |
| 1493 |
|
| 1494 |
background-pixmap: PIXMAP or None or ParentRelative |
| 1495 |
background-pixel: CARD32 |
| 1496 |
border-pixmap: PIXMAP or CopyFromParent |
| 1497 |
border-pixel: CARD32 |
| 1498 |
bit-gravity: BITGRAVITY |
| 1499 |
win-gravity: WINGRAVITY |
| 1500 |
backing-store: {NotUseful, WhenMapped, Always} |
| 1501 |
backing-bit-planes: CARD32 |
| 1502 |
backing-pixel: CARD32 |
| 1503 |
save-under: BOOL |
| 1504 |
event-mask: SETofEVENT |
| 1505 |
do-not-propagate-mask: SETofDEVICEEVENT |
| 1506 |
override-redirect: BOOL |
| 1507 |
colormap: COLORMAP or CopyFromParent |
| 1508 |
cursor: CURSOR or None |
| 1509 |
|
| 1510 |
The default values, when attributes are not explicitly |
| 1511 |
initialized, are: |
| 1512 |
|
| 1513 |
background-pixmap: None |
| 1514 |
border-pixmap: CopyFromParent |
| 1515 |
bit-gravity: Forget |
| 1516 |
win-gravity: NorthWest |
| 1517 |
backing-store: NotUseful |
| 1518 |
backing-bit-planes: all ones |
| 1519 |
backing-pixel: zero |
| 1520 |
save-under: False |
| 1521 |
event-mask: {} (empty set) |
| 1522 |
do-not-propagate-mask: {} (empty set) |
| 1523 |
override-redirect: False |
| 1524 |
colormap: CopyFromParent |
| 1525 |
cursor: None |
| 1526 |
|
| 1527 |
|
| 1528 |
|
| 1529 |
|
| 1530 |
<span class="grey">M.I.T. [Page 26]</span></pre> |
| 1531 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span> |
| 1532 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1533 |
|
| 1534 |
|
| 1535 |
Only the following attributes are defined for InputOnly |
| 1536 |
windows: win-gravity, event-mask, do-not-propagate-mask, |
| 1537 |
and cursor. It is a Match error to specify any other |
| 1538 |
attributes for InputOnly windows. |
| 1539 |
|
| 1540 |
If background-pixmap is given, it overrides the default |
| 1541 |
background-pixel. The background pixmap and the window must |
| 1542 |
have the same root and the same depth (else a Match error). |
| 1543 |
Any size pixmap can be used, although some sizes may be |
| 1544 |
faster than others. If background None is specifed, the |
| 1545 |
window has no defined background. If background |
| 1546 |
ParentRelative is specified, the parent's background is |
| 1547 |
used, but the window must have the same depth as the parent |
| 1548 |
(else a Match error); if the parent has background None, |
| 1549 |
then the window will also have background None. A copy |
| 1550 |
of the parent's background is not made; the parent's |
| 1551 |
background is reexamined each time the window background is |
| 1552 |
required. If background-pixel is given, it overrides the |
| 1553 |
default and any background-pixmap given, and a pixmap of |
| 1554 |
undefined size filled with background-pixel is used for the |
| 1555 |
background. For a ParentRelative background, the |
| 1556 |
background tile origin always aligns with the parent's |
| 1557 |
background tile origin; otherwise the background tile |
| 1558 |
origin is always the window origin. |
| 1559 |
|
| 1560 |
When regions of the window are exposed and the server has |
| 1561 |
not retained the contents, the server automatically tiles |
| 1562 |
the regions with the window's background unless the window |
| 1563 |
has a background of None, in which case the previous screen |
| 1564 |
contents are simply left in place. Exposure events are then |
| 1565 |
generated for the regions, even if the background is None. |
| 1566 |
|
| 1567 |
The border tile origin is always the same as the background |
| 1568 |
tile origin. If border-pixmap is given, it overrides the |
| 1569 |
default border-pixel. The border pixmap and the window must |
| 1570 |
have the same root and the same depth (else a Match error). |
| 1571 |
Any size pixmap can be used, although some sizes may faster |
| 1572 |
than others. If CopyFromParent is given, the parent's border |
| 1573 |
pixmap is copied (subsequent changes to the parent do not |
| 1574 |
affect the child), but the window must have the same depth |
| 1575 |
as the parent (else a Match error). If border-pixel is |
| 1576 |
given, it overrides the default and any border-pixmap given, |
| 1577 |
and a pixmap of undefined size filled with border-pixel is |
| 1578 |
used for the border. |
| 1579 |
|
| 1580 |
Output to a window is always clipped to the inside of the |
| 1581 |
window, so that the border is never affected. |
| 1582 |
|
| 1583 |
The bit-gravity defines which region of the window should be |
| 1584 |
retained if the window is resized, and win-gravity defines |
| 1585 |
how the window should be repositioned if the parent is |
| 1586 |
|
| 1587 |
|
| 1588 |
|
| 1589 |
<span class="grey">M.I.T. [Page 27]</span></pre> |
| 1590 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span> |
| 1591 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1592 |
|
| 1593 |
|
| 1594 |
resized; see ConfigureWindow. |
| 1595 |
|
| 1596 |
A backing-store of WhenMapped advises the server that |
| 1597 |
maintaining contents of obscured regions when the window |
| 1598 |
is mapped would be beneficial. A backing-store of Always |
| 1599 |
advises the server that maintaining contents even when the |
| 1600 |
window is unmapped would be beneficial. Note that, even if |
| 1601 |
the window is larger than its parent, the server should |
| 1602 |
maintain complete contents, not just the region within the |
| 1603 |
parent boundaries. If the server maintains contents, |
| 1604 |
Exposure events will not be generated, but the server may |
| 1605 |
stop maintaining contents at any time. A value of NotUseful |
| 1606 |
advises the server that maintaining contents is unnecessary, |
| 1607 |
although a server may still choose to maintain contents. |
| 1608 |
|
| 1609 |
Backing-bit-planes indicates (with one bits) which bit |
| 1610 |
planes of the window hold dynamic data that must be preserved |
| 1611 |
in backing-stores. Backing-pixel specifies what value to use |
| 1612 |
in planes not covered by backing-bit-planes. The server is |
| 1613 |
free to only save the specified bit planes in the |
| 1614 |
backing-store, and regenerate the remaining planes with the |
| 1615 |
specified pixel value. |
| 1616 |
|
| 1617 |
If save-under is True, the server is advised that, when |
| 1618 |
this window is mapped, saving the contents of windows it |
| 1619 |
obscures would be beneficial. |
| 1620 |
|
| 1621 |
The event-mask defines which events the client is interested |
| 1622 |
in for this window (or, for some event types, inferiors of |
| 1623 |
the window). The do-not-propagate-mask defines which events |
| 1624 |
should not be propagated to ancestor windows when no client |
| 1625 |
has the event type selected in this window. |
| 1626 |
|
| 1627 |
Override-redirect specifies whether map and configure |
| 1628 |
request on this window should override a SubstructureRedirect |
| 1629 |
on the parent, typically to inform a window manager not to |
| 1630 |
tamper with the window. |
| 1631 |
|
| 1632 |
The colormap specifies the colormap, that best reflects the |
| 1633 |
"true" colors of the window. Servers capable of supporting |
| 1634 |
hardware colormaps may use this information, and window |
| 1635 |
managers may use it for InstallColormap requests. The |
| 1636 |
colormap must have the same visual type as the window |
| 1637 |
(else a match error). If CopyFromParent is specified, the |
| 1638 |
parents's colormap is copied (subsequent changes to the |
| 1639 |
parent do not affect the child), but the window must have |
| 1640 |
the same visual type as the parent (else a Match error) an |
| 1641 |
the parent must not have a colormap of None (else a Match |
| 1642 |
error). |
| 1643 |
|
| 1644 |
|
| 1645 |
|
| 1646 |
|
| 1647 |
|
| 1648 |
<span class="grey">M.I.T. [Page 28]</span></pre> |
| 1649 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span> |
| 1650 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1651 |
|
| 1652 |
|
| 1653 |
If a cursor is specified, it will be used whenever the |
| 1654 |
pointer is in the window. If None is specified, the |
| 1655 |
parent's cursor will be used when the pointer is in the |
| 1656 |
window, and any change in the parent's cursor will |
| 1657 |
cause an immediate change in the display cursor. |
| 1658 |
|
| 1659 |
This request generates a CreateNotify event. |
| 1660 |
|
| 1661 |
The background and border pixmaps and the cursor may be |
| 1662 |
freed immediately if no further explicit references to |
| 1663 |
them are to be made. |
| 1664 |
|
| 1665 |
Subsequent drawing into the background or border pixmap has |
| 1666 |
an undefined effect on the window state; the server might or |
| 1667 |
might not make a copy of the pixmap. |
| 1668 |
|
| 1669 |
ChangeWindowAttributes |
| 1670 |
window: WINDOW |
| 1671 |
value-mask: BITMASK |
| 1672 |
value-list: LISTofVALUE |
| 1673 |
|
| 1674 |
Errors: Window, Pixmap, Colormap, Cursor, Match, Value, |
| 1675 |
Access |
| 1676 |
|
| 1677 |
The value-mask and value-list specify which attributes are |
| 1678 |
to be changed. The values and restrictions are the same |
| 1679 |
as for CreateWindow. |
| 1680 |
|
| 1681 |
Changing the background does not cause the window contents |
| 1682 |
to be changed. Setting the border, or changing the |
| 1683 |
background such that border tile origin changes, causes the |
| 1684 |
border to be repainted. Changing the background of a root |
| 1685 |
window to None or ParentRelative restores the default |
| 1686 |
background pixmap. Changing the border of a root window to |
| 1687 |
CopyFromParent restores the default border pixmap. |
| 1688 |
|
| 1689 |
Changing the back-store of an obsecured window to |
| 1690 |
WhenMapped or Always, or changing the backing-bit-planes, |
| 1691 |
backing-pixel, or save-under of a mapped window, may have |
| 1692 |
no immediate effect. |
| 1693 |
|
| 1694 |
Multiple clients can select input on the same window; their |
| 1695 |
event-masks are disjoint. When an event is generated it |
| 1696 |
will be reported to all interested clients. However, at |
| 1697 |
most one client at a time can select for |
| 1698 |
SubstructureRedirect, at most one client at a time can |
| 1699 |
select for ResizeRedirectr, and at most one client at a |
| 1700 |
time can select for ButtonPress. |
| 1701 |
|
| 1702 |
There is only one do-not-propagate-mask for a window, not |
| 1703 |
one per client. |
| 1704 |
|
| 1705 |
|
| 1706 |
|
| 1707 |
<span class="grey">M.I.T. [Page 29]</span></pre> |
| 1708 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span> |
| 1709 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1710 |
|
| 1711 |
|
| 1712 |
Changing the colormap of a window (i.e., defining a new map, |
| 1713 |
not changing the contents of the existing map) generates a |
| 1714 |
ColormapNorify event. Changing the colormap os a visible |
| 1715 |
window may have no immediate effect on the screen; see |
| 1716 |
InstallColormap. |
| 1717 |
|
| 1718 |
Changing the cursor of a root window to None restores the |
| 1719 |
default cursor. |
| 1720 |
|
| 1721 |
The order in which attributes are verified and altered is |
| 1722 |
server dependent. If an error is generated, a subset of |
| 1723 |
the attributes may have been altered. |
| 1724 |
|
| 1725 |
GetWindowAttributes |
| 1726 |
window: WINDOW |
| 1727 |
=> |
| 1728 |
visual: VISUALID |
| 1729 |
class: {InputOutput, InputOnly} |
| 1730 |
bit-gravity: BITGRAVITY |
| 1731 |
win-gravity: WINGRAVITY |
| 1732 |
backing-store: {NotUseful, WhenMapped, Always} |
| 1733 |
backing-bit-planes: CARD32 |
| 1734 |
backing-pixel: CARD32 |
| 1735 |
save-under: BOOL |
| 1736 |
colormap: COLORMAP or None |
| 1737 |
map-is-installed: BOOL |
| 1738 |
map-state: {Unmapped, Unviewable, Viewable} |
| 1739 |
all-event-masks, your-event-mask: SETofEVENT |
| 1740 |
do-not-propagate-mask: SETofDEVICEEVENT |
| 1741 |
override-redirect: BOOL |
| 1742 |
|
| 1743 |
Errors: Window |
| 1744 |
|
| 1745 |
Returns current attributes of the window. All-event-masks |
| 1746 |
is the inclusive-OR of all event masks selected on the |
| 1747 |
window by clients. Your-event-mask is the event mask |
| 1748 |
selected by the querying client. |
| 1749 |
|
| 1750 |
DestroyWindow |
| 1751 |
window: WINDOW |
| 1752 |
|
| 1753 |
Errors: Window |
| 1754 |
|
| 1755 |
If the argument window is mapped, an UnmapWindow request is |
| 1756 |
performed automatically. The window and all inferiors are |
| 1757 |
then destroyed, and a DestroyNotify event is generated for |
| 1758 |
each window, in order from the argument window downwards, |
| 1759 |
with unspecified order among siblings at each level. |
| 1760 |
|
| 1761 |
Normal exposure processing on formerly obscured windows is |
| 1762 |
performed. |
| 1763 |
|
| 1764 |
|
| 1765 |
|
| 1766 |
<span class="grey">M.I.T. [Page 30]</span></pre> |
| 1767 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span> |
| 1768 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1769 |
|
| 1770 |
|
| 1771 |
If the window is a root window, this request has no effect. |
| 1772 |
|
| 1773 |
DestroySubwindows |
| 1774 |
window: WINDOW |
| 1775 |
|
| 1776 |
Errors: Window |
| 1777 |
|
| 1778 |
Performs a DestroyWindow on all children of the window, in |
| 1779 |
bottom to top stacking order. |
| 1780 |
|
| 1781 |
ChangeSaveSet |
| 1782 |
window: WINDOW |
| 1783 |
mode: {Insert, Delete} |
| 1784 |
|
| 1785 |
Errors: Window, Match, Value |
| 1786 |
|
| 1787 |
Adds or removes the specified window from the client's |
| 1788 |
"save-set". The window must have been created by some other |
| 1789 |
client (else a Match error). The use of the save-set is |
| 1790 |
described in <a href="#section-11">Section 11</a>. |
| 1791 |
|
| 1792 |
Windows are removed automatically from the save-set by the |
| 1793 |
server when they are destroyed. |
| 1794 |
|
| 1795 |
ReparentWindow |
| 1796 |
window, parent: WINDOW |
| 1797 |
x, y: INT16 |
| 1798 |
|
| 1799 |
Errors: Window, Match |
| 1800 |
|
| 1801 |
If the window is mapped, an UnmapWindow request is |
| 1802 |
performed automatically first. The window is then removed |
| 1803 |
from its current position in the hierarchy, and is inserted |
| 1804 |
as a child of the specified parent. The x and y coordinates |
| 1805 |
are relative to the parent's origin, and specify the new |
| 1806 |
position of the upper left outer corner of the window. The |
| 1807 |
window is placed on top in the stacking order with respect |
| 1808 |
to siblings. A ReparentNotify event is then generated. The |
| 1809 |
override-redirect attribute of the window is passed on in |
| 1810 |
this event; a value of True indicates that a window manager |
| 1811 |
should not tamper with this window. Finally, if the window |
| 1812 |
was originally mapped, a MapWindow request is performed |
| 1813 |
automatically. |
| 1814 |
|
| 1815 |
Normal exposure processing on formerly obscured windows is |
| 1816 |
performed. The server might not generate exposure events for |
| 1817 |
regions from the initial unmap that are immediately obscured |
| 1818 |
by the final map. |
| 1819 |
|
| 1820 |
A Match error is generated if the new parent is not on the |
| 1821 |
same screen as the old parent, or if the new parent is the |
| 1822 |
|
| 1823 |
|
| 1824 |
|
| 1825 |
<span class="grey">M.I.T. [Page 31]</span></pre> |
| 1826 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span> |
| 1827 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1828 |
|
| 1829 |
|
| 1830 |
window itself or an inferior of the window, or if the window |
| 1831 |
has a ParentRelative background and the new parent is not |
| 1832 |
the same depth as the window. |
| 1833 |
|
| 1834 |
MapWindow |
| 1835 |
window: WINDOW |
| 1836 |
|
| 1837 |
Errors: Window |
| 1838 |
|
| 1839 |
If the window is already mapped, this request has no effect. |
| 1840 |
|
| 1841 |
If the override-redirect attribute of the window is False and |
| 1842 |
some other client has selected SubstructureRedirect on the |
| 1843 |
parent, then a MapRequest event is generated, but the window |
| 1844 |
remains unmapped. Otherwise, the window is mapped and a |
| 1845 |
MapNotify event is generated. |
| 1846 |
|
| 1847 |
If the window is now viewable and its contents had been |
| 1848 |
discarded, then the window is tiled with its background (if |
| 1849 |
no background is defined the existing screen contents are not |
| 1850 |
altered) and one or more exposure events are generated. If a |
| 1851 |
backing-store has been maintained while the window was |
| 1852 |
unmapped, no exposure events are generated. If a |
| 1853 |
backing-store will now be maintained, a full-window exposure |
| 1854 |
is always generated; otherwise only visible regions may be |
| 1855 |
reported. Similar tiling and exposure take place for any |
| 1856 |
newly viewable inferiors. |
| 1857 |
|
| 1858 |
MapSubwindows |
| 1859 |
window: WINDOW |
| 1860 |
|
| 1861 |
Errors: Window |
| 1862 |
|
| 1863 |
Performs a MapWindow request on all unmapped children of the |
| 1864 |
window, in top to bottom stacking order. |
| 1865 |
|
| 1866 |
UnmapWindow |
| 1867 |
window: WINDOW |
| 1868 |
|
| 1869 |
Errors: Window |
| 1870 |
|
| 1871 |
If the window is already unmapped, this request has no |
| 1872 |
effect. Otherwise, the window is unmapped and an UnmapNotify |
| 1873 |
event is generated. Normal exposure processing on formerly |
| 1874 |
obscured windows is performed. |
| 1875 |
|
| 1876 |
UnmapSubwindows |
| 1877 |
window: WINDOW |
| 1878 |
|
| 1879 |
Errors: Window |
| 1880 |
|
| 1881 |
|
| 1882 |
|
| 1883 |
|
| 1884 |
<span class="grey">M.I.T. [Page 32]</span></pre> |
| 1885 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span> |
| 1886 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1887 |
|
| 1888 |
|
| 1889 |
Performs an UnmapWindow request on all mapped children of the |
| 1890 |
window, in bottom to top stacking order. |
| 1891 |
|
| 1892 |
ConfigureWindow |
| 1893 |
window: WINDOW |
| 1894 |
value-mask: BITMASK |
| 1895 |
value-list: LISTofVALUE |
| 1896 |
|
| 1897 |
Errors: Window, Match, Value |
| 1898 |
|
| 1899 |
Changes the configuration of the window. The value-mask and |
| 1900 |
value-list specify which values are to be given. The |
| 1901 |
possible values are: |
| 1902 |
|
| 1903 |
x: INT16 |
| 1904 |
y: INT16 |
| 1905 |
width: CARD16 |
| 1906 |
height: CARD16 |
| 1907 |
border-width: CARD16 |
| 1908 |
sibling: WINDOW |
| 1909 |
stack-mode: {Above, Below, TopIf, BottomIf, Opposite} |
| 1910 |
|
| 1911 |
The x and y coordinates are relative to the parent's origin, |
| 1912 |
and specify the position of the upper left outer corner of |
| 1913 |
the window. The width and height specify the inside size, |
| 1914 |
not including the border, and must be non-zero. It is a |
| 1915 |
Match error to attempt to make the border-width of an |
| 1916 |
InputOnly window non-zero. |
| 1917 |
|
| 1918 |
If the override-redirect attribute of the window is False |
| 1919 |
and some other client has selected SubstructureRedirect on |
| 1920 |
the parent, then a ConfigureRequest event is generated, and |
| 1921 |
no further processing is performed. Otherwise, the following |
| 1922 |
is performed. |
| 1923 |
|
| 1924 |
If some other client has selected ResizeRedirect on the |
| 1925 |
window and the width or height of the window is being |
| 1926 |
changed, then a ResizeRequest event is generated, and the |
| 1927 |
current width and height are used instead in the following. |
| 1928 |
|
| 1929 |
The geometry of the window is changed as specified and the |
| 1930 |
window is restacked among siblings as described below, and a |
| 1931 |
ConfigureNotify event is generated. If the width or height |
| 1932 |
of the window has actually changed, then children of the |
| 1933 |
window are affected as described below. |
| 1934 |
|
| 1935 |
Exposure processing is performed on formerly obscured |
| 1936 |
windows. |
| 1937 |
|
| 1938 |
Changing the width or height of the window causes its |
| 1939 |
contents to be moved or lost, depending on the bit-gravity of |
| 1940 |
|
| 1941 |
|
| 1942 |
|
| 1943 |
<span class="grey">M.I.T. [Page 33]</span></pre> |
| 1944 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span> |
| 1945 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 1946 |
|
| 1947 |
|
| 1948 |
the window, and causes children to be reconfigured, depending |
| 1949 |
on their win-gravity. For a change of width and height of W |
| 1950 |
and H, we define the [x, y] pairs: |
| 1951 |
|
| 1952 |
NorthWest: [0, 0] |
| 1953 |
North: [W/2, 0] |
| 1954 |
NorthEast: [W, 0] |
| 1955 |
West: [0, H/2] |
| 1956 |
Center: [W/2, H/2] |
| 1957 |
East: [W, H/2] |
| 1958 |
SouthWest: [0, H] |
| 1959 |
South: [W/2, H] |
| 1960 |
SouthEast: [W, H] |
| 1961 |
|
| 1962 |
When a window with one of these bit-gravities is resized, the |
| 1963 |
corresponding pair defines the change in position of each |
| 1964 |
pixel in the window. When a window with one of these |
| 1965 |
win-gravities has its parent window resized, the |
| 1966 |
corresponding pair defines the change in position of the |
| 1967 |
window within the parent. When a window is so repositioned, |
| 1968 |
a GravityNotify event is generated. |
| 1969 |
|
| 1970 |
A gravity of Static indicates that the contents or origin |
| 1971 |
should not move relative to the origin of the root window. If |
| 1972 |
the change in size of the window is coupled with a change in |
| 1973 |
position of [X, Y], then for bit-gravity the change in |
| 1974 |
position of each pixel is [-X, -Y], and for win-gravity the |
| 1975 |
change in position of a child when its parent is so resized |
| 1976 |
is [-X, -Y]. Note that Static gravity still only takes |
| 1977 |
effect when the width or height of the window is changed, not |
| 1978 |
when the window is simply moved. |
| 1979 |
|
| 1980 |
A bit-gravity of Forget indicates that the window contents |
| 1981 |
are always discarded after a size change; the window is tiled |
| 1982 |
with its background (if no background is defined, the |
| 1983 |
existing screen contents are not altered) and one or more |
| 1984 |
exposure events are generated. A server may also ignore the |
| 1985 |
specified bit-gravity and use Forget instead. |
| 1986 |
|
| 1987 |
A win-gravity of Unmap is like NorthWest, but the child is |
| 1988 |
also unmapped when the parent is resized, and an UnmapNotify |
| 1989 |
event is generated. |
| 1990 |
|
| 1991 |
If a sibling and a stack-mode is specified, the window is |
| 1992 |
restacked as follows: |
| 1993 |
|
| 1994 |
Above: window is placed just above sibling |
| 1995 |
Below: window is placed just below sibling |
| 1996 |
TopIf: if sibling occludes window, then window is placed |
| 1997 |
at the top of the stack |
| 1998 |
BottomIf: if window occludes sibling, then window is |
| 1999 |
|
| 2000 |
|
| 2001 |
|
| 2002 |
<span class="grey">M.I.T. [Page 34]</span></pre> |
| 2003 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span> |
| 2004 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2005 |
|
| 2006 |
|
| 2007 |
placed at the bottom of the stack |
| 2008 |
Opposite: if sibling occludes window, then window is |
| 2009 |
placed at the top of the stack, else if window |
| 2010 |
occludes sibling, then window is placed at the |
| 2011 |
bottom of the stack |
| 2012 |
|
| 2013 |
If a stack-mode is specified but no sibling is specified, the |
| 2014 |
window is restacked as follows: |
| 2015 |
|
| 2016 |
Above: window is placed at the top of the stack |
| 2017 |
Below: window is placed at the bottom of the stack |
| 2018 |
TopIf: if any sibling occludes window, then window is |
| 2019 |
placed at the top of the stack |
| 2020 |
BottomIf: if window occludes any sibling, then window is |
| 2021 |
placed at the bottom of the stack |
| 2022 |
Opposite: if any sibling occludes window, then window is |
| 2023 |
placed at the top of the stack, else if window |
| 2024 |
occludes any sibling, then window is placed at |
| 2025 |
the bottom of the stack |
| 2026 |
|
| 2027 |
It is a Match error if a sibling is specified without a |
| 2028 |
stack-mode, or if the window is not actually a sibling. |
| 2029 |
|
| 2030 |
Note that the computations for BottomIf, TopIf, and Opposite |
| 2031 |
are performed with respect to the window's final geometry |
| 2032 |
(as controlled by the other arguments to the request), not |
| 2033 |
its initial geometry. |
| 2034 |
|
| 2035 |
CirculateWindow |
| 2036 |
window: WINDOW |
| 2037 |
direction: {RaiseLowest, LowerHighest} |
| 2038 |
|
| 2039 |
Errors: Window, Value |
| 2040 |
|
| 2041 |
If some other client has selected SubstructureRedirect on the |
| 2042 |
window, then a CirculateRequest event is generated, and no |
| 2043 |
further processing is performed. Otherwise, the following is |
| 2044 |
performed, and then a CirculateNotify event is generated if |
| 2045 |
the window is actually restacked. |
| 2046 |
|
| 2047 |
For RaiseLowest, raises the lowest mapped child (if any) that |
| 2048 |
is occluded by another child to the top of the stack. For |
| 2049 |
LowerHighest, lowers the highest mapped child (if any) that |
| 2050 |
occludes another child to the bottom of the stack. Exposure |
| 2051 |
processing is performed on formerly obscured windows. |
| 2052 |
|
| 2053 |
GetGeometry |
| 2054 |
drawable: DRAWABLE |
| 2055 |
=> |
| 2056 |
root: WINDOW |
| 2057 |
depth: CARD8 |
| 2058 |
|
| 2059 |
|
| 2060 |
|
| 2061 |
<span class="grey">M.I.T. [Page 35]</span></pre> |
| 2062 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span> |
| 2063 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2064 |
|
| 2065 |
|
| 2066 |
x, y: INT16 |
| 2067 |
width, height, border-width: CARD16 |
| 2068 |
|
| 2069 |
Errors: Drawable |
| 2070 |
|
| 2071 |
Returns the root and (current) geometry of the drawable. |
| 2072 |
Depth is the number of bits per pixel for the object. |
| 2073 |
X, y, and border-width will always be zero for pixmaps. |
| 2074 |
For a window, the x and y coordinates specify the upper |
| 2075 |
left outer corner of the window relative to its parent's |
| 2076 |
origin, and the width and height specify the inside size |
| 2077 |
(not including the border). |
| 2078 |
|
| 2079 |
It is legal to pass an InputOnly window as a drawable to |
| 2080 |
this request. |
| 2081 |
|
| 2082 |
QueryTree |
| 2083 |
window: WINDOW |
| 2084 |
=> |
| 2085 |
root: WINDOW |
| 2086 |
parent: WINDOW or None |
| 2087 |
children: LISTofWINDOW |
| 2088 |
|
| 2089 |
Errors: Window |
| 2090 |
|
| 2091 |
Returns the root, the parent, and children of the window. |
| 2092 |
The children are listed in bottom-to-top stacking order. |
| 2093 |
|
| 2094 |
InternAtom |
| 2095 |
name: STRING8 |
| 2096 |
only-if-exists: BOOL |
| 2097 |
=> |
| 2098 |
atom: ATOM or None |
| 2099 |
|
| 2100 |
Errors: Value, Alloc |
| 2101 |
|
| 2102 |
Returns the atom for the given name. If only-if-exists is |
| 2103 |
False, then the atom is created if it does not exist. The |
| 2104 |
string should use the ASCII encoding, and upper/lower case |
| 2105 |
matters. |
| 2106 |
|
| 2107 |
The lifetime of an atom is not tied to the interning client. |
| 2108 |
Atoms remained defined until server reset (see <a href="#section-11">Section 11</a>). |
| 2109 |
|
| 2110 |
GetAtomName |
| 2111 |
atom: ATOM |
| 2112 |
=> |
| 2113 |
name: STRING8 |
| 2114 |
|
| 2115 |
Errors: Atom |
| 2116 |
|
| 2117 |
|
| 2118 |
|
| 2119 |
|
| 2120 |
<span class="grey">M.I.T. [Page 36]</span></pre> |
| 2121 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span> |
| 2122 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2123 |
|
| 2124 |
|
| 2125 |
Returns the name for the given atom. |
| 2126 |
|
| 2127 |
ChangeProperty |
| 2128 |
window: WINDOW |
| 2129 |
property, type: ATOM |
| 2130 |
format: {8, 16, 32} |
| 2131 |
mode: {Replace, Prepend, Append} |
| 2132 |
data: LISTofINT8 or LISTofINT16 or LISTofINT32 |
| 2133 |
|
| 2134 |
Errors: Window, Atom, Value, Match, Alloc |
| 2135 |
|
| 2136 |
Alters the property for the specified window. The type is |
| 2137 |
uninterpreted by the server. The format specifies whether |
| 2138 |
the data should be viewed as a list of 8-bit, 16-bit, or |
| 2139 |
32-bit quantities, so that the server can correctly |
| 2140 |
byte-swap as necessary. |
| 2141 |
|
| 2142 |
If mode is Replace, the previous property value is discarded. |
| 2143 |
If the mode is Prepend or Append, then the type and format |
| 2144 |
must match the existing property value (else a Match error); |
| 2145 |
if the property is undefined, it is treated as defined with |
| 2146 |
the correct type and format with zero-length data. For |
| 2147 |
Prepend, the data is tacked on to the beginning of the |
| 2148 |
existing data, and for Append it is tacked on to the |
| 2149 |
end of the existing data. |
| 2150 |
|
| 2151 |
Generates a PropertyNotify event on the window. |
| 2152 |
|
| 2153 |
The lifetime of a property is not tied to the storing client. |
| 2154 |
Properties remain until explicitly deleted, or the window is |
| 2155 |
destroyed, or until server reset (see <a href="#section-11">Section 11</a>). |
| 2156 |
|
| 2157 |
The maximum size of a property is server dependent. |
| 2158 |
|
| 2159 |
DeleteProperty |
| 2160 |
window: WINDOW |
| 2161 |
property: ATOM |
| 2162 |
|
| 2163 |
Errors: Window, Atom |
| 2164 |
|
| 2165 |
Deletes the property from the specified window if the |
| 2166 |
property exists. Generates a PropertyNotify event on the |
| 2167 |
window unless the property does not exist. |
| 2168 |
|
| 2169 |
GetProperty |
| 2170 |
window: WINDOW |
| 2171 |
property: ATOM |
| 2172 |
type: ATOM or AnyPropertyType |
| 2173 |
long-offset, long-length: CARD32 |
| 2174 |
delete: BOOL |
| 2175 |
=> |
| 2176 |
|
| 2177 |
|
| 2178 |
|
| 2179 |
<span class="grey">M.I.T. [Page 37]</span></pre> |
| 2180 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span> |
| 2181 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2182 |
|
| 2183 |
|
| 2184 |
type: ATOM |
| 2185 |
format: {8, 16, 32} |
| 2186 |
bytes-after: CARD32 |
| 2187 |
value: LISTofINT8 or LISTofINT16 or LISTofINT32 |
| 2188 |
|
| 2189 |
Errors: Window, Atom, Property, Match, Value |
| 2190 |
|
| 2191 |
If the specified property does not exist for the specifed |
| 2192 |
window, a Property error is generated. Otherwise, if type |
| 2193 |
AnyPropertyType is specified, (part of) the property is |
| 2194 |
returned regardless of its type; if a type is specified, |
| 2195 |
(part of) the property is returned only if its type equals |
| 2196 |
the specified type (else a Match error). The actual type |
| 2197 |
and format of the property are returned. |
| 2198 |
|
| 2199 |
Define the following values: |
| 2200 |
N = actual length of the stored property in bytes |
| 2201 |
(even if the format is 16 or 32) |
| 2202 |
I = 4 * long-offset |
| 2203 |
T = N - I |
| 2204 |
L = MINIMUM(T, 4 * long-length) |
| 2205 |
A = N - (I + L) |
| 2206 |
The returned value starts at byte index I in the property |
| 2207 |
(indexing from 0), and its length in bytes is L. It is a |
| 2208 |
Value error if long-offset is given such that L is negative. |
| 2209 |
The value of bytes-after is A, giving the number of trailing |
| 2210 |
unread bytes in the stored property. |
| 2211 |
|
| 2212 |
If delete is True and bytes-after is zero, the property is |
| 2213 |
also deleted from the window and a PropertyNotify event is |
| 2214 |
generated on the window. |
| 2215 |
|
| 2216 |
RotateProperties |
| 2217 |
window: WINDOW |
| 2218 |
delta: INT8 |
| 2219 |
properties: LISTofATOM |
| 2220 |
|
| 2221 |
Errors: Window, Atom, Match |
| 2222 |
|
| 2223 |
If the property names in the list are viewed as being |
| 2224 |
numbered starting from zero, and there are N property names |
| 2225 |
in the list, then the value associated with property name I |
| 2226 |
becomes the value associated with property name (I + delta) |
| 2227 |
mod N, for all I from zero to N - 1. The effect is to rotate |
| 2228 |
the states by delta places around the virtual ring of |
| 2229 |
property names (right for positive delta, left for negative |
| 2230 |
delta). |
| 2231 |
|
| 2232 |
A PropertyNotify event is generated for each property, in the |
| 2233 |
order listed. |
| 2234 |
|
| 2235 |
|
| 2236 |
|
| 2237 |
|
| 2238 |
<span class="grey">M.I.T. [Page 38]</span></pre> |
| 2239 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span> |
| 2240 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2241 |
|
| 2242 |
|
| 2243 |
If an atom occurs more than once in the list or no property |
| 2244 |
with that name is defined for the window, a Match error is |
| 2245 |
generated. If an Atom or Match error is generated, no |
| 2246 |
properties are changed. |
| 2247 |
|
| 2248 |
ListProperties |
| 2249 |
window: WINDOW |
| 2250 |
=> |
| 2251 |
atoms: LISTofATOM |
| 2252 |
|
| 2253 |
Errors: Window |
| 2254 |
|
| 2255 |
Returns the atoms of properties currently defined on the |
| 2256 |
window. |
| 2257 |
|
| 2258 |
SetSelectionOwner |
| 2259 |
selection: ATOM |
| 2260 |
owner: WINDOW or None |
| 2261 |
time: TIMESTAMP or CurrentTime |
| 2262 |
|
| 2263 |
Error: Atom, Window |
| 2264 |
|
| 2265 |
Changes the owner and last-change time of the specifed |
| 2266 |
selection. The request has no effect if the specified time |
| 2267 |
is earlier than the current last-change time of the specified |
| 2268 |
selection or is later than the current server time; |
| 2269 |
otherwise, the last-change time is set to the specified time, |
| 2270 |
with CurrentTime replaced by the current server time. |
| 2271 |
If the new owner is not the same as the current owner of the |
| 2272 |
selection, and the current owner is a window, then the |
| 2273 |
current owner is sent a SelectClear event. |
| 2274 |
|
| 2275 |
If the owner of a selection is a window, and the window is |
| 2276 |
later destroyed, the owner of the selection automatically |
| 2277 |
reverts to None, but the last-change time is not affected. |
| 2278 |
|
| 2279 |
The selection atom is uninterpreted by the server. |
| 2280 |
|
| 2281 |
Selections are global to the server. |
| 2282 |
|
| 2283 |
GetSelectionOwner |
| 2284 |
selection: ATOM |
| 2285 |
=> |
| 2286 |
owner: WINDOW or None |
| 2287 |
|
| 2288 |
Errors: Atom |
| 2289 |
|
| 2290 |
Returns the current owner of the specified selection, if any. |
| 2291 |
|
| 2292 |
ConvertSelection |
| 2293 |
selection, target: ATOM |
| 2294 |
|
| 2295 |
|
| 2296 |
|
| 2297 |
<span class="grey">M.I.T. [Page 39]</span></pre> |
| 2298 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span> |
| 2299 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2300 |
|
| 2301 |
|
| 2302 |
property: ATOM or None |
| 2303 |
requestor: WINDOW |
| 2304 |
time: TIMESTAMP or CurrentTime |
| 2305 |
|
| 2306 |
Error: Atom, Window |
| 2307 |
|
| 2308 |
If the specified selection is owned by a window, the server |
| 2309 |
sends a SelectionRequest event to the owner. If no owner for |
| 2310 |
the specified selection exists, the server generates a |
| 2311 |
SelectionNotify event to the requestor with property None. |
| 2312 |
The arguments are passed on unchanged in either event. |
| 2313 |
|
| 2314 |
SendEvent |
| 2315 |
destination: WINDOW or PointerWindow or InputFocus |
| 2316 |
propagate: BOOL |
| 2317 |
event-mask: SETofEVENT |
| 2318 |
event: <normal-event-format> |
| 2319 |
|
| 2320 |
Errors: Window, Value |
| 2321 |
|
| 2322 |
If PointerWindow is specified, destination is replaced with |
| 2323 |
the window that the pointer is in. If InputFocus is |
| 2324 |
specified, then if the focus window contains the pointer, |
| 2325 |
destination is replaced with the window that the pointer is |
| 2326 |
in, and otherwise destination is replaced with the focus |
| 2327 |
window. |
| 2328 |
|
| 2329 |
If propagate is False, then the event is sent to every client |
| 2330 |
selecting on destination any of the event types in |
| 2331 |
event-mask. |
| 2332 |
|
| 2333 |
If propagate is True and no clients have selected on |
| 2334 |
destination any of the event types in event-mask, then |
| 2335 |
destination is replaced with the closest ancestor of |
| 2336 |
destination for which some client has selected a type in |
| 2337 |
event-mask and no intervening window has that type in its |
| 2338 |
do-not-propagate-mask. If no such window exists, or if the |
| 2339 |
window is an ancestor of the focus window and InputFocus was |
| 2340 |
originally specified sent to any clients. Otherwise, the |
| 2341 |
event is reported to every client selecting on the final |
| 2342 |
destination any of the types specified in event-mask. |
| 2343 |
|
| 2344 |
The event code must be one of the core events, or one of |
| 2345 |
the events defined by an extension, so that the server can |
| 2346 |
correctly byte swap the contents as necessary. The |
| 2347 |
contents of the event are otherwise unaltered and unchecked |
| 2348 |
by the server except to force on the most significant bit |
| 2349 |
of the event code. |
| 2350 |
|
| 2351 |
|
| 2352 |
|
| 2353 |
|
| 2354 |
|
| 2355 |
|
| 2356 |
<span class="grey">M.I.T. [Page 40]</span></pre> |
| 2357 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span> |
| 2358 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2359 |
|
| 2360 |
|
| 2361 |
Active grabs are ignored for this request. |
| 2362 |
|
| 2363 |
GrabPointer |
| 2364 |
grab-window: WINDOW |
| 2365 |
owner-events: BOOL |
| 2366 |
event-mask: SETofPOINTEREVENT |
| 2367 |
pointer-mode, keyboard-mode: {Synchronous, Asynchronous} |
| 2368 |
confine-to: WINDOW or None |
| 2369 |
cursor: CURSOR or None |
| 2370 |
time: TIMESTAMP or CurrentTime |
| 2371 |
=> |
| 2372 |
status: {Success, AlreadyGrabbed, Frozen, InvalidTime, |
| 2373 |
NotViewable} |
| 2374 |
|
| 2375 |
Errors: Cursor, Window, Value |
| 2376 |
|
| 2377 |
Actively grabs control of the pointer. Further pointer |
| 2378 |
events are only reported to the grabbing client. The |
| 2379 |
request overrides any active pointer grab by this client. |
| 2380 |
|
| 2381 |
Event-mask is always augmented to include ButtonPress and |
| 2382 |
ButtonRelease. If owner-events is False, all generated |
| 2383 |
pointer events are reported with respect to grab-window, |
| 2384 |
and are only reported if selected by event-mask. If |
| 2385 |
owner-events is True, then if a generated pointer event |
| 2386 |
would normally be reported to this client, it is reported |
| 2387 |
normally; otherwise the event is reported with respect to |
| 2388 |
the grab-window, and is only reported if selected by |
| 2389 |
event-mask. For either value of owner-events, unreported |
| 2390 |
events are simply discarded. |
| 2391 |
|
| 2392 |
Pointer-mode controls further processing of pointer events, |
| 2393 |
and keyboard-mode controls further processing of keyboard |
| 2394 |
events. If the mode is Asynchronous, event processing |
| 2395 |
continues normally; if the device is currently frozen by |
| 2396 |
this client, then processing of events for the device is |
| 2397 |
resumed. If the mode is Synchronous, the device (as seen |
| 2398 |
via the protocol) appears to freeze, and no further events |
| 2399 |
for that device are generated by the server until the |
| 2400 |
grabbing client issues a releasing AllowEvents request. |
| 2401 |
Actual device changes are not lost while the device is |
| 2402 |
frozen; they are simply queued for later processing. |
| 2403 |
|
| 2404 |
If a cursor is specified, then it is displayed regardless |
| 2405 |
of what window the pointer is in. If no cursor is |
| 2406 |
specified, then when the pointer is in grab-window or one |
| 2407 |
of its subwindows, the normal cursor for that window is |
| 2408 |
displayed, and otherwise the cursor for grab-window is |
| 2409 |
displayed. |
| 2410 |
|
| 2411 |
|
| 2412 |
|
| 2413 |
|
| 2414 |
|
| 2415 |
<span class="grey">M.I.T. [Page 41]</span></pre> |
| 2416 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span> |
| 2417 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2418 |
|
| 2419 |
|
| 2420 |
If a confine-to window is specified, then the pointer |
| 2421 |
will be restricted to stay contained in that window. |
| 2422 |
The confine-to window need have no relationship to the |
| 2423 |
grab-window. If the pointer is not initially in the |
| 2424 |
confine-to window, then it is warped automatically to |
| 2425 |
the closest edge (and enter/leave events generated |
| 2426 |
normally) just before the grab activates. If the |
| 2427 |
confine-to window is subsequently reconfigured, the |
| 2428 |
pointer will be warped automatically as necessary to keep |
| 2429 |
it contained in the window. |
| 2430 |
|
| 2431 |
This request generates EnterNotify and LeaveNotify events. |
| 2432 |
|
| 2433 |
The request fails with status AlreadyGrabbed if the |
| 2434 |
pointer is actively grabbed by some other client. The |
| 2435 |
request fails with status Frozen if the pointer is frozen |
| 2436 |
by an active grab of another client. The request fails |
| 2437 |
with status NotViewable if grab-window or |
| 2438 |
confine-to window is not viewable. The request fails with |
| 2439 |
status InvalidTime if the specified time is earlier than |
| 2440 |
the last-pointer-grab time or later than the current |
| 2441 |
server time; otherwise the last-pointer-grab time is set |
| 2442 |
to the specified time, with CurrentTime replaced by the |
| 2443 |
current server time. |
| 2444 |
|
| 2445 |
UngrabPointer |
| 2446 |
time: TIMESTAMP or CurrentTime |
| 2447 |
|
| 2448 |
Releases the pointer if this client has it actively |
| 2449 |
grabbed (from either GrabPointer or GrabButton or from a |
| 2450 |
normal button press), and releases any queued events. The |
| 2451 |
request has no effect if the specified time is earlier |
| 2452 |
than the last-pointer-grab time or is later than the |
| 2453 |
current server time. |
| 2454 |
|
| 2455 |
This request generates EnterNotify and LeaveNotify events. |
| 2456 |
|
| 2457 |
An UngrabPointer is performed automatically if the event |
| 2458 |
window or confine-to window for an active pointer grab |
| 2459 |
becomes not viewable. |
| 2460 |
|
| 2461 |
GrabButton |
| 2462 |
modifiers: SETofKEYMASK or AnyModifier |
| 2463 |
button: BUTTON or AnyButton |
| 2464 |
grab-window: WINDOW |
| 2465 |
owner-events: BOOL |
| 2466 |
event-mask: SETofPOINTEREVENT |
| 2467 |
pointer-mode, keyboard-mode: {Synchronous, Asynchronous} |
| 2468 |
confine-to: WINDOW or None |
| 2469 |
cursor: CURSOR or None |
| 2470 |
|
| 2471 |
|
| 2472 |
|
| 2473 |
|
| 2474 |
<span class="grey">M.I.T. [Page 42]</span></pre> |
| 2475 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span> |
| 2476 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2477 |
|
| 2478 |
|
| 2479 |
Errors: Cursor, Window, Value, Access |
| 2480 |
|
| 2481 |
This request establishes a passive grab. In the future, |
| 2482 |
if the specified button is pressed when the specified |
| 2483 |
modifier keys are down (and no other buttons or modifier |
| 2484 |
keys are down), and grab-window contains the pointer, |
| 2485 |
and the confine-to window (if any) is viewable, and these |
| 2486 |
constraints are not satisfied for any ancestor, then the |
| 2487 |
pointer is actively grabbed as described in GrabPointer, |
| 2488 |
the last-pointer-grab time is set to the time at which |
| 2489 |
the button was pressed (as transmitted in the ButtonPress |
| 2490 |
event), and the ButtonPress event is reported. The |
| 2491 |
interpretation of the remaining arguments is as for |
| 2492 |
GrabPointer. The active grab is terminated automatically |
| 2493 |
when all buttons are released (independent of the state |
| 2494 |
of modifier keys). |
| 2495 |
|
| 2496 |
A modifiers of AnyModifier is equivalent to issuing the |
| 2497 |
request for all possible modifier combinations. A |
| 2498 |
button of AnyButton is equivalent to issuing the request |
| 2499 |
for all possible buttons. |
| 2500 |
|
| 2501 |
An Access error is generated if some other client has |
| 2502 |
already issued a GrabButton with the same button/key |
| 2503 |
combination on the same window. When using AnyModifier |
| 2504 |
or AnyButton, the request fails completely (no grabs are |
| 2505 |
established) if there is a combination. The request has |
| 2506 |
no effect on an active grab. |
| 2507 |
|
| 2508 |
UngrabButton |
| 2509 |
modifiers: SETofKEYMASK or AnyModifier |
| 2510 |
button: BUTTON or AnyButton |
| 2511 |
grab-window: WINDOW |
| 2512 |
|
| 2513 |
Errors: Window |
| 2514 |
|
| 2515 |
Releases the passive button/key combination on the |
| 2516 |
specified window if it was grabbed by this client. A |
| 2517 |
modifiers of AnyModifier is equivalent to issuing the |
| 2518 |
request for all possible modifier combinations. A |
| 2519 |
button of AnyButton is equivalent to issuing the request |
| 2520 |
for all possible buttons. Has no effect on an active |
| 2521 |
grab. |
| 2522 |
|
| 2523 |
ChangeActivePointerGrab |
| 2524 |
event-mask: SETofPOINTEREVENT |
| 2525 |
cursor: CURSOR or None |
| 2526 |
time: TIMESTAMP or CurrentTime |
| 2527 |
|
| 2528 |
Errors: Cursor |
| 2529 |
|
| 2530 |
|
| 2531 |
|
| 2532 |
|
| 2533 |
<span class="grey">M.I.T. [Page 43]</span></pre> |
| 2534 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span> |
| 2535 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2536 |
|
| 2537 |
|
| 2538 |
Changes the specified dynamic parameters if the pointer |
| 2539 |
is actively grabbed by the client and the specified time |
| 2540 |
is no earlier than the last-pointer-grab time and no |
| 2541 |
later than the current server time. The interpretation |
| 2542 |
of event-mask and cursor are as in GrabPointer. The |
| 2543 |
event-mask is always augmented to include ButtonPress |
| 2544 |
and ButtonRelease. Has no effect on the passive |
| 2545 |
parameters of a GrabButton. |
| 2546 |
|
| 2547 |
GrabKeyboard |
| 2548 |
grab-window: WINDOW |
| 2549 |
owner-events: BOOL |
| 2550 |
pointer-mode, keyboard-mode: {Synchronous, Asynchronous} |
| 2551 |
time: TIMESTAMP or CurrentTime |
| 2552 |
=> |
| 2553 |
status: {Success, AlreadyGrabbed, Frozen, InvalidTime, |
| 2554 |
NotViewable} |
| 2555 |
|
| 2556 |
Errors: Window, Value |
| 2557 |
|
| 2558 |
Actively grabs control of the keyboard. Further key |
| 2559 |
events are reported only to the grabbing client. The |
| 2560 |
request overrides any active keyboard grab by this |
| 2561 |
client. |
| 2562 |
|
| 2563 |
If owner-events is False, all generated key events are |
| 2564 |
reported with respect to grab-window. If owner-events is |
| 2565 |
True, then if a generated key event would normally be |
| 2566 |
reported to this client, it is reported normally; |
| 2567 |
otherwise the event is reported with respect to the |
| 2568 |
grab-window. Both KeyPress and KeyRelease events are |
| 2569 |
always reported, independent of any event selection made |
| 2570 |
by the client. |
| 2571 |
|
| 2572 |
Pointer-mode controls further processing of pointer |
| 2573 |
events, and keyboard-mode controls further processing of |
| 2574 |
keyboard events. If the mode is Asynchronous, event |
| 2575 |
processing continues normally; if the device is currently |
| 2576 |
frozen by this client, then processing of events for the |
| 2577 |
device is resumed. If the mode is Synchronous, the |
| 2578 |
device (as seen via the protocol) appears to freeze, and |
| 2579 |
no further events for that device are generated by the |
| 2580 |
server until the grabbing client issues a releasing |
| 2581 |
AllowEvents request. Actual device changes are not lost |
| 2582 |
while the device is frozen; they are simply queued for |
| 2583 |
later processing. |
| 2584 |
|
| 2585 |
This request generates FocusIn and FocusOut events. |
| 2586 |
|
| 2587 |
The request fails with status AlreadyGrabbed if the |
| 2588 |
keyboard is actively grabbed by some other client. The |
| 2589 |
|
| 2590 |
|
| 2591 |
|
| 2592 |
<span class="grey">M.I.T. [Page 44]</span></pre> |
| 2593 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span> |
| 2594 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2595 |
|
| 2596 |
|
| 2597 |
request fails with status Frozen if the keyboard is |
| 2598 |
frozen by an active grab of another client. The request |
| 2599 |
fails with status NotViewable if grab-window is not |
| 2600 |
viewable. The request fails with status InvalidTime if |
| 2601 |
the specified time is earlier than the last-keyboard-grab |
| 2602 |
time or later than the current server time; otherwise the |
| 2603 |
last-keyboard-grab time is set to the specified time, |
| 2604 |
with CurrentTime replaced by the current server time. |
| 2605 |
|
| 2606 |
UngrabKeyboard |
| 2607 |
time: TIMESTAMP or CurrentTime |
| 2608 |
|
| 2609 |
Releases the keyboard if this client has it actively |
| 2610 |
grabbed (from either GrabKeyboard or GrabKey), and |
| 2611 |
releases any queued events. The request has no effect |
| 2612 |
if the specified time is earlier than the |
| 2613 |
last-keyboard-grab time or is later than the current |
| 2614 |
server time. |
| 2615 |
|
| 2616 |
This request generates FocusIn and FocusOut events. |
| 2617 |
|
| 2618 |
An UngrabKeyboard is performed automatically if the event |
| 2619 |
window for an active keyboard grab becomes not viewable. |
| 2620 |
|
| 2621 |
GrabKey |
| 2622 |
key: KEYCODE or AnyNonModifier |
| 2623 |
modifiers: SETofKEYMASK or AnyModifier |
| 2624 |
grab-window: WINDOW |
| 2625 |
owner-events: BOOL |
| 2626 |
pointer-mode, keyboard-mode: {Synchronous, Asynchronous} |
| 2627 |
|
| 2628 |
Errors: Window, Value, Access |
| 2629 |
|
| 2630 |
This request establishes a passive grab on the keyboard. |
| 2631 |
In the future, if the specified key (which can itself be a |
| 2632 |
modifier key) is pressed when the specified modifier keys |
| 2633 |
are down (and no other modifier keys are down), and the |
| 2634 |
KeyPress event would be generated in grab-window or one of |
| 2635 |
its inferiors, and these constraints are not satisfied for |
| 2636 |
any ancestor, then the keyboard is actively grabbed as |
| 2637 |
described in GrabKeyboard, the last-keyboard-grab time is |
| 2638 |
transmitted in set to the time at which the key was |
| 2639 |
pressed (as in the KeyPress event), and the KeyPress |
| 2640 |
event is reported. The interpretation of the remaining |
| 2641 |
arguments is as for GrabKeyboard. The active grab is |
| 2642 |
terminated automatically when the specified key has been |
| 2643 |
released (independent of the state of the modifier keys). |
| 2644 |
|
| 2645 |
A modifiers of AnyModifier is equivalent to issuing the |
| 2646 |
request for all possible modifier combinations. A key of |
| 2647 |
AnyNonModifier is equivalent to issuing the request for |
| 2648 |
|
| 2649 |
|
| 2650 |
|
| 2651 |
<span class="grey">M.I.T. [Page 45]</span></pre> |
| 2652 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span> |
| 2653 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2654 |
|
| 2655 |
|
| 2656 |
all possible non-modifier key codes. |
| 2657 |
|
| 2658 |
An Access error is generated if some other client has |
| 2659 |
issued a GrabKey with the same key combination on the |
| 2660 |
same window. When using AnyModifier or AnyNonModifier, |
| 2661 |
the request fails completely (no grabs are established) |
| 2662 |
if there is a conflicting grab for any combination. |
| 2663 |
|
| 2664 |
UngrabKey |
| 2665 |
key: KEYCODE or AnyNonModifier |
| 2666 |
modifiers: SETofKEYMASK or AnyModifier |
| 2667 |
grab-window: WINDOW |
| 2668 |
|
| 2669 |
Errors: Window |
| 2670 |
|
| 2671 |
Releases the key combination on the specified window if it |
| 2672 |
was grabbed by this client. A modifiers of AnyModifier is |
| 2673 |
equivalent to issuing the request for all possible |
| 2674 |
modifier combinations. A key of AnyNonModifier is |
| 2675 |
equivalent to issuing the request for all possible |
| 2676 |
non-modifier key codes. Has no effect on an active grab. |
| 2677 |
|
| 2678 |
AllowEvents |
| 2679 |
mode: {AsyncPointer, SyncPointer, ReplayPointer, |
| 2680 |
AsyncKeyboard, SyncKeyboard, ReplayKeyboard} |
| 2681 |
time: TIMESTAMP or CurrentTime |
| 2682 |
|
| 2683 |
Errors: Value |
| 2684 |
|
| 2685 |
Releases some queued events if the client has caused a |
| 2686 |
device to freeze. The request has no effect if the |
| 2687 |
specified time is earlier than the last-grab time of the |
| 2688 |
most recent active grab for the client, or if the |
| 2689 |
specified time is later than the current server time. |
| 2690 |
|
| 2691 |
For AsyncPointer, if the pointer is frozen by the client, |
| 2692 |
pointer event processing continues normally. If the |
| 2693 |
pointer is frozen twice by the client on behalf of two |
| 2694 |
separate grabs, AsyncPointer "thaws" for both. |
| 2695 |
AsyncPointer has no effect if the pointer is not frozen |
| 2696 |
by the client, but the pointer need not be grabbed by |
| 2697 |
the client. |
| 2698 |
|
| 2699 |
For SyncPointer, if the pointer is frozen and actively |
| 2700 |
grabbed by the client, pointer event processing continues |
| 2701 |
normally until the next ButtonPress or ButtonRelease event |
| 2702 |
is reported to the client, at which time the pointer again |
| 2703 |
appears to freeze. However if the reported event causes |
| 2704 |
the pointer grab to be released, then the pointer does not |
| 2705 |
freeze. SyncPointer has no effect if the pointer is not |
| 2706 |
frozen by the client, or if the pointer is not grabbed by |
| 2707 |
|
| 2708 |
|
| 2709 |
|
| 2710 |
<span class="grey">M.I.T. [Page 46]</span></pre> |
| 2711 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span> |
| 2712 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2713 |
|
| 2714 |
|
| 2715 |
the client. |
| 2716 |
|
| 2717 |
For ReplayPointer, if the pointer is actively grabbed by |
| 2718 |
the client and is frozen as the result of an event having |
| 2719 |
been sent to the client (either from the activation of a |
| 2720 |
GrabButton, or from a previous AllowEvents with mode |
| 2721 |
SyncPointer, but not from a GrabPointer), then the pointer |
| 2722 |
grab is released and that event is completely reprocessed, |
| 2723 |
but this time ignoring any passive grabs at or above |
| 2724 |
(towards the root) the grab-window of the grab just |
| 2725 |
released. The request has no effect if the pointer is |
| 2726 |
not grabbed by the client, or if the pointer is not |
| 2727 |
frozen as the result of an event. |
| 2728 |
|
| 2729 |
For AsyncKeyboard, if the keyboard is frozen by the |
| 2730 |
client, keyboard event processing continues normally. If |
| 2731 |
the pointer is frozen twice by the client on behalf of |
| 2732 |
two separate grabs, AsyncPointer "thaws" for both. |
| 2733 |
AsyncKeyboard has no effect if the keyboard is not |
| 2734 |
frozen by the client, but the keyboard need not be |
| 2735 |
grabbed by the client. |
| 2736 |
|
| 2737 |
For SyncKeyboard, if the keyboard is frozen and actively |
| 2738 |
grabbed by the client, keyboard event processing |
| 2739 |
continues normally until the next KeyPress or KeyRelease |
| 2740 |
event is reported to the client, at which time the |
| 2741 |
keyboard again appears to freeze. However if the |
| 2742 |
reported event causes the keyboard grab to be released, |
| 2743 |
then the keyboard does not freeze. SyncKeyboard has no |
| 2744 |
effect if the keyboard is not frozen by the client, or |
| 2745 |
if the keyboard is not grabbed by the client. |
| 2746 |
|
| 2747 |
For ReplayKeyboard, if the keyboard is actively grabbed |
| 2748 |
by the client and is frozen as the result of an event |
| 2749 |
having been sent to the client (either from the |
| 2750 |
activation of a GrabKey, or from a previous AllowEvents |
| 2751 |
with mode SyncKeyboard, but not from a GrabKeyboard), |
| 2752 |
then the keyboard grab is released and that event is |
| 2753 |
completely reprocessed, but this time ignoring any passive |
| 2754 |
grabs at or above (towards the root) the grab-window of |
| 2755 |
the grab just released. The request has no effect if the |
| 2756 |
keyboard is not grabbed by the client, or if the keyboard |
| 2757 |
is notfrozen as the result of an event. |
| 2758 |
|
| 2759 |
AsyncPointer, SyncPointer, and Replay Pointer have no |
| 2760 |
effect on processing of keyboard events. AsyncKeyboard, |
| 2761 |
SyncKeyboard, and ReplayKeyboard have no effect on |
| 2762 |
processing of pointer events. |
| 2763 |
|
| 2764 |
It is possible for both a pointer grab and a keyboard grab |
| 2765 |
to be active simultaneously (by the same or different |
| 2766 |
|
| 2767 |
|
| 2768 |
|
| 2769 |
<span class="grey">M.I.T. [Page 47]</span></pre> |
| 2770 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span> |
| 2771 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2772 |
|
| 2773 |
|
| 2774 |
clients). If a device is frozen on behalf of either grab, |
| 2775 |
no event processing is performed for the device. It is |
| 2776 |
possible for a single device to be frozen due to both |
| 2777 |
grabs. In this case, the freeze must be released on |
| 2778 |
behalf of both grabs before events can again be |
| 2779 |
processed. |
| 2780 |
|
| 2781 |
GrabServer |
| 2782 |
Disables processing of requests and close-downs on all |
| 2783 |
other connections (than the one this request arrived on). |
| 2784 |
|
| 2785 |
UngrabServer |
| 2786 |
Restarts processing of requests and close-downs on other |
| 2787 |
connections. |
| 2788 |
|
| 2789 |
QueryPointer |
| 2790 |
window: WINDOW |
| 2791 |
=> |
| 2792 |
root: WINDOW |
| 2793 |
child: WINDOW or None |
| 2794 |
same-screen: BOOL |
| 2795 |
root-x, root-y, win-x, win-y: INT16 |
| 2796 |
mask: SETofKEYBUTMASK |
| 2797 |
|
| 2798 |
Errors: Window |
| 2799 |
|
| 2800 |
The root window the pointer is currently on, and pointer |
| 2801 |
coordinates relative to the root's origin, are returned. |
| 2802 |
If same-screen is False, then the pointer is not on the |
| 2803 |
same screen as the argument window, and child is None and |
| 2804 |
win-x and win-y are zero. If same-screen is True, then |
| 2805 |
win-x and win-y are the pointer coordinates relative to |
| 2806 |
the argument window's origin, and child is the child |
| 2807 |
containing the pointer, if any. The current state of the |
| 2808 |
modifier keys and the buttons are also returned. |
| 2809 |
|
| 2810 |
GetMotionEvents |
| 2811 |
start, stop: TIMESTAMP or CurrentTime |
| 2812 |
window: WINDOW |
| 2813 |
=> |
| 2814 |
events: LISTofTIMECOORD |
| 2815 |
|
| 2816 |
where |
| 2817 |
TIMECOORD: {x, y: CARD16 |
| 2818 |
time: TIMESTAMP} |
| 2819 |
|
| 2820 |
Error: Window |
| 2821 |
|
| 2822 |
Returns all events in the motion history buffer that fall |
| 2823 |
between the specified start and stop times (inclusive) |
| 2824 |
and that have coordinates that lie within (including |
| 2825 |
|
| 2826 |
|
| 2827 |
|
| 2828 |
<span class="grey">M.I.T. [Page 48]</span></pre> |
| 2829 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span> |
| 2830 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2831 |
|
| 2832 |
|
| 2833 |
borders) the specified window at its present placement. |
| 2834 |
The x and y coordinates are reported relative to the |
| 2835 |
origin of the window. |
| 2836 |
|
| 2837 |
TranslateCoordinates |
| 2838 |
src-window, dst-window: WINDOW |
| 2839 |
src-x, src-y: INT16 |
| 2840 |
=> |
| 2841 |
same-screen: BOOL |
| 2842 |
child: WINDOW or None |
| 2843 |
dst-x, dst-y: INT16 |
| 2844 |
|
| 2845 |
Errors: Window |
| 2846 |
|
| 2847 |
The src-x and src-y coordinates are taken relative to |
| 2848 |
src-window's origin, and returned as dst-x and dst-y |
| 2849 |
coordinates relative to dst-window's origin. If |
| 2850 |
same-screen is False, then src-window and dst-window are |
| 2851 |
on different screens, and dst-x and dst-y are zero. If |
| 2852 |
the coordinates are contained in a mapped child of |
| 2853 |
dst-window, then that child is returned. |
| 2854 |
|
| 2855 |
WarpPointer |
| 2856 |
src-window: WINDOW or None |
| 2857 |
dst-window: WINDOW |
| 2858 |
src-x, src-y: INT16 |
| 2859 |
src-width, src-height: CARD16 |
| 2860 |
dst-x, dst-y: INT16 |
| 2861 |
|
| 2862 |
Errors: Window |
| 2863 |
|
| 2864 |
Moves the pointer to [dst-x, dst-y] relative to |
| 2865 |
dst-window's origin. If src-window is None, the move is |
| 2866 |
independent of the current pointer position, but if a |
| 2867 |
window is specified, the move only takes place if the |
| 2868 |
pointer is currently contained in a visible portion of |
| 2869 |
the specified rectangle of the src-window. |
| 2870 |
|
| 2871 |
The src-x and src-y coordinates are relative to |
| 2872 |
src-window's origin. If src-height is zero, it is |
| 2873 |
replaced with the current height of src-window minus |
| 2874 |
src-y. If src-width is zero, it is replaced with the |
| 2875 |
current width of src-window minus src-x. |
| 2876 |
|
| 2877 |
This request cannot be used to move the pointer outside |
| 2878 |
the confine-to window of an active pointer grab; an |
| 2879 |
attempt will only move the pointer as far as the closest |
| 2880 |
edge of the confine-to window. |
| 2881 |
|
| 2882 |
|
| 2883 |
|
| 2884 |
|
| 2885 |
|
| 2886 |
|
| 2887 |
<span class="grey">M.I.T. [Page 49]</span></pre> |
| 2888 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span> |
| 2889 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2890 |
|
| 2891 |
|
| 2892 |
SetInputFocus |
| 2893 |
focus: WINDOW or PointerRoot or None |
| 2894 |
revert-to: {Parent, PointerRoot, None} |
| 2895 |
time: TIMESTAMP or CurrentTime |
| 2896 |
|
| 2897 |
Errors: Window, Value |
| 2898 |
|
| 2899 |
Changes the input focus and the last-focus-change time. |
| 2900 |
The request has no effect if the specified time is earlier |
| 2901 |
than the current last-focus-change time or is later than |
| 2902 |
the current server time; otherwise, the last-focus-change |
| 2903 |
time is set to the specified time, with CurrentTime |
| 2904 |
replaced by the current server time. |
| 2905 |
|
| 2906 |
If None is specified as the focus, all keyboard events are |
| 2907 |
discarded until a new focus window is set. In this case, |
| 2908 |
therevert-to argument is ignored. |
| 2909 |
|
| 2910 |
If a window is specified as the focus, it becomes the |
| 2911 |
keyboard's focus window. If a generated keyboard event |
| 2912 |
would normally be reported to this window or one of its |
| 2913 |
inferiors, the event is reported normally; otherwise, the |
| 2914 |
event is reported with respect to the focus window. |
| 2915 |
|
| 2916 |
If PointerRoot is specified as the focus, the focus |
| 2917 |
window is dynamically taken to be the root window of |
| 2918 |
whatever screen the pointer is on at each keyboard event. |
| 2919 |
In this case, the revert-to argument is ignored. |
| 2920 |
|
| 2921 |
This request generates FocusIn and FocusOut events. |
| 2922 |
|
| 2923 |
If the focus window becomes not viewable, the new focus |
| 2924 |
window depends on the revert-to argument. If revert-to |
| 2925 |
is Parent, the focus reverts to the parent (or the |
| 2926 |
closest viewable ancestor) and the new revert-to value is |
| 2927 |
take to be None. If revert-to is PointerRoot or None, |
| 2928 |
the focus reverts to that value. When the focus reverts, |
| 2929 |
FocusIn and FocusOut events are generated, but the |
| 2930 |
last-focus-change time is not affected. |
| 2931 |
|
| 2932 |
GetInputFocus |
| 2933 |
=> |
| 2934 |
focus: WINDOW or PointerRoot or None |
| 2935 |
revert-to: {Parent, PointerRoot, None} |
| 2936 |
|
| 2937 |
Returns the current focus state. |
| 2938 |
|
| 2939 |
QueryKeymap |
| 2940 |
=> |
| 2941 |
keys: LISTofCARD8 |
| 2942 |
|
| 2943 |
|
| 2944 |
|
| 2945 |
|
| 2946 |
<span class="grey">M.I.T. [Page 50]</span></pre> |
| 2947 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span> |
| 2948 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 2949 |
|
| 2950 |
|
| 2951 |
Returns a bit vector for the keyboard; each one bit |
| 2952 |
indicates that the corresponding key is currently pressed. |
| 2953 |
The vector is represented as 32 bytes. Byte N (from 0) |
| 2954 |
contains the bits for keys 8N to 8N+7, with the least |
| 2955 |
significant bit in the byte representing key 8N. |
| 2956 |
|
| 2957 |
OpenFont |
| 2958 |
fid: FONT |
| 2959 |
name: STRING8 |
| 2960 |
|
| 2961 |
Errors: IDChoice, Name, Alloc |
| 2962 |
|
| 2963 |
Loads the specified font, if necessary, and associates |
| 2964 |
identifier fid with it. The font can be used as a source |
| 2965 |
for any drawable. The font name should use the ASCII |
| 2966 |
encoding, and upper/lower case does not matter. |
| 2967 |
|
| 2968 |
CloseFont |
| 2969 |
font: FONT |
| 2970 |
|
| 2971 |
Errors: Font |
| 2972 |
|
| 2973 |
Deletes the association between the resource id and the |
| 2974 |
font. The font itself will be freed when no other |
| 2975 |
resource references it. |
| 2976 |
|
| 2977 |
QueryFont |
| 2978 |
font: FONT or GCONTEXT |
| 2979 |
=> |
| 2980 |
font-info: FONTINFO |
| 2981 |
char-infos: LISTofCHARINFO |
| 2982 |
|
| 2983 |
where |
| 2984 |
FONTINFO: [draw-direction: {LeftToRight, RightToLeft} |
| 2985 |
min-char-or-byte2,max-char-or-byte2:CARD16 |
| 2986 |
min-byte1, max-byte1: CARD8 |
| 2987 |
all-chars-exist: BOOL |
| 2988 |
default-char: CARD16 |
| 2989 |
min-bounds: CHARINFO |
| 2990 |
max-bounds: CHARINFO |
| 2991 |
font-ascent: INT16 |
| 2992 |
font-descent: INT16 |
| 2993 |
properties: LISTofFONTPROP] |
| 2994 |
FONTPROP: [name: ATOM |
| 2995 |
value: INT32 or CARD32] |
| 2996 |
CHARINFO: [left-side-bearing: INT16 |
| 2997 |
right-side-bearing: INT16 |
| 2998 |
character-width: INT16 |
| 2999 |
ascent: INT16 |
| 3000 |
descent: INT16 |
| 3001 |
attributes: CARD16] |
| 3002 |
|
| 3003 |
|
| 3004 |
|
| 3005 |
<span class="grey">M.I.T. [Page 51]</span></pre> |
| 3006 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span> |
| 3007 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3008 |
|
| 3009 |
|
| 3010 |
Errors: Font |
| 3011 |
|
| 3012 |
Returns logical information about a font. |
| 3013 |
|
| 3014 |
The draw-direction is essentially just a hint, indicating |
| 3015 |
whether most char-infos have a positive (LeftToRight) or a |
| 3016 |
negative (RightToLeft) character-width metric. The core |
| 3017 |
protocol defines no support for vertical text. |
| 3018 |
|
| 3019 |
If min-byte1 and max-byte1 are both zero, then |
| 3020 |
min-char-or-byte2 specifies the linear character index |
| 3021 |
corresponding to the first elementb of char-infos, and |
| 3022 |
max-char-or-byte2 specifies the linear character index of |
| 3023 |
the last element. If either min-byte1 or max-byte1 are |
| 3024 |
non-zero, then both min-char-or-byte2 and |
| 3025 |
max-char-or-byte2 will be less than 256, and the two-byte |
| 3026 |
character index values corresponding to char-infos element |
| 3027 |
N (counting from 0) are |
| 3028 |
byte1 = N/D + min-byte1 |
| 3029 |
byte2 = N\D + min-char-or-byte2 |
| 3030 |
where |
| 3031 |
D = max-char-or-byte2 - min-char-or-byte2 + 1 |
| 3032 |
/ = integer division |
| 3033 |
\ = integer modulus |
| 3034 |
|
| 3035 |
If char-infos has length zero, then min-bounds and |
| 3036 |
max-bounds will be identical, and the effective |
| 3037 |
char-infos is one filled with this char-info, of length |
| 3038 |
L = D * (max-byte1 - min-byte1 + 1) |
| 3039 |
That is, all glyphs in the specified linear or matrix |
| 3040 |
range have the same information, as given by min-bounds |
| 3041 |
(and max-bounds). If all-chars-exist is True, then all |
| 3042 |
characters in char-infos have non-zero bounding boxes. |
| 3043 |
|
| 3044 |
The default-char specifies the character that will be |
| 3045 |
used when an undefined or non-existent character is used. |
| 3046 |
Note that default-char is a CARD16 (not CHAR2B); for a |
| 3047 |
font using two-byte matrix format, the default-char has |
| 3048 |
byte1 in the most significant byte, and byte2 in the |
| 3049 |
least significant byte. If the default-char itself |
| 3050 |
specifies an undefined or non-existent character, then |
| 3051 |
no printing is performed for an undefined or non-existent |
| 3052 |
character. |
| 3053 |
|
| 3054 |
The min-bounds and max-bounds contain the minimum and |
| 3055 |
maximum values of each individual CHARINFO component over |
| 3056 |
all char-infos (ignoring non-existent characters). The |
| 3057 |
bounding box of the font, i.e., the smallest rectangle |
| 3058 |
enclosing the shape obtained by superimposing all |
| 3059 |
characters at the same origin [x,y], has its upper left |
| 3060 |
coordinate at |
| 3061 |
|
| 3062 |
|
| 3063 |
|
| 3064 |
<span class="grey">M.I.T. [Page 52]</span></pre> |
| 3065 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span> |
| 3066 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3067 |
|
| 3068 |
|
| 3069 |
[x + min-bounds.left-side-bearing, y - max-bounds. |
| 3070 |
ascent] with a width of |
| 3071 |
max-bounds.right-side-bearing - min-bounds. |
| 3072 |
left-side-bearing and a height of |
| 3073 |
max-bounds.ascent + max-bounds.descent |
| 3074 |
|
| 3075 |
The font-ascent is the logical extent of the font above |
| 3076 |
the baseline, for determining line spacing. Specific |
| 3077 |
characters may extend beyond this. The font-descent is |
| 3078 |
the logical extent of the font at or below the baseline, |
| 3079 |
for determining line spacing. Specific characters may |
| 3080 |
extend beyond this. If the baseline is at Y-coordinate |
| 3081 |
y, then the logical extent of the font is inclusive |
| 3082 |
between the Y-coordinate values (y - font-ascent) and |
| 3083 |
(y + font-descent - 1). |
| 3084 |
|
| 3085 |
A font is not guaranteed to have any properties. Whether |
| 3086 |
a property value is signed or unsigned must be derived |
| 3087 |
from a prior knowledge of the property. When possible, |
| 3088 |
fonts should have at least the following properties (note |
| 3089 |
that the trailing colon is not part of the name, and that |
| 3090 |
upper/lower case matters). |
| 3091 |
|
| 3092 |
MIN_SPACE: CARD32 |
| 3093 |
The minimum interword spacing, in pixels. |
| 3094 |
NORM_SPACE: CARD32 |
| 3095 |
The normal interword spacing, in pixels. |
| 3096 |
MAX_SPACE: CARD32 |
| 3097 |
The maximum interword spacing, in pixels |
| 3098 |
SUBSCRIPT_X: INT32 |
| 3099 |
SUBSCRIPT_Y: INT32 |
| 3100 |
Offsets from the character origin where subscripts |
| 3101 |
should begin, in pixels. If the origin is at [x,y], |
| 3102 |
then subscripts should begin at [x + SubscriptX, |
| 3103 |
y + SubscriptY]. |
| 3104 |
UNDERLINE_POSITION: INT32 |
| 3105 |
Y offset from the baseline to the top of an underline, |
| 3106 |
in pixels. If the baseline is Y-coordinate y, then |
| 3107 |
the top of the underline is at (y + |
| 3108 |
UnderlinePosition). |
| 3109 |
UNDERLINE_THICKNESS: CARD32 |
| 3110 |
Thickness of the underline, in pixels. |
| 3111 |
STRIKEOUT_ASCENT: INT32 |
| 3112 |
STRIKEOUT_DESCENT: INT32 |
| 3113 |
Vertical extents for boxing or voiding characters, in |
| 3114 |
pixels. If the baseline is at Y-coordinate y, then |
| 3115 |
the top of the strikeout box is at (y - |
| 3116 |
StrikeoutAscent), and the height of the box is |
| 3117 |
(StrikeoutAscent + StrikeoutDescent). |
| 3118 |
ITALIC_ANGLE: INT32 |
| 3119 |
The angle of characters in the font, in degrees |
| 3120 |
|
| 3121 |
|
| 3122 |
|
| 3123 |
<span class="grey">M.I.T. [Page 53]</span></pre> |
| 3124 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span> |
| 3125 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3126 |
|
| 3127 |
|
| 3128 |
scaled by 64, relative to the three-oclock position |
| 3129 |
from the character origin, with positive indicating |
| 3130 |
counterclockwise motion (as in Arc requests). |
| 3131 |
X_HEIGHT: INT32 |
| 3132 |
"1 ex" as in TeX, but expressed in units of pixels. |
| 3133 |
Often the height of lowercase x. |
| 3134 |
QUAD_WIDTH: INT32 |
| 3135 |
"1 em" as in TeX, but expressed in units of pixels. |
| 3136 |
Often the width of the digits 0-9. |
| 3137 |
WEIGHT: CARD32 |
| 3138 |
The weight or boldness of the font, expressed as a |
| 3139 |
value between 0 and 1000. |
| 3140 |
POINT_SIZE: CARD32 |
| 3141 |
The point size, expressed in 1/10ths, of this font at |
| 3142 |
the ideal resolution. There are 72.27 points to the |
| 3143 |
inch. |
| 3144 |
RESOLUTION: CARD32 |
| 3145 |
The number of pixels per point, expressed in 1/100ths, |
| 3146 |
at which this font was created. |
| 3147 |
|
| 3148 |
For a character origin at [x,y], the bounding box of a |
| 3149 |
character,i.e., the smallest rectangle enclosing the |
| 3150 |
character's shape, described in terms of CHARINFO |
| 3151 |
components, is a rectangle with its upper left corner at |
| 3152 |
[x + left-side-bearing, y - ascent] |
| 3153 |
with a width of |
| 3154 |
right-side-bearing - left-side-bearing |
| 3155 |
and a height of |
| 3156 |
ascent + descent |
| 3157 |
and the origin for the next character is defined to be |
| 3158 |
[x + character-width, y] |
| 3159 |
Note that the baseline is logically viewed as being just |
| 3160 |
below non-descending characters (when descent is zero, |
| 3161 |
only pixels with Y-coordinates less than y are drawn), |
| 3162 |
and that the origin is logically viewed as being |
| 3163 |
coincident with the left edge of a non-kerned character |
| 3164 |
(when left-side-bearing is zero, no pixels with |
| 3165 |
X-coordinate less than x are drawn). |
| 3166 |
|
| 3167 |
Note that CHARINFO metric values can be negative. |
| 3168 |
|
| 3169 |
A non-existent character is represented with all CHARINFO |
| 3170 |
components zero. |
| 3171 |
|
| 3172 |
The interpretation of the per-character attributes field |
| 3173 |
is undefined by the core protocol. |
| 3174 |
|
| 3175 |
QueryTextExtents |
| 3176 |
font: FONT or GCONTEXT |
| 3177 |
items: STRING16 |
| 3178 |
=> |
| 3179 |
|
| 3180 |
|
| 3181 |
|
| 3182 |
<span class="grey">M.I.T. [Page 54]</span></pre> |
| 3183 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span> |
| 3184 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3185 |
|
| 3186 |
|
| 3187 |
draw-direction: {LeftToRight, RightToLeft} |
| 3188 |
font-ascent: INT16 |
| 3189 |
font-descent: INT16 |
| 3190 |
overall-ascent: INT16 |
| 3191 |
overall-descent: INT16 |
| 3192 |
overall-width: INT32 |
| 3193 |
overall-left: INT32 |
| 3194 |
overall-right: INT32 |
| 3195 |
|
| 3196 |
Errors: Font |
| 3197 |
|
| 3198 |
Returns the logical extents of the specified string of |
| 3199 |
characters in the specified font. Draw-direction, |
| 3200 |
font-ascent, and font-descent are as described in |
| 3201 |
QueryFont. Overall-ascent is the maximum of the ascent |
| 3202 |
metrics of all characters in the string, and |
| 3203 |
overall-descent is the maximum of the descent metrics. |
| 3204 |
Overall-width is the sum of the character-width metrics |
| 3205 |
of all characters in the string. For each character in |
| 3206 |
the string, let W be the sum of the character-width |
| 3207 |
metrics of all characters preceding it in the string, |
| 3208 |
let L be the left-side-bearing metric of the character |
| 3209 |
plus W, and let R be the right-side-bearing metric of |
| 3210 |
the character plus W. Overall-left is the minimum L of |
| 3211 |
all characters in the string, and overall-right is the |
| 3212 |
maximum R. |
| 3213 |
|
| 3214 |
For fonts defined with linear indexing rather than |
| 3215 |
two-byte matrix indexing, the server will interpret each |
| 3216 |
CHAR2B as a 16-bit number that has been transmitted most |
| 3217 |
significant byte first (i.e., byte1 of the CHAR2B is |
| 3218 |
taken as the most significant byte). |
| 3219 |
|
| 3220 |
If the font has no defined default-char, then undefined |
| 3221 |
characters in the string are taken to have all zero |
| 3222 |
metrics. |
| 3223 |
ListFonts |
| 3224 |
pattern: STRING8 |
| 3225 |
max-names: CARD16 |
| 3226 |
=> |
| 3227 |
names: LISTofSTRING8 |
| 3228 |
|
| 3229 |
Returns a list of length at most max-names, of names of |
| 3230 |
fonts matching the pattern. The pattern should use the |
| 3231 |
ASCII encoding, and upper/lower case does not matter. |
| 3232 |
In the pattern, the '?' character (octal value 77) will |
| 3233 |
match any single character, and the character '*' (octal |
| 3234 |
value 52) will match any number of characters. The |
| 3235 |
returned names are in lower case. |
| 3236 |
|
| 3237 |
|
| 3238 |
|
| 3239 |
|
| 3240 |
|
| 3241 |
<span class="grey">M.I.T. [Page 55]</span></pre> |
| 3242 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span> |
| 3243 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3244 |
|
| 3245 |
|
| 3246 |
ListFontsWithInfo |
| 3247 |
pattern: STRING8 |
| 3248 |
max-names: CARD16 |
| 3249 |
=> |
| 3250 |
fonts: LISTofFONTDATA |
| 3251 |
|
| 3252 |
where |
| 3253 |
FONTDATA: [name: STRING8 |
| 3254 |
info: FONTINFO] |
| 3255 |
FONTINFO: <same type definition as in QueryFont> |
| 3256 |
|
| 3257 |
Like ListFonts, but also returns information about each |
| 3258 |
font. The information returned for each font is |
| 3259 |
identical to what QueryFont would return (except that the |
| 3260 |
per-character metrics are not returned). |
| 3261 |
|
| 3262 |
SetFontPath |
| 3263 |
path: LISTofSTRING8 |
| 3264 |
|
| 3265 |
Errors: Value |
| 3266 |
|
| 3267 |
Defines the search path for font lookup. There is only one |
| 3268 |
search path per server, not one per client. The |
| 3269 |
interpretation of the strings is operating system dependent, |
| 3270 |
but they are intended to specify directories to be |
| 3271 |
searched in the order listed. |
| 3272 |
|
| 3273 |
Setting the path to the empty list restores the default |
| 3274 |
path defined for the server. |
| 3275 |
|
| 3276 |
As a side-effect of executing this request, the server |
| 3277 |
is guaranteed to flush all cached information about fonts |
| 3278 |
for which there currently are no explicit resource ids |
| 3279 |
allocated. |
| 3280 |
|
| 3281 |
The meaning of an error from this request is system |
| 3282 |
specific. |
| 3283 |
|
| 3284 |
GetFontPath |
| 3285 |
=> |
| 3286 |
path: LISTofSTRING8 |
| 3287 |
|
| 3288 |
Returns the current search path for fonts. |
| 3289 |
|
| 3290 |
CreatePixmap |
| 3291 |
pid: PIXMAP |
| 3292 |
drawable: DRAWABLE |
| 3293 |
depth: CARD8 |
| 3294 |
width, height: CARD16 |
| 3295 |
|
| 3296 |
Errors: IDChoice, Drawable, Value, Alloc |
| 3297 |
|
| 3298 |
|
| 3299 |
|
| 3300 |
<span class="grey">M.I.T. [Page 56]</span></pre> |
| 3301 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span> |
| 3302 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3303 |
|
| 3304 |
|
| 3305 |
Creates a pixmap, and assigns the identifier pid to it. |
| 3306 |
Width and height must be non-zero. Depth must be one of |
| 3307 |
the depths supported by root of the specified drawable. |
| 3308 |
The initial contents of the pixmap are undefined. |
| 3309 |
|
| 3310 |
It is legal to pass an InputOnly window as a drawable to |
| 3311 |
this request. |
| 3312 |
|
| 3313 |
FreePixmap |
| 3314 |
pixmap: PIXMAP |
| 3315 |
|
| 3316 |
Errors: Pixmap |
| 3317 |
|
| 3318 |
Deletes the association between the resource id and the |
| 3319 |
pixmap. The pixmap storage will be freed when no other |
| 3320 |
resource references it. |
| 3321 |
|
| 3322 |
CreateGC |
| 3323 |
cid: GCONTEXT |
| 3324 |
drawable: DRAWABLE |
| 3325 |
value-mask: BITMASK |
| 3326 |
value-list: LISTofVALUE |
| 3327 |
|
| 3328 |
Errors: IDChoice, Drawable, Pixmap, Font, Match, Value, Alloc |
| 3329 |
|
| 3330 |
Creates a graphics context, and assigns the identifier cid to |
| 3331 |
it. The gcontext can be used with any destination drawable |
| 3332 |
having the same root and depth as the specified drawable. |
| 3333 |
|
| 3334 |
The value-mask and value-list specify which components are to |
| 3335 |
be explicitly initialized. The context components are: |
| 3336 |
|
| 3337 |
alu-function: {Clear, And, AndReverse, Copy, AndInverted, |
| 3338 |
Noop, Xor, Or, Nor, Equiv, Invert, |
| 3339 |
OrReverse, CopyInverted, OrInverted, |
| 3340 |
Nand, Set} |
| 3341 |
plane-mask: CARD32 |
| 3342 |
foreground: CARD32 |
| 3343 |
background: CARD32 |
| 3344 |
line-width: CARD16 |
| 3345 |
line-style: {Solid, OnOffDash, DoubleDash} |
| 3346 |
cap-style: {NotLast, Butt, Round, Projecting} |
| 3347 |
join-style: {Miter, Round, Bevel} |
| 3348 |
fill-style: {Solid, Tiled, OpaqueStippled, Stippled} |
| 3349 |
fill-rule: {EvenOdd, Winding} |
| 3350 |
arc-mode: {Chord, PieSlice} |
| 3351 |
tile: PIXMAP |
| 3352 |
stipple: PIXMAP |
| 3353 |
tile-stipple-x-origin: INT16 |
| 3354 |
tile-stipple-y-origin: INT16 |
| 3355 |
font: FONT |
| 3356 |
|
| 3357 |
|
| 3358 |
|
| 3359 |
<span class="grey">M.I.T. [Page 57]</span></pre> |
| 3360 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span> |
| 3361 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3362 |
|
| 3363 |
|
| 3364 |
subwindow-mode: {ClipByChildren, IncludeInferiors} |
| 3365 |
graphics-exposures: BOOL |
| 3366 |
clip-x-origin: INT16 |
| 3367 |
clip-y-origin: INT16 |
| 3368 |
clip-mask: PIXMAP or None |
| 3369 |
dash-offset: CARD16 |
| 3370 |
dash-list: CARD8 |
| 3371 |
|
| 3372 |
In graphics operations, given a source and destination pixel, |
| 3373 |
the result is computed bitwise on corresponding bits of the |
| 3374 |
pixels. That is, a boolean operation is performed in each |
| 3375 |
bit plane. The plane-mask restricts the operation to a subset |
| 3376 |
of planes. That is, the result is |
| 3377 |
|
| 3378 |
((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask)) |
| 3379 |
|
| 3380 |
Range checking is not performed on the values for foreground, |
| 3381 |
background, or plane-mask; they are simply truncated to the |
| 3382 |
appropriate number of bits. |
| 3383 |
|
| 3384 |
The meanings of the alu-functions are: |
| 3385 |
|
| 3386 |
Clear 0 |
| 3387 |
And src AND dst |
| 3388 |
AndReverse src AND (NOT dst) |
| 3389 |
Copy src |
| 3390 |
AndInverted (NOT src) AND dst |
| 3391 |
NoOp dst |
| 3392 |
Xor src XOR dst |
| 3393 |
Or src OR dst |
| 3394 |
Nor (NOT src) AND (NOT dst) |
| 3395 |
Equiv (NOT src) XOR dst |
| 3396 |
Invert NOT dst |
| 3397 |
OrReverse src OR (NOT dst) |
| 3398 |
CopyInverted NOT src |
| 3399 |
OrInverted (NOT src) OR dst |
| 3400 |
NAnd (NOT src) OR (NOT dst) |
| 3401 |
Set 1 |
| 3402 |
|
| 3403 |
Line-width is measured in pixels and can be greater than or |
| 3404 |
equal to one (a "wide" line) or the special value zero (a |
| 3405 |
"thin" line). |
| 3406 |
|
| 3407 |
Wide lines are drawn centered on the path described by the |
| 3408 |
graphics request. Unless otherwise specified by the join or |
| 3409 |
cap style, the bounding box of a wide line with endpoints |
| 3410 |
[x1, y1], [x2, y2], and width w is a rectangle with vertices |
| 3411 |
at the following real coordinates: |
| 3412 |
|
| 3413 |
[x1-(w*sn/2), y1+(w*cs/2)], [x1+(w*sn/2), y1-(w*cs/2)], |
| 3414 |
[x2-(w*sn/2), y2+(w*cs/2)], [x2+(w*sn/2), y2-(w*cs/2)] |
| 3415 |
|
| 3416 |
|
| 3417 |
|
| 3418 |
<span class="grey">M.I.T. [Page 58]</span></pre> |
| 3419 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span> |
| 3420 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3421 |
|
| 3422 |
|
| 3423 |
where sn is the sine of the angle of the line and cs is the |
| 3424 |
cosine of the angle of the line. A pixel is part of the line |
| 3425 |
(and hence drawn) if the center of the pixel is fully inside |
| 3426 |
the bounding box (which is viewed as having infinitely thin |
| 3427 |
edges). If the center of the pixel is exactly on the |
| 3428 |
bounding box, it is part of the line if and only if the |
| 3429 |
interior is immediately to its right (x increasing |
| 3430 |
direction). Pixels with centers on a horizontal edge are a |
| 3431 |
special case and are part of the line if and only if the |
| 3432 |
interior is immediately below (y increasing direction). |
| 3433 |
Note that this description is a mathematical model |
| 3434 |
describing the pixels that are drawn for a wide line and |
| 3435 |
does not imply that trigonometry is required to implement |
| 3436 |
such a model. Real or fixed point arithmetic is |
| 3437 |
recommended for computing the corners of the line endpoints |
| 3438 |
for lines greater than one pixel in width. |
| 3439 |
|
| 3440 |
Thin lines (zero line-width) are "one pixel wide" lines drawn |
| 3441 |
using an unspecified, device dependent algorithm (for |
| 3442 |
example, Bresenham). There are only two constraints on this |
| 3443 |
algorithm. First, if a line is drawn unclipped from [x1,y1] |
| 3444 |
to [x2,y2] and another line is drawn unclipped from [x1+dx, |
| 3445 |
y1+dy] to [x2+dx,y2+dy], then a point [x,y] is touched by |
| 3446 |
drawing the first line if and only if the point [x+dx,y+dy] |
| 3447 |
is touched by drawing the second line. Second, the effective |
| 3448 |
set of points comprising a line cannot be affected by |
| 3449 |
clipping; that is, a point is touched in a clipped line if |
| 3450 |
and only if the point lies inside the clipping region and |
| 3451 |
the point would be touched by the line when drawn unclipped. |
| 3452 |
|
| 3453 |
Note that a wide line drawn from [x1,y1] to [x2,y2] always |
| 3454 |
draws the same pixels as a wide line drawn from [x2,y2] to |
| 3455 |
[x1,y1], not counting cap and join styles, but this property |
| 3456 |
is not guaranteed for thin lines. Also note that "jags" in |
| 3457 |
adjacent wide lines will always line up properly, but this |
| 3458 |
property is not guaranteed for thin lines. A line-width of |
| 3459 |
zero differs from a line-width of one in which pixels are |
| 3460 |
drawn. In general, drawing a thin line will be faster than |
| 3461 |
drawing a wide line of width one, but thin lines may not mix |
| 3462 |
well aesthetically desirable to obtain precise and uniform |
| 3463 |
results across all displays, a client should always use a |
| 3464 |
line-width of one, rather than a line-width of zero. |
| 3465 |
|
| 3466 |
The line-style defines which segments of a line are drawn: |
| 3467 |
Solid: the full path of the line is drawn |
| 3468 |
DoubleDash: the full path of the line is drawn, but the |
| 3469 |
segments defined by the even dashes are |
| 3470 |
filled differently than the segments defined |
| 3471 |
by the odd dashes (see fill-style) |
| 3472 |
OnOffDash: only the segments defined by the even dashes |
| 3473 |
are drawn, and cap-style applies to each |
| 3474 |
|
| 3475 |
|
| 3476 |
|
| 3477 |
<span class="grey">M.I.T. [Page 59]</span></pre> |
| 3478 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span> |
| 3479 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3480 |
|
| 3481 |
|
| 3482 |
individual segment (except NotLast is treated |
| 3483 |
as Butt for internal caps) |
| 3484 |
|
| 3485 |
The cap-style defines how the endpoints of a path are drawn: |
| 3486 |
NotLast: equivalent to Butt, except that for a |
| 3487 |
line-width of zero or one the final endpoint is |
| 3488 |
not drawn |
| 3489 |
Butt: square at the endpoint, with no projection beyond |
| 3490 |
Round: a circular arc with diameter equal to the |
| 3491 |
line-width, centered on the endpoint; equivalent |
| 3492 |
to Butt for line-width zero or one |
| 3493 |
Projecting: square at the end, but the path continues |
| 3494 |
beyond the endpoint for a distance equal to |
| 3495 |
half the line-width; equivalent to Butt for |
| 3496 |
line-width zero or one |
| 3497 |
|
| 3498 |
The join-style defines how corners are drawn for wide lines: |
| 3499 |
Miter: the outer edges of the two lines extend to meet at |
| 3500 |
an angle |
| 3501 |
Round: a circular arc with diameter equal to the |
| 3502 |
line-width, centered on the joinpoint |
| 3503 |
Bevel: Butt endpoint styles, and then the triangular |
| 3504 |
"notch" filled |
| 3505 |
|
| 3506 |
The tile/stipple and clip origins are interpreted relative to |
| 3507 |
the origin of whatever destination drawable is specified in a |
| 3508 |
graphics request. |
| 3509 |
|
| 3510 |
The tile pixmap must have the same root and depth as the |
| 3511 |
gcontext (else a Match error). The stipple pixmap must have |
| 3512 |
depth one, and must have the same root as the gcontext (else |
| 3513 |
a Match error). For stipple operations, the stipple pattern |
| 3514 |
is tiled in a single plane, and acts as an additional clip |
| 3515 |
mask to be ANDed with the clip-mask. Any size pixmap can be |
| 3516 |
used for tiling or stippling, although some sizes may be |
| 3517 |
faster to use than others. |
| 3518 |
|
| 3519 |
The fill-style defines the contents of the source for line, |
| 3520 |
text, and fill requests. For all text and fill requests |
| 3521 |
(PolyText8, PolyText16, PolyFillRectangle, FillPoly, |
| 3522 |
PolyFillArc), for line requests (PolyLine, PolySegment, |
| 3523 |
PolyRectangle, PolyArc) with line-style Solid, and for the |
| 3524 |
even dashes for line requests with line-style OnOffDash or |
| 3525 |
DoubleDash: |
| 3526 |
Solid: foreground |
| 3527 |
Tiled: tile |
| 3528 |
OpaqueStippled: a tile with the same width and height as |
| 3529 |
stipple, but with background everywhere |
| 3530 |
stipple has a zero and with foreground |
| 3531 |
everywhere stipple has a one |
| 3532 |
Stippled: foreground masked by stipple |
| 3533 |
|
| 3534 |
|
| 3535 |
|
| 3536 |
<span class="grey">M.I.T. [Page 60]</span></pre> |
| 3537 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-61" ></span> |
| 3538 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3539 |
|
| 3540 |
|
| 3541 |
For the odd dashes for line requests with line-style |
| 3542 |
DoubleDash: |
| 3543 |
Solid: background |
| 3544 |
Tiled: same as for even dashes |
| 3545 |
OpaqueStippled: same as for even dashes |
| 3546 |
Stippled: background masked by stipple |
| 3547 |
|
| 3548 |
The dash-list value allowed here is actually a simplified |
| 3549 |
form of the more general patterns that can be set with |
| 3550 |
SetDashes.Specifying a value of N here is equivalent to |
| 3551 |
specifying the two element list [N, N] in SetDashes. The |
| 3552 |
value must be non-zero. The meaning of dash-offset and |
| 3553 |
dash-list are explained in the SetDashes request. |
| 3554 |
|
| 3555 |
The clip-mask restricts writes to the destination drawable; |
| 3556 |
only pixels where the clip-mask has a one bit are drawn. It |
| 3557 |
affects all graphics requests. The clip-mask does not clip |
| 3558 |
sources. The clip-mask origin is interpreted relative to the |
| 3559 |
origin of whatever destination drawable is specified in a |
| 3560 |
graphics request. If a pixmap is specified as the clip-mask, |
| 3561 |
it must have depth one and have the same root as the gcontext |
| 3562 |
(else a Match error). The clip-mask can also be set with the |
| 3563 |
SetClipRectangles request. |
| 3564 |
|
| 3565 |
For ClipByChildren, both source and destination windows are |
| 3566 |
additionally clipped by all viewable InputOutput children. |
| 3567 |
For IncludeInferiors, neither source nor destination window |
| 3568 |
is clipped by inferiors; this will result in drawing through |
| 3569 |
subwindow boundaries. The use of IncludeInferiors on a window |
| 3570 |
of one depth with mapped inferiors of differing depth is not |
| 3571 |
illegal, but the semantics isundefined by the core protocol. |
| 3572 |
|
| 3573 |
The fill-rule defines what pixels are inside (i.e., are |
| 3574 |
drawn) for paths given in FillPoly requests. EvenOdd means |
| 3575 |
a point is inside if an infinite ray with the point as origin |
| 3576 |
crosses the path an odd number of times. For Winding, a |
| 3577 |
point is inside if an infinite ray with the point as origin |
| 3578 |
crosses an unequal number of clockwise and counterclockwise |
| 3579 |
directed path segments. For both rules, a "point" is |
| 3580 |
infinitely small, and the path is an infinitely thin line. |
| 3581 |
A pixel is inside if the center point of the pixel is inside |
| 3582 |
and the center point is not on the boundary. If the center |
| 3583 |
point is on the boundary, the pixel is inside if and only if |
| 3584 |
the polygon interior is immediately to its right (x |
| 3585 |
increasing direction). Pixels with centers along a |
| 3586 |
horizontal edge are a special case and are inside if and |
| 3587 |
only if the polygon interior is immediately below (y |
| 3588 |
increasing direction). |
| 3589 |
|
| 3590 |
The arc-mode controls filling in the PolyFillArc request. |
| 3591 |
|
| 3592 |
|
| 3593 |
|
| 3594 |
|
| 3595 |
<span class="grey">M.I.T. [Page 61]</span></pre> |
| 3596 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-62" ></span> |
| 3597 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3598 |
|
| 3599 |
|
| 3600 |
The graphics-exposures flag controls GraphicsExposure event |
| 3601 |
generation for CopyArea and CopyPlane requests (and any |
| 3602 |
similar requests defined by extensions). |
| 3603 |
|
| 3604 |
The default component values are: |
| 3605 |
function: Copy |
| 3606 |
plane-mask: all ones |
| 3607 |
foreground: 0 |
| 3608 |
background: 1 |
| 3609 |
line-width: 0 |
| 3610 |
line-style: Solid |
| 3611 |
cap-style: Butt |
| 3612 |
join-style: Miter |
| 3613 |
fill-style: Solid |
| 3614 |
full-rule: EvenOdd |
| 3615 |
arc-mode: PieSlice |
| 3616 |
tile: pixmap of unspecified size filled with forground |
| 3617 |
pixell (i.e., client specified pixel if any, |
| 3618 |
else 0) |
| 3619 |
stipple: pixmap of unspecified size filled with ones |
| 3620 |
tile-stipple-x-origin: 0 |
| 3621 |
tile-stipple-y-origin: 0 |
| 3622 |
font: <implementation dependent> |
| 3623 |
subwindow-mode: ClipByChildren |
| 3624 |
graphics-exposures: True |
| 3625 |
clip-x-origin: 0 |
| 3626 |
clip-y-origin: 0 |
| 3627 |
clip-mask: None |
| 3628 |
dash-offset: 0 |
| 3629 |
dash-list: 4 (i.e., the list [4, 4]) |
| 3630 |
|
| 3631 |
Storing a pixmap in a gcontext might or might not result in a |
| 3632 |
copy being made. If the pixmap is later used as the |
| 3633 |
destination for a graphics request, the change might or might |
| 3634 |
not be reflected in the gcontext. If the pixmap is used |
| 3635 |
simultaneously in a graphics request as both a destination |
| 3636 |
and as a tile or stipple. the results are not defined. |
| 3637 |
|
| 3638 |
It is quite likely that some amount of gcontext information |
| 3639 |
will be cached in display hardware, and that such hardware |
| 3640 |
can only cache a small number of gcontexts. Given the number |
| 3641 |
and complexity of components, clients should view switching |
| 3642 |
between gcontexts with nearly identical state as |
| 3643 |
significantly more expensive than making minor changes to a |
| 3644 |
single gcontext. |
| 3645 |
|
| 3646 |
ChangeGC |
| 3647 |
gc: GCONTEXT |
| 3648 |
value-mask: BITMASK |
| 3649 |
value-list: LISTofVALUE |
| 3650 |
|
| 3651 |
|
| 3652 |
|
| 3653 |
|
| 3654 |
<span class="grey">M.I.T. [Page 62]</span></pre> |
| 3655 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-63" ></span> |
| 3656 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3657 |
|
| 3658 |
|
| 3659 |
Errors: GContext, Pixmap, Font, Match, Value, Alloc |
| 3660 |
|
| 3661 |
Changes components in gc. The value-mask and value-list |
| 3662 |
specify which components are to be changed. The values and |
| 3663 |
restrictions are the same as for CreateGC. |
| 3664 |
|
| 3665 |
Changing the clip-mask also overrides any previous |
| 3666 |
SetClipRectangles request on the context. Changing the |
| 3667 |
dash-offset or dash-list overrides any previous SetDashes |
| 3668 |
request on the context. |
| 3669 |
|
| 3670 |
The order in which components are verified and altered is |
| 3671 |
server dependent. If an error is generated, a subset of the |
| 3672 |
components may have been altered. |
| 3673 |
|
| 3674 |
CopyGC |
| 3675 |
src-gc, dst-gc: GCONTEXT |
| 3676 |
value-mask: BITMASK |
| 3677 |
|
| 3678 |
Errors: GContext, Value, Match, Alloc |
| 3679 |
|
| 3680 |
Copies components from src-gc to dst-gc. The value-mask |
| 3681 |
specifies which components to copy, as for CreateGC. The |
| 3682 |
two gcontexts must have the same root and the same depth |
| 3683 |
(else a Match error). |
| 3684 |
|
| 3685 |
SetDashes |
| 3686 |
gc: GCONTEXT |
| 3687 |
dash-offset: CARD16 |
| 3688 |
dash-list: LISTofCARD8 |
| 3689 |
|
| 3690 |
Errors: GContext, Value, Alloc |
| 3691 |
|
| 3692 |
Sets the dash-offset and dash-list in gc for dashed line |
| 3693 |
styles. The initial and alternating elements of the |
| 3694 |
dash-list are the "even" dashes, the others are the |
| 3695 |
"odd" dashes. All of the elements must be non-zero. |
| 3696 |
The dash-offset defines the phase of the pattern, |
| 3697 |
specifying how many pixels into the dash-list the pattern |
| 3698 |
should actually begin in any single graphics request. |
| 3699 |
Dashing is continuous through path segments combined with |
| 3700 |
a join-style, but is reset to the dash-offset each time a |
| 3701 |
cap-style is applied. |
| 3702 |
|
| 3703 |
SetClipRectangles |
| 3704 |
gc: GCONTEXT |
| 3705 |
clip-x-origin, clip-y-origin: INT16 |
| 3706 |
rectangles: LISTofRECTANGLE |
| 3707 |
ordering: {UnSorted, YSorted, YXSorted, YXBanded} |
| 3708 |
|
| 3709 |
Errors: GContext, Value, Alloc, Match |
| 3710 |
|
| 3711 |
|
| 3712 |
|
| 3713 |
<span class="grey">M.I.T. [Page 63]</span></pre> |
| 3714 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-64" ></span> |
| 3715 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3716 |
|
| 3717 |
|
| 3718 |
Changes clip-mask in gc to the specified list of rectangles |
| 3719 |
and sets the clip origin. Output will be clipped to remain |
| 3720 |
contained within the rectangles. The clip origin is |
| 3721 |
interpreted relative to the origin of whatever destination |
| 3722 |
drawable is specified in a graphics request. The rectangle |
| 3723 |
coordinates are interpreted relative to the clip origin. |
| 3724 |
The rectangles should be non-intersecting, or graphics |
| 3725 |
results will be undefined. |
| 3726 |
|
| 3727 |
If known by the client, ordering relations on the rectangles |
| 3728 |
can be specified with the ordering argument; this may provide |
| 3729 |
faster operation by the server. If an incorrect ordering is |
| 3730 |
specified, the server may generate a Match error, but is not |
| 3731 |
required to do so; if no error is generated, the graphics |
| 3732 |
results are undefined. UnSorted means the rectangles are in |
| 3733 |
arbitrary order. YSorted means that the rectangles are |
| 3734 |
non-decreasing in their Y origin. YXSorted additionally |
| 3735 |
constrains YSorted order in that all rectangles with an equal |
| 3736 |
Y origin are non-decreasing in their X origin. YXBanded |
| 3737 |
additionally constrains YXSorted by requiring that for every |
| 3738 |
possible Y scanline, all rectangles that include that |
| 3739 |
scanline have identical Y origins and Y extents. |
| 3740 |
|
| 3741 |
FreeGC |
| 3742 |
gc: GCONTEXT |
| 3743 |
|
| 3744 |
Errors: GContext |
| 3745 |
|
| 3746 |
Deletes the association between the resource id and the |
| 3747 |
gcontext, and destroys the gcontext. |
| 3748 |
|
| 3749 |
ClearToBackground |
| 3750 |
window: WINDOW |
| 3751 |
x, y: INT16 |
| 3752 |
width, height: CARD16 |
| 3753 |
exposures: BOOL |
| 3754 |
|
| 3755 |
Errors: Window, Value, Match |
| 3756 |
|
| 3757 |
The x and y coordinates are relative to the window's origin, |
| 3758 |
and specify the upper left corner of the rectangle. If width |
| 3759 |
is zero, it is replaced with the current width of the window |
| 3760 |
minus x. If height is zero, it is replaced with the current |
| 3761 |
height of the window minus y. If the window has a defined |
| 3762 |
background tile, the rectangle is tiled with a plane-mask of |
| 3763 |
all ones and alu-function of Copy. If the window has |
| 3764 |
background None, the contents of the window are not changed. |
| 3765 |
In eithercase, if exposures is True, then one or more |
| 3766 |
exposure events are generated for regions of the rectangle |
| 3767 |
that are eithervisible or are being retained in a backing |
| 3768 |
store. |
| 3769 |
|
| 3770 |
|
| 3771 |
|
| 3772 |
<span class="grey">M.I.T. [Page 64]</span></pre> |
| 3773 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-65" ></span> |
| 3774 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3775 |
|
| 3776 |
|
| 3777 |
It is a Match error to use an InputOnly window in this |
| 3778 |
request. |
| 3779 |
CopyArea |
| 3780 |
src-drawable, dst-drawable: DRAWABLE |
| 3781 |
gc: GCONTEXT |
| 3782 |
src-x, src-y: INT16 |
| 3783 |
width, height: CARD16 |
| 3784 |
dst-x, dst-y: INT16 |
| 3785 |
|
| 3786 |
Errors: Drawable, GContext, Match |
| 3787 |
|
| 3788 |
Combines the specified rectangle of src-drawable with the |
| 3789 |
specified rectangle of dst-drawable. The src-x and src-y |
| 3790 |
coordinates are relative to src-drawable's origin, dst-x and |
| 3791 |
dst-y are relative to dst-drawable's origin, each pair |
| 3792 |
specifying the upper left corner of the rectangle. |
| 3793 |
Src-drawable must have the same root and the same depth as |
| 3794 |
dst-drawable (else a Match error). |
| 3795 |
|
| 3796 |
If regions of the source rectangle are obscured and have not |
| 3797 |
been retained by the server, or if regions outside the |
| 3798 |
boundaries of the source drawable are specified, then the |
| 3799 |
following occurs. If the dst-drawable is a window with a |
| 3800 |
background of other than None, the corresponding regions of |
| 3801 |
the destination are tiled (with plane-mask of ones and |
| 3802 |
alu-function Copy) with that background. Regardless, if |
| 3803 |
graphics-exposures in gc is True, GraphicsExposure events |
| 3804 |
for the corresponding desitnation regions are generated. |
| 3805 |
|
| 3806 |
If graphics-exposures if True but no regions are exposed, |
| 3807 |
then a NoExposure event is generated. |
| 3808 |
|
| 3809 |
GC components: alu-function, plane-mask, foreground, |
| 3810 |
subwindow-mode, clip-x-origin, clip-y-origin, clip-mask |
| 3811 |
|
| 3812 |
CopyPlane |
| 3813 |
scr-drawable, dst-drawable: DRAWABLE |
| 3814 |
GC:Gcontext |
| 3815 |
src-x, src-y: INT16 |
| 3816 |
width, height: CARD16 |
| 3817 |
dst-x, dst-y: INT16 |
| 3818 |
bit-plane: CARD32 |
| 3819 |
|
| 3820 |
Errors: Drawable, GContext, Value, Match |
| 3821 |
|
| 3822 |
Src-drawable must have the same root as dst-srawable (else |
| 3823 |
a match error), but need not have the same depth. |
| 3824 |
Bit-plane must have exactly one bit set. Effectively, that |
| 3825 |
plane of the src-drawable and the fore-ground/background |
| 3826 |
pixels in gc are combined to form a pixmap of the same |
| 3827 |
depth as dst-drawable, and the equivalent of a CopyArea is |
| 3828 |
|
| 3829 |
|
| 3830 |
|
| 3831 |
<span class="grey">M.I.T. [Page 65]</span></pre> |
| 3832 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-66" ></span> |
| 3833 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3834 |
|
| 3835 |
|
| 3836 |
performed, with all the same exposure semantics. |
| 3837 |
|
| 3838 |
GC components: alu-function, plan-mask, foreground, |
| 3839 |
background, subwindow-mode, graphics-exposures, |
| 3840 |
clip-x-origin, clip-y-origin, clip-mask |
| 3841 |
|
| 3842 |
PolyPoint |
| 3843 |
drawable: DRAWABLE |
| 3844 |
gc: GCONTEXT |
| 3845 |
coordinate-mode: {Origin, Previous} |
| 3846 |
points: LISTofPOINT |
| 3847 |
|
| 3848 |
Errors: Drawable, GContext, Value, Match |
| 3849 |
|
| 3850 |
Combines the foreground pixel in gc with the pixel at each |
| 3851 |
point in the drawable. The points are drawn in the order |
| 3852 |
listed. |
| 3853 |
|
| 3854 |
The first point is always relative to the drawable's origin; |
| 3855 |
the rest are relative either to that origin or the previous |
| 3856 |
point, depending on the coordinate-mode. |
| 3857 |
|
| 3858 |
GCcomponents: alu-function, plane-mask, foreground, |
| 3859 |
subwindow-mode, clip-x-origin, clip-y-origin, clip-mask |
| 3860 |
|
| 3861 |
PolyLine |
| 3862 |
drawable: DRAWABLE |
| 3863 |
gc: GCONTEXT |
| 3864 |
coordinate-mode: {Origin, Previous} |
| 3865 |
points: LISTofPOINT |
| 3866 |
|
| 3867 |
Errors: Drawable, GContext, Value, Match |
| 3868 |
|
| 3869 |
Draws lines between each pair of points (point[i], point |
| 3870 |
[i+1]). The lines are drawn in the order listed. The lines |
| 3871 |
join correctly at all intermediate points, and if the first |
| 3872 |
and last points coincide, the first and last lines also join |
| 3873 |
correctly. |
| 3874 |
|
| 3875 |
For any given line, no pixel is drawn more than once. If |
| 3876 |
thin (zero line-width) lines intersect, the intersecting |
| 3877 |
pixels are drawn multiple times. If wide lines intersect, |
| 3878 |
the intersecting pixels are drawn only once, as though the |
| 3879 |
entire PolyLine were a single filled shape. |
| 3880 |
|
| 3881 |
The first point is always relative to the drawable's origin; |
| 3882 |
the rest are relative either to that origin or the previous |
| 3883 |
point, depending on the coordinate-mode. |
| 3884 |
|
| 3885 |
GC components: alu-function, plane-mask, line-width, |
| 3886 |
line-style, cap-style, join-style, fill-style, |
| 3887 |
|
| 3888 |
|
| 3889 |
|
| 3890 |
<span class="grey">M.I.T. [Page 66]</span></pre> |
| 3891 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-67" ></span> |
| 3892 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3893 |
|
| 3894 |
|
| 3895 |
subwindow-mode, clip-x-origin, clip-y-origin, clip-mask |
| 3896 |
|
| 3897 |
GC mode-dependent components: foreground, background, tile, |
| 3898 |
stipple, tile-stipple-x-origin, tile-stipple-y-origin, |
| 3899 |
dash-offset,dash-list |
| 3900 |
|
| 3901 |
PolySegment |
| 3902 |
drawable: DRAWABLE |
| 3903 |
gc: GCONTEXT |
| 3904 |
segments: LISTofSEGMENT |
| 3905 |
|
| 3906 |
where SEGMENT: [x1, y1, x2, y2: INT16] |
| 3907 |
|
| 3908 |
Errors: Drawable, GContext, Match |
| 3909 |
|
| 3910 |
For each segment, draws a line between [x1, y1] and [x2, y2]. |
| 3911 |
The lines are drawn in the order listed. No joining is |
| 3912 |
performed at coincident end points. For any given line, no |
| 3913 |
pixel is drawn more than once. If lines intersect, the |
| 3914 |
intersecting pixels are drawn multiple times. |
| 3915 |
|
| 3916 |
GC components: alu-function, plane-mask, line-width, |
| 3917 |
line-style, cap-style, fill-style, subwindow-mode, |
| 3918 |
clip-x-origin, clip-y-origin,clip-mask |
| 3919 |
|
| 3920 |
GC mode-dependent components: foreground, background, tile, |
| 3921 |
stipple,tile-stipple-x-origin, tile-stipple-y-origin, |
| 3922 |
dash-offset, dash-list |
| 3923 |
|
| 3924 |
PolyRectangle |
| 3925 |
drawable: DRAWABLE |
| 3926 |
gc: GCONTEXT |
| 3927 |
rectangles: LISTofRECTANGLE |
| 3928 |
|
| 3929 |
Errors: Drawable, GContext, Match |
| 3930 |
|
| 3931 |
Draws the outlines of the specified rectangles, as if a |
| 3932 |
five-point PolyLine were specified for each rectangle. The x |
| 3933 |
and y coordinates of each rectangle are relative to the |
| 3934 |
drawable's origin, and define the upper left corner of the |
| 3935 |
rectangle. |
| 3936 |
|
| 3937 |
The rectangles are drawn in the order listed. For any given |
| 3938 |
rectangle, no pixel is drawn more than once. If rectangles |
| 3939 |
intersect, the intersecting pixels are drawn multiple times. |
| 3940 |
|
| 3941 |
GC components: alu-function, plane-mask, line-width, |
| 3942 |
line-style, join-style, fill-style, subwindow-mode, |
| 3943 |
clip-x-origin, clip-y-origin, clip-mask |
| 3944 |
|
| 3945 |
GC mode-dependent components: foreground, background, tile, |
| 3946 |
|
| 3947 |
|
| 3948 |
|
| 3949 |
<span class="grey">M.I.T. [Page 67]</span></pre> |
| 3950 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-68" ></span> |
| 3951 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 3952 |
|
| 3953 |
|
| 3954 |
stipple, tile-stipple-x-origin, tile-stipple-y-origin, |
| 3955 |
dash-offset, dash-list |
| 3956 |
|
| 3957 |
PolyArc |
| 3958 |
drawable: DRAWABLE |
| 3959 |
gc: GCONTEXT |
| 3960 |
arcs: LISTofARC |
| 3961 |
|
| 3962 |
Errors: Drawable, GContext, Match |
| 3963 |
|
| 3964 |
Draws circular or elliptical arcs. Each arc is specified by |
| 3965 |
a rectangle and two angles. The x and y coordinates are |
| 3966 |
relative to the origin of the drawable, and define the upper |
| 3967 |
left corner of the rectangle. The center of the circle or |
| 3968 |
ellipse is the center of the rectangle, and the major and |
| 3969 |
minor axes are specified by the width and height, |
| 3970 |
respectively. The angles are signed integers in degrees |
| 3971 |
scaled by 64, with positive indicating counterclockwise |
| 3972 |
motion and negative indicating clockwise motion. The start |
| 3973 |
of the arc is specified by angle1 relative to the |
| 3974 |
three-oclock position from the center, and the path and |
| 3975 |
extent of the arc is specified by angle2 relative to the |
| 3976 |
start of the arc. If the magnitude of angle2 is greater |
| 3977 |
than 360 degrees, it is truncated to 360 degrees. |
| 3978 |
|
| 3979 |
The arcs are drawn in the order listed. If the last point in |
| 3980 |
one arc coincides with the first point in the following arc, |
| 3981 |
the two arcs will join correctly. If the first point in the |
| 3982 |
first arc coincides with the last point in the last arc, the |
| 3983 |
two arcs will join correctly. For any given arc, no pixel is |
| 3984 |
drawn more than once. If two arcs join correctly and the |
| 3985 |
line-width is greater than zero and the arcs intersect, no |
| 3986 |
pixel is drawn more than once. Otherwise, the intersecting |
| 3987 |
pixels of intersecting arcs are drawn multiple times. |
| 3988 |
Specifying an arc with one endpoint and a clockwise extent |
| 3989 |
draws the same pixels as specifying the other endpoint and an |
| 3990 |
equivalent counterclockwise extent, except as it affects |
| 3991 |
joins. |
| 3992 |
|
| 3993 |
By specifying one axis to be zero, a horizontal or vertical |
| 3994 |
line can be drawn. |
| 3995 |
|
| 3996 |
Angles are computed based solely on the coordinate system, |
| 3997 |
ignoring the aspect ratio. |
| 3998 |
|
| 3999 |
GC components: alu-function, plane-mask, line-width, |
| 4000 |
line-style, cap-style, join-style, fill-style, |
| 4001 |
subwindow-mode, clip-x-origin, clip-y-origin, clip-mask |
| 4002 |
|
| 4003 |
GC mode-dependent components: foreground, background, tile, |
| 4004 |
stipple,tile-stipple-x-origin, tile-stipple-y-origin, |
| 4005 |
|
| 4006 |
|
| 4007 |
|
| 4008 |
<span class="grey">M.I.T. [Page 68]</span></pre> |
| 4009 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-69" ></span> |
| 4010 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4011 |
|
| 4012 |
|
| 4013 |
dash-offset, dash-list |
| 4014 |
FillPoly |
| 4015 |
drawable: DRAWABLE |
| 4016 |
gc: GCONTEXT |
| 4017 |
shape: {Complex, Nonconvex, Convex} |
| 4018 |
coordinate-mode: {Origin, Previous} |
| 4019 |
points: LISTofPOINT |
| 4020 |
|
| 4021 |
Errors: Drawable, GContext, Match, Value |
| 4022 |
|
| 4023 |
Fills the region closed by the specified path. The path is |
| 4024 |
closed automatically if the last point in the list does not |
| 4025 |
coincide with the first point. No pixel of the region is |
| 4026 |
drawn more than once. |
| 4027 |
|
| 4028 |
The first point is always relative to the drawable's origin; |
| 4029 |
the rest are relative either to that origin or the previous |
| 4030 |
point, depending on the coordinate-mode. |
| 4031 |
|
| 4032 |
The shape parameter may be used by the server to improve |
| 4033 |
performance. Complex means the path may self-intersect. |
| 4034 |
|
| 4035 |
Nonconvex means the path does not self-intersect, but the |
| 4036 |
shape is not wholly convex. If known by the client, |
| 4037 |
specifying Nonconvex over Complex may improve performance. If |
| 4038 |
Nonconvex is specified for a self-intersecting path, the |
| 4039 |
graphics results are undefined. |
| 4040 |
|
| 4041 |
Convex means the path is wholly convex. If known by the |
| 4042 |
client, specifying Convex can improve performance. If Convex |
| 4043 |
is specified for a path that is not convex, the graphics |
| 4044 |
results are undefined. |
| 4045 |
|
| 4046 |
GC components: alu-function, plane-mask, fill-style, |
| 4047 |
fill-rule, subwindow-mode, clip-x-origin, clip-y-origin, |
| 4048 |
clip-mask |
| 4049 |
|
| 4050 |
GC mode-dependent components: foreground, tile, stipple, |
| 4051 |
tile-stipple-x-origin, tile-stipple-y-origin |
| 4052 |
|
| 4053 |
PolyFillRectangle |
| 4054 |
drawable: DRAWABLE |
| 4055 |
gc: GCONTEXT |
| 4056 |
rectangles: LISTofRECTANGLE |
| 4057 |
|
| 4058 |
Errors: Drawable, GContext, Match |
| 4059 |
|
| 4060 |
Fills the specified rectangles. The x and y coordinates of |
| 4061 |
each rectangle are relative to the drawable's origin, and |
| 4062 |
define the upper left corner of the rectangle. |
| 4063 |
|
| 4064 |
|
| 4065 |
|
| 4066 |
|
| 4067 |
<span class="grey">M.I.T. [Page 69]</span></pre> |
| 4068 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-70" ></span> |
| 4069 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4070 |
|
| 4071 |
|
| 4072 |
The rectangles are drawn in the order listed. For any given |
| 4073 |
rectangle, no pixel is drawn more than once. If rectangles |
| 4074 |
intersect, the intersecting pixels are drawn multiple times. |
| 4075 |
|
| 4076 |
GC components: alu-function, plane-mask, fill-style, |
| 4077 |
fill-rule, subwindow-mode, clip-x-origin, clip-y-origin, |
| 4078 |
clip-mask |
| 4079 |
|
| 4080 |
GC mode-dependent components: foreground, tile, stipple, |
| 4081 |
tile-stipple-x-origin, tile-stipple-y-origin |
| 4082 |
|
| 4083 |
PolyFillArc |
| 4084 |
drawable: DRAWABLE |
| 4085 |
gc: GCONTEXT |
| 4086 |
arcs: LISTofARC |
| 4087 |
|
| 4088 |
Errors: Drawable, GContext, Match |
| 4089 |
|
| 4090 |
For each arc, fills the region closed by the specified arc |
| 4091 |
and one or two line segments, depending on the arc-mode. For |
| 4092 |
Chord, the single line segment joining the endpoints of the |
| 4093 |
arc is used. For PieSlice, the two line segments joining the |
| 4094 |
endpoints of the arc with the center point are used. The |
| 4095 |
arcs are as specified in the PolyArc request. |
| 4096 |
|
| 4097 |
The arcs are filled in the order listed. For any given arc, |
| 4098 |
no pixel is drawn more than once. If regions intersect, the |
| 4099 |
intersecting pixels are drawn multiple times. |
| 4100 |
|
| 4101 |
GC components: alu-function, plane-mask, fill-style, |
| 4102 |
fill-rule, arc-mode, subwindow-mode, clip-x-origin, |
| 4103 |
clip-y-origin, clip-mask |
| 4104 |
|
| 4105 |
GC mode-dependent components: foreground, tile, stipple, |
| 4106 |
tile-stipple-x-origin, tile-stipple-y-origin |
| 4107 |
|
| 4108 |
PutImage |
| 4109 |
drawable: DRAWABLE |
| 4110 |
gc: GCONTEXT |
| 4111 |
depth: CARD8 |
| 4112 |
width, height: CARD16 |
| 4113 |
dst-x, dst-y: INT16 |
| 4114 |
left-pad: CARD8 |
| 4115 |
format: {Bitmap, XYPixmap, ZPixmap} |
| 4116 |
bits: <bits> |
| 4117 |
|
| 4118 |
Errors: Drawable, GContext, Match, Value, Alloc |
| 4119 |
|
| 4120 |
Combines an image with a rectangle of the drawable. The |
| 4121 |
dst-x and dst-y coordinates are relative to the drawable's |
| 4122 |
origin. |
| 4123 |
|
| 4124 |
|
| 4125 |
|
| 4126 |
<span class="grey">M.I.T. [Page 70]</span></pre> |
| 4127 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-71" ></span> |
| 4128 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4129 |
|
| 4130 |
|
| 4131 |
If Bitmap format is used, then depth must be one (else a |
| 4132 |
Match error) and the image must be in XYFormat. The |
| 4133 |
foreground pixel in gc defines the source for one bits in the |
| 4134 |
image, and the background pixel defines the source for the |
| 4135 |
zero bits. |
| 4136 |
|
| 4137 |
For XYPixmap and ZPixmap, depth must match the depth of |
| 4138 |
drawable (else a Match error). For XYPixmap, the image must |
| 4139 |
be sent in XYFormat. For ZPixmap, the image must be sent in |
| 4140 |
the ZFormat defined for the given depth. |
| 4141 |
|
| 4142 |
The left-pad must be zero for ZPixmap format. For Bitmap and |
| 4143 |
XYPixmap format, left-pad must be less than |
| 4144 |
bitmap-format-scanline-pad (as given in the server connection |
| 4145 |
setup info). The first left-pad bits in every scanline are |
| 4146 |
to be ignored by the server; the actual image begins that |
| 4147 |
many bits into the data. The width argument defines the width |
| 4148 |
of the actual image, and does not include left-pad. |
| 4149 |
|
| 4150 |
GC components: alu-function, plane-mask, subwindow-mode, |
| 4151 |
clip-x-origin, clip-y-origin, clip-mask |
| 4152 |
|
| 4153 |
GC mode-dependent components: foreground, background |
| 4154 |
|
| 4155 |
GetImage |
| 4156 |
drawable: DRAWABLE |
| 4157 |
x, y: INT16 |
| 4158 |
width, height: CARD16 |
| 4159 |
plane-mask: CARD32 |
| 4160 |
format: {XYFormat, ZFormat} |
| 4161 |
=> |
| 4162 |
depth: CARD8 |
| 4163 |
visual: VISUALID or None |
| 4164 |
bits: <bits> |
| 4165 |
|
| 4166 |
Errors: Drawable, Value, Match |
| 4167 |
|
| 4168 |
Returns the contents of the given rectangle of the drawable |
| 4169 |
in the given format. The x and y coordinates are relative to |
| 4170 |
the drawable's origin, and define the upper left corner of |
| 4171 |
the rectangle. If XYFormat is specified, only the bit planes |
| 4172 |
specified in plane-mask are transmitted. If ZFormat is |
| 4173 |
specified, then bits in all planes not specified in |
| 4174 |
plane-mask transmitted as zero. The returned depth specifies |
| 4175 |
the number of bits per pixel of the image. If the drawable |
| 4176 |
is a window, its visual type is returned; if the drawable |
| 4177 |
is a pixmap,the visual is None. |
| 4178 |
|
| 4179 |
If the drawable is a window, the window must be mapped, and |
| 4180 |
it must be the case that, if there were no inferiors or |
| 4181 |
overlapping windows, the specified rectangle of the window |
| 4182 |
|
| 4183 |
|
| 4184 |
|
| 4185 |
<span class="grey">M.I.T. [Page 71]</span></pre> |
| 4186 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-72" ></span> |
| 4187 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4188 |
|
| 4189 |
|
| 4190 |
would be fully visible on the screen will include any |
| 4191 |
visible portions of inferiors or overlapping windows |
| 4192 |
contained in the rectangle, but if these windows are of |
| 4193 |
different depth than the specified window, the contents |
| 4194 |
returned for them are not defined by the core protocol. |
| 4195 |
PolyText8 |
| 4196 |
drawable: DRAWABLE |
| 4197 |
gc: GCONTEXT |
| 4198 |
x, y: INT16 |
| 4199 |
items: LISTofTEXTITEM8 |
| 4200 |
|
| 4201 |
where |
| 4202 |
TEXTITEM8: TEXTELT8 or FONT |
| 4203 |
TEXTELT8: [delta: INT8 |
| 4204 |
string: STRING8] |
| 4205 |
|
| 4206 |
Errors: Drawable, GContext, Match, Font |
| 4207 |
|
| 4208 |
The x and y coordinates are relative to drawable's origin, |
| 4209 |
and specify the baseline starting position (the initial |
| 4210 |
character origin). Each text item is processed in turn. A |
| 4211 |
font item causes the font to be stored in gc, and to be |
| 4212 |
used for subsequent text; switching among fonts with |
| 4213 |
differing draw-directions is permitted. A text element |
| 4214 |
delta specifies an additional change in the position along |
| 4215 |
the x axis before the string is drawn; the delta is always |
| 4216 |
added to the character origin (not added or subtracted based |
| 4217 |
on the draw-direction of the current font). Each character |
| 4218 |
image, as defined by the a font in gc, is treated as an |
| 4219 |
additional mask for a fill operation on the drawable. |
| 4220 |
|
| 4221 |
All contained FONTs are always transmitted most significant |
| 4222 |
byte first. |
| 4223 |
|
| 4224 |
If a Font error is generated for an item, the previous items |
| 4225 |
may have been drawn. |
| 4226 |
|
| 4227 |
For fonts defined with two-byte matrix indexing, each STRING8 |
| 4228 |
byte is interpreted as a byte2 value of a CHAR2B with a byte1 |
| 4229 |
value of zero. |
| 4230 |
|
| 4231 |
GC components: alu-function, plane-mask, fill-style, font, |
| 4232 |
subwindow-mode, clip-x-origin, clip-y-origin, clip-mask |
| 4233 |
|
| 4234 |
GC mode-dependent components: foreground, tile, stipple, |
| 4235 |
tile-stipple-x-origin, tile-stipple-y-origin |
| 4236 |
|
| 4237 |
PolyText16 |
| 4238 |
drawable: DRAWABLE |
| 4239 |
gc: GCONTEXT |
| 4240 |
x, y: INT16 |
| 4241 |
|
| 4242 |
|
| 4243 |
|
| 4244 |
<span class="grey">M.I.T. [Page 72]</span></pre> |
| 4245 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-73" ></span> |
| 4246 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4247 |
|
| 4248 |
|
| 4249 |
items: LISTofTEXTITEM16 |
| 4250 |
|
| 4251 |
where |
| 4252 |
TEXTITEM16: TEXTELT16 or FONT |
| 4253 |
TEXTELT16: [delta-x: INT8 |
| 4254 |
string: STRING16] |
| 4255 |
|
| 4256 |
Errors: Drawable, GContext, Match, Font |
| 4257 |
|
| 4258 |
Just like PolyText8, except two-byte (or 16-bit) characters |
| 4259 |
are used. For fonts defined with linear indexing rather than |
| 4260 |
two-byte matrix indexing, the server will interpret each |
| 4261 |
CHAR2B as a 16-bit number that has been transmitted most |
| 4262 |
significant byte first (i.e., byte1 of the CHAR2B is taken |
| 4263 |
as the most significant byte). |
| 4264 |
|
| 4265 |
ImageText8 |
| 4266 |
drawable: DRAWABLE |
| 4267 |
gc: GCONTEXT |
| 4268 |
x, y: INT16 |
| 4269 |
string: STRING8 |
| 4270 |
|
| 4271 |
Errors: Drawable, GContext, Match |
| 4272 |
|
| 4273 |
The x and y coordinates are relative to drawable's origin, |
| 4274 |
and specify the baseline starting position (the initial |
| 4275 |
character origin). The effect is to first fill a |
| 4276 |
destination rectangle with the background pixel defined in |
| 4277 |
gc, and then paint the text with the foreground pixel. |
| 4278 |
The upper left corner of the filled rectangle is at |
| 4279 |
[x + overall-left, y - font-ascent] |
| 4280 |
the width is |
| 4281 |
overall-right - overall-left |
| 4282 |
and the height is |
| 4283 |
font-ascent + font-descent |
| 4284 |
where overall-left, overall-right, font-ascent, and |
| 4285 |
as font-descent are would be returned by a QueryTextExtents |
| 4286 |
call using gc and string. |
| 4287 |
|
| 4288 |
The alu-function and fill-style defined in gc are ignored for |
| 4289 |
this request; the effective alu-function is Copy and the |
| 4290 |
effective fill-style Solid. |
| 4291 |
|
| 4292 |
For fonts defined with two-byte matrix indexing, each STRING8 |
| 4293 |
byte is interpreted as a byte2 value of a CHAR2B with a byte1 |
| 4294 |
value of zero. |
| 4295 |
|
| 4296 |
GC components: plane-mask, foreground, background, font, |
| 4297 |
subwindow-mode, clip-x-origin, clip-y-origin, clip-mask |
| 4298 |
|
| 4299 |
|
| 4300 |
|
| 4301 |
|
| 4302 |
|
| 4303 |
<span class="grey">M.I.T. [Page 73]</span></pre> |
| 4304 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-74" ></span> |
| 4305 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4306 |
|
| 4307 |
|
| 4308 |
ImageText16 |
| 4309 |
drawable: DRAWABLE |
| 4310 |
gc: GCONTEXT |
| 4311 |
x, y: INT16 |
| 4312 |
string: STRING16 |
| 4313 |
|
| 4314 |
Errors: Drawable, GContext, Match |
| 4315 |
|
| 4316 |
Just like ImageText8, except two-byte (or 16-bit) characters |
| 4317 |
are used. For fonts defined with linear indexing rather than |
| 4318 |
two-byte matrix indexing, the server will interpret each |
| 4319 |
CHAR2B as a 16-bit number that has been transmitted most |
| 4320 |
significant byte first (i.e., byte1 of the CHAR2B is taken as |
| 4321 |
the most significant byte). |
| 4322 |
|
| 4323 |
CreateColormap |
| 4324 |
mid: COLORMAP |
| 4325 |
visual: VISUALID |
| 4326 |
window: WINDOW |
| 4327 |
alloc: {None, All} |
| 4328 |
|
| 4329 |
Errors: IDChoice, Window, Value, Match, Alloc |
| 4330 |
|
| 4331 |
Creates a colormap of the specified visual type for the |
| 4332 |
screen on which the window resides, and associates the |
| 4333 |
identifier mid with it. The visual type must be one |
| 4334 |
supported by the screen, and cannot be of class TrueColor |
| 4335 |
(else a Match error). The initial values of the colormap |
| 4336 |
entries are undefined for classes GrayScale, PseudoColor, |
| 4337 |
and DirectColor; for StaticGray, StaticColor, and |
| 4338 |
TrueColor, the entries will have defined values, but those |
| 4339 |
values are specific to the visual and are not defined by |
| 4340 |
the core protocol. For StaticGray, StaticColor, and |
| 4341 |
TrueColor, alloc must be specified as None (else a Match |
| 4342 |
error). For the other classes, if alloc is None, the |
| 4343 |
colormap initially has no allocated entries, and clients |
| 4344 |
can allocate entries. If alloc is All, then the entire |
| 4345 |
colormap is "allocated" writable, but entries cannot be |
| 4346 |
freed with FreeColors, and no relationships among entries |
| 4347 |
is defined; the client must understand whether the colormap |
| 4348 |
is GrayScale, PseudoColor, or DirectColor to know how to |
| 4349 |
store into entries. |
| 4350 |
|
| 4351 |
FreeColormap |
| 4352 |
cmap: COLORMAP |
| 4353 |
|
| 4354 |
Errors: Colormap |
| 4355 |
|
| 4356 |
Deletes the association between the resource id and the |
| 4357 |
colormap. If the colormap is an installed map for a screen, |
| 4358 |
it is uninstalled (see UninstallColormap). If the colormap |
| 4359 |
|
| 4360 |
|
| 4361 |
|
| 4362 |
<span class="grey">M.I.T. [Page 74]</span></pre> |
| 4363 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-75" ></span> |
| 4364 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4365 |
|
| 4366 |
|
| 4367 |
is defined as the colormap for a window (via CreateWindow or |
| 4368 |
ChangeWindowAttributes), the colormap for the window is |
| 4369 |
changed to None, and a ColormapNotify event is generated.The |
| 4370 |
colors displayed for a window with a colormap of None are not |
| 4371 |
defined by the protocol. |
| 4372 |
|
| 4373 |
Has no effect on a default colormap for a screen. |
| 4374 |
|
| 4375 |
|
| 4376 |
CopyColormapAndFree |
| 4377 |
mid, src-cmap: COLORMAP |
| 4378 |
|
| 4379 |
Errors: Colormap, Alloc |
| 4380 |
|
| 4381 |
Creates a colormap for the same screen as src-cmap, and |
| 4382 |
associates identifier mid with it. Moves all of the client's |
| 4383 |
existing allocations from src-cmap to the new colormap, and |
| 4384 |
frees those entries in src-cmap. Values in other entries in |
| 4385 |
the new colormap are undefined. |
| 4386 |
|
| 4387 |
InstallColormap |
| 4388 |
cmap: COLORMAP |
| 4389 |
|
| 4390 |
Errors: Colormap |
| 4391 |
|
| 4392 |
Makes this colormap an installed map for its screen. All |
| 4393 |
windows associated with this colormap immediately display |
| 4394 |
with true colors. As a side-effect, previously installed |
| 4395 |
colormaps may be uninstalled, and other windows may display |
| 4396 |
with false colors. Which colormaps get uninstalled is |
| 4397 |
server dependent, except that it is guaranteed that the |
| 4398 |
M-1 most recently client-installed colormaps will not be |
| 4399 |
uninstalled, where M is the min-installed-maps specified |
| 4400 |
for the screen in the connection setup. |
| 4401 |
|
| 4402 |
If cmap is not already an installed map, a ColormapNotify |
| 4403 |
event is generated on every window having cmap as an |
| 4404 |
attribute. If a colormap is uninstalled as a result of |
| 4405 |
the install, a ColormapNotify event is generated on every |
| 4406 |
window having that colormap as an attribute. |
| 4407 |
|
| 4408 |
Initially only the default colormap for a screen is |
| 4409 |
installed. |
| 4410 |
|
| 4411 |
UninstallColormap |
| 4412 |
cmap: COLORMAP |
| 4413 |
|
| 4414 |
Errors: Colormap |
| 4415 |
|
| 4416 |
If cmap is an installed map for its screen, one or more |
| 4417 |
colormaps are installed in its place; the choice is server |
| 4418 |
|
| 4419 |
|
| 4420 |
|
| 4421 |
<span class="grey">M.I.T. [Page 75]</span></pre> |
| 4422 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-76" ></span> |
| 4423 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4424 |
|
| 4425 |
|
| 4426 |
dependent, pexcept that if the screen's default colormap is |
| 4427 |
not installed and can be installed (without forcing other |
| 4428 |
colormaps out), then the default colormap is used. |
| 4429 |
|
| 4430 |
If cmap is an installed map, a ColormapNotify event is |
| 4431 |
generated on every window having this colormap as an |
| 4432 |
attribute. If a colormap is installed as a result of the |
| 4433 |
uninstall, a ColormapNotify event is generated on every |
| 4434 |
window having that colormap as an attribute. |
| 4435 |
|
| 4436 |
ListInstalledColormaps |
| 4437 |
window: WINDOW |
| 4438 |
=> |
| 4439 |
cmaps: LISTofCOLORMAP |
| 4440 |
|
| 4441 |
Errors: Window |
| 4442 |
|
| 4443 |
Returns a list of the currently installed colormaps for the |
| 4444 |
screen of the specified window. |
| 4445 |
|
| 4446 |
AllocColor |
| 4447 |
cmap: COLORMAP |
| 4448 |
red, green, blue: CARD16 |
| 4449 |
=> |
| 4450 |
pixel: CARD32 |
| 4451 |
red, green, blue: CARD16 |
| 4452 |
|
| 4453 |
Errors: Colormap, Alloc |
| 4454 |
|
| 4455 |
Allocates a read-only colormap entry corresponding to the |
| 4456 |
closest RGB values provided by the hardware. Returns the |
| 4457 |
pixel and the RGB values actually used. |
| 4458 |
|
| 4459 |
AllocNamedColor |
| 4460 |
cmap: COLORMAP |
| 4461 |
name: STRING8 |
| 4462 |
=> |
| 4463 |
pixel: CARD32 |
| 4464 |
exact-red, exact-green, exact-blue: CARD16 |
| 4465 |
screen-red, screen-green, screen-blue: CARD16 |
| 4466 |
|
| 4467 |
Errors: Colormap, Name, Alloc |
| 4468 |
|
| 4469 |
Looks up the named color with respect to the screen |
| 4470 |
associated with the colormap, then does an AllocColor on |
| 4471 |
cmap. The name should use the ASCII encoding, and |
| 4472 |
upper/lower case does not matter. The exact RGB values |
| 4473 |
specify the "true" values for the color, and the screen |
| 4474 |
values specify the values actually used in the colormap. |
| 4475 |
|
| 4476 |
|
| 4477 |
|
| 4478 |
|
| 4479 |
|
| 4480 |
<span class="grey">M.I.T. [Page 76]</span></pre> |
| 4481 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-77" ></span> |
| 4482 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4483 |
|
| 4484 |
|
| 4485 |
AllocColorCells |
| 4486 |
cmap: COLORMAP |
| 4487 |
colors, planes: CARD16 |
| 4488 |
contiguous: BOOL |
| 4489 |
=> |
| 4490 |
pixels, masks: LISTofCARD32 |
| 4491 |
|
| 4492 |
Errors: Colormap, Value, Alloc |
| 4493 |
|
| 4494 |
The number of colors must be positive, the number of planes |
| 4495 |
non-negative. If C colors and P planes are requested, then C |
| 4496 |
pixels and P masks are returned. No mask will have any bits |
| 4497 |
in common with any other mask, or with any of the pixels. By |
| 4498 |
ORing together masks and pixels, C*(2^P) distinct pixels can |
| 4499 |
be produced; all of these are allocated writable by the |
| 4500 |
request. For GrayScale or PseudoColor, each mask will have |
| 4501 |
exactly one bit, and for DirectColor each will have exactly |
| 4502 |
three bits. If contiguous is True, then if all masks are |
| 4503 |
ORed together, a single contiguous set of bits will be formed |
| 4504 |
for GrayScale or PseudoColor, and three contiguous sets of |
| 4505 |
bits (one within each pixel subfield) for DirectColor. The |
| 4506 |
RGB values of the allocated entries are undefined. |
| 4507 |
|
| 4508 |
AllocColorPlanes |
| 4509 |
cmap: COLORMAP |
| 4510 |
colors, reds, greens, blues: CARD16 |
| 4511 |
contiguous: BOOL |
| 4512 |
=> |
| 4513 |
pixels: LISTofCARD32 |
| 4514 |
red-mask, green-mask, blue-mask: CARD32 |
| 4515 |
|
| 4516 |
Errors; Colormap, Value, Alloc |
| 4517 |
|
| 4518 |
The number of colors must be positive, the reds, greens, and |
| 4519 |
blues non-negative. If C colors, R reds, G greens, and B |
| 4520 |
blues are requested, then C pixels are returned, and the |
| 4521 |
masks have R, G, and B bits set respectively. If contiguous |
| 4522 |
is True, then each mask will have a contiguous set of bits. |
| 4523 |
No mask will have any bits in common with any other mask, or |
| 4524 |
with any of the pixels. For DirectColor, each mask will lie |
| 4525 |
within the corresponding pixel subfield. By ORing together |
| 4526 |
subsets of masks with pixels, C*(2^(R+G+B)) distinct pixels |
| 4527 |
can be produced; all of these are allocated by the request. |
| 4528 |
The initial RGB values of the allocated entries are |
| 4529 |
undefined. In the colormap there are only C*(2^R) |
| 4530 |
independent red entries, C*(2^G) independent green entries, |
| 4531 |
and C*(2^B) independent blue entries. This is true even for |
| 4532 |
PseudoColor. When the colormap entry for a pixel value is |
| 4533 |
changed using StoreColors or StoreNamedColor, the pixel is |
| 4534 |
decomposed according to the masks and the corresponding |
| 4535 |
independent entries are updated. |
| 4536 |
|
| 4537 |
|
| 4538 |
|
| 4539 |
<span class="grey">M.I.T. [Page 77]</span></pre> |
| 4540 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-78" ></span> |
| 4541 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4542 |
|
| 4543 |
|
| 4544 |
FreeColors |
| 4545 |
cmap: COLORMAP |
| 4546 |
pixels: LISTofCARD32 |
| 4547 |
plane-mask: CARD32 |
| 4548 |
|
| 4549 |
Errors: Colormap, Access, Value |
| 4550 |
|
| 4551 |
The plane-mask should not have any bits in common with any of |
| 4552 |
the pixels. The set of all pixels is produced by ORing |
| 4553 |
together subsets of plane-mask with the pixels. The request |
| 4554 |
frees all of these pixels. Note that freeing an individual |
| 4555 |
pixel obtained from AllocColorPlanes may not actually allow |
| 4556 |
it to be reused until all of its "related" pixels are also |
| 4557 |
freed. |
| 4558 |
|
| 4559 |
All specified pixels that are allocated by the client in |
| 4560 |
cmap are freed, even if one or more pixels produce an error. |
| 4561 |
A Value error is generated if a specified pixel is not a |
| 4562 |
valid index into cmap, and an Access error is generated if a |
| 4563 |
specified pixel is not allocated by the client (i.e., is |
| 4564 |
unallocated or is only allocated by another client). If more |
| 4565 |
than one pixel is in error, which one is reported is |
| 4566 |
arbitrary. |
| 4567 |
|
| 4568 |
StoreColors |
| 4569 |
cmap: COLORMAP |
| 4570 |
items: LISTofCOLORITEM |
| 4571 |
|
| 4572 |
where |
| 4573 |
COLORITEM: [pixel: CARD32 |
| 4574 |
do-red, do-green, do-blue: BOOL |
| 4575 |
red, green, blue: CARD16] |
| 4576 |
|
| 4577 |
Errors: Colormap, Access, Value |
| 4578 |
|
| 4579 |
Changes the colormap entries of the specified pixels. The |
| 4580 |
do-red, do-green, and do-blue fields indicate which |
| 4581 |
components should actually be changed. If the colormap is an |
| 4582 |
installed map for its screen, the changes are visible |
| 4583 |
immediately. |
| 4584 |
|
| 4585 |
All specified pixels that are allocated writable in cmap (by |
| 4586 |
any client) are changed, even if one or more pixels produce |
| 4587 |
an error. A Value error is generated if a specified pixel is |
| 4588 |
not a valid index into cmap, and an Access error is generated |
| 4589 |
if a specified pixel is unallocated or is allocated |
| 4590 |
read-only. If more than one pixel is in error, which one is |
| 4591 |
reported is arbitrary. |
| 4592 |
|
| 4593 |
StoreNamedColor |
| 4594 |
cmap: COLORMAP |
| 4595 |
|
| 4596 |
|
| 4597 |
|
| 4598 |
<span class="grey">M.I.T. [Page 78]</span></pre> |
| 4599 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-79" ></span> |
| 4600 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4601 |
|
| 4602 |
|
| 4603 |
pixel: CARD32 |
| 4604 |
name: STRING8 |
| 4605 |
do-red, do-green, do-blue: BOOL |
| 4606 |
|
| 4607 |
Errors: Colormap, Name, Access, Value |
| 4608 |
|
| 4609 |
Looks up the named color with respect to the screen |
| 4610 |
associated with cmap, then does a StoreColors in cmap. The |
| 4611 |
name should use the ASCII encoding, and upper/lower case |
| 4612 |
does not matter. |
| 4613 |
|
| 4614 |
QueryColors |
| 4615 |
cmap: COLORMAP |
| 4616 |
pixels: LISTofCARD32 |
| 4617 |
=> |
| 4618 |
colors: LISTofRGB |
| 4619 |
|
| 4620 |
where |
| 4621 |
RGB: [red, green, blue: CARD16] |
| 4622 |
|
| 4623 |
Errors: Colormap, Value |
| 4624 |
|
| 4625 |
Returns the color values stored in cmap for the specified |
| 4626 |
pixels. The values returned for an unallocated entry are |
| 4627 |
undefined. A Value error is generated if a pixel is not a |
| 4628 |
valid index into cmap. If more than one pixel is in error, |
| 4629 |
which one is reported is arbitrary. |
| 4630 |
|
| 4631 |
LookupColor |
| 4632 |
cmap: COLORMAP |
| 4633 |
name: STRING8 |
| 4634 |
=> |
| 4635 |
exact-red, exact-green, exact-blue: CARD16 |
| 4636 |
screen-red, screen-green, screen-blue: CARD16 |
| 4637 |
|
| 4638 |
Errors: Colormap, Name |
| 4639 |
|
| 4640 |
Looks up the string name of a color with respect to the |
| 4641 |
screen associated with cmap, and returns both the exact the |
| 4642 |
color values and the closest values provided by the hardware. |
| 4643 |
The name should use the ASCII encoding, and upper/lower |
| 4644 |
case does not matter. |
| 4645 |
|
| 4646 |
CreateCursor |
| 4647 |
cid: CURSOR |
| 4648 |
source: PIXMAP |
| 4649 |
mask: PIXMAP or None |
| 4650 |
fore-red, fore-green, fore-blue: CARD16 |
| 4651 |
back-red, back-green, back-blue: CARD16 |
| 4652 |
x, y: CARD16 |
| 4653 |
|
| 4654 |
|
| 4655 |
|
| 4656 |
|
| 4657 |
<span class="grey">M.I.T. [Page 79]</span></pre> |
| 4658 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-80" ></span> |
| 4659 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4660 |
|
| 4661 |
|
| 4662 |
Errors: IDChoice, Bitmap, Match, Value, Alloc |
| 4663 |
|
| 4664 |
Creates a cursor and associates identifier cid with it. |
| 4665 |
Foreground and background RGB values must be specified, even |
| 4666 |
if the server only has a monochrome screen. The foreground |
| 4667 |
is used for the one bits in the source, and the background is |
| 4668 |
used for the zero bits. Both source and mask (if specified) |
| 4669 |
must have depth one (else a Match error), but can have any |
| 4670 |
root. The mask pixmap defines the shape of the cursor; that |
| 4671 |
is, the one bits in the mask define which source pixels will |
| 4672 |
be displayed. If no mask is given, all pixels of the source |
| 4673 |
are displayed. The mask, if present, must be the same size |
| 4674 |
as source (else a Match error). The x and y coordinates |
| 4675 |
define the hotspot, relative to the source's origin, and must |
| 4676 |
be a point within the source (else a Match error). |
| 4677 |
|
| 4678 |
The components of the cursor may be transformed arbitrarily |
| 4679 |
to meet display limitations. |
| 4680 |
|
| 4681 |
The pixmaps can be freed immediately if no further explicit |
| 4682 |
references to them are to be made. |
| 4683 |
|
| 4684 |
Subsequent drawing in the source or mask pixmap has an |
| 4685 |
undefined effect on the cursor; the server might or might |
| 4686 |
not make a copy of the pixmap. |
| 4687 |
|
| 4688 |
CreateGlyphCursor |
| 4689 |
cid: CURSOR |
| 4690 |
source-font: FONT |
| 4691 |
mask-font: FONT or None |
| 4692 |
source-char, mask-char: CARD16 |
| 4693 |
fore-red, fore-green, fore-blue: CARD16 |
| 4694 |
back-red, back-green, back-blue: CARD16 |
| 4695 |
|
| 4696 |
Errors: IDChoice, Font, Value, Alloc |
| 4697 |
|
| 4698 |
Similar to CreateCursor, but the source and mask bitmaps are |
| 4699 |
obtained from the specified font glyphs. The mask font and |
| 4700 |
character are optional. The origin of the source glyph |
| 4701 |
defines the hotspot, and the mask is positioned such that |
| 4702 |
the origins are coincident. The source and mask need not |
| 4703 |
have the same bounding box metrics. If no mask is given, |
| 4704 |
all pixels of the source are displayed. Note that |
| 4705 |
source-char and mask-char are CARD16 (not CHAR2B); for |
| 4706 |
two-byte matrix fonts, the 16-bit value should be formed |
| 4707 |
with byte1 in the most significant byte and byte2 in the |
| 4708 |
least significant byte. |
| 4709 |
|
| 4710 |
FreeCursor |
| 4711 |
cursor: CURSOR |
| 4712 |
|
| 4713 |
|
| 4714 |
|
| 4715 |
|
| 4716 |
<span class="grey">M.I.T. [Page 80]</span></pre> |
| 4717 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-81" ></span> |
| 4718 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4719 |
|
| 4720 |
|
| 4721 |
Errors: Cursor |
| 4722 |
|
| 4723 |
Deletes the association between the resource id and the |
| 4724 |
cursor. The cursor storage will be freed when no other |
| 4725 |
resource references it. |
| 4726 |
|
| 4727 |
RecolorCursor |
| 4728 |
cursor: CURSOR |
| 4729 |
fore-red, fore-green, fore-blue: CARD16 |
| 4730 |
back-red, back-green, back-blue: CARD16 |
| 4731 |
|
| 4732 |
Errors: Cursor |
| 4733 |
|
| 4734 |
Changes the color of a cursor. If the cursor is being |
| 4735 |
displayed on a screen, the change is visible immediately. |
| 4736 |
|
| 4737 |
QueryBestSize |
| 4738 |
class: {Cursor, Tile, Stipple} |
| 4739 |
drawable: DRAWABLE |
| 4740 |
width, height: CARD16 |
| 4741 |
=> |
| 4742 |
width, height: CARD16 |
| 4743 |
|
| 4744 |
Errors: Drawable, Value, Match |
| 4745 |
|
| 4746 |
Returns the "best" size that is "closest" to the argument |
| 4747 |
size. For Cursor, this is the largest size that can be |
| 4748 |
fully displayed. For Tile, this is the size that can be |
| 4749 |
tiled "fastest". For Stipple, this is the size that can |
| 4750 |
be stippled "fastest". |
| 4751 |
|
| 4752 |
For Cursor, the drawable indicates the desired screen. For |
| 4753 |
Tile and Stipple, the drawable indicates screen, and also |
| 4754 |
possibly window class and depth; an InputOnly window cannot |
| 4755 |
be used as the drawable for Tile or Stipple (else a Match |
| 4756 |
error). |
| 4757 |
|
| 4758 |
QueryExtension |
| 4759 |
name: STRING8 |
| 4760 |
=> |
| 4761 |
present: BOOL |
| 4762 |
major-opcode: CARD8 |
| 4763 |
first-event: CARD8 |
| 4764 |
first-error: CARD8 |
| 4765 |
|
| 4766 |
Determines if the named extension is present. If so, the |
| 4767 |
major opcode for the extension is returned, if it has one, |
| 4768 |
otherwise zero is returned. Any minor opcode and the request |
| 4769 |
formats are specific to the extension. If the extension |
| 4770 |
involves additional event types, the base event type code is |
| 4771 |
returned, otherwise zero is returned. The format of the |
| 4772 |
|
| 4773 |
|
| 4774 |
|
| 4775 |
<span class="grey">M.I.T. [Page 81]</span></pre> |
| 4776 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-82" ></span> |
| 4777 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4778 |
|
| 4779 |
|
| 4780 |
events is specific to the extension. If the extension |
| 4781 |
involves additional error codes, the base error code is |
| 4782 |
returned, otherwise zero is returned. The format of |
| 4783 |
additional data in the errors is specific to the extension. |
| 4784 |
|
| 4785 |
The extension name should be in the ASCII encoding, and |
| 4786 |
upper/lower case matters. |
| 4787 |
|
| 4788 |
ListExtensions |
| 4789 |
=> |
| 4790 |
names: LISTofSTRING8 |
| 4791 |
|
| 4792 |
Returns a list of all extensions supported by the server. |
| 4793 |
|
| 4794 |
SetKeyboardMapping |
| 4795 |
map: LISTofCARD8 |
| 4796 |
=> |
| 4797 |
status: {Success, Busy} |
| 4798 |
|
| 4799 |
Errors: Value |
| 4800 |
|
| 4801 |
Sets the mapping of the keyboard. Elements of the list are |
| 4802 |
indexed starting from one. The list must be of length 255. |
| 4803 |
The index is a "core" keycode, and the element of the list |
| 4804 |
defines the "effective" keycode. |
| 4805 |
|
| 4806 |
A zero element disables a key, no elements can have values 1 |
| 4807 |
through 7, and no two elements (with index larger than 7) can |
| 4808 |
have the same non-zero value. If the keyboard does not |
| 4809 |
really generate a given keycode, specifying a non-zero value |
| 4810 |
for that core keycode has no effect. |
| 4811 |
|
| 4812 |
Elements 6 and 7 of the map must always be zero. The first |
| 4813 |
five elements are special: they specify the keycodes (if |
| 4814 |
any) that correspond to the Mod1 through Mod5 modifiers. |
| 4815 |
Setting one of these entries to zero disables use of that |
| 4816 |
modifier bit. No two of the firstfive elements can have the |
| 4817 |
same non-zero value. |
| 4818 |
|
| 4819 |
A server can impose restrictions on how keyboards get |
| 4820 |
remapped, e.g., if certain keys do not generate up |
| 4821 |
transitions in hardware. |
| 4822 |
|
| 4823 |
If any of the keys or modifiers to be altered are currently |
| 4824 |
in the down state, the status reply is Busy and the mapping |
| 4825 |
is not changed. |
| 4826 |
|
| 4827 |
GetKeyboardMapping |
| 4828 |
=> |
| 4829 |
map: LISTofCARD8 |
| 4830 |
|
| 4831 |
|
| 4832 |
|
| 4833 |
|
| 4834 |
<span class="grey">M.I.T. [Page 82]</span></pre> |
| 4835 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-83" ></span> |
| 4836 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4837 |
|
| 4838 |
|
| 4839 |
Errors: Value |
| 4840 |
|
| 4841 |
Returns the current mapping of the keyboard. Elements of the |
| 4842 |
list are indexed starting from one. The length of the list |
| 4843 |
is 255. |
| 4844 |
|
| 4845 |
The nominal mapping for a keyboard is almost the identity |
| 4846 |
mapping, except that map[i]=0 for keycodes that have no |
| 4847 |
corresponding physical key, and the first five entries |
| 4848 |
indicate the keycodes (if any) corresponding to the Mod1 |
| 4849 |
through Mod5 modifier bits. |
| 4850 |
|
| 4851 |
ChangeKeyboardControl |
| 4852 |
value-mask: BITMASK |
| 4853 |
value-list: LISTofVALUE |
| 4854 |
|
| 4855 |
Errors: Match Value |
| 4856 |
|
| 4857 |
Controls various aspects of the keyboard. The value-mask and |
| 4858 |
value-list specify which controls are to be changed. The |
| 4859 |
possible values are: |
| 4860 |
|
| 4861 |
key-click-percent: INT8 |
| 4862 |
bell-percent: INT8 |
| 4863 |
bell-pitch: INT16 |
| 4864 |
bell-duration: INT16 |
| 4865 |
led: CARD8 |
| 4866 |
led-mode: {On, Off} |
| 4867 |
key: KEYCODE |
| 4868 |
auto-repeat-mode: {On, Off, Default} |
| 4869 |
|
| 4870 |
Key-click-percent sets the volume for key clicks between 0 |
| 4871 |
(off) and 100 (loud) inclusive, if possible. Setting to -1 |
| 4872 |
restores the default. Other negative values generate a Value |
| 4873 |
error. |
| 4874 |
|
| 4875 |
Bell-percent sets the base volume for the bell between 0 |
| 4876 |
(off) and 100 (loud) inclusive, if possible. Setting to -1 |
| 4877 |
restores the default. Other negative values generate a Value |
| 4878 |
error. |
| 4879 |
|
| 4880 |
Bell-pitch sets the pitch (specified in Hz) of the bell, if |
| 4881 |
possible. Setting to -1 restores the default. Other |
| 4882 |
negative values generate a Value error. |
| 4883 |
|
| 4884 |
Bell-duration sets the duration (specified in milliseconds) |
| 4885 |
of the bell, if possible. Setting to -1 restores the |
| 4886 |
default. Other negative values generate a Value error. |
| 4887 |
|
| 4888 |
If both led-mode and led are specified, then the state of |
| 4889 |
that LED is changed, if possible. If only led-mode is |
| 4890 |
|
| 4891 |
|
| 4892 |
|
| 4893 |
<span class="grey">M.I.T. [Page 83]</span></pre> |
| 4894 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-84" ></span> |
| 4895 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4896 |
|
| 4897 |
|
| 4898 |
specified, then the state of all LEDs are changed, if |
| 4899 |
possible. At most 32 LEDs are supported, numbered from one. |
| 4900 |
It is a Match error if an led is specified without an |
| 4901 |
led-mode. |
| 4902 |
|
| 4903 |
If both auto-repeat-mode and key are specified, then the |
| 4904 |
auto-repeat mode of that key is changed, if possible. If |
| 4905 |
only auto-repeat-mode is specified, then the global |
| 4906 |
auto-repeat mode for the entire keyboard is changed, if |
| 4907 |
possible, without affecting the per-key settings. It is |
| 4908 |
a Match error if a key is specified without an |
| 4909 |
auto-repeat-mode. |
| 4910 |
|
| 4911 |
A bell generator connected with the console but not directly |
| 4912 |
on the keyboard is treated as if it were part of the |
| 4913 |
keyboard. |
| 4914 |
|
| 4915 |
The order in which controls are verified and altered is |
| 4916 |
server dependent. If an error is generated, a subset of the |
| 4917 |
controls may have been altered. |
| 4918 |
|
| 4919 |
GetKeyboardControl |
| 4920 |
=> |
| 4921 |
key-click-percent: CARD8 |
| 4922 |
bell-percent: CARD8 |
| 4923 |
bell-pitch: CARD16 |
| 4924 |
bell-duration: CARD16 |
| 4925 |
led-mask: CARD32 |
| 4926 |
global-auto-repeat: {On, Off} |
| 4927 |
auto-repeats: LISTofCARD8 |
| 4928 |
|
| 4929 |
Errors: Match |
| 4930 |
|
| 4931 |
Returns the current control values for the keyboard. For the |
| 4932 |
LEDs, the least significant bit of led-mask corresponds to |
| 4933 |
LED one, and each one bit in led-mask indicates an LED that |
| 4934 |
is lit. Auto-repeats is a bit vector; each one bit indicates |
| 4935 |
that auto-repeat is enabled for the corresponding key. The |
| 4936 |
vector is represented as 32 bytes. Byte N (from 0) contains |
| 4937 |
the bits for keys 8N to 8N+7, with the least significant bit |
| 4938 |
in the byte representing key 8N. |
| 4939 |
|
| 4940 |
Bell |
| 4941 |
percent: INT8 |
| 4942 |
|
| 4943 |
Errors: Match, Value |
| 4944 |
|
| 4945 |
Rings the bell on the keyboard at the specified volume |
| 4946 |
relative to the base volume for the keyboard, if possible. |
| 4947 |
Percent, which can range from -100 to 100 inclusive, is added |
| 4948 |
to the base volume, and the sum limited to the range 0 to 100 |
| 4949 |
|
| 4950 |
|
| 4951 |
|
| 4952 |
<span class="grey">M.I.T. [Page 84]</span></pre> |
| 4953 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-85" ></span> |
| 4954 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 4955 |
|
| 4956 |
|
| 4957 |
inclusive. |
| 4958 |
|
| 4959 |
SetPointerMapping |
| 4960 |
map: LISTofCARD8 |
| 4961 |
=> |
| 4962 |
status: {Success, Busy} |
| 4963 |
|
| 4964 |
Errors: Value |
| 4965 |
|
| 4966 |
Sets the mapping of the pointer. Elements of the list are |
| 4967 |
indexed starting from one. The length of the list must be |
| 4968 |
the same as GetPointerMapping would return. The index is a |
| 4969 |
"core" button number, and the element of the list defines |
| 4970 |
the "effective" number. |
| 4971 |
|
| 4972 |
A zero element disables a button, and elements are not |
| 4973 |
restricted in value by the number of physical buttons, but |
| 4974 |
no two elements can have the same non-zero value. |
| 4975 |
|
| 4976 |
If any of the buttons to be altered are currently in the |
| 4977 |
down state,the status reply is Busy and the mapping is not |
| 4978 |
changed. |
| 4979 |
|
| 4980 |
GetPointerMapping |
| 4981 |
=> |
| 4982 |
map: LISTofCARD8 |
| 4983 |
|
| 4984 |
Errors: Value |
| 4985 |
|
| 4986 |
Returns the current mapping of the pointer. Elements of the |
| 4987 |
list are indexed starting from one. The length of the list |
| 4988 |
indicates the number of physical buttons. |
| 4989 |
|
| 4990 |
The nominal mapping for a pointer is the identity mapping; |
| 4991 |
map[i]=i. |
| 4992 |
|
| 4993 |
ChangePointerControl |
| 4994 |
do-acceleration, do-threshold: BOOL |
| 4995 |
acceleration-numerator, acceleration-denominator: INT16 |
| 4996 |
threshold: INT16 |
| 4997 |
|
| 4998 |
Errors: Match, Value |
| 4999 |
|
| 5000 |
Defines how the pointer moves. The acceleration is a |
| 5001 |
multiplier for movement, expressed as a fraction. For |
| 5002 |
example, specifying 3/1 means the pointer moves three times |
| 5003 |
as fast as normal. The fraction may be rounded arbitrarily |
| 5004 |
by the server. Acceleration only takes effect if the |
| 5005 |
pointer moves more than threshold pixels at once, and only |
| 5006 |
applies to the amount beyond the threshold. Setting a |
| 5007 |
value to -1 restores the default. Other negative values |
| 5008 |
|
| 5009 |
|
| 5010 |
|
| 5011 |
<span class="grey">M.I.T. [Page 85]</span></pre> |
| 5012 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-86" ></span> |
| 5013 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5014 |
|
| 5015 |
|
| 5016 |
generate a Value error, as does a zero value for |
| 5017 |
acceleration-denominator. |
| 5018 |
|
| 5019 |
GetPointerControl |
| 5020 |
=> |
| 5021 |
acceleration-numerator, acceleration-denominator: CARD16 |
| 5022 |
threshold: CARD16 |
| 5023 |
|
| 5024 |
Errors: Match |
| 5025 |
|
| 5026 |
Returns the current acceleration and threshold for the |
| 5027 |
pointer. |
| 5028 |
|
| 5029 |
SetScreenSaver |
| 5030 |
timeout, interval: INT16 |
| 5031 |
prefer-blanking: {Yes, No, Default} |
| 5032 |
allow-exposures: {Yes, No, Default} |
| 5033 |
|
| 5034 |
Errors: Value |
| 5035 |
|
| 5036 |
Timeout and interval are specified in minutes; setting a |
| 5037 |
value to -1 restores the default. Other negative values |
| 5038 |
generate a Value error. If the timeout value is zero, |
| 5039 |
screen-saver is disabled. If the timeout value is |
| 5040 |
non-zero, screen-saver is enabled. Once screen-saver |
| 5041 |
is enabled, if no input from the keyboard or pointer is |
| 5042 |
generated for timeout minutes, screen-saver is activated. |
| 5043 |
For each screen, if blanking is preferred and the hardware |
| 5044 |
supports video blanking, the screen will simply go blank. |
| 5045 |
Otherwise, if either exposures are allowed or the screen |
| 5046 |
can be regenerated without sending exposure events to |
| 5047 |
clients, the screen is tiled with the root window |
| 5048 |
background tile, randomly re-origined each interval |
| 5049 |
minutes if the interval value is non-zero. Otherwise, the |
| 5050 |
state of the screen does not change and screen-saver is not |
| 5051 |
activated. Screen-saver is deactivated, and all screen |
| 5052 |
states are restored, at the next keyboard or pointer input |
| 5053 |
or at the next ForceScreenSaver with mode Reset. |
| 5054 |
|
| 5055 |
GetScreenSaver |
| 5056 |
=> |
| 5057 |
timeout, interval: CARD16 |
| 5058 |
prefer-blanking: {Yes, No} |
| 5059 |
allow-exposures: {Yes, No} |
| 5060 |
|
| 5061 |
Returns the current screen-saver control values. |
| 5062 |
|
| 5063 |
ForceScreenSaver |
| 5064 |
mode: {Activate, Reset} |
| 5065 |
|
| 5066 |
If the mode is Activate and screen-saver is currently |
| 5067 |
|
| 5068 |
|
| 5069 |
|
| 5070 |
<span class="grey">M.I.T. [Page 86]</span></pre> |
| 5071 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-87" ></span> |
| 5072 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5073 |
|
| 5074 |
|
| 5075 |
deactivated, then screen-saver is activated (even if |
| 5076 |
screen-saver has been disabled with a timeout value of zero). |
| 5077 |
If the mode is Reset and screen-saver is currently enabled, |
| 5078 |
then screen-saver is deactivated (if it was activated), and |
| 5079 |
then the activation timer is reset to its initial state, as |
| 5080 |
if device input had just been received. |
| 5081 |
|
| 5082 |
ChangeHosts |
| 5083 |
mode: {Insert, Delete} |
| 5084 |
host: HOST |
| 5085 |
|
| 5086 |
Errors: Access, Value |
| 5087 |
|
| 5088 |
Adds or removes the specified host from the access control |
| 5089 |
list. When the access control mechanism is enabled and a |
| 5090 |
host attempts to establish a connection to the server, the |
| 5091 |
host must be in this list or the server will refuse the |
| 5092 |
connection. |
| 5093 |
|
| 5094 |
The client must reside on the same host as the server, and/or |
| 5095 |
have been granted permission in the initial authorization at |
| 5096 |
connection setup. |
| 5097 |
|
| 5098 |
An initial access control list can be specified, typically |
| 5099 |
by naming a file that the server reads at startup and reset. |
| 5100 |
|
| 5101 |
ListHosts |
| 5102 |
=> |
| 5103 |
mode: {Enabled, Disabled} |
| 5104 |
hosts: LISTofHOST |
| 5105 |
|
| 5106 |
Returns the hosts on the access control list, and whether use |
| 5107 |
of the list at connection setup is currently enabled or |
| 5108 |
disabled. |
| 5109 |
|
| 5110 |
Each HOST is padded to a multiple of four bytes. |
| 5111 |
|
| 5112 |
ChangeAccessControl |
| 5113 |
mode: {Enable, Disable} |
| 5114 |
|
| 5115 |
Errors: Value, Access |
| 5116 |
|
| 5117 |
Enables or disables the use of the access control list at |
| 5118 |
connection setups. |
| 5119 |
|
| 5120 |
The client must reside on the same host as the server, and/or |
| 5121 |
have been granted permission in the initial authorization at |
| 5122 |
connection setup. |
| 5123 |
|
| 5124 |
ChangeCloseDownMode |
| 5125 |
mode: {Destroy, RetainPermanent, RetainTemporary} |
| 5126 |
|
| 5127 |
|
| 5128 |
|
| 5129 |
<span class="grey">M.I.T. [Page 87]</span></pre> |
| 5130 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-88" ></span> |
| 5131 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5132 |
|
| 5133 |
|
| 5134 |
Errors: Value |
| 5135 |
|
| 5136 |
Defines what will happen to the client's resources at |
| 5137 |
connection close. A connection starts in Destroy mode. The |
| 5138 |
meaning of the close-down mode is described in <a href="#section-11">Section 11</a>. |
| 5139 |
|
| 5140 |
KillClient |
| 5141 |
resource: CARD32 or AllTemporary |
| 5142 |
|
| 5143 |
Errors: Value |
| 5144 |
|
| 5145 |
If a valid resource is specified, forces a close-down of the |
| 5146 |
client that created the resource. If the client has already |
| 5147 |
terminated in either RetainPermanent or RetainTemporary mode, |
| 5148 |
all of the client's resources are destroyed (see <a href="#section-11">Section 11</a>). |
| 5149 |
If AllTemporary is specified, then the resources of all |
| 5150 |
clients that have terminated in RetainTemporary are |
| 5151 |
destroyed. |
| 5152 |
|
| 5153 |
NoOperation |
| 5154 |
This request has no arguments and no results, but the request |
| 5155 |
length field can be non-zero, allowing the request to be any |
| 5156 |
multiple of 4 bytes in length. The bytes contained in the |
| 5157 |
request are uninterpreted by the server. |
| 5158 |
|
| 5159 |
This request can be used in its minimum 4 byte form as |
| 5160 |
"padding" where necessary by client libraries that find it |
| 5161 |
convenient to force requests to begin on 64-bit boundaries. |
| 5162 |
|
| 5163 |
|
| 5164 |
<a href="#section-11">SECTION 11</a>. CONNECTION CLOSE |
| 5165 |
|
| 5166 |
What happens at connection close: |
| 5167 |
|
| 5168 |
All event selections made by the client are discarded. If |
| 5169 |
the client has the pointer actively grabbed, an |
| 5170 |
UngrabPointer is performed. If the client has the keyboard |
| 5171 |
actively grabbed, an UngrabKeyboard is performed. All |
| 5172 |
passive grabs by the client are eleased. If the client has |
| 5173 |
the server grabbed, and UngrabServer is performed. If |
| 5174 |
close-down mode (see ChangeCloseDownMode) is |
| 5175 |
RetainPermanent or RetainTemporary, then all resources |
| 5176 |
(including colormap entries) allocated by the client are |
| 5177 |
marked as "permanent" or "temporary", respectively (but |
| 5178 |
this does not prevent other clients from explicitly |
| 5179 |
destroying them). If the mode is Destroy, then all of the |
| 5180 |
client's resources are destroyed as described below. |
| 5181 |
|
| 5182 |
What happens when a client's resources are destroyed: |
| 5183 |
|
| 5184 |
For each window in the client's save-set, if the window |
| 5185 |
|
| 5186 |
|
| 5187 |
|
| 5188 |
<span class="grey">M.I.T. [Page 88]</span></pre> |
| 5189 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-89" ></span> |
| 5190 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5191 |
|
| 5192 |
|
| 5193 |
created by the client, that save-set window is reparented to |
| 5194 |
the closest ancestor such that the save-set window is not an |
| 5195 |
inferior of a window created by the client. If the save-set |
| 5196 |
window is unmaped, a MapWindow request is performed on it. |
| 5197 |
After save-set processing, all windows created by the client |
| 5198 |
are destroyed. For each non-window resource created by the |
| 5199 |
client, the appropriate Free request is performed. All |
| 5200 |
colors and colormap entries allocated by the client are |
| 5201 |
freed. |
| 5202 |
|
| 5203 |
What happens when the last connection to a server closes: |
| 5204 |
|
| 5205 |
A server goes through a cycle, of having no connections and |
| 5206 |
having some connections. At every transition to the state |
| 5207 |
of having no connections, the server "resets" its state, as |
| 5208 |
if it had just been started. This starts by destroying all |
| 5209 |
lingering resources from clients that have terminated in |
| 5210 |
RetainPermanent or RetainTemporary mode. It additionally |
| 5211 |
includes deleting all but the predefined atom identifiers, |
| 5212 |
deleting all properties on all root windows, resetting all |
| 5213 |
device maps and attributes (key click, bell volume, |
| 5214 |
acceleration), resetting the access control list, restoring |
| 5215 |
the standard root tiles and cursors, restoring the default |
| 5216 |
font path, and restoring the input focus to state |
| 5217 |
PointerRoot. |
| 5218 |
|
| 5219 |
<a href="#section-12">SECTION 12</a>. EVENTS |
| 5220 |
|
| 5221 |
When a button is pressed with the pointer in some window W, and |
| 5222 |
no active pointer grab is in progress, then the ancestors if W are |
| 5223 |
searched from the root down, looking for a passive grab to |
| 5224 |
activate. If no matching passive grab on the button exists, then |
| 5225 |
an active grab is started automatically for the client receiving |
| 5226 |
the event, and the last-pointer-grab time is set to the current |
| 5227 |
server time. The effect is essentially equivalent to a GrabButton |
| 5228 |
with arguments: |
| 5229 |
event-window: the event window |
| 5230 |
event-mask: the client's selected events on the event window |
| 5231 |
pointer-mode and keyboard-mode: Asynchronous |
| 5232 |
owner-events: True if the client has OwnerGrabButton selected |
| 5233 |
on the event window, else False |
| 5234 |
confine-to: None |
| 5235 |
cursor: None |
| 5236 |
The grab is terminated automatically when all buttons are released. |
| 5237 |
UngrabPointer and ChangeActiveGrab can both be used to modify the |
| 5238 |
active grab. |
| 5239 |
|
| 5240 |
KeyPress |
| 5241 |
and |
| 5242 |
KeyRelease |
| 5243 |
and |
| 5244 |
|
| 5245 |
|
| 5246 |
|
| 5247 |
<span class="grey">M.I.T. [Page 89]</span></pre> |
| 5248 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-90" ></span> |
| 5249 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5250 |
|
| 5251 |
|
| 5252 |
ButtonPress |
| 5253 |
and |
| 5254 |
ButtonRelease |
| 5255 |
and |
| 5256 |
MotionNotify |
| 5257 |
root, event: WINDOW |
| 5258 |
child: WINDOW or None |
| 5259 |
same-screen: BOOL |
| 5260 |
root-x, root-y, event-x, event-y: INT16 |
| 5261 |
detail: <see below> |
| 5262 |
state: SETofKEYBUTMASK |
| 5263 |
time: TIMESTAMP |
| 5264 |
|
| 5265 |
Generated when a key or button changes state, or the pointer |
| 5266 |
moves. The "source" of the event is the window the pointer |
| 5267 |
is in. The window with respect to which the event is |
| 5268 |
normally reported is found by looking up the hierarchy |
| 5269 |
(starting with the source window) for the first window on |
| 5270 |
which any client has selected interest in the event, |
| 5271 |
provided no intervening window prohibits event generation by |
| 5272 |
including the event type in its do-not-propagate-mask. The |
| 5273 |
actual window used for reporting can be modified by active |
| 5274 |
grabs and the focus window. The window the event is reported |
| 5275 |
with respect to is called the "event" window. |
| 5276 |
|
| 5277 |
Root is the root window of the "source" window, and root-x |
| 5278 |
and root-y are the pointer coordinates relative to root's |
| 5279 |
origin at the time of the event. Event is the "event" |
| 5280 |
window. If the event window is on the same screen as root, |
| 5281 |
then event-x and event-y are the pointer coordinates relative |
| 5282 |
to the event window's origin; otherwise event-x and event-y |
| 5283 |
are zero. If the source window is an inferior of the event |
| 5284 |
window, then child is set to the child of the event window |
| 5285 |
that is an ancestor of the source window. The state |
| 5286 |
component gives the state of the buttons and modifier keys |
| 5287 |
just before the event. The detailcomponent varies with |
| 5288 |
the event type: |
| 5289 |
KeyPress, KeyRelease: KEYCODE |
| 5290 |
ButtonPress, ButtonRelease: BUTTON |
| 5291 |
MotionNotify: {Normal, Hint} |
| 5292 |
|
| 5293 |
MotionNotify events are only generated when the motion |
| 5294 |
begins and ends in the window. The granularity of motion |
| 5295 |
events is not guaranteed, but a client selecting for motion |
| 5296 |
events is guaranteed to get at least one event when the |
| 5297 |
pointer moves and comes to rest. Selecting PointerMotion |
| 5298 |
receives events independent of the state of the pointer |
| 5299 |
buttons. By selecting some subset of Button[1-5]Motion |
| 5300 |
instead, MotionNotify events will only be received when one |
| 5301 |
or more of the specified buttons are pressed. By selecting |
| 5302 |
ButtonMotion, MotionNotify events will received only when at |
| 5303 |
|
| 5304 |
|
| 5305 |
|
| 5306 |
<span class="grey">M.I.T. [Page 90]</span></pre> |
| 5307 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-91" ></span> |
| 5308 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5309 |
|
| 5310 |
|
| 5311 |
least one button is pressed. The events are always of type |
| 5312 |
MotionNotify, independent of the selection. If |
| 5313 |
PointerMotionHint is selected, the server is free to send |
| 5314 |
only one MotionNotify event (with detail Hint) to the client |
| 5315 |
for the event window, until either the key or button state |
| 5316 |
changes, or the pointer leaves the event window, or the |
| 5317 |
client issues a QueryPointer or GetMotionEvents request. |
| 5318 |
|
| 5319 |
EnterNotify |
| 5320 |
and |
| 5321 |
LeaveNotify |
| 5322 |
root, event: WINDOW |
| 5323 |
child: WINDOW or None |
| 5324 |
same-screen: BOOL |
| 5325 |
root-x, root-y, event-x, event-y: INT16 |
| 5326 |
mode: {Normal, Grab, Ungrab} |
| 5327 |
detail: {Ancestor, Virtual, Inferior, Nonlinear, |
| 5328 |
NonlinearVirtual} |
| 5329 |
focus: BOOL |
| 5330 |
state: SETofKEYBUTMASK |
| 5331 |
time: TIMESTAMP |
| 5332 |
|
| 5333 |
If pointer motion causes the pointer to be in a different |
| 5334 |
window than before, EnterNotify and LeaveNotify events are |
| 5335 |
generated instead of a MotionNotify event. Only clients |
| 5336 |
selecting EnterWindow on a window receive EnterNotify events, |
| 5337 |
and only clients selection LeaveNotifyreceive LeaveNotify |
| 5338 |
events. The pointer position reported in the event is always |
| 5339 |
the "final" position, not the "initial" position of the |
| 5340 |
pointer. In a LeaveNotify event, if a child of the event |
| 5341 |
window contains the "initial" position of the pointer, then |
| 5342 |
the child component is set to that child, otherwise it is |
| 5343 |
None. For an EnterNotify event, if a child of the event |
| 5344 |
window contains the "final" pointer position, then the child |
| 5345 |
component is set to that child, otherwise it is None. If |
| 5346 |
the the event window is the focus window or an inferior of |
| 5347 |
the focus window, then focus is True, and otherwisefocus is |
| 5348 |
False. |
| 5349 |
|
| 5350 |
Normal pointer motion events have mode Normal; pseudo-motion |
| 5351 |
events when a grab actives have mode Grab, and pseudo-motion |
| 5352 |
events when a grab deactivates have mode Ungrab. |
| 5353 |
|
| 5354 |
Normal events are generated as follows: |
| 5355 |
|
| 5356 |
When the pointer moves from window A to window B, and A is an |
| 5357 |
inferior of B: |
| 5358 |
LeaveNotify with detail Ancestor is generated on A |
| 5359 |
LeaveNotify with detail Virtual is generated on each window |
| 5360 |
between A and B exclusive (in that order) |
| 5361 |
EnterNotify with detail Inferior is generated on B |
| 5362 |
|
| 5363 |
|
| 5364 |
|
| 5365 |
<span class="grey">M.I.T. [Page 91]</span></pre> |
| 5366 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-92" ></span> |
| 5367 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5368 |
|
| 5369 |
|
| 5370 |
When the pointer moves from window A to window B, and B is an |
| 5371 |
inferior of A: |
| 5372 |
LeaveNotify with detail Inferior is generated on A |
| 5373 |
EnterNotify with detail Virtual is generated on each window |
| 5374 |
between A and B exclusive (in that order) |
| 5375 |
EnterNotify with detail Ancestor is generated on B |
| 5376 |
|
| 5377 |
When the pointer moves from window A to window B, with window C |
| 5378 |
being their least common ancestor: |
| 5379 |
LeaveNotify with detail Nonlinear is generated on A |
| 5380 |
LeaveNotify with detail NonlinearVirtual is generated on each |
| 5381 |
window between A and C exclusive (in that order) |
| 5382 |
EnterNotify with detail NonlinearVirtual is generated on each |
| 5383 |
window between C and B exclusive (in that order) |
| 5384 |
EnterNotify with detail Nonlinear is generated on B |
| 5385 |
|
| 5386 |
When the pointer moves from window A to window B, on different |
| 5387 |
screens: |
| 5388 |
LeaveNotify with detail Nonlinear is generated on A |
| 5389 |
LeaveNotify with detail NonlinearVirtual is generated on each |
| 5390 |
window above A up to and including its root (in |
| 5391 |
order) |
| 5392 |
EnterNotify with detail NonlinearVirtual is generated on each |
| 5393 |
window |
| 5394 |
from B's root down to but not including B (in order) |
| 5395 |
EnterNotify with detail Nonlinear is generated on B |
| 5396 |
|
| 5397 |
When a pointer grab activates (but after any initial warp into a |
| 5398 |
confine-to window), with G the grab-window for the grab and P the |
| 5399 |
window the pointer is in: |
| 5400 |
EnterNotify and LeaveNotify events with mode Grab are |
| 5401 |
generated (as for Normal above) as if the pointer were to |
| 5402 |
suddenly warp from its current position in P to some position |
| 5403 |
in G.However, the pointer does not warp, and the pointer |
| 5404 |
position is used as both the "initial"and "final" positions |
| 5405 |
for the events. |
| 5406 |
|
| 5407 |
When a pointer grab deactivates, with G the grab-window for the |
| 5408 |
grab and P the window the pointer is in: |
| 5409 |
|
| 5410 |
EnterNotify and LeaveNotify events with mode Ungrab are |
| 5411 |
generated (as for Normal above) as if the pointer were to |
| 5412 |
suddenly warp from from some position in G to its current |
| 5413 |
position in P. However, the pointer does not warp, and the |
| 5414 |
current pointer position is used as both the "initial" and |
| 5415 |
"final" positions for the events. |
| 5416 |
|
| 5417 |
FocusIn |
| 5418 |
and |
| 5419 |
FocusOut |
| 5420 |
event: WINDOW |
| 5421 |
|
| 5422 |
|
| 5423 |
|
| 5424 |
<span class="grey">M.I.T. [Page 92]</span></pre> |
| 5425 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-93" ></span> |
| 5426 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5427 |
|
| 5428 |
|
| 5429 |
mode: {Normal, WhileGrabbed, Grab, Ungrab} |
| 5430 |
detail: {Ancestor, Virtual, Inferior, Nonlinear, |
| 5431 |
NonlinearVirtual, Pointer, PointerRoot, None} |
| 5432 |
|
| 5433 |
Generated when the input focus changes. Reported to clients |
| 5434 |
selecting FocusChange on the window. Events generated by |
| 5435 |
SetInputFocus when the keyboard is not grabbed have mode |
| 5436 |
Normal; events generated by SetInputFocus when the keyboard |
| 5437 |
is grabbed have mode WhileGrabbed; events generated when a |
| 5438 |
keyboard grab actives have mode Grab, and events generated |
| 5439 |
when a keyboard grab deactivates have mode Ungrab. |
| 5440 |
|
| 5441 |
Normal and WhileGrabbed events are generated as follows: |
| 5442 |
|
| 5443 |
When the focus moves from window A to window B, and A is an |
| 5444 |
inferior of B, with the pointer in window P: |
| 5445 |
FocusOut with detail Ancestor is generated on A |
| 5446 |
FocusOut with detail Virtual is generated on each window |
| 5447 |
between A and B exclusive (in that order) |
| 5448 |
FocusIn with detail Inferior is generated on B |
| 5449 |
If P is an inferior of B, but P is not A or an inferior of A |
| 5450 |
or an ancestor of A, FocusIn with detail Pointer is |
| 5451 |
generated on each window below B down to and |
| 5452 |
including P (in order) |
| 5453 |
|
| 5454 |
When the focus moves from window A to window B, and B is an |
| 5455 |
inferior of A, with the pointer in window P: |
| 5456 |
If P is an inferior of A, but P is not A or an inferior of B |
| 5457 |
or an ancestor of B, FocusOut with detail Pointer is |
| 5458 |
generated on each window from P up to but not |
| 5459 |
including A (in order) |
| 5460 |
FocusOut with detail Inferior is generated on A |
| 5461 |
FocusIn with detail Virtual is generated on each window |
| 5462 |
between A and B exclusive (in that order) |
| 5463 |
FocusIn with detail Ancestor is generated on B |
| 5464 |
|
| 5465 |
When the focus moves from window A to window B, with window C |
| 5466 |
being their least common ancestor, and with the pointer in |
| 5467 |
window P: |
| 5468 |
If P is an inferior of A, FocusOut with detail Pointer is |
| 5469 |
generated on each window from P up to but not |
| 5470 |
including A (in order) |
| 5471 |
FocusOut with detail Nonlinear is generated on A |
| 5472 |
FocusOut with detail NonlinearVirtual is generated on each |
| 5473 |
window between A and C exclusive (in that order) |
| 5474 |
FocusIn with detail NonlinearVirtual is generated on each |
| 5475 |
window between C and B exclusive (in that order) |
| 5476 |
FocusIn with detail Nonlinear is generated on B |
| 5477 |
If P is an inferior of B, FocusIn with detail Pointer is |
| 5478 |
generated on each window below B down to and |
| 5479 |
including P (in order) |
| 5480 |
|
| 5481 |
|
| 5482 |
|
| 5483 |
<span class="grey">M.I.T. [Page 93]</span></pre> |
| 5484 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-94" ></span> |
| 5485 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5486 |
|
| 5487 |
|
| 5488 |
When the focus moves from window A to window B, on different |
| 5489 |
screens, with the pointer in window P: |
| 5490 |
If P is an inferior of A, FocusOut with detail Pointer is |
| 5491 |
generated on each window from P up to but not |
| 5492 |
including A (in order) |
| 5493 |
FocusOut with detail Nonlinear is generated on A |
| 5494 |
FocusOut with detail NonlinearVirtual is generated on each |
| 5495 |
window above A up to and including its root (in |
| 5496 |
order) |
| 5497 |
FocusIn with detail NonlinearVirtual is generated on each |
| 5498 |
window from B's root down to but not including B |
| 5499 |
(in order) |
| 5500 |
FocusIn with detail Nonlinear is generated on B |
| 5501 |
If P is an inferior of B, FocusIn with detail Pointer is |
| 5502 |
generated on each window below B down to and |
| 5503 |
including P (in order) |
| 5504 |
|
| 5505 |
When the focus moves from window A to PointerRoot (or None) |
| 5506 |
If P is an inferior of A, FocusOut with detail Pointer is |
| 5507 |
generated on each window from P up to but not |
| 5508 |
including A (in order) |
| 5509 |
FocusOut with detail Nonlinear is generated on A |
| 5510 |
FocusOut with detail NonlinearVirtual is generated on each |
| 5511 |
window above A up to and including its root (in |
| 5512 |
order) |
| 5513 |
FocusIn with detail PointerRoot (or None) is generated on |
| 5514 |
all root windows |
| 5515 |
|
| 5516 |
When the focus moves from PointerRoot (or None) to window A: |
| 5517 |
FocusOut with detail PointerRoot (or None) is generated on |
| 5518 |
all root windows |
| 5519 |
FocusIn with detail NonlinearVirtual is generated on each |
| 5520 |
window from A's root down to but not including A |
| 5521 |
(in order) |
| 5522 |
FocusIn with detail Nonlinear is generated on A |
| 5523 |
If P is an inferior of A, FocusIn with detail Pointer is |
| 5524 |
generated on each window below A down to and |
| 5525 |
including P (in order) |
| 5526 |
|
| 5527 |
When the focus moves from PointerRoot to None (or vice versa): |
| 5528 |
FocusOut with detail PointerRoot (or None) is generated on |
| 5529 |
all root windows |
| 5530 |
FocusIn with detail None (or PointerRoot) is generated on |
| 5531 |
all root windows |
| 5532 |
|
| 5533 |
When a keyboard grab activates, with G the grab-window for the |
| 5534 |
grab and F the current focus: |
| 5535 |
FocusIn and FocusOut events with mode Grab are generated (as |
| 5536 |
for Normal above) as if the focus were to change from F to G |
| 5537 |
|
| 5538 |
|
| 5539 |
|
| 5540 |
|
| 5541 |
|
| 5542 |
<span class="grey">M.I.T. [Page 94]</span></pre> |
| 5543 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-95" ></span> |
| 5544 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5545 |
|
| 5546 |
|
| 5547 |
When a keyboard grab deactivates, with G the grab-window for the |
| 5548 |
grab and F the current focus: |
| 5549 |
FocusIn and FocusOut events with mode Ungrab are generated |
| 5550 |
(as for Normal above) as if the focus were to change from G |
| 5551 |
to F |
| 5552 |
|
| 5553 |
KeymapNotify |
| 5554 |
keys: LISTofCARD8 |
| 5555 |
|
| 5556 |
The value is a bit vector, as described in QueryKeymap. |
| 5557 |
Reported to clients selecting KeymapState on a window. |
| 5558 |
Generated immediately after every EnterNotify and FocusIn. |
| 5559 |
|
| 5560 |
Expose |
| 5561 |
window: WINDOW |
| 5562 |
x, y, width, height: CARD16 |
| 5563 |
last-in-series: BOOL |
| 5564 |
|
| 5565 |
Reported to clients selecting Exposure on the window. |
| 5566 |
Possibly generated when a region of the window becomes |
| 5567 |
viewable, but might only be generated when a region becomes |
| 5568 |
visible. All of the regions exposed by a given "action" are |
| 5569 |
guaranteed to be reported contiguously; if last-in-series is |
| 5570 |
False then another exposure follows. |
| 5571 |
|
| 5572 |
The x and y coordinates are relative to drawable's origin, |
| 5573 |
and specify the upper left corner of a rectangule. The |
| 5574 |
width and height specify the extent of the rectangle. |
| 5575 |
|
| 5576 |
Expose events are never generated on InputOnly windows. |
| 5577 |
|
| 5578 |
GraphicsExposure |
| 5579 |
drawable: DRAWABLE |
| 5580 |
x, y, width, height: CARD16 |
| 5581 |
last-in-series: BOOL |
| 5582 |
major-opcode: CARD8 |
| 5583 |
minor-opcode: CARD16 |
| 5584 |
|
| 5585 |
Reported to clients selecting graphics-exposures in a |
| 5586 |
graphics context. Generated when a destination region could |
| 5587 |
not be computed due to an obscured or out-of-bounds source |
| 5588 |
region. All of the regions exposed by a given graphics |
| 5589 |
request are guaranteed to be reported contiguously; if |
| 5590 |
last-in-series is False then another exposure follows. |
| 5591 |
|
| 5592 |
The x and y coordinates are relative to drawable's origin, |
| 5593 |
and specify the upper left corner of a rectangule. The width |
| 5594 |
and height specify the extent of the rectangle. |
| 5595 |
|
| 5596 |
The major and minor opcodes identify the graphics request |
| 5597 |
used. For the core protocol, major-opcode is always |
| 5598 |
|
| 5599 |
|
| 5600 |
|
| 5601 |
<span class="grey">M.I.T. [Page 95]</span></pre> |
| 5602 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-96" ></span> |
| 5603 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5604 |
|
| 5605 |
|
| 5606 |
CopyArea or CopyPlane and minor-opcode is always zero. |
| 5607 |
|
| 5608 |
NoExposure |
| 5609 |
drawable: DRAWABLE |
| 5610 |
major-opcode: CARD8 |
| 5611 |
minor-opcode: CARD16 |
| 5612 |
|
| 5613 |
Reported to clients selecting graphics-exposures in a |
| 5614 |
graphics context. Generated when a graphics request that |
| 5615 |
might produce GraphicsExposure events does not produce any. |
| 5616 |
The drawable specifies the destination used for the |
| 5617 |
graphics request. |
| 5618 |
|
| 5619 |
The major and minor opcodes identify the graphics request |
| 5620 |
used. For the core protocol, major-opcode is always CopyArea |
| 5621 |
or CopyPlane and minor-opcode is always zero. |
| 5622 |
|
| 5623 |
VisibilityNotify |
| 5624 |
window: WINDOW |
| 5625 |
state: {Unobscured, PartiallyObscured, FullyObscured} |
| 5626 |
|
| 5627 |
Reported to clients selecting VisibilityChange on the |
| 5628 |
window. In the following, the state of the window is |
| 5629 |
calculated ignoring all of the window's subwindows. When |
| 5630 |
a window changes state from partially or fully obscured or |
| 5631 |
not viewable to viewable and completely unobscured, an |
| 5632 |
event with Unobscured is generated. When a window changes |
| 5633 |
state from a) viewable and completely unobscured or b) not |
| 5634 |
viewable, to viewable and partially obscured, an event with |
| 5635 |
PartiallyObscured is generated. When a window changes state |
| 5636 |
from a) viewable and completely unobscured or b) viewable and |
| 5637 |
partially obscured or c) not viewable, to viewable and fully |
| 5638 |
obscured, an event with FullyObscured is generated. |
| 5639 |
|
| 5640 |
VisibilityNotify events are never generated on InputOnly |
| 5641 |
windows. |
| 5642 |
|
| 5643 |
CreateNotify |
| 5644 |
parent, window: WINDOW |
| 5645 |
x, y: INT16 |
| 5646 |
width, height, border-width: CARD16 |
| 5647 |
override-redirect: BOOL |
| 5648 |
|
| 5649 |
Reported to clients selecting SubstructureNotify on the |
| 5650 |
parent. Generated when the window is created. The arguments |
| 5651 |
are as in the CreateWindow request. |
| 5652 |
|
| 5653 |
|
| 5654 |
|
| 5655 |
|
| 5656 |
|
| 5657 |
|
| 5658 |
|
| 5659 |
|
| 5660 |
<span class="grey">M.I.T. [Page 96]</span></pre> |
| 5661 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-97" ></span> |
| 5662 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5663 |
|
| 5664 |
|
| 5665 |
DestroyNotify |
| 5666 |
event, window: WINDOW |
| 5667 |
|
| 5668 |
Reported to clients selecting StructureNotify on the window, |
| 5669 |
and to clients selecting SubstructureNotify on the parent. |
| 5670 |
Generated when the window is destroyed. "Event" is the |
| 5671 |
window on which the event was generated, and "window" is |
| 5672 |
the window that is destroyed. |
| 5673 |
|
| 5674 |
UnmapNotify |
| 5675 |
event, window: WINDOW |
| 5676 |
from-configure: BOOL |
| 5677 |
|
| 5678 |
Reported to clients selecting StructureNotify on the window, |
| 5679 |
and to clients selecting SubstructureNotify on the parent. |
| 5680 |
Generated when the window changes state from mapped to |
| 5681 |
unmapped. "Event" is the window on which the event was |
| 5682 |
generated, and "window" is the window that is unmapped. The |
| 5683 |
from-configure flag is True if the event was generated as a |
| 5684 |
result of the window's parent being resized when the window |
| 5685 |
itself had a win-gravity of Unmap. |
| 5686 |
|
| 5687 |
MapNotify |
| 5688 |
event, window: WINDOW |
| 5689 |
override-redirect: BOOL |
| 5690 |
|
| 5691 |
Reported to clients selecting StructureNotify on the window, |
| 5692 |
and to clients selecting SubstructureNotify on the parent. |
| 5693 |
Generated when the window changes state from unmapped to |
| 5694 |
mapped. "Event" is the window on which the event was |
| 5695 |
generated, and "window" is the window that is mapped. The |
| 5696 |
override-redirect flag is from the window's attribute. |
| 5697 |
|
| 5698 |
MapRequest |
| 5699 |
parent, window: WINDOW |
| 5700 |
|
| 5701 |
Reported to the client selecting SubstructureRedirect on the |
| 5702 |
parent. Generated when a MapWindow request is issued on an |
| 5703 |
unmapped window with an override-redirect attribute of False. |
| 5704 |
|
| 5705 |
ReparentNotify |
| 5706 |
event, window, parent: WINDOW |
| 5707 |
x, y: INT16 |
| 5708 |
override-redirect: BOOL |
| 5709 |
|
| 5710 |
Reported to clients selecting SubstructureNotify on either |
| 5711 |
the old or the new parent, and to clients selecting |
| 5712 |
StructureNotify on the window. Generated when the window |
| 5713 |
is reparented. "Event" is the window on which the event |
| 5714 |
was generated, "window" is the window that has been |
| 5715 |
re-rooted, and "parent" specifies the new parent. The x |
| 5716 |
|
| 5717 |
|
| 5718 |
|
| 5719 |
<span class="grey">M.I.T. [Page 97]</span></pre> |
| 5720 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-98" ></span> |
| 5721 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5722 |
|
| 5723 |
|
| 5724 |
and y coordinates are relative to the new parent's origin, |
| 5725 |
and specify the position of the upper left outer corner of |
| 5726 |
the window. The override-redirect flag is from the |
| 5727 |
window's attribute. |
| 5728 |
|
| 5729 |
ConfigureNotify |
| 5730 |
event, window: WINDOW |
| 5731 |
x, y: INT16 |
| 5732 |
width, height, border-width: CARD16 |
| 5733 |
above-sibling: WINDOW or None |
| 5734 |
override-redirect: BOOL |
| 5735 |
|
| 5736 |
Reported to clients selecting StructureNotify on the window, |
| 5737 |
and to clients selecting SubstructureNotify on the parent. |
| 5738 |
Generated when a ConfigureWindow request actually changes the |
| 5739 |
state of the window. "Event" is the window on which the event |
| 5740 |
was generated, and "window" is the window that is changed. |
| 5741 |
If above-sibling is None, then the window is on the bottom of |
| 5742 |
the stack with respect to siblings; otherwise, the window is |
| 5743 |
immediately on top of the specified sibling. The |
| 5744 |
override-redirect flag is from the window's attribute. |
| 5745 |
|
| 5746 |
GravityNotify |
| 5747 |
event, window: WINDOW |
| 5748 |
x, y: INT16 |
| 5749 |
|
| 5750 |
Reported to clients selecting SubstructureNotify on the |
| 5751 |
parent, and to clients selecting StructureNotify on the |
| 5752 |
window. Generated when a window is moved because of a |
| 5753 |
change in size of the parent. "Event" is the window on |
| 5754 |
which the event was generated, and "window" is the |
| 5755 |
window that is moved. |
| 5756 |
|
| 5757 |
ResizeRequest |
| 5758 |
window: WINDOW |
| 5759 |
width, height: CARD16 |
| 5760 |
|
| 5761 |
Reported to the client selecting ResizeRedirect on the |
| 5762 |
window. Generated when a ConfigureWindow request by some |
| 5763 |
other client on the window attempts to change the size of the |
| 5764 |
window. The width and height are the inside size, not |
| 5765 |
including the border. |
| 5766 |
|
| 5767 |
ConfigureRequest |
| 5768 |
parent, window: WINDOW |
| 5769 |
x, y: INT16 |
| 5770 |
width, height, border-width: CARD16 |
| 5771 |
above-sibling: WINDOW or None |
| 5772 |
|
| 5773 |
Reported to the client selecting SubstructureRedirect on the |
| 5774 |
parent. Generated when a ConfigureWindow request is issued on |
| 5775 |
|
| 5776 |
|
| 5777 |
|
| 5778 |
<span class="grey">M.I.T. [Page 98]</span></pre> |
| 5779 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-99" ></span> |
| 5780 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5781 |
|
| 5782 |
|
| 5783 |
the window by some other client. The geometry is as derived |
| 5784 |
from the request. The above-sibling is the sibling the |
| 5785 |
window should be placed directly on top of; if None, then the |
| 5786 |
window should be placed on the bottom. |
| 5787 |
|
| 5788 |
CirculateNotify |
| 5789 |
event, window: WINDOW |
| 5790 |
place: {Top, Bottom} |
| 5791 |
|
| 5792 |
Reported to clients selecting StructureNotify on the window, |
| 5793 |
and to clients selecting SubstructureNotify on the parent. |
| 5794 |
Generated when the window is actually restacked from a |
| 5795 |
CirculateWindow request. "Event" is the window on which the |
| 5796 |
event was generated, and "window" is the window that is |
| 5797 |
restacked. If place is Top, the window is now on top of all |
| 5798 |
siblings; otherwise it is below all siblings. |
| 5799 |
|
| 5800 |
CirculateRequest |
| 5801 |
parent, window: WINDOW |
| 5802 |
place: {Top, Bottom} |
| 5803 |
|
| 5804 |
Reported to the client selecting SubstructureRedirect on the |
| 5805 |
parent. Generated when a CirculateWindow request is issued on |
| 5806 |
the parent and a window actually needs to be restacked. The |
| 5807 |
window specifies the window to be restacked, and place |
| 5808 |
specifies what the new position in the stacking order should |
| 5809 |
be. |
| 5810 |
|
| 5811 |
PropertyNotify |
| 5812 |
window: WINDOW |
| 5813 |
atom: ATOM |
| 5814 |
state: {NewValue, Deleted} |
| 5815 |
time: TIMESTAMP |
| 5816 |
|
| 5817 |
Reported to clients selecting PropertyChange on the window. |
| 5818 |
Generated when a property of the window is changed. The |
| 5819 |
timestamp indicates the server time when the property was |
| 5820 |
changed. |
| 5821 |
|
| 5822 |
SelectionClear |
| 5823 |
owner: WINDOW |
| 5824 |
selection: ATOM |
| 5825 |
time: TIMESTAMP |
| 5826 |
|
| 5827 |
Reported to the current owner of a selection. Generated on |
| 5828 |
the window losing ownership when a new owner is being |
| 5829 |
defined. The timestamp is the last-change time recorded for |
| 5830 |
the selection. |
| 5831 |
|
| 5832 |
SelectionRequest |
| 5833 |
owner: WINDOW |
| 5834 |
|
| 5835 |
|
| 5836 |
|
| 5837 |
<span class="grey">M.I.T. [Page 99]</span></pre> |
| 5838 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-100" ></span> |
| 5839 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5840 |
|
| 5841 |
|
| 5842 |
selection: ATOM |
| 5843 |
target: ATOM |
| 5844 |
property: ATOM or None |
| 5845 |
requestor: WINDOW |
| 5846 |
time: TIMESTAMP or CurrentTime |
| 5847 |
|
| 5848 |
Reported to the owner of a selection. Generated when a |
| 5849 |
client issues a ConvertSelection request. The arguments are |
| 5850 |
as in the request. |
| 5851 |
|
| 5852 |
The owner should convert the selection based on the specified |
| 5853 |
target type. If a property is specified, the owner should |
| 5854 |
store the result as that property on the requestor window, |
| 5855 |
and then send a SelectionNotify event to the requestor using |
| 5856 |
SendEvent. If the selection cannot be converted as |
| 5857 |
requested, the owner should send a SelectionNotify with the |
| 5858 |
property set to None. |
| 5859 |
|
| 5860 |
SelectionNotify |
| 5861 |
requestor: WINDOW |
| 5862 |
selection, target: ATOM |
| 5863 |
property: ATOM or None |
| 5864 |
time: TIMESTAMP or CurrentTime |
| 5865 |
|
| 5866 |
This event is only generated by clients using SendEvent. The |
| 5867 |
owner of a selection should send this event to a requestor |
| 5868 |
when a selection has been converted and stored as a property, |
| 5869 |
or when a selection conversion could not be performed |
| 5870 |
(indicated with property None). |
| 5871 |
|
| 5872 |
ColormapNotify |
| 5873 |
window: WINDOW |
| 5874 |
colormap: COLORMAP or None |
| 5875 |
new: BOOL |
| 5876 |
state: {Installed, Uninstalled} |
| 5877 |
|
| 5878 |
Reported to clients selecting ColormapChange on the window. |
| 5879 |
Generated with value True for new when the colormap attribute |
| 5880 |
of the window is changed. Generated with value False for new |
| 5881 |
when the colormap of a window is installed or uninstalled. In |
| 5882 |
either case, state indicates whether the colormap is |
| 5883 |
currently installed. |
| 5884 |
|
| 5885 |
ClientMessage |
| 5886 |
window: WINDOW |
| 5887 |
type: ATOM |
| 5888 |
format: {8, 16, 32} |
| 5889 |
data: LISTofINT8 or LISTofINT16 or LISTofINT32 |
| 5890 |
|
| 5891 |
This event is only generated by clients using SendEvent. The |
| 5892 |
type specifies how the data is to be interpreted by the |
| 5893 |
|
| 5894 |
|
| 5895 |
|
| 5896 |
<span class="grey">M.I.T. [Page 100]</span></pre> |
| 5897 |
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-101" ></span> |
| 5898 |
<span class="grey"><a href="./rfc1013">RFC 1013</a> June 1987</span> |
| 5899 |
|
| 5900 |
|
| 5901 |
receiving client; the server places no interpretation on the |
| 5902 |
type or the data. The format specifies whether the data |
| 5903 |
should be viewed as a list of 8-bit, 16-bit, or 32-bit |
| 5904 |
quantities, so that the server can correctly byte-swap as |
| 5905 |
necessary. The data always consists of either 20 8-bit values |
| 5906 |
or 10 16-bit values or 5 32-bit values, although particular |
| 5907 |
message types might not make use of all of these values. |
| 5908 |
|
| 5909 |
<a href="#section-13">SECTION 13</a>. FLOW CONTROL AND CONCURRENCY |
| 5910 |
|
| 5911 |
Whenever the server is writing to a given connection, it is |
| 5912 |
permissible for the server to stop reading from that connection (but |
| 5913 |
if the writing would block it must continue to service other |
| 5914 |
connections). The server is not required to buffer more than a |
| 5915 |
single request per connection at one time. For a given connection |
| 5916 |
to the server, a client can block while reading from the connection, |
| 5917 |
but should undertake to read (events and errors) when writing would |
| 5918 |
block. Failure on the part of a client to obey this rule could |
| 5919 |
result in a deadlocked connection, although deadlock is probably |
| 5920 |
unlikely unless the transport layer has very little buffering, or |
| 5921 |
unless the client attempts to send large numbers of requests without |
| 5922 |
ever reading replies or checking for errors and events. |
| 5923 |
|
| 5924 |
If a server is implemented with internal concurrency, the overall |
| 5925 |
effect must be as if individual requests are executed to completion |
| 5926 |
in some serial order, and that requests from a given connection are |
| 5927 |
executed in delivery order (i.e., the total execution order is a |
| 5928 |
shuffle of the individual streams). The "execution" of a request |
| 5929 |
includes validating all arguments, collecting all data for any |
| 5930 |
reply, and generating (and queueing) all required events, but does |
| 5931 |
not include the actual transmission of the reply and the events. |
| 5932 |
In addition, the effect of any other "cause" (e.g., activation of |
| 5933 |
a grab, pointer motion) that can generate multiple events must |
| 5934 |
effectively generate (and queue) all required events indivisibly |
| 5935 |
with respect to all other causes and requests. |
| 5936 |
|
| 5937 |
|
| 5938 |
|
| 5939 |
|
| 5940 |
|
| 5941 |
|
| 5942 |
|
| 5943 |
|
| 5944 |
|
| 5945 |
|
| 5946 |
|
| 5947 |
|
| 5948 |
|
| 5949 |
|
| 5950 |
|
| 5951 |
|
| 5952 |
|
| 5953 |
|
| 5954 |
|
| 5955 |
M.I.T. [Page 101] |
| 5956 |
</pre> |