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
37 external freeze : [>`mathview] obj -> unit =
38 "ml_gtk_math_view_freeze"
39 external thaw : [>`mathview] obj -> unit =
40 "ml_gtk_math_view_thaw"
41 external load_uri : [>`mathview] obj -> filename:string -> bool =
42 "ml_gtk_math_view_load_uri"
43 external load_doc : [>`mathview] obj -> dom:[> `Document] GdomeT.t -> bool =
44 "ml_gtk_math_view_load_doc"
45 external unload : [>`mathview] obj -> unit =
46 "ml_gtk_math_view_unload"
48 [>`mathview] obj -> [> `Element] GdomeT.t -> unit =
49 "ml_gtk_math_view_select"
51 [>`mathview] obj -> [> `Element] GdomeT.t -> unit =
52 "ml_gtk_math_view_unselect"
53 external is_selected :
54 [>`mathview] obj -> [> `Element] GdomeT.t -> bool =
55 "ml_gtk_math_view_is_selected"
56 external get_element_at :
57 [> `mathview] obj -> int -> int -> TElement.t option =
58 "ml_gtk_math_view_get_element_at"
59 (* beginning of prop-like methods *)
60 external get_width : [>`mathview] obj -> int =
61 "ml_gtk_math_view_get_width"
62 external get_height : [>`mathview] obj -> int =
63 "ml_gtk_math_view_get_height"
64 external get_top : [>`mathview] obj -> (int * int) =
65 "ml_gtk_math_view_get_top"
66 external set_top : [>`mathview] obj -> int -> int -> unit =
67 "ml_gtk_math_view_set_top"
68 external set_adjustments : [>`mathview] obj -> Gtk.adjustment obj -> Gtk.adjustment obj -> unit =
69 "ml_gtk_math_view_set_adjustments"
70 external get_hadjustment : [>`mathview] obj -> Gtk.adjustment obj =
71 "ml_gtk_math_view_get_hadjustment"
72 external get_vadjustment : [>`mathview] obj -> Gtk.adjustment obj =
73 "ml_gtk_math_view_get_vadjustment"
74 external get_buffer : [>`mathview] obj -> Gdk.pixmap =
75 "ml_gtk_math_view_get_buffer"
76 external get_drawing_area : [>`mathview] obj -> Gtk.drawing_area obj =
77 "ml_gtk_math_view_get_drawing_area"
78 external set_font_size : [>`mathview] obj -> int -> unit =
79 "ml_gtk_math_view_set_font_size"
80 external get_font_size : [>`mathview] obj -> int =
81 "ml_gtk_math_view_get_font_size"
82 external set_log_verbosity : [>`mathview] obj -> int -> unit =
83 "ml_gtk_math_view_set_log_verbosity"
84 external get_log_verbosity : [>`mathview] obj -> int =
85 "ml_gtk_math_view_get_log_verbosity"