diff options
| author | bhgv <bhgv.empire@gmail.com> | 2018-03-01 16:54:45 +0200 |
|---|---|---|
| committer | bhgv <bhgv.empire@gmail.com> | 2018-03-01 16:54:45 +0200 |
| commit | b786f20bbab5a59046aa78a2c6c2a11536497202 (patch) | |
| tree | 0851ecdec889eb9b7ba3751cc04d4f0b474e4a9e /module/wmclient.m | |
inferno-os tree was separated from the inferno-os-android (separated from the Android driver)
Diffstat (limited to 'module/wmclient.m')
| -rw-r--r-- | module/wmclient.m | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/module/wmclient.m b/module/wmclient.m new file mode 100644 index 0000000..cc6f605 --- /dev/null +++ b/module/wmclient.m @@ -0,0 +1,49 @@ +Wmclient: module +{ + PATH: con "/dis/lib/wmclient.dis"; + + Resize, + Hide, + Help, + OK, + Popup, + Plain: con 1 << iota; + Appl: con Resize | Hide; + + init: fn(); + makedrawcontext: fn(): ref Draw->Context; + window: fn(ctxt: ref Draw->Context, title: string, buts: int): ref Window; + snarfput: fn(buf: string); + snarfget: fn(): string; + cursorspec: fn(img: ref Draw->Image): string; + + Window: adt{ + display: ref Draw->Display; + r: Draw->Rect; # full rectangle of window, including titlebar. + image: ref Draw->Image; + displayr: Draw->Rect; + ctxt: ref Draw->Wmcontext; + bd: int; + focused: int; + ctl: chan of string; + + # private from here: + titlebar: ref Tk->Toplevel; # XXX i wish this didn't have to be visible to the application... + tbsize: Draw->Point; # size requested by titlebar. + tbrect: Draw->Rect; + screen: ref Draw->Screen; + buttons: int; + ptrfocus: int; + saved: Draw->Point; # saved origin before task + + startinput: fn(w: self ref Window, devs: list of string); + wmctl: fn(w: self ref Window, request: string): string; + settitle: fn(w: self ref Window, name: string): string; + reshape: fn(w: self ref Window, r: Draw->Rect); + onscreen: fn(w: self ref Window, how: string); + screenr: fn(w: self ref Window, sr: Draw->Rect): Draw->Rect; + imager: fn(w: self ref Window, ir: Draw->Rect): Draw->Rect; + pointer: fn(w: self ref Window, p: Draw->Pointer): int; + }; + +}; |
