2 * lablgtksourceview, OCaml binding for the GtkSourceView text widget
4 * Copyright (C) 2005 Stefano Zacchiroli <zack@cs.unibo.it>
6 * This library is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1 of the
9 * License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24 (** {2 GtkSourceLanguage} *)
26 class source_language_signals:
27 ([> Gtk_sourceview.source_language ] as 'b) obj ->
29 inherit ['b] GObj.gobject_signals
30 method tag_style_changed: callback:(string -> unit) -> GtkSignal.id
33 class source_language:
34 Gtk_sourceview.source_language obj ->
36 method as_source_language: Gtk_sourceview.source_language obj
37 method connect: source_language_signals
38 method get_escape_char: Glib.unichar
39 method get_name: string
40 method get_section: string
41 method misc: GObj.gobject_ops
44 (** {2 GtkSourceLanguagesManager} *)
46 class source_languages_manager:
47 Gtk_sourceview.source_languages_manager obj ->
50 method as_source_languages_manager:
51 Gtk_sourceview.source_languages_manager obj
52 method get_language_from_mime_type: string -> source_language option
53 method lang_files_dirs: string list
56 val source_languages_manager:
57 (* ?lang_files_dirs:string list -> *)
59 source_languages_manager
61 val source_language_from_file:
62 ?languages_manager:source_languages_manager -> string ->
63 source_language option
65 (** {2 GtkSourceBuffer} *)
67 class source_buffer_signals:
68 ([> Gtk_sourceview.source_buffer ] as 'b) obj ->
70 inherit GText.buffer_signals
71 method can_redo: callback:(bool -> unit) -> GtkSignal.id
72 method can_undo: callback:(bool -> unit) -> GtkSignal.id
73 method highlight_updated:
74 callback:(Gtk.text_iter -> Gtk.text_iter -> unit) -> GtkSignal.id
75 method marker_updated: callback:(Gtk.text_iter -> unit) -> GtkSignal.id
79 Gtk_sourceview.source_buffer obj ->
81 inherit GText.buffer_skel
82 method connect: source_buffer_signals
83 method misc: GObj.gobject_ops
84 method check_brackets: bool
85 method set_check_brackets: bool -> unit
86 (* method set_bracket_match_style: tag_style -> unit *)
87 method highlight: bool
88 method set_highlight: bool -> unit
89 method max_undo_levels: int
90 method set_max_undo_levels: int -> unit
91 method language: source_language option
92 method set_language: source_language -> unit
93 method escape_char: Glib.unichar
94 method set_escape_char: Glib.unichar -> unit
97 method undo: unit -> unit
98 method redo: unit -> unit
99 method begin_not_undoable_action: unit -> unit
100 method end_not_undoable_action: unit -> unit
101 (* method create_marker: name:char -> typ:char -> source_marker *)
102 (* method move_marker: source_marker -> Gtext.text_iter -> unit *)
103 (* method delete_marker: source_marker -> unit *)
104 (* method get_marker: name:char -> source_marker *)
105 (* method get_markers_in_region:
106 start:text_iter -> stop:text_iter -> source_marker list *)
107 (* method get_first_marker: unit -> source_marker *)
108 (* method get_last_marker: unit -> source_marker *)
109 (* method get_iter_at_marker: ... *)
110 (* method get_next_marker: unit -> source_marker *)
111 (* method get_prev_marker: unit -> source_marker *)
115 ?language:source_language ->
116 (* ?tag_table:source_tag_table -> *)
118 ?check_brackets:bool ->
121 ?max_undo_levels:int ->
125 (** {2 GtkSourceView} *)
127 class source_view_signals:
128 ([> Gtk_sourceview.source_view ] as 'b) obj ->
130 inherit GText.view_signals
131 method redo: callback:(unit -> unit) -> GtkSignal.id
132 method undo: callback:(unit -> unit) -> GtkSignal.id
136 Gtk_sourceview.source_view obj ->
138 inherit GText.view_skel
139 val obj: Gtk_sourceview.source_view obj
140 method connect: source_view_signals
141 method source_buffer: source_buffer
142 method set_show_line_numbers: bool -> unit
143 method show_line_numbers: bool
144 method set_show_line_markers: bool -> unit
145 method show_line_markers: bool
146 method set_tabs_width: int -> unit
147 method tabs_width: int
148 method set_auto_indent: bool -> unit
149 method auto_indent: bool
150 method set_insert_spaces_instead_of_tabs: bool -> unit
151 method insert_spaces_instead_of_tabs: bool
152 method set_show_margin: bool -> unit
153 method show_margin: bool
154 method set_margin: int -> unit
156 (* method set_marker_pixbuf: GdkPixbuf.pixbuf -> unit *)
157 (* method marker_pixbuf: GdkPixbuf.pixbuf *)
158 method set_smart_home_end: bool -> unit
159 method smart_home_end: bool
163 ?source_buffer:source_buffer ->
165 ?insert_spaces_instead_of_tabs:bool ->
167 ?show_line_markers:bool ->
168 ?show_line_numbers:bool ->
170 ?smart_home_end:bool ->
173 ?cursor_visible:bool ->
174 ?justification:GtkEnums.justification ->
175 ?wrap_mode:GtkEnums.wrap_mode ->
179 ?packing:(GObj.widget -> unit) ->
186 val find_matching_bracket: GText.iter -> GText.iter option