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
27 open GtkSourceViewProps
30 (* external gslist_of_string_list: string list -> 'a obj =
31 "ml_gslist_of_string_list" *)
33 external _gtk_source_language_init: unit -> unit = "ml_gtk_source_language_init"
34 external _gtk_source_languages_manager_init: unit -> unit =
35 "ml_gtk_source_languages_manager_init"
36 external _gtk_source_buffer_init: unit -> unit = "ml_gtk_source_buffer_init"
37 external _gtk_source_view_init: unit -> unit = "ml_gtk_source_view_init"
40 _gtk_source_language_init ();
41 _gtk_source_languages_manager_init ();
42 _gtk_source_buffer_init ();
43 _gtk_source_view_init ()
45 module SourceLanguage =
47 include SourceLanguage
48 external new_from_file:
49 string -> [>`sourcelanguagesmanager] obj -> source_language obj option
51 "ml__gtk_source_language_new_from_file"
52 external get_name: [>`sourcelanguage] obj -> string =
53 "ml_gtk_source_language_get_name"
54 external get_section: [>`sourcelanguage] obj -> string =
55 "ml_gtk_source_language_get_section"
56 (* external get_tags: [>`sourcelanguage] obj -> source_tag list *)
57 external get_escape_char: [>`sourcelanguage] obj -> Glib.unichar =
58 "ml_gtk_source_language_get_escape_char"
59 (* external get_mime_types: [>`sourcelanguage] obj -> string list *)
60 (* external set_mime_types: [>`sourcelanguage] obj -> string list -> unit *)
61 (* external get_style_scheme: [>`sourcelanguage] obj -> style_scheme *)
62 (* external set_style_char: [>`sourcelanguage] obj -> style_scheme -> unit *)
63 (* external get_tag_style: [>`sourcelanguage] obj -> tag_style *)
64 (* external set_tag_style: [>`sourcelanguage] obj -> string -> tag_style -> unit *)
65 (* external get_tag_default_style: [>`sourcelanguage] obj -> string -> tag_style *)
68 module SourceLanguagesManager =
70 include SourceLanguagesManager
71 external new_: unit -> source_languages_manager obj =
72 "ml_gtk_source_languages_manager_new"
73 (* external get_available_languages:
74 [>`sourcelanguagesmanager] obj -> source_language obj list
75 = "ml_gtk_source_languages_manager_get_available_languages" *)
76 external get_language_from_mime_type:
77 [>`sourcelanguagesmanager] obj -> string -> source_language obj option
78 = "ml_gtk_source_languages_manager_get_language_from_mime_type"
79 external get_lang_files_dirs:
80 [>`sourcelanguagesmanager] obj -> string list
81 = "ml_gtk_source_languages_manager_get_lang_files_dirs"
82 (* external set_lang_files_dirs:
83 [>`sourcelanguagesmanager] obj -> string list -> unit
84 = "ml_gtk_source_languages_manager_set_lang_files_dirs" *)
90 (* external new_: unit -> source_buffer obj = "ml_gtk_source_buffer_new" *)
91 (* external new_with_buffer: [>`sourcelanguage] obj -> source_buffer obj =
92 "ml_gtk_source_buffer_new_with_language" *)
93 external can_undo: [>`sourcebuffer] obj -> bool =
94 "ml_gtk_source_buffer_can_undo"
95 external can_redo: [>`sourcebuffer] obj -> bool =
96 "ml_gtk_source_buffer_can_redo"
97 external undo: [>`sourcebuffer] obj -> unit = "ml_gtk_source_buffer_undo"
98 external redo: [>`sourcebuffer] obj -> unit = "ml_gtk_source_buffer_redo"
99 external begin_not_undoable_action: [>`sourcebuffer] obj -> unit =
100 "ml_gtk_source_buffer_begin_not_undoable_action"
101 external end_not_undoable_action: [>`sourcebuffer] obj -> unit =
102 "ml_gtk_source_buffer_end_not_undoable_action"
108 external new_: unit -> source_view obj = "ml_gtk_source_view_new"
109 external new_with_buffer: [>`sourcebuffer] obj -> source_view obj =
110 "ml_gtk_source_view_new_with_buffer"
113 module SourceViewMisc =
115 external find_matching_bracket: text_iter -> bool =
116 "ml_gtk_source_iter_find_matching_bracket"