1 (* Copyright (C) 2000-2003, Luca Padovani <luca.padovani@cs.unibo.it>,
2 * Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>.
4 * This file is part of lablgtkmathview, the Ocaml binding
5 * for the GtkMathView widget.
7 * lablgtkmathview is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * lablgtkmathview is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with lablgtkmathview; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * For details, send a mail to the author.
32 external _gtkmathview_init : unit -> unit = "ml_gtk_mathview_init"
33 let () = _gtkmathview_init ()
35 module MathView = struct
36 include MathView_GMetaDOM
37 external freeze : [>`mathview_gmetadom] obj -> unit =
38 "ml_gtk_math_view_freeze"
39 external thaw : [>`mathview_gmetadom] obj -> unit =
40 "ml_gtk_math_view_thaw"
41 external load_uri : [>`mathview_gmetadom] obj -> filename:string -> bool =
42 "ml_gtk_math_view_load_uri"
43 external load_root : [>`mathview_gmetadom] obj -> root:[> `Element] GdomeT.t -> bool =
44 "ml_gtk_math_view_load_root"
45 external unload : [>`mathview_gmetadom] obj -> unit =
46 "ml_gtk_math_view_unload"
48 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit =
49 "ml_gtk_math_view_select"
51 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit =
52 "ml_gtk_math_view_unselect"
53 external is_selected :
54 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> bool =
55 "ml_gtk_math_view_is_selected"
56 external structure_changed :
57 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit =
58 "ml_gtk_math_view_structure_changed"
59 external attribute_changed :
60 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> name:TDOMString.t -> unit =
61 "ml_gtk_math_view_attribute_changed"
62 external get_bounding_box :
63 [>`mathview_gmetadom] obj -> (int * int * int) =
64 "ml_gtk_math_view_get_bounding_box"
65 external get_element_at :
66 [> `mathview_gmetadom] obj -> int -> int -> TElement.t option =
67 "ml_gtk_math_view_get_element_at"
68 (* beginning of prop-like methods *)
69 external get_size : [>`mathview_gmetadom] obj -> int * int =
70 "ml_gtk_math_view_get_size"
71 external get_top : [>`mathview_gmetadom] obj -> (int * int) =
72 "ml_gtk_math_view_get_top"
73 external set_top : [>`mathview_gmetadom] obj -> int -> int -> unit =
74 "ml_gtk_math_view_set_top"
75 external set_adjustments : [>`mathview_gmetadom] obj -> Gtk.adjustment obj -> Gtk.adjustment obj -> unit =
76 "ml_gtk_math_view_set_adjustments"
77 external get_adjustments : [>`mathview_gmetadom] obj ->
78 Gtk.adjustment obj * Gtk.adjustment obj =
79 "ml_gtk_math_view_get_adjustments"
80 external get_buffer : [>`mathview_gmetadom] obj -> Gdk.pixmap =
81 "ml_gtk_math_view_get_buffer"
82 external set_font_size : [>`mathview_gmetadom] obj -> int -> unit =
83 "ml_gtk_math_view_set_font_size"
84 external get_font_size : [>`mathview_gmetadom] obj -> int =
85 "ml_gtk_math_view_get_font_size"
86 external set_log_verbosity : [>`mathview_gmetadom] obj -> int -> unit =
87 "ml_gtk_math_view_set_log_verbosity"
88 external get_log_verbosity : [>`mathview_gmetadom] obj -> int =
89 "ml_gtk_math_view_get_log_verbosity"