/usr/lib/ocaml/lablgtk2/gtkSourceView2.ml is in liblablgtksourceview2-ocaml-dev 2.18.3+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
(* and/or modify it under the terms of the GNU Library General *)
(* Public License as published by the Free Software Foundation *)
(* version 2, with the exception described in file COPYING which *)
(* comes with the library. *)
(* *)
(* This program is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
(* GNU Library General Public License for more details. *)
(* *)
(* You should have received a copy of the GNU Library General *)
(* Public License along with this program; if not, write to the *)
(* Free Software Foundation, Inc., 59 Temple Place, Suite 330, *)
(* Boston, MA 02111-1307 USA *)
(* *)
(* *)
(**************************************************************************)
open GtkSourceView2_types
open Gaux
open Gobject
open Gtk
open Tags
open SourceView2Enums
open GtkSourceView2Props
open GtkBase
external _gtk_source_completion_init: unit -> unit = "ml_gtk_source_completion_init"
external _gtk_source_style_scheme_init: unit -> unit = "ml_gtk_source_style_scheme_init"
external _gtk_source_style_scheme_manager_init: unit -> unit = "ml_gtk_source_style_scheme_manager_init"
external _gtk_source_language_init: unit -> unit = "ml_gtk_source_language_init"
external _gtk_source_language_manager_init: unit -> unit =
"ml_gtk_source_language_manager_init"
external _gtk_source_buffer_init: unit -> unit = "ml_gtk_source_buffer_init"
external _gtk_source_view_init: unit -> unit = "ml_gtk_source_view_init"
let () =
_gtk_source_completion_init ();
_gtk_source_style_scheme_init ();
_gtk_source_style_scheme_manager_init ();
_gtk_source_language_init ();
_gtk_source_language_manager_init ();
_gtk_source_buffer_init ();
_gtk_source_view_init ()
module SourceStyleScheme =
struct
include SourceStyleScheme
external get_name: source_style_scheme obj -> string =
"ml_gtk_source_style_scheme_get_name"
external get_description: source_style_scheme obj -> string =
"ml_gtk_source_style_scheme_get_description"
end
module SourceCompletionItem =
struct
include SourceCompletionItem
external new_:
string -> string -> GdkPixbuf.pixbuf option -> string option -> source_completion_proposal obj =
"ml_gtk_source_completion_item_new"
external new_with_markup:
string -> string -> GdkPixbuf.pixbuf option -> string option -> source_completion_proposal obj =
"ml_gtk_source_completion_item_new_with_markup"
external new_from_stock:
string -> string -> string -> string -> source_completion_proposal obj =
"ml_gtk_source_completion_item_new_from_stock"
end
module SourceCompletionProvider =
struct
include SourceCompletionProvider
type provider = {
provider_name : unit -> string;
provider_icon : unit -> GdkPixbuf.pixbuf option;
provider_populate : source_completion_context obj -> unit;
provider_activation : unit -> source_completion_activation_flags list;
provider_match : source_completion_context obj -> bool;
provider_info_widget : source_completion_proposal obj -> widget obj option;
provider_update_info : source_completion_proposal obj -> source_completion_info obj -> unit;
provider_start_iter : source_completion_context obj -> source_completion_proposal obj -> text_iter -> bool;
provider_activate_proposal : source_completion_proposal obj -> text_iter -> bool;
provider_interactive_delay : unit -> int;
provider_priority : unit -> int;
}
external match_ : source_completion_provider obj -> source_completion_context obj -> bool =
"ml_gtk_source_completion_provider_match"
external new_ : provider -> source_completion_provider obj =
"ml_custom_completion_provider_new"
end
module SourceCompletionContext = SourceCompletionContext
module SourceCompletionInfo = SourceCompletionInfo
module SourceCompletion = SourceCompletion
module SourceStyleSchemeManager =
struct
include SourceStyleSchemeManager
external new_ : unit -> source_style_scheme_manager obj =
"ml_gtk_source_style_scheme_manager_new"
external default : unit -> source_style_scheme_manager obj =
"ml_gtk_source_style_scheme_manager_get_default"
end
module SourceLanguage =
struct
include SourceLanguage
external get_id : [>`sourcelanguage] obj -> string
= "ml_gtk_source_language_get_id"
external get_name : [>`sourcelanguage] obj -> string
= "ml_gtk_source_language_get_name"
external get_section : [>`sourcelanguage] obj -> string
= "ml_gtk_source_language_get_section"
external get_hidden : [>`sourcelanguage] obj -> bool
= "ml_gtk_source_language_get_hidden"
external metadata: [>`sourcelanguage] obj -> string -> string option=
"ml_gtk_source_language_get_metadata"
external mime_types: [>`sourcelanguage] obj -> string list =
"ml_gtk_source_language_get_mime_types"
external globs: [>`sourcelanguage] obj -> string list =
"ml_gtk_source_language_get_globs"
external style_name: [>`sourcelanguage] obj -> string -> string option =
"ml_gtk_source_language_get_style_name"
external style_ids: [>`sourcelanguage] obj -> string list =
"ml_gtk_source_language_get_style_ids"
end
module SourceLanguageManager =
struct
include SourceLanguageManager
external new_: unit -> source_language_manager obj =
"ml_gtk_source_language_manager_new"
external default: unit -> source_language_manager obj
= "ml_gtk_source_language_manager_get_default"
external set_search_path:
[>`sourcelanguagemanager] obj -> string list -> unit
= "ml_gtk_source_language_manager_set_search_path"
external search_path:
[>`sourcelanguagemanager] obj -> string list
= "ml_gtk_source_language_manager_get_search_path"
external language_ids:
[>`sourcelanguagemanager] obj -> string list
= "ml_gtk_source_language_manager_get_language_ids"
external language:
[>`sourcelanguagemanager] obj -> string -> source_language obj option
= "ml_gtk_source_language_manager_get_language"
external guess_language:
[>`sourcelanguagemanager] obj ->
string option -> string option -> source_language obj option
= "ml_gtk_source_language_manager_guess_language"
end
module SourceUndoManager =
struct
include SourceUndoManager
type undo_manager = {
can_undo : unit -> bool;
can_redo : unit -> bool;
undo : unit -> unit;
redo : unit -> unit;
begin_not_undoable_action : unit -> unit;
end_not_undoable_action : unit -> unit;
can_undo_changed : unit -> unit;
can_redo_changed : unit -> unit;
}
external new_ : undo_manager -> [`sourceundomanager] obj =
"ml_custom_undo_manager_new"
end
module SourceBuffer =
struct
include SourceBuffer
external new_: [`texttagtable] obj -> source_buffer obj = "ml_gtk_source_buffer_new"
external new_with_langage: [>`sourcelanguage] obj -> source_buffer obj =
"ml_gtk_source_buffer_new_with_language"
external undo: [>`sourcebuffer] obj -> unit = "ml_gtk_source_buffer_undo"
external redo: [>`sourcebuffer] obj -> unit = "ml_gtk_source_buffer_redo"
external begin_not_undoable_action: [>`sourcebuffer] obj -> unit =
"ml_gtk_source_buffer_begin_not_undoable_action"
external end_not_undoable_action: [>`sourcebuffer] obj -> unit =
"ml_gtk_source_buffer_end_not_undoable_action"
external set_highlight_matching_brackets: [>`sourcebuffer] obj -> bool -> unit =
"ml_gtk_source_buffer_set_highlight_matching_brackets"
external create_source_mark:
[>`sourcebuffer] obj -> string option -> string option -> Gtk.text_iter ->
source_mark obj =
"ml_gtk_source_buffer_create_source_mark"
external remove_source_marks:
[>`sourcebuffer] obj
-> Gtk.text_iter -> Gtk.text_iter -> string option -> unit =
"ml_gtk_source_buffer_remove_source_marks"
external get_source_marks_at_line:
[>`sourcebuffer] obj -> int -> string option -> source_mark obj list =
"ml_gtk_source_buffer_get_source_marks_at_line"
external get_source_marks_at_iter:
[>`sourcebuffer] obj -> Gtk.text_iter -> string option ->
source_mark obj list =
"ml_gtk_source_buffer_get_source_marks_at_iter"
external forward_iter_to_source_mark:
[>`sourcebuffer] obj -> Gtk.text_iter -> string option -> bool =
"ml_gtk_source_buffer_forward_iter_to_source_mark"
external backward_iter_to_source_mark:
[>`sourcebuffer] obj -> Gtk.text_iter -> string option -> bool =
"ml_gtk_source_buffer_backward_iter_to_source_mark"
external iter_has_context_class:
[>`sourcebuffer] obj -> Gtk.text_iter -> string -> bool =
"ml_gtk_source_buffer_iter_has_context_class"
external iter_forward_to_context_class_toggle:
[>`sourcebuffer] obj -> Gtk.text_iter -> string -> bool =
"ml_gtk_source_buffer_iter_forward_to_context_class_toggle"
external iter_backward_to_context_class_toggle:
[>`sourcebuffer] obj -> Gtk.text_iter -> string -> bool =
"ml_gtk_source_buffer_iter_backward_to_context_class_toggle"
external ensure_highlight:
[>`sourcebuffer] obj -> Gtk.text_iter -> Gtk.text_iter -> unit =
"ml_gtk_source_buffer_ensure_highlight"
end
module SourceView =
struct
include SourceView
external new_: unit -> source_view obj = "ml_gtk_source_view_new"
external new_with_buffer: [>`sourcebuffer] obj -> source_view obj =
"ml_gtk_source_view_new_with_buffer"
external set_mark_category_pixbuf: [>`sourceview] obj -> string -> GdkPixbuf.pixbuf option -> unit =
"ml_gtk_source_view_set_mark_category_pixbuf"
external get_mark_category_pixbuf: [>`sourceview] obj -> string -> GdkPixbuf.pixbuf option =
"ml_gtk_source_view_get_mark_category_pixbuf"
(* Should probably not exist *)
external set_cursor_color: [>`sourceview] obj -> Gdk.color -> unit =
"ml_gtk_modify_cursor_color"
end
module SourceMark =
struct
include SourceMark
external next: [> `sourcemark] obj -> string option -> source_mark obj option
= "ml_gtk_source_mark_next"
external prev: [> `sourcemark] obj -> string option -> source_mark obj option
= "ml_gtk_source_mark_prev"
end
module SourceViewMisc =
struct
external iter_backward_search:
Gtk.text_iter -> string -> SourceView2Enums.source_search_flag list ->
start: Gtk.text_iter -> stop: Gtk.text_iter -> Gtk.text_iter option ->
(Gtk.text_iter * Gtk.text_iter) option =
"ml_gtk_source_iter_backward_search_bc" "ml_gtk_source_iter_backward_search"
external iter_forward_search:
Gtk.text_iter -> string -> SourceView2Enums.source_search_flag list ->
start: Gtk.text_iter -> stop: Gtk.text_iter -> Gtk.text_iter option ->
(Gtk.text_iter * Gtk.text_iter) option =
"ml_gtk_source_iter_forward_search_bc" "ml_gtk_source_iter_forward_search"
end
|