2 * Stefano Zacchiroli <zack@cs.unibo.it>
3 * Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
5 * This file is part of lablgtksourceview, the OCaml binding for the
6 * GtkSourceView widget.
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.
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.
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
23 * For details, send a mail to the authors.
28 (** {2 GtkSourceLanguage} *)
30 class source_language_signals:
31 ([> Gtk_sourceview.source_language ] as 'b) obj ->
33 inherit ['b] GObj.gobject_signals
34 method tag_style_changed: callback:(string -> unit) -> GtkSignal.id
37 class source_language:
38 Gtk_sourceview.source_language obj ->
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
48 (** {2 GtkSourceLanguagesManager} *)
50 class source_languages_manager:
51 Gtk_sourceview.source_languages_manager obj ->
54 method as_source_languages_manager:
55 Gtk_sourceview.source_languages_manager obj
56 method get_language_from_mime_type: string -> source_language option
59 val source_languages_manager: unit -> source_languages_manager
61 (** {2 GtkSourceBuffer} *)
63 class source_buffer_signals:
64 ([> Gtk_sourceview.source_buffer ] as 'b) obj ->
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
75 Gtk_sourceview.source_buffer obj ->
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
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 *)
111 ?language:source_language ->
112 (* ?tag_table:source_tag_table -> *)
114 ?check_brackets:bool ->
117 ?max_undo_levels:int ->
121 (** {2 GtkSourceView} *)
123 class source_view_signals:
124 ([> Gtk_sourceview.source_view ] as 'b) obj ->
126 inherit GText.view_signals
127 method redo: callback:(unit -> unit) -> GtkSignal.id
128 method undo: callback:(unit -> unit) -> GtkSignal.id
132 Gtk_sourceview.source_view obj ->
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
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
159 ?source_buffer:source_buffer ->
161 ?insert_spaces_instead_of_tabs:bool ->
163 ?show_line_markers:bool ->
164 ?show_line_numbers:bool ->
166 ?smart_home_end:bool ->
169 ?cursor_visible:bool ->
170 ?justification:GtkEnums.justification ->
171 ?wrap_mode:GtkEnums.wrap_mode ->
175 ?packing:(GObj.widget -> unit) ->