diff options
author | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 1999-11-16 10:22:42 +0000 |
---|---|---|
committer | Jacques Garrigue <garrigue at math.nagoya-u.ac.jp> | 1999-11-16 10:22:42 +0000 |
commit | 9696d300803ab6fcb5ab2884cd65fe05696e7025 (patch) | |
tree | 82e406c747a89199f5d8a74b161da42aa00fdeb9 /otherlibs/labltk/support/protocol.mli | |
download | ocaml-labltk.tar.gz |
import labltklabltk
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/labltk@2531 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/support/protocol.mli')
-rw-r--r-- | otherlibs/labltk/support/protocol.mli | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/otherlibs/labltk/support/protocol.mli b/otherlibs/labltk/support/protocol.mli new file mode 100644 index 0000000000..4febdc87da --- /dev/null +++ b/otherlibs/labltk/support/protocol.mli @@ -0,0 +1,66 @@ +open Widget + +(* Lower level interface *) +exception TkError of string + (* Raised by the communication functions *) + +val debug : bool ref + (* When set to true, displays approximation of intermediate Tcl code *) + +type tkArgs = + TkToken of string + | TkTokenList of tkArgs list (* to be expanded *) + | TkQuote of tkArgs (* mapped to Tcl list *) + + +(* Misc *) +external splitlist : string -> string list + = "camltk_splitlist" + +val add_destroy_hook : (any widget -> unit) -> unit + + +(* Opening, closing, and mainloop *) +val openTk : unit -> toplevel widget +val openTkClass: string -> toplevel widget +val openTkDisplayClass: display:string -> string -> toplevel widget +val closeTk : unit -> unit +val mainLoop : unit -> unit + + +(* Direct evaluation of tcl code *) +val tkEval : tkArgs array -> string + +(* Returning a value from a Tcl callback *) +val tkreturn: string -> unit + + +(* Callbacks: this is private *) + +type cbid + +type callback_buffer = string list + (* Buffer for reading callback arguments *) + +val callback_naming_table : (cbid, callback_buffer -> unit) Hashtbl.t +val callback_memo_table : (any widget, cbid) Hashtbl.t + (* Exported for debug purposes only. Don't use them unless you + know what you are doing *) +val new_function_id : unit -> cbid +val string_of_cbid : cbid -> string +val register_callback : 'a widget -> callback:(callback_buffer -> unit) -> string + (* Callback support *) +val clear_callback : cbid -> unit + (* Remove a given callback from the table *) +val remove_callbacks : 'a widget -> unit + (* Clean up callbacks associated to widget. Must be used only when + the Destroy event is bind by the user and masks the default + Destroy event binding *) + +val cTKtoCAMLwidget : string -> any widget +val cCAMLtoTKwidget : 'a widget -> tkArgs + +val register : string -> callback:(callback_buffer -> unit) -> unit + +(*-*) +val prerr_cbid : cbid -> unit |