Unified · Split
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #include "draw.h" |
| 3 | 3 | |
| 4 | 4 | /* |
| 5 | − * compressed data are seuences of byte codes. | |
| 5 | + * compressed data are sequences of byte codes. | |
| 6 | 6 | * if the first byte b has the 0x80 bit set, the next (b^0x80)+1 bytes |
| 7 | 7 | * are data. otherwise, it's two bytes specifying a previous string to repeat. |
| 8 | 8 | */ |
| @@ -26,12 +26,12 @@ does not provide any means for starting new applications; · 25 unmodified lines | ||
| 26 | 26 | that facility must be provided by an auxilliary program, |
| 27 | 27 | .B wm/toolbar |
| 28 | 28 | being one such example. |
| 29 | −.SS Control Inferface | |
| 29 | +.SS Control Interface | |
| 30 | 30 | .I Wm |
| 31 | 31 | provides a control interface to programs running inside it |
| 32 | 32 | through the |
| 33 | 33 | .B Wmcontext |
| 34 | −adt that can be obtained from via the | |
| 34 | +adt that can be obtained from the | |
| 35 | 35 | .B Draw->Context |
| 36 | 36 | that it passes to applications that it starts |
| 37 | 37 | (see |
| @@ -5,9 +5,11 @@ devpointer \- I/O interface for the pointer device · 4 unmodified lines | ||
| 5 | 5 | .EX |
| 6 | 6 | include "draw.m"; # for Draw->Pointer |
| 7 | 7 | include "devpointer.m"; |
| 8 | −ptr:= load Devpointer Devpointer->PATH; | |
| 8 | +ptr := load Devpointer Devpointer->PATH; | |
| 9 | 9 | |
| 10 | −init: fn(file: string, posn: chan of ref Draw->Pointer): int; | |
| 10 | +init: fn(); | |
| 11 | +reader: fn(file: string, posn: chan of ref Draw->Pointer, | |
| 12 | + pid: chan of (int, string)); | |
| 11 | 13 | bytes2ptr: fn(buf: array of byte) : ref Draw->Pointer; |
| 12 | 14 | ptr2bytes: fn(ptr: ref Draw->Pointer): array of byte; |
| 13 | 15 | .EE |
| @@ -20,11 +22,30 @@ converting them to · 6 unmodified lines | ||
| 20 | 22 | adts. |
| 21 | 23 | .PP |
| 22 | 24 | .B Init |
| 23 | −spawns a process to read continually the pointer device specified by | |
| 24 | −.I file | |
| 25 | −and send a | |
| 25 | +must be called before any other operation of the module. | |
| 26 | +.PP | |
| 27 | +.B Reader | |
| 28 | +should be spawned by the caller. | |
| 29 | +It opens the pointer device specified by | |
| 30 | +.IR file , | |
| 31 | +and sends a value | |
| 32 | +.BI ( id,\ err ) | |
| 33 | +on channel | |
| 34 | +.IR pid . | |
| 35 | +On success, | |
| 36 | +.I id | |
| 37 | +is the process ID of the spawned process and | |
| 38 | +.I err | |
| 39 | +is nil; on an error, | |
| 40 | +.I err | |
| 41 | +is a diagnostic, and | |
| 42 | +.I id | |
| 43 | +is undefined. | |
| 44 | +If the file was opened successfully, | |
| 45 | +.B reader | |
| 46 | +continually reads the pointer device and sends | |
| 26 | 47 | .B Pointer |
| 27 | −adts over the channel specified by | |
| 48 | +adts over the channel | |
| 28 | 49 | .IR posn . |
| 29 | 50 | If |
| 30 | 51 | .I file |
| @@ -306,7 +306,7 @@ Returns a reference to the image published as · 305 unmodified lines | ||
| 306 | 306 | on display |
| 307 | 307 | .I d |
| 308 | 308 | by |
| 309 | −.B Image.nameimage | |
| 309 | +.B Image.name | |
| 310 | 310 | (see |
| 311 | 311 | .IR draw-image (2)). |
| 312 | 312 | This allows unrelated processes to share the image (eg, a window manager and client). |
| @@ -114,7 +114,7 @@ parameter can be · 113 unmodified lines | ||
| 114 | 114 | which provides backing store to store obscured parts of the window when necessary, |
| 115 | 115 | and is used by the window manager and its clients; or |
| 116 | 116 | .BR Draw->Refnone , |
| 117 | −wihch provides no refresh, and is used for windows that are transient, or are already protected by backing | |
| 117 | +which provides no refresh, and is used for windows that are transient, or are already protected by backing | |
| 118 | 118 | store. |
| 119 | 119 | .TP |
| 120 | 120 | .IB screen .top( wins ) |