1 (* Copyright (C) 2000-2005,
2 * Luca Padovani <lpadovan@cs.unibo.it>
3 * Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
4 * Stefano Zacchiroli <zacchiro@cs.unibo.it>
6 * This file is part of lablgtkmathview, the Ocaml binding for the
9 * lablgtkmathview is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * lablgtkmathview is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with lablgtkmathview; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 * For details, send a mail to the authors.
35 external _gtkmathview_init : unit -> unit = "ml_gtk_mathview_init"
36 let () = _gtkmathview_init ()
38 external add_configuration_path : string -> unit =
39 "ml_gtk_math_view_add_configuration_path"
41 module MathView = struct
42 include MathView_GMetaDOM
43 external freeze : [>`mathview_gmetadom] obj -> unit =
44 "ml_gtk_math_view_freeze"
45 external thaw : [>`mathview_gmetadom] obj -> unit =
46 "ml_gtk_math_view_thaw"
47 external load_uri : [>`mathview_gmetadom] obj -> filename:string -> bool =
48 "ml_gtk_math_view_load_uri"
49 external load_root : [>`mathview_gmetadom] obj -> root:[> `Element] GdomeT.t -> bool =
50 "ml_gtk_math_view_load_root"
51 external unload : [>`mathview_gmetadom] obj -> unit =
52 "ml_gtk_math_view_unload"
54 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit =
55 "ml_gtk_math_view_select"
57 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit =
58 "ml_gtk_math_view_unselect"
59 external is_selected :
60 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> bool =
61 "ml_gtk_math_view_is_selected"
62 external structure_changed :
63 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit =
64 "ml_gtk_math_view_structure_changed"
65 external attribute_changed :
66 [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> name:TDOMString.t -> unit =
67 "ml_gtk_math_view_attribute_changed"
68 external get_bounding_box :
69 [>`mathview_gmetadom] obj -> (int * int * int) =
70 "ml_gtk_math_view_get_bounding_box"
71 external get_element_at :
72 [> `mathview_gmetadom] obj -> int -> int -> TElement.t option =
73 "ml_gtk_math_view_get_element_at"
74 external get_document :
75 [> `mathview_gmetadom] obj -> TDocument.t option =
76 "ml_gtk_math_view_get_document"
77 (* beginning of prop-like methods *)
78 external get_size : [>`mathview_gmetadom] obj -> int * int =
79 "ml_gtk_math_view_get_size"
80 external get_top : [>`mathview_gmetadom] obj -> (int * int) =
81 "ml_gtk_math_view_get_top"
82 external set_top : [>`mathview_gmetadom] obj -> int -> int -> unit =
83 "ml_gtk_math_view_set_top"
84 external set_adjustments : [>`mathview_gmetadom] obj -> Gtk.adjustment obj -> Gtk.adjustment obj -> unit =
85 "ml_gtk_math_view_set_adjustments"
86 external get_adjustments : [>`mathview_gmetadom] obj ->
87 Gtk.adjustment obj * Gtk.adjustment obj =
88 "ml_gtk_math_view_get_adjustments"
89 external get_buffer : [>`mathview_gmetadom] obj -> Gdk.pixmap =
90 "ml_gtk_math_view_get_buffer"
91 external set_font_size : [>`mathview_gmetadom] obj -> int -> unit =
92 "ml_gtk_math_view_set_font_size"
93 external get_font_size : [>`mathview_gmetadom] obj -> int =
94 "ml_gtk_math_view_get_font_size"
95 external set_log_verbosity : [>`mathview_gmetadom] obj -> int -> unit =
96 "ml_gtk_math_view_set_log_verbosity"
97 external get_log_verbosity : [>`mathview_gmetadom] obj -> int =
98 "ml_gtk_math_view_get_log_verbosity"
99 external set_t1_opaque_mode : [>`mathview_gmetadom] obj -> bool -> unit =
100 "ml_gtk_math_view_set_t1_opaque_mode"
101 external get_t1_opaque_mode : [>`mathview_gmetadom] obj -> bool =
102 "ml_gtk_math_view_get_t1_opaque_mode"
103 external set_t1_anti_aliased_mode : [>`mathview_gmetadom] obj -> bool -> unit =
104 "ml_gtk_math_view_set_t1_anti_aliased_mode"
105 external get_t1_anti_aliased_mode : [>`mathview_gmetadom] obj -> bool =
106 "ml_gtk_math_view_get_t1_anti_aliased_mode"