summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk/support/protocol.ml
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/labltk/support/protocol.ml')
-rw-r--r--otherlibs/labltk/support/protocol.ml16
1 files changed, 3 insertions, 13 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