xref: /inferno-os/module/wmlib.m (revision 46439007cf417cbd9ac8049bb4122c890097a0fa)
1Wmlib: module
2{
3	PATH:		con "/dis/lib/wmlib.dis";
4
5	init:		fn();
6	makedrawcontext: fn(): ref Draw->Context;
7	importdrawcontext: fn(devdraw, mntwm: string): (ref Draw->Context, string);
8	connect:	fn(ctxt: ref Draw->Context): ref Draw->Wmcontext;
9	reshape:	fn(w: ref Draw->Wmcontext, name: string, r: Draw->Rect, i: ref Draw->Image, how: string): ref Draw->Image;
10	startinput:	fn(w: ref Draw->Wmcontext, devs: list of string): string;	# could be part of connect?
11	wmctl:	fn(w: ref Draw->Wmcontext, request: string): (string, ref Draw->Image, string);
12#	wmtoken:	fn(w: ref Draw->Wmcontext): string;
13	snarfput:	fn(buf: string);
14	snarfget:	fn(): string;
15
16	# XXX these don't really belong here, but where should they go?
17	splitqword:	fn(s: string, e: int): ((int, int), int);
18	qslice:		fn(s: string, r: (int, int)): string;
19	qword:		fn(s: string, e: int): (string, int);
20	s2r:			fn(s: string, e: int): (Draw->Rect, int);
21};
22