diff options
Diffstat (limited to 'appl/charon/gui.m')
| -rw-r--r-- | appl/charon/gui.m | 48 |
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(); +}; |
