]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtksourceview/gSourceView.mli
- bound GtkSourceLanguagesManager (only get_lang..from_mime_type)
[helm.git] / helm / DEVEL / lablgtksourceview / gSourceView.mli
1 (* Copyright (C) 2005:
2  *      Stefano Zacchiroli     <zack@cs.unibo.it>
3  *      Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
4  *
5  * This file is part of lablgtksourceview, the OCaml binding for the
6  * GtkSourceView widget.
7  * 
8  * lablgtksourceview is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License, or (at your option) any later version.
12  *
13  * lablgtksourceview is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with lablgtksourceview; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21  * 02111-1307, USA.
22  * 
23  * For details, send a mail to the authors.
24  *)
25
26 open Gtk
27
28 (** {2 GtkSourceLanguage} *)
29
30 class source_language_signals:
31   ([> Gtk_sourceview.source_language ] as 'b) obj ->
32   object ('a)
33     inherit ['b] GObj.gobject_signals
34     method tag_style_changed: callback:(string -> unit) -> GtkSignal.id
35   end
36
37 class source_language:
38   Gtk_sourceview.source_language obj ->
39   object
40     method as_source_language: Gtk_sourceview.source_language obj
41     method connect: source_language_signals
42     method get_escape_char: Glib.unichar
43     method get_name: string
44     method get_section: string
45     method misc: GObj.gobject_ops
46   end
47
48 (** {2 GtkSourceLanguagesManager} *)
49
50 class source_languages_manager:
51   Gtk_sourceview.source_languages_manager obj ->
52   object
53     method get_oid: int
54     method as_source_languages_manager:
55       Gtk_sourceview.source_languages_manager obj
56     method get_language_from_mime_type: string -> source_language option
57   end
58
59 val source_languages_manager: unit -> source_languages_manager
60
61 (** {2 GtkSourceBuffer} *)
62
63 class source_buffer_signals:
64   ([> Gtk_sourceview.source_buffer ] as 'b) obj ->
65   object ('a)
66     inherit GText.buffer_signals
67     method can_redo: callback:(bool -> unit) -> GtkSignal.id
68     method can_undo: callback:(bool -> unit) -> GtkSignal.id
69     method highlight_updated:
70       callback:(Gtk.text_iter -> Gtk.text_iter -> unit) -> GtkSignal.id
71     method marker_updated: callback:(Gtk.text_iter -> unit) -> GtkSignal.id
72   end
73
74 class source_buffer:
75   Gtk_sourceview.source_buffer obj ->
76   object
77     inherit GText.buffer_skel
78     method connect: source_buffer_signals
79     method misc: GObj.gobject_ops
80     method check_brackets: bool
81     method set_check_brackets: bool -> unit
82 (*     method set_bracket_match_style: tag_style -> unit *)
83     method highlight: bool
84     method set_highlight: bool -> unit
85     method max_undo_levels: int
86     method set_max_undo_levels: int -> unit
87     method language: source_language option
88     method set_language: source_language -> unit
89     method escape_char: Glib.unichar
90     method set_escape_char: Glib.unichar -> unit
91     method can_undo: bool
92     method can_redo: bool
93     method undo: unit -> unit
94     method redo: unit -> unit
95     method begin_not_undoable_action: unit -> unit
96     method end_not_undoable_action: unit -> unit
97 (*     method create_marker: name:char -> typ:char -> source_marker *)
98 (*     method move_marker: source_marker -> Gtext.text_iter -> unit *)
99 (*     method delete_marker: source_marker -> unit *)
100 (*     method get_marker: name:char -> source_marker *)
101 (*     method get_markers_in_region:
102       start:text_iter -> stop:text_iter -> source_marker list *)
103 (*     method get_first_marker: unit -> source_marker *)
104 (*     method get_last_marker: unit -> source_marker *)
105 (*     method get_iter_at_marker: ... *)
106 (*     method get_next_marker: unit -> source_marker *)
107 (*     method get_prev_marker: unit -> source_marker *)
108   end
109
110 val source_buffer:
111   ?language:source_language ->
112 (*   ?tag_table:source_tag_table -> *)
113   ?text:string ->
114   ?check_brackets:bool ->
115   ?escape_char:int ->
116   ?highlight:bool ->
117   ?max_undo_levels:int ->
118   unit ->
119     source_buffer
120
121 (** {2 GtkSourceView} *)
122
123 class source_view_signals:
124   ([> Gtk_sourceview.source_view ] as 'b) obj ->
125   object ('a)
126     inherit GText.view_signals
127     method redo: callback:(unit -> unit) -> GtkSignal.id
128     method undo: callback:(unit -> unit) -> GtkSignal.id
129   end
130
131 class source_view:
132   Gtk_sourceview.source_view obj ->
133   object
134     inherit GText.view_skel
135     val obj: Gtk_sourceview.source_view obj
136     method connect: source_view_signals
137     method source_buffer: source_buffer
138     method set_show_line_numbers: bool -> unit
139     method show_line_numbers: bool
140     method set_show_line_markers: bool -> unit
141     method show_line_markers: bool
142     method set_tabs_width: int -> unit
143     method tabs_width: int
144     method set_auto_indent: bool -> unit
145     method auto_indent: bool
146     method set_insert_spaces_instead_of_tabs: bool -> unit
147     method insert_spaces_instead_of_tabs: bool
148     method set_show_margin: bool -> unit
149     method show_margin: bool
150     method set_margin: int -> unit
151     method margin: int
152 (*     method set_marker_pixbuf: GdkPixbuf.pixbuf -> unit *)
153 (*     method marker_pixbuf: GdkPixbuf.pixbuf *)
154     method set_smart_home_end: bool -> unit
155     method smart_home_end: bool
156   end
157
158 val source_view:
159   ?source_buffer:source_buffer ->
160   ?auto_indent:bool ->
161   ?insert_spaces_instead_of_tabs:bool ->
162   ?margin:int ->
163   ?show_line_markers:bool ->
164   ?show_line_numbers:bool ->
165   ?show_margin:bool ->
166   ?smart_home_end:bool ->
167   ?tabs_width:int ->
168   ?editable:bool ->
169   ?cursor_visible:bool ->
170   ?justification:GtkEnums.justification ->
171   ?wrap_mode:GtkEnums.wrap_mode ->
172   ?border_width:int ->
173   ?width:int ->
174   ?height:int ->
175   ?packing:(GObj.widget -> unit) ->
176   ?show:bool ->
177   unit ->
178     source_view
179