forsyth20121205-174063a80cc13 years agoHistory
90 lines · 1.8 KB · Text
RawDownload
.TH WMLIB 2.SH NAMEwmlib \-low level access to window manager.SH SYNOPSIS.EXinclude "sys.m";include "draw.m";include "wmlib.m";wmlib := load Wmlib Wmlib->PATH; init:       fn();connect:	fn(ctxt: ref Draw->Context): ref Draw->Wmcontext;startinput:	fn(w: ref Draw->Wmcontext, devs: list of string): string;wmctl:	fn(w: ref Draw->Wmcontext, request: string): (string, ref Draw->Image, string);snarfput:	fn(buf: string);snarfget:	fn(): string; .EE.SH DESCRIPTION.B Wmlibprovides basic routines to access the window manager,It is used by higher level modules such as.IR tkclient (2)and.IR wmclient (2)to provide window manager access to applications..PP.B Initshould be called once to initialise the internal state of.BR Wmlib ..B Connectmakes a connection to the window manager through.I ctxt(see.IR draw-context (2))..B Startinputtells the window manager to start queuing events on the inputstreams named in.I devs(e.g..BR ptr ,.BR kbd )so that they can be received by the application..PP.B Wmctlsends.I requestto the window manager.It returns a tuple, say (\fIname\fP, \fIimg\fP, \fIerr\fP).If a request fails, then.I nameand.I imgwill be nil and the non-empty.I errgives the reason.If the request has resized or created an image,.I namegives the tag name of the image and.I imgholds the new image..B Wmlibinterprets the.B exitrequest itself, by killing all processes in the currentprocess group, and exiting..PP.B Snarfgetand.B snarfputretrieve and replace the contents of the windowmanager's snarf buffer..SH FILES.TF /chan/snarf.TP.B /chan/snarfsnarf buffer maintained by.IR wm (1).TP.B /chan/wmchannel for interaction with.IR wm (1).SH SOURCE.B /appl/lib/wmclient.b.SH SEE ALSO.IR wm (1),.IR wmclient (2),.IR tkclient (2),.IR tk (2)