3 rio \- window system files
20 serves a variety of files for reading, writing, and controlling
22 Some of them are virtual versions of system files for dealing
23 with the display, keyboard, and mouse; others control operations
24 of the window system itself.
26 posts its service in the
29 name constructed from a catenation of the user ID
30 and a process id; the environment variable
32 is set to this service name within processes running under the control
37 posts a named pipe to access the window creation features
43 its name space; this is named in
54 to create a new window; the attach specifier in the
56 gives the coordinates of the created window.
57 The syntax of the specifier is the same as the arguments to
61 By default, the window is sized and placed automatically.
62 It is always necessary, however, to provide the process id of the
63 process to whom to deliver notes generated by DEL characters and hangups
65 That pid is specified by including the string
68 in the attach specifier. (See the Examples section
71 When a window is created either by
77 or by using the menu supplied by
79 this server is mounted on
83 the files mentioned here
84 appear in both those directories.
86 Some of these files supply virtual versions of services available from the underlying
87 environment, in particular the character terminal files
93 each specific to the window.
96 device multiplexes itself;
98 places windows but does not mediate programs' access to the display device.
100 Other files are unique to
105 is a virtual version of the standard terminal file
108 supplies extra editing features and a scroll bar
113 controls interpretation of keyboard input.
114 Writing strings to it sets these modes:
123 Closing the file makes the window revert to default state
130 a multiplexed version of the underlying device file, in this case representing the
131 appearance of the mouse cursor when the mouse is within the corresponding window.
134 initially contains a string with the process ID of the lead process
135 in the window and the command being executed there.
136 It may be written and is used as a tag when the window is hidden.
139 is a virtual version of the standard mouse file (see
141 Opening it turns off scrolling, editing, and
143 menus in the associated
145 In a standard mouse message, the first character is
149 will send an otherwise normal message with the first character
151 if the corresponding window has been resized.
152 The application must then call
156 to re-establish its state in the newly moved or changed window.
159 file blocks until the mouse moves or a button changes.
160 Mouse movements or button changes are invisible when the mouse cursor
161 is located outside the window, except that if the mouse leaves the window
162 while a button is pressed, it will continue receiving mouse data until the button is released.
165 is a read-only file reporting the depth, coordinates, and raster image corresponding to the entire
167 in the uncompressed format defined in
171 returns the string currently in the snarf buffer.
172 Writing this file sets the contents of the snarf buffer.
175 is run recursively, the inner instance uses the snarf buffer of the parent, rather than
179 returns the full contents of the window.
180 It may not be written.
183 may be read or written.
184 When read, it returns the location of the window as four decimal integers formatted
185 in the usual 12-character style: upper left
193 Following these numbers are strings describing the window's state:
200 A subsequent read will block until the window changes size, location, or state.
203 accepts messages to change the size or placement of the associated window,
204 and to create new windows.
205 The messages are in a command-line like format, with a command name,
206 possibly followed by options introduced by a minus sign.
207 The options must be separated by blanks, for example
214 (change the size and position of the window),
218 (enable scrolling in the window),
222 (change selected properties of the window),
224 (move the window to the `top', making it fully visible),
226 (move the window to the `bottom', perhaps partially or totally obscuring it),
230 (restore a hidden window),
232 (make the window the recipient of keyboard and mouse input),
240 commands do not change whether the window is current or not;
241 the others always make the affected window current.
263 options to set the position of the corresponding edge of the window.
264 They also accept an option
266 .I minx miny maxx maxy
267 to set all four at once.
278 to set the width and height of the window.
281 will choose a convenient geometry automatically.
285 command accepts an optional shell command and argument string,
286 given as plain strings after any standard options, to run in the window
287 instead of the default
299 of the process whose `note group' should receive interrupt
300 and hangup notes generated in the window.
301 The initial working directory of the new window may be set by a
307 option causes the window to be created off-screen, in the hidden state, while
311 set the initial scrolling state of the window; the default is that of the main program.
315 command accepts a set of parameters in the same style; only
320 So programs outside name spaces controlled by
325 messages may also be written to the named pipe identified by
329 is a read/write text file containing
331 idea of the current working directory of the process running in the window.
332 It is used to fill in the
340 menu item on button 2.
341 The file is writable so the program may update it;
343 is otherwise unaware of
345 calls its clients make.
355 returns the unique and unchangeable ID for the window;
356 it is a string of digits.
359 is the virtual version of
361 It contains the depth, coordinates, and
362 uncompressed raster image corresponding to the associated
366 is a directory containing a subdirectory for each window, named
367 by the unique ID for that window. Within each subdirectory
368 are entries corresponding to several of the special files associated
376 Cause a window to be created in the upper left corner,
382 mount $wsys /tmp 'new -r 0 0 128 64 -pid '$pid
388 in a large horizontal window.
391 echo new -dx 800 -dy 200 -cd /sys/src/cmd sam > /dev/wctl
394 Print the screen image of window with id 123.
397 lp /dev/wsys/123/window