]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtksourceview/gSourceView.mli
snaphot
[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 GtkSourceBuffer} *)
49
50 class source_buffer_signals:
51   ([> Gtk_sourceview.source_buffer ] as 'b) obj ->
52   object ('a)
53     inherit GText.buffer_signals
54     method can_redo: callback:(bool -> unit) -> GtkSignal.id
55     method can_undo: callback:(bool -> unit) -> GtkSignal.id
56     method highlight_updated:
57       callback:(Gtk.text_iter -> Gtk.text_iter -> unit) -> GtkSignal.id
58     method marker_updated: callback:(Gtk.text_iter -> unit) -> GtkSignal.id
59   end
60
61 class source_buffer:
62   Gtk_sourceview.source_buffer obj ->
63   object
64     inherit GText.buffer_skel
65     method connect: source_buffer_signals
66     method misc: GObj.gobject_ops
67     method check_brackets: bool
68     method set_check_brackets: bool -> unit
69 (*     method set_bracket_match_style: tag_style -> unit *)
70     method highlight: bool
71     method set_highlight: bool -> unit
72     method max_undo_levels: int
73     method set_max_undo_levels: int -> unit
74     method language: source_language option
75     method set_language: source_language -> unit
76     method escape_char: Glib.unichar
77     method set_escape_char: Glib.unichar -> unit
78     method can_undo: bool
79     method can_redo: bool
80     method undo: unit -> unit
81     method redo: unit -> unit
82     method begin_not_undoable_action: unit -> unit
83     method end_not_undoable_action: unit -> unit
84 (*     method create_marker: name:char -> typ:char -> source_marker *)
85 (*     method move_marker: source_marker -> Gtext.text_iter -> unit *)
86 (*     method delete_marker: source_marker -> unit *)
87 (*     method get_marker: name:char -> source_marker *)
88 (*     method get_markers_in_region:
89       start:text_iter -> stop:text_iter -> source_marker list *)
90 (*     method get_first_marker: unit -> source_marker *)
91 (*     method get_last_marker: unit -> source_marker *)
92 (*     method get_iter_at_marker: ... *)
93 (*     method get_next_marker: unit -> source_marker *)
94 (*     method get_prev_marker: unit -> source_marker *)
95   end
96
97 val source_buffer:
98   ?language:source_language ->
99 (*   ?tag_table:source_tag_table -> *)
100   ?text:string ->
101   ?check_brackets:bool ->
102   ?escape_char:int ->
103   ?highlight:bool ->
104   ?max_undo_levels:int ->
105   unit ->
106     source_buffer
107
108 (** {2 GtkSourceView} *)
109
110 class source_view_signals:
111   ([> Gtk_sourceview.source_view ] as 'b) obj ->
112   object ('a)
113     inherit GText.view_signals
114     method redo: callback:(unit -> unit) -> GtkSignal.id
115     method undo: callback:(unit -> unit) -> GtkSignal.id
116   end
117
118 class source_view:
119   Gtk_sourceview.source_view obj ->
120   object
121     inherit GText.view_skel
122     val obj: Gtk_sourceview.source_view obj
123     method connect: source_view_signals
124     method source_buffer: source_buffer
125     method set_show_line_numbers: bool -> unit
126     method show_line_numbers: bool
127     method set_show_line_markers: bool -> unit
128     method show_line_markers: bool
129     method set_tabs_width: int -> unit
130     method tabs_width: int
131     method set_auto_indent: bool -> unit
132     method auto_indent: bool
133     method set_insert_spaces_instead_of_tabs: bool -> unit
134     method insert_spaces_instead_of_tabs: bool
135     method set_show_margin: bool -> unit
136     method show_margin: bool
137     method set_margin: int -> unit
138     method margin: int
139 (*     method set_marker_pixbuf: GdkPixbuf.pixbuf -> unit *)
140 (*     method marker_pixbuf: GdkPixbuf.pixbuf *)
141     method set_smart_home_end: bool -> unit
142     method smart_home_end: bool
143   end
144
145 val source_view:
146   ?source_buffer:source_buffer ->
147   ?auto_indent:bool ->
148   ?insert_spaces_instead_of_tabs:bool ->
149   ?margin:int ->
150   ?show_line_markers:bool ->
151   ?show_line_numbers:bool ->
152   ?show_margin:bool ->
153   ?smart_home_end:bool ->
154   ?tabs_width:int ->
155   ?editable:bool ->
156   ?cursor_visible:bool ->
157   ?justification:GtkEnums.justification ->
158   ?wrap_mode:GtkEnums.wrap_mode ->
159   ?border_width:int ->
160   ?width:int ->
161   ?height:int ->
162   ?packing:(GObj.widget -> unit) ->
163   ?show:bool ->
164   unit ->
165     source_view
166