Module Cam_plug


module Cam_plug: sig .. end
Interface for plug-ins

type command = string 
val rc_dir : string
The directory with config files. Can be used by a plug-in to create its own config file.
val display_message : string -> unit
Display the given string in the label at the bottom of the main window.
class type embedded_app = object .. end
The class type of embedded applications.
val add_embedded_app : command -> (unit -> embedded_app) -> unit
add_embedded_app com f registers an application which can be started by command com. When this command is triggered, f () is evaluated to get an application object.
val add_command : command -> string -> (string list -> unit) -> unit
add_command com desc f adds the command com to the list of registered commands, with description desc and callback f. The callback takes a list of arguments in parameter. If the same command exists in the table, it is hidden by the new one.
val available_commands : unit -> command list
Return the list of the available commands.
val add_config_box : (unit -> Configwin.configuration_structure) -> unit
add_config_box f registers a function creating a section for the configuration window. This function is called each time the configuration window is created.
val selected_dir : unit -> string option
Access to the selected directory (its name as it appears in the tree, absolute or relative).

type cvs_status =
| Up_to_date (*The file is identical with the latest revision in the repository for the branch in use.*)
| Locally_modified (*You have edited the file, and not yet committed your changes.*)
| Locally_added (*You have added the file with add, and not yet committed your changes.*)
| Locally_removed (*You have removed the file with remove, and not yet committed your changes.*)
| Needs_checkout (*Someone else has committed a newer revision to the repository. The name is slightly misleading; you will ordinarily use update rather than checkout to get that newer revision.*)
| Needs_Patch (*Like Needs Checkout, but the CVS server will send a patch rather than the entire file. Sending a patch or sending an entire file accomplishes the same thing.*)
| Needs_Merge (*Someone else has committed a newer revision to the repository, and you have also made modifications to the file.*)
| Conflicts_on_merge (*This is like Locally Modified, except that a previous update command gave a conflict. If you have not already done so, you need to resolve the conflict.*)
| Unknown (*CVS doesn't know anything about this file. For example, you have created a new file and have not run add.*)

type editor =
| Efuns
| Dbforge
| Emacs
| XEmacs
| Report
| Zoggy
| Custom_editor of string

type file_type = {
   mutable ft_regexp_string : string;
   mutable ft_regexp : Str.regexp;
   mutable ft_name : string;
   mutable ft_color : string option;
   mutable ft_edit : editor;
   mutable ft_templates : string list;
   mutable ft_binary : bool;
}
type file = {
   f_name : string; (*relative or absolute file name*)
   f_abs_name : string; (*absolute file name*)
   f_date : float; (*date of last update of the structure*)
   f_date_string : string; (*cvs date string*)
   f_work_rev : string; (*cvs working revision*)
   f_rep_rev : string; (*cvs repository revision*)
   f_status : cvs_status; (*cvs status*)
   mutable f_type : file_type; (*type of file*)
}
val selected_files : unit -> file list
Access to the selected files.

Command execution


val eval : string -> unit -> unit
eval com () execute the given command. The command is a string and can be an internal command (with or without arguments) or a shell command (beginning with '#'). Catch all the exceptions raised by the function. Do nothing if there is no function associated to the command.
val background_execute : ?width:int -> ?height:int -> command -> unit -> unit
background_execute com () execute the given shell command in background, showing in a window the output (stdout and stderr) of the command. Catch all the exceptions raised by the function.

width : the width of the window
height : the height of the window
val background_execute_with_subst : ?width:int -> ?height:int -> command -> unit -> unit
Same as background_execute but performs substitution of %tags in the given command.

Custom editors


class type editor_app = object .. end
The class type to represent an editor.
val add_editor : string -> (?char:int -> file -> editor_app option) -> unit
add_editor id f adds an editor identified by id, and f is the function used to create an optional instance of that editor, for the given file. id is the string which must be used in the editor field of a file type. Default editor commands cannot be overriden. If the given function returns None as editor, Cameleon does not mark the file as open. If the function returns (Some editor), Cameleon can ask this editor to close (when the user quits Cameleon), to reload, or to save if the changed method returns true (before a commit for example).
val close_file : file -> unit
This function must be called when an editor is closed, to warn Cameleon that this file is closed. If the function given to add_editor returned None (i.e. no editor created), you don't have to call this function, since Cameleon did not mark the file as open. Cameleon will not allow to edit the file as long as it is marked as open.

Option management


module Options: sig .. end
This module implements a simple mechanism to handle program options files.

Custom views


module View: sig .. end
You can define new views using this module.