summaryrefslogtreecommitdiff
path: root/module/tk.m
diff options
context:
space:
mode:
Diffstat (limited to 'module/tk.m')
-rw-r--r--module/tk.m25
1 files changed, 25 insertions, 0 deletions
diff --git a/module/tk.m b/module/tk.m
new file mode 100644
index 00000000..d54fee83
--- /dev/null
+++ b/module/tk.m
@@ -0,0 +1,25 @@
+Tk: module
+{
+ PATH: con "$Tk";
+
+ Toplevel: adt
+ {
+ display: ref Draw->Display;
+ wreq: chan of string;
+ image: ref Draw->Image;
+ ctxt: ref Draw->Wmcontext; # placeholder, not used by tk
+ screenr: Draw->Rect; # writable
+ };
+ Border, Required, Local: con 1<<iota;
+ rect: fn(t: ref Toplevel, name: string, flags: int): Draw->Rect;
+
+ toplevel: fn(d: ref Draw->Display, arg: string): ref Toplevel;
+ namechan: fn(t: ref Toplevel, c: chan of string, n: string): string;
+ cmd: fn(t: ref Toplevel, arg: string): string;
+ pointer: fn(t: ref Toplevel, p: Draw->Pointer);
+ keyboard: fn(t: ref Toplevel, key: int);
+ putimage: fn(t: ref Toplevel, name: string, i, m: ref Draw->Image): string;
+ getimage: fn(t: ref Toplevel, name: string): (ref Draw->Image, ref Draw->Image, string);
+ quote: fn(s: string): string;
+ color: fn(col: string): int;
+};