File: gtkMathView.ml

package info (click to toggle)
lablgtkmathview 0.7.8-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 332 kB
  • sloc: ml: 777; ansic: 177; makefile: 139; xml: 132
file content (107 lines) | stat: -rw-r--r-- 4,519 bytes parent folder | download | duplicates (5)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
(* Copyright (C) 2000-2005,
 *    Luca Padovani	      <lpadovan@cs.unibo.it>
 *    Claudio Sacerdoti Coen  <sacerdot@cs.unibo.it>
 *    Stefano Zacchiroli      <zacchiro@cs.unibo.it>
 *
 * This file is part of lablgtkmathview, the Ocaml binding for the
 * GtkMathView widget.
 * 
 * lablgtkmathview is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * lablgtkmathview is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with lablgtkmathview; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 * 
 * For details, send a mail to the authors.
 *)

open Gtk_mathview
open Gaux
open Gobject
open Gtk
open Tags
open GtkMathViewProps
open GtkBase

external _gtkmathview_init : unit -> unit = "ml_gtk_mathview_init"
let () = _gtkmathview_init ()

external add_configuration_path : string -> unit =
  "ml_gtk_math_view_add_configuration_path"

module MathView = struct
  include MathView_GMetaDOM
  external freeze : [>`mathview_gmetadom] obj -> unit =
   "ml_gtk_math_view_freeze"
  external thaw : [>`mathview_gmetadom] obj -> unit =
   "ml_gtk_math_view_thaw"
  external load_uri : [>`mathview_gmetadom] obj -> filename:string -> bool =
   "ml_gtk_math_view_load_uri"
  external load_root : [>`mathview_gmetadom] obj -> root:[> `Element] GdomeT.t -> bool =
   "ml_gtk_math_view_load_root"
  external unload : [>`mathview_gmetadom] obj -> unit =
   "ml_gtk_math_view_unload"
  external select :
   [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit =
   "ml_gtk_math_view_select"
  external unselect :
   [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit =
   "ml_gtk_math_view_unselect"
  external is_selected :
   [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> bool =
   "ml_gtk_math_view_is_selected"
  external structure_changed :
   [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> unit =
   "ml_gtk_math_view_structure_changed"
  external attribute_changed :
   [>`mathview_gmetadom] obj -> [> `Element] GdomeT.t -> name:TDOMString.t -> unit =
   "ml_gtk_math_view_attribute_changed"
  external get_bounding_box :
   [>`mathview_gmetadom] obj -> (int * int * int) =
   "ml_gtk_math_view_get_bounding_box"
  external get_element_at :
   [> `mathview_gmetadom] obj -> int -> int -> TElement.t option =
   "ml_gtk_math_view_get_element_at"
  external get_document :
   [> `mathview_gmetadom] obj -> TDocument.t option =
   "ml_gtk_math_view_get_document"
   (* beginning of prop-like methods *)
  external get_size : [>`mathview_gmetadom] obj -> int * int =
    "ml_gtk_math_view_get_size"
  external get_top : [>`mathview_gmetadom] obj -> (int * int) =
   "ml_gtk_math_view_get_top"
  external set_top : [>`mathview_gmetadom] obj -> int -> int -> unit =
   "ml_gtk_math_view_set_top"
  external set_adjustments : [>`mathview_gmetadom] obj -> Gtk.adjustment obj -> Gtk.adjustment obj -> unit =
   "ml_gtk_math_view_set_adjustments"
  external get_adjustments : [>`mathview_gmetadom] obj ->
    Gtk.adjustment obj * Gtk.adjustment obj =
      "ml_gtk_math_view_get_adjustments"
  external get_buffer : [>`mathview_gmetadom] obj -> Gdk.pixmap =
   "ml_gtk_math_view_get_buffer"
  external set_font_size : [>`mathview_gmetadom] obj -> int -> unit =
   "ml_gtk_math_view_set_font_size"
  external get_font_size : [>`mathview_gmetadom] obj -> int =
   "ml_gtk_math_view_get_font_size"
  external set_log_verbosity : [>`mathview_gmetadom] obj -> int -> unit =
   "ml_gtk_math_view_set_log_verbosity"
  external get_log_verbosity : [>`mathview_gmetadom] obj -> int =
   "ml_gtk_math_view_get_log_verbosity"
  external set_t1_opaque_mode : [>`mathview_gmetadom] obj -> bool -> unit =
   "ml_gtk_math_view_set_t1_opaque_mode"
  external get_t1_opaque_mode : [>`mathview_gmetadom] obj -> bool =
   "ml_gtk_math_view_get_t1_opaque_mode"
  external set_t1_anti_aliased_mode : [>`mathview_gmetadom] obj -> bool -> unit =
   "ml_gtk_math_view_set_t1_anti_aliased_mode"
  external get_t1_anti_aliased_mode : [>`mathview_gmetadom] obj -> bool =
   "ml_gtk_math_view_get_t1_anti_aliased_mode"
end