(*********************************************************************************)
(*                Chamo                                                          *)
(*                                                                               *)
(*    Copyright (C) 2003-2021 Institut National de Recherche en Informatique     *)
(*    et en Automatique. All rights reserved.                                    *)
(*                                                                               *)
(*    This program is free software; you can redistribute it and/or modify       *)
(*    it under the terms of the GNU Lesser General Public License version        *)
(*    3 as published by the Free Software Foundation.                            *)
(*                                                                               *)
(*    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 General Public License for more details.                               *)
(*                                                                               *)
(*    You should have received a copy of the GNU 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                                                            *)
(*                                                                               *)
(*    Contact: Maxence.Guesdon@inria.fr                                          *)
(*                                                                               *)
(*********************************************************************************)

(** Configuration of the "sourceview" view. *)

(** Name of the view. *)
val factory_name : string

(** The user's configuration file. *)
val rc_file : string

(** The function to get the configuration file of a mode, from the mode name. *)
val mode_rc_file : string -> string

(** The function to get the local configuration file of a mode, from the mode name. *)
val local_mode_rc_file : string -> string

(** The bookmarks file. *)
val bookmarks_rc_file : string

(** Key bindings of the view. *)
val key_bindings : (Stk.Key.keystate list * string) list Ocf.conf_option

(** Associations between regular expressions on filenames and mime type,
     to get the correct language syntax highlighting. *)
val filename_language_patterns : (string * string) list Ocf.conf_option

(** Associations between regular expressions in filenames and mode names. *)
val filename_mode_patterns : (string * string) list Ocf.conf_option

(** Maximum undo levels. *)
val max_undo_levels : int Ocf.conf_option

(** Default wrap mode to use when creating a sourceview, if no indication is given. *)
val default_wrap_mode : Stk.Textview.wrap_mode Ocf.conf_option

(** Default regexp for words. *)
val default_word_re : string

(** Default theme for sourceviews. *)
val default_theme : string Ocf.conf_option

(** Read the configuration file. *)
val read : unit -> unit

(** Write the configuration file. *)
val write : unit -> unit

(** This function adds a key binding for the view, described by a
     combination of key hits and an associated command name. *)
val add_sourceview_key_binding : Stk.Key.keystate list -> string -> unit

(** Same as {!add_sourceview_key_binding} but the combination of
     key hits is given as a string. *)
val add_sourceview_key_binding_string : string -> string -> unit

(** This function creates, for a key bindings option and a given mode name,
     two functions to add a key binding to the mode, and also register
     a command to add a binding to the mode.
     The command name is called [add_sourceview_mode_<mode name>_key_binding].
     This function uses {!Commands.create_add_binding_commands}.*)
val create_add_sourceview_mode_binding_commands :
  (Stk.Key.keystate list * string) list Ocf.conf_option ->
  string ->
  (Stk.Key.keystate list -> string -> unit) * (string -> string -> unit)
