summaryrefslogtreecommitdiff
path: root/module/wmclient.m
diff options
context:
space:
mode:
Diffstat (limited to 'module/wmclient.m')
-rw-r--r--module/wmclient.m49
1 files changed, 49 insertions, 0 deletions
diff --git a/module/wmclient.m b/module/wmclient.m
new file mode 100644
index 00000000..cc6f6058
--- /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;
+ };
+
+};