aboutsummaryrefslogtreecommitdiff
path: root/module/tk.m
diff options
context:
space:
mode:
authorbhgv <bhgv.empire@gmail.com>2018-03-01 16:54:45 +0200
committerbhgv <bhgv.empire@gmail.com>2018-03-01 16:54:45 +0200
commitb786f20bbab5a59046aa78a2c6c2a11536497202 (patch)
tree0851ecdec889eb9b7ba3751cc04d4f0b474e4a9e /module/tk.m
inferno-os tree was separated from the inferno-os-android (separated from the Android driver)
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 0000000..d54fee8
--- /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;
+};