From 37da2899f40661e3e9631e497da8dc59b971cbd0 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 17:07:39 +0000 Subject: 20060303a --- appl/charon/gui.m | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 appl/charon/gui.m (limited to 'appl/charon/gui.m') 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(); +}; -- cgit v1.2.3