blob: 635349a31562c1f0177c9db4a5dbd40cc57a81ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
(***********************************************************************)
(* *)
(* MLTk, Tcl/Tk interface of OCaml *)
(* *)
(* Francois Rouaix, Francois Pessaux, Jun Furuse and Pierre Weis *)
(* projet Cristal, INRIA Rocquencourt *)
(* Jacques Garrigue, Kyoto University RIMS *)
(* *)
(* Copyright 2002 Institut National de Recherche en Informatique et *)
(* en Automatique and Kyoto University. All rights reserved. *)
(* This file is distributed under the terms of the GNU Library *)
(* General Public License, with the special exception on linking *)
(* described in file LICENSE found in the OCaml source tree. *)
(* *)
(***********************************************************************)
module Widget = struct
include Rawwidget
type widget = raw_any raw_widget
let default_toplevel = coe default_toplevel
end
module Protocol = struct
open Widget
include Protocol
let opentk () = coe (opentk ())
let opentk_with_args args = coe (opentk_with_args args)
let openTk ?display ?clas () = coe (openTk ?display ?clas ())
let cCAMLtoTKwidget table w =
Widget.check_class w table; (* we need run time type check of widgets *)
TkToken (Widget.name w)
(* backward compatibility *)
let openTkClass s = coe (openTkClass s)
let openTkDisplayClass disp c = coe (openTkDisplayClass disp c)
end
module Textvariable = struct
open Textvariable
type textVariable = Textvariable.textVariable
let create = create
let set = set
let get = get
let name = name
let cCAMLtoTKtextVariable = cCAMLtoTKtextVariable
let handle tv cbk = handle tv ~callback:cbk
let coerce = coerce
(*-*)
let free = free
(* backward compatibility *)
let create_temporary w = create ~on: w ()
end
module Fileevent = struct
open Fileevent
let add_fileinput fd callback = add_fileinput ~fd ~callback
let remove_fileinput fd = remove_fileinput ~fd
let add_fileoutput fd callback = add_fileoutput ~fd ~callback
let remove_fileoutput fd = remove_fileoutput ~fd
end
module Timer = struct
open Timer
type t = Timer.t
let add ms callback = add ~ms ~callback
let set ms callback = set ~ms ~callback
let remove = remove
end
(*
Not compiled in support
module Tkwait = Tkwait
*)
|