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
97 each specific to the window.
100 device multiplexes itself;
102 places windows but does not mediate programs' access to the display device.
104 Other files are unique to
109 a virtual version of the standard terminal file from
112 supplies extra editing features and a scroll bar
117 controls interpretation of console input.
118 Writing strings to it sets these modes:
127 Closing the file makes the window revert to default state
131 represents the raw keyboard events (see
133 for the corresponding window. While open,
134 navigation keys and input on the
142 a multiplexed version of the underlying device file, in this case representing the
143 appearance of the mouse cursor when the mouse is within the corresponding window.
146 initially contains a string with the process ID of the lead process
147 in the window and the command being executed there.
148 It may be written and is used as a tag when the window is hidden.
151 is a virtual version of the standard mouse file (see
153 Opening it turns off scrolling, editing, and
155 menus in the associated
157 In a standard mouse message, the first character is
161 will send an otherwise normal message with the first character
163 if the corresponding window has been resized.
164 The application must then call
168 to re-establish its state in the newly moved or changed window.
171 file blocks until the mouse moves or a button changes.
172 Mouse movements or button changes are invisible when the mouse cursor
173 is located outside the window, except that if the mouse leaves the window
174 while a button is pressed, it will continue receiving mouse data until the button is released.
177 is a read-only file reporting the depth, coordinates, and raster image corresponding to the entire
179 in the uncompressed format defined in
183 returns the string currently in the snarf buffer.
184 Writing this file sets the contents of the snarf buffer.
187 is run recursively, the inner instance uses the snarf buffer of the parent, rather than
191 returns the full contents of the window.
192 It may not be written.
195 may be read or written.
196 When read, it returns the location of the window as four decimal integers formatted
197 in the usual 12-character style: upper left
205 Following these numbers are strings describing the window's state:
212 A subsequent read will block until the window changes size, location, or state.
215 accepts messages to change the size or placement of the associated window,
216 and to create new windows.
217 The messages are in a command-line like format, with a command name,
218 possibly followed by options introduced by a minus sign.
219 The options must be separated by blanks, for example
226 (change the size and position of the window),
230 (enable scrolling in the window),
234 (change selected properties of the window),
236 (move the window to the `top', making it fully visible),
238 (move the window to the `bottom', perhaps partially or totally obscuring it),
242 (restore a hidden window),
244 (make the window the recipient of keyboard and mouse input),
252 commands do not change whether the window is current or not;
253 the others always make the affected window current.
275 options to set the position of the corresponding edge of the window.
276 They also accept an option
278 .I minx miny maxx maxy
279 to set all four at once.
290 to set the width and height of the window.
293 will choose a convenient geometry automatically.
297 command accepts an optional shell command and argument string,
298 given as plain strings after any standard options, to run in the window
299 instead of the default
311 of the process whose `note group' should receive interrupt
312 and hangup notes generated in the window.
313 The initial working directory of the new window may be set by a
319 option causes the window to be created off-screen, in the hidden state, while
323 set the initial scrolling state of the window; the default is that of the main program.
327 command accepts a set of parameters in the same style; only
332 So programs outside name spaces controlled by
337 messages may also be written to the named pipe identified by
341 is a read/write text file containing
343 idea of the current working directory of the process running in the window.
344 It is used to fill in the
352 menu item on button 2.
353 The file is writable so the program may update it;
355 is otherwise unaware of
357 calls its clients make.
367 returns the unique and unchangeable ID for the window;
368 it is a string of digits.
371 is the virtual version of
373 It contains the depth, coordinates, and
374 uncompressed raster image corresponding to the associated
378 is a directory containing a subdirectory for each window, named
379 by the unique ID for that window. Within each subdirectory
380 are entries corresponding to several of the special files associated
388 Cause a window to be created in the upper left corner,
394 mount $wsys /tmp 'new -r 0 0 128 64 -pid '$pid
400 in a large horizontal window.
403 echo new -dx 800 -dy 200 -cd /sys/src/cmd sam > /dev/wctl
406 Print the screen image of window with id 123.
409 lp /dev/wsys/123/window