xref: /inferno-os/module/tk.m (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
1Tk: module
2{
3	PATH:	con	"$Tk";
4
5	Toplevel: adt
6	{
7		display:	ref Draw->Display;
8		wreq:	chan of string;
9		image:	ref Draw->Image;
10		ctxt:		ref Draw->Wmcontext;	# placeholder, not used by tk
11		screenr:	Draw->Rect;			# writable
12	};
13	Border, Required, Local: con 1<<iota;
14	rect:			fn(t: ref Toplevel, name: string, flags: int): Draw->Rect;
15
16	toplevel:		fn(d: ref Draw->Display, arg: string): ref Toplevel;
17	namechan:	fn(t: ref Toplevel, c: chan of string, n: string): string;
18	cmd:			fn(t: ref Toplevel, arg: string): string;
19	pointer:		fn(t: ref Toplevel, p: Draw->Pointer);
20	keyboard:		fn(t: ref Toplevel, key: int);
21	putimage:		fn(t: ref Toplevel, name: string, i, m: ref Draw->Image): string;
22	getimage:		fn(t: ref Toplevel, name: string): (ref Draw->Image, ref Draw->Image, string);
23	quote:		fn(s: string): string;
24	color:		fn(col: string): int;
25};
26