1 (***********************************************************************)
5 (* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *)
6 (* Objective Caml port by John Malecki and Xavier Leroy *)
8 (* Copyright 1996 Institut National de Recherche en Informatique et *)
9 (* en Automatique. All rights reserved. This file is distributed *)
10 (* under the terms of the Q Public License version 1.0. *)
12 (***********************************************************************)
14 (* $Id: input_handling.mli 7767 2006-12-09 13:49:10Z ertai $ *)
16 (***************************** Input control ***************************)
20 (*** Actives files. ***)
22 (* Add a file to the list of active files. *)
23 val add_file : io_channel -> (io_channel -> unit) -> unit
25 (* Remove a file from the list of actives files. *)
26 val remove_file : io_channel -> unit
28 (* Return the controller currently attached to the given file. *)
29 val current_controller : io_channel -> (io_channel -> unit)
31 (* Execute a function with `controller' attached to `file'. *)
32 (* ### controller file funct *)
33 val execute_with_other_controller :
34 (io_channel -> unit) -> io_channel -> (unit -> 'a) -> 'a
36 (*** The "Main Loop" ***)
38 (* Call this function for exiting the main loop. *)
39 val exit_main_loop : 'a -> unit
41 (* Handle active files until `continue_main_loop' is false. *)
42 val main_loop : unit -> unit
44 (*** Managing user inputs ***)
46 (* Are we in interactive mode ? *)
47 val interactif : bool ref
49 val current_prompt : string ref
51 (* Where the user input come from. *)
52 val user_channel : io_channel ref
54 val read_user_input : string -> int -> int
56 (* Stop reading user input. *)
57 val stop_user_input : unit -> unit
59 (* Resume reading user input. *)
60 val resume_user_input : unit -> unit