summaryrefslogtreecommitdiff
path: root/appl/charon/gui.m
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 17:07:39 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 17:07:39 +0000
commit37da2899f40661e3e9631e497da8dc59b971cbd0 (patch)
treecbc6d4680e347d906f5fa7fca73214418741df72 /appl/charon/gui.m
parent54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff)
20060303a
Diffstat (limited to 'appl/charon/gui.m')
-rw-r--r--appl/charon/gui.m48
1 files changed, 48 insertions, 0 deletions
diff --git a/appl/charon/gui.m b/appl/charon/gui.m
new file mode 100644
index 00000000..b295aa47
--- /dev/null
+++ b/appl/charon/gui.m
@@ -0,0 +1,48 @@
+Gui: module {
+ PATH: con "/dis/charon/gui.dis";
+
+ Progressmsg : adt {
+ bsid : int;
+ state : int;
+ pcnt : int;
+ s : string;
+ };
+
+ # clients should never capture Popup.image
+ # other than during drawing operations
+ Popup: adt {
+ r: Draw->Rect;
+ image: ref Draw->Image;
+ window: ref Draw->Image;
+
+ flush: fn(p: self ref Popup, r: Draw->Rect);
+ };
+
+ # Progress states
+ Punused, Pstart, Pconnected, Psslconnected, Phavehdr,
+ Phavedata, Pdone, Perr, Paborted : con iota;
+
+ display: ref Draw->Display;
+ mainwin: ref Draw->Image;
+ progress: chan of Progressmsg;
+
+ init: fn(ctxt: ref Draw->Context, cu: CharonUtils): ref Draw->Context;
+
+ snarfput: fn(s: string);
+ setstatus: fn(s: string);
+ seturl: fn(s: string);
+ auth: fn(realm: string) : (int, string, string);
+ alert: fn(msg: string);
+ confirm: fn(msg: string) : int;
+ prompt: fn(msg, dflt: string) : (int, string);
+ backbutton: fn(enable : int);
+ fwdbutton: fn (enable : int);
+
+ flush: fn (r : Draw->Rect);
+ clientfocus: fn();
+
+ getpopup: fn(r: Draw->Rect): ref Popup;
+ cancelpopup: fn(): int;
+
+ exitcharon: fn();
+};