From 54d06533f3d8d73d9369206f7f5be71351cfbcf3 Mon Sep 17 00:00:00 2001 From: forsyth Date: Thu, 24 Feb 2011 23:53:07 +0000 Subject: 20110224-2351 --- man/1/wm | 4 ++-- man/2/devpointer | 33 +++++++++++++++++++++++++++------ man/2/draw-display | 2 +- man/2/draw-screen | 2 +- 4 files changed, 31 insertions(+), 10 deletions(-) (limited to 'man') diff --git a/man/1/wm b/man/1/wm index a4678390..667ef9a7 100644 --- a/man/1/wm +++ b/man/1/wm @@ -26,12 +26,12 @@ does not provide any means for starting new applications; that facility must be provided by an auxilliary program, .B wm/toolbar being one such example. -.SS Control Inferface +.SS Control Interface .I Wm provides a control interface to programs running inside it through the .B Wmcontext -adt that can be obtained from via the +adt that can be obtained from the .B Draw->Context that it passes to applications that it starts (see diff --git a/man/2/devpointer b/man/2/devpointer index 6433221c..19c82f13 100644 --- a/man/2/devpointer +++ b/man/2/devpointer @@ -5,9 +5,11 @@ devpointer \- I/O interface for the pointer device .EX include "draw.m"; # for Draw->Pointer include "devpointer.m"; -ptr:= load Devpointer Devpointer->PATH; +ptr := load Devpointer Devpointer->PATH; -init: fn(file: string, posn: chan of ref Draw->Pointer): int; +init: fn(); +reader: fn(file: string, posn: chan of ref Draw->Pointer, + pid: chan of (int, string)); bytes2ptr: fn(buf: array of byte) : ref Draw->Pointer; ptr2bytes: fn(ptr: ref Draw->Pointer): array of byte; .EE @@ -20,11 +22,30 @@ converting them to adts. .PP .B Init -spawns a process to read continually the pointer device specified by -.I file -and send a +must be called before any other operation of the module. +.PP +.B Reader +should be spawned by the caller. +It opens the pointer device specified by +.IR file , +and sends a value +.BI ( id,\ err ) +on channel +.IR pid . +On success, +.I id +is the process ID of the spawned process and +.I err +is nil; on an error, +.I err +is a diagnostic, and +.I id +is undefined. +If the file was opened successfully, +.B reader +continually reads the pointer device and sends .B Pointer -adts over the channel specified by +adts over the channel .IR posn . If .I file diff --git a/man/2/draw-display b/man/2/draw-display index 90dbcb8d..7eb3898f 100644 --- a/man/2/draw-display +++ b/man/2/draw-display @@ -306,7 +306,7 @@ Returns a reference to the image published as on display .I d by -.B Image.nameimage +.B Image.name (see .IR draw-image (2)). This allows unrelated processes to share the image (eg, a window manager and client). diff --git a/man/2/draw-screen b/man/2/draw-screen index 5a0d283b..17a65781 100644 --- a/man/2/draw-screen +++ b/man/2/draw-screen @@ -114,7 +114,7 @@ parameter can be which provides backing store to store obscured parts of the window when necessary, and is used by the window manager and its clients; or .BR Draw->Refnone , -wihch provides no refresh, and is used for windows that are transient, or are already protected by backing +which provides no refresh, and is used for windows that are transient, or are already protected by backing store. .TP .IB screen .top( wins ) -- cgit v1.2.3