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 GtkSourceBuffer} *)
30 class source_buffer_signals:
31 ([> Gtk_sourceview.source_buffer ] as 'b) obj ->
35 callback:(GText.tag -> start:GText.iter -> stop:GText.iter -> unit) ->
37 method begin_user_action : callback:(unit -> unit) -> GtkSignal.id
38 method can_redo : callback:(bool -> unit) -> GtkSignal.id
39 method can_undo : callback:(bool -> unit) -> GtkSignal.id
40 method changed : callback:(unit -> unit) -> GtkSignal.id
41 method private connect :
42 'c. ('b, 'c) GtkSignal.t -> callback:'c -> GtkSignal.id
44 callback:(start:GText.iter -> stop:GText.iter -> unit) -> GtkSignal.id
45 method end_user_action : callback:(unit -> unit) -> GtkSignal.id
46 method highlight_updated :
47 callback:(Gtk.text_iter -> Gtk.text_iter -> unit) -> GtkSignal.id
48 method insert_child_anchor :
49 callback:(GText.iter -> Gtk.text_child_anchor -> unit) -> GtkSignal.id
50 method insert_pixbuf :
51 callback:(GText.iter -> GdkPixbuf.pixbuf -> unit) -> GtkSignal.id
53 callback:(GText.iter -> string -> unit) -> GtkSignal.id
54 method mark_deleted : callback:(Gtk.text_mark -> unit) -> GtkSignal.id
56 callback:(GText.iter -> Gtk.text_mark -> unit) -> GtkSignal.id
57 method marker_updated : callback:(Gtk.text_iter -> unit) -> GtkSignal.id
58 method modified_changed : callback:(unit -> unit) -> GtkSignal.id
60 callback:(GText.tag -> start:GText.iter -> stop:GText.iter -> unit) ->
65 Gtk_sourceview.source_buffer Gtk.obj ->
67 inherit GText.buffer_skel
68 method connect: source_buffer_signals
69 method misc: GObj.gobject_ops
70 method check_brackets: bool
71 method set_check_brackets: bool -> unit
72 (* method set_bracket_match_style: tag_style -> unit *)
73 method highlight: bool
74 method set_highlight: bool -> unit
75 method max_undo_levels: int
76 method set_max_undo_levels: int -> unit
77 (* method language: source_language *)
78 (* method set_language: source_language -> unit *)
79 method escape_char: Glib.unichar
80 method set_escape_char: Glib.unichar -> unit
83 method undo: unit -> unit
84 method redo: unit -> unit
85 method begin_not_undoable_action: unit -> unit
86 method end_not_undoable_action: unit -> unit
87 (* method create_marker: name:char -> typ:char -> source_marker *)
88 (* method move_marker: source_marker -> Gtext.text_iter -> unit *)
89 (* method delete_marker: source_marker -> unit *)
90 (* method get_marker: name:char -> source_marker *)
91 (* method get_markers_in_region:
92 start:text_iter -> stop:text_iter -> source_marker list *)
93 (* method get_first_marker: unit -> source_marker *)
94 (* method get_last_marker: unit -> source_marker *)
95 (* method get_iter_at_marker: ... *)
96 (* method get_next_marker: unit -> source_marker *)
97 (* method get_prev_marker: unit -> source_marker *)
101 ?check_brackets:bool ->
104 ?max_undo_levels:int ->
105 (* ?tag_table:GText.tag_table ->
110 (** {2 GtkSourceView} *)
112 class source_view_signals :
113 ([> Gtk_sourceview.source_view ] as 'b) obj ->
116 method copy_clipboard : callback:(unit -> unit) -> GtkSignal.id
117 method cut_clipboard : callback:(unit -> unit) -> GtkSignal.id
118 method delete_from_cursor :
119 callback:(Gtk.Tags.delete_type -> int -> unit) -> GtkSignal.id
120 method destroy : callback:(unit -> unit) -> GtkSignal.id
121 method insert_at_cursor : callback:(string -> unit) -> GtkSignal.id
123 callback:(Gtk.Tags.movement_step -> int -> extend:bool -> unit) ->
126 callback:(Gtk.Tags.direction_type -> unit) -> GtkSignal.id
127 method page_horizontally :
128 callback:(int -> extend:bool -> unit) -> GtkSignal.id
129 method paste_clipboard : callback:(unit -> unit) -> GtkSignal.id
130 method populate_popup :
131 callback:(Gtk.menu Gtk.obj -> unit) -> GtkSignal.id
132 method redo : callback:(unit -> unit) -> GtkSignal.id
133 method set_anchor : callback:(unit -> unit) -> GtkSignal.id
134 method set_scroll_adjustments :
135 callback:(GData.adjustment option -> GData.adjustment option -> unit) -> GtkSignal.id
136 method toggle_overwrite : callback:(unit -> unit) -> GtkSignal.id
137 method undo : callback:(unit -> unit) -> GtkSignal.id
141 Gtk_sourceview.source_view Gtk.obj ->
143 inherit GText.view_skel
144 val obj: Gtk_sourceview.source_view Gtk.obj
145 method connect: source_view_signals
146 method set_show_line_numbers : bool -> unit
147 method show_line_numbers : bool
148 method set_show_line_markers : bool -> unit
149 method show_line_markers : bool
150 method set_tabs_width: int -> unit
151 method tabs_width: int
152 method set_auto_indent: bool -> unit
153 method auto_indent: bool
154 method set_insert_spaces_instead_of_tabs: bool -> unit
155 method insert_spaces_instead_of_tabs: bool
156 method set_show_margin: bool -> unit
157 method show_margin: bool
158 method set_margin: int -> unit
160 (* method set_marker_pixbuf: GdkPixbuf.pixbuf -> unit *)
161 (* method marker_pixbuf: GdkPixbuf.pixbuf *)
162 method set_smart_home_end: bool -> unit
163 method smart_home_end: bool
167 ?source_buffer:source_buffer ->
169 ?insert_spaces_instead_of_tabs:bool ->
171 ?show_line_markers:bool ->
172 ?show_line_numbers:bool ->
174 ?smart_home_end:bool ->
177 ?cursor_visible:bool ->
178 ?justification:GtkEnums.justification ->
179 ?wrap_mode:GtkEnums.wrap_mode ->
183 ?packing:(GObj.widget -> unit) ->