summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk/support
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/labltk/support')
-rw-r--r--otherlibs/labltk/support/protocol.ml16
-rw-r--r--otherlibs/labltk/support/protocol.mli4
-rw-r--r--otherlibs/labltk/support/report.ml2
3 files changed, 4 insertions, 18 deletions
diff --git a/otherlibs/labltk/support/protocol.ml b/otherlibs/labltk/support/protocol.ml
index c5fa13dcf..f934d0d2f 100644
--- a/otherlibs/labltk/support/protocol.ml
+++ b/otherlibs/labltk/support/protocol.ml
@@ -12,7 +12,7 @@ type tkArgs =
type cbid = int
-external opentk : string -> string -> unit
+external opentk : display:string -> class:string -> unit
= "camltk_opentk"
external tcl_eval : string -> string
= "camltk_tcl_eval"
@@ -157,18 +157,8 @@ let _ = callback_init ()
(* Different version of initialisation functions *)
(* Native opentk is [opentk display class] *)
-let openTk () =
- opentk "" "LablTk";
- install_cleanup();
- Widget.default_toplevel
-
-let openTkClass s =
- opentk "" s;
- install_cleanup();
- Widget.default_toplevel
-
-let openTkDisplayClass display:disp cl =
- opentk disp cl;
+let openTk ?(:display = "") ?(:class = "LablTk") () =
+ opentk :display :class;
install_cleanup();
Widget.default_toplevel
diff --git a/otherlibs/labltk/support/protocol.mli b/otherlibs/labltk/support/protocol.mli
index 17e004e7c..dc28f60de 100644
--- a/otherlibs/labltk/support/protocol.mli
+++ b/otherlibs/labltk/support/protocol.mli
@@ -21,9 +21,7 @@ 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 openTk : ?display:string -> ?class:string -> unit -> toplevel widget
val closeTk : unit -> unit
val mainLoop : unit -> unit
diff --git a/otherlibs/labltk/support/report.ml b/otherlibs/labltk/support/report.ml
index ee040de37..f7def6a7a 100644
--- a/otherlibs/labltk/support/report.ml
+++ b/otherlibs/labltk/support/report.ml
@@ -1,7 +1,5 @@
(* Report globals from protocol to tk *)
let openTk = openTk
-and openTkClass = openTkClass
-and openTkDisplayClass = openTkDisplayClass
and closeTk = closeTk
and mainLoop = mainLoop
and register = register