sig
val title : string -> (unit -> 'a) -> 'a
val title_utf8 : string -> (unit -> 'a) -> 'a
type color = private int
val system_16 :
red:int -> green:int -> blue:int -> intensity:int -> Terminal.color
val black : Terminal.color
val dark_red : Terminal.color
val dark_green : Terminal.color
val dark_yellow : Terminal.color
val dark_blue : Terminal.color
val dark_magenta : Terminal.color
val dark_cyan : Terminal.color
val gray : Terminal.color
val dark_gray : Terminal.color
val blue : Terminal.color
val green : Terminal.color
val cyan : Terminal.color
val red : Terminal.color
val magenta : Terminal.color
val yellow : Terminal.color
val white : Terminal.color
val supports_256 : unit -> bool
val rgb : red:float -> green:float -> blue:float -> Terminal.color
val grayscale : float -> Terminal.color
type event = private string
val escape_sequence_of_event : Terminal.event -> string
val is_char : Terminal.event -> bool
val char_of_event : Terminal.event -> char
val is_string : Terminal.event -> bool
val string_of_event : Terminal.event -> string
val is_resized : Terminal.event -> bool
val size_of_event : Terminal.event -> int * int
type key =
[ `delete
| `down
| `end_key
| `f1
| `f10
| `f11
| `f12
| `f2
| `f3
| `f4
| `f5
| `f6
| `f7
| `f8
| `f9
| `home
| `insert
| `left
| `pagedown
| `pageup
| `right
| `up ]
type shift_state = private int
val is_key : Terminal.event -> bool
val key_of_event :
Terminal.event ->
[ `delete
| `down
| `end_key
| `f1
| `f10
| `f11
| `f12
| `f2
| `f3
| `f4
| `f5
| `f6
| `f7
| `f8
| `f9
| `home
| `insert
| `left
| `pagedown
| `pageup
| `right
| `unknown
| `up ]
val shift_of_event : Terminal.event -> Terminal.shift_state
type shift_key = private int
val empty : Terminal.shift_state
val shift : Terminal.shift_key
val meta : Terminal.shift_key
val control : Terminal.shift_key
val alt : Terminal.shift_key
val mem : Terminal.shift_key -> Terminal.shift_state -> bool
external add :
Terminal.shift_key -> Terminal.shift_state -> Terminal.shift_state
= "%orint"
type button =
[ `button1 | `button2 | `button3 | `released | `wheeldown | `wheelup ]
val is_clicked : Terminal.event -> bool
val button_of_event :
Terminal.event ->
[ `button1
| `button2
| `button3
| `released
| `unknown
| `wheeldown
| `wheelup ]
val position_of_event : Terminal.event -> int * int
module Descr :
sig
val is_terminal : Unix.file_descr -> bool
val size : Unix.file_descr -> int * int
val set_size : Unix.file_descr -> int -> int -> unit
val view : Unix.file_descr -> int * int * int * int
val position : Unix.file_descr -> int * int
val set_position : Unix.file_descr -> int -> int -> unit
val move : Unix.file_descr -> int -> int -> unit
val move_to_bol : Unix.file_descr -> unit -> unit
val color :
Unix.file_descr ->
?reset:bool ->
?bold:bool ->
?underscore:bool ->
?blink:bool ->
?reverse:bool ->
?concealed:bool ->
?foreground:Terminal.color ->
?background:Terminal.color -> unit -> unit
val save : Unix.file_descr -> (unit -> 'a) -> 'a
val clear_screen : Unix.file_descr -> unit -> unit
val clear_eol : Unix.file_descr -> unit -> unit
val clear_line : Unix.file_descr -> unit -> unit
val scroll : Unix.file_descr -> int -> unit
val show_cursor : Unix.file_descr -> bool -> unit
val wrap : Unix.file_descr -> bool -> unit
val screen :
Unix.file_descr ->
?size:int * int ->
?cursor:bool -> ?wrap:bool -> (Unix.file_descr -> 'a) -> 'a
val output : Unix.file_descr -> bytes -> int -> int -> unit
val output_substring : Unix.file_descr -> string -> int -> int -> unit
val output_string : Unix.file_descr -> string -> unit
val output_substring_utf8 :
Unix.file_descr -> string -> int -> int -> unit
val output_string_utf8 : Unix.file_descr -> string -> unit
val output_newline : Unix.file_descr -> unit -> unit
val mode :
Unix.file_descr ->
?echo:bool ->
?canonical:bool ->
?control_c:bool -> ?mouse:bool -> (unit -> 'a) -> 'a
val input : Unix.file_descr -> bytes -> int -> int -> int
val input_line_utf8 : Unix.file_descr -> string
val is_empty : Unix.file_descr -> bool
val input_event : Unix.file_descr -> Terminal.event
end
val is_terminal_out : Stdlib.out_channel -> bool
val size : Stdlib.out_channel -> int * int
val set_size : Stdlib.out_channel -> int -> int -> unit
val view : Stdlib.out_channel -> int * int * int * int
val position : Stdlib.out_channel -> int * int
val set_position : Stdlib.out_channel -> int -> int -> unit
val move : Stdlib.out_channel -> int -> int -> unit
val move_to_bol : Stdlib.out_channel -> unit -> unit
val color :
Stdlib.out_channel ->
?reset:bool ->
?bold:bool ->
?underscore:bool ->
?blink:bool ->
?reverse:bool ->
?concealed:bool ->
?foreground:Terminal.color -> ?background:Terminal.color -> unit -> unit
val save : Stdlib.out_channel -> (unit -> 'a) -> 'a
val clear_screen : Stdlib.out_channel -> unit -> unit
val clear_eol : Stdlib.out_channel -> unit -> unit
val clear_line : Stdlib.out_channel -> unit -> unit
val scroll : Stdlib.out_channel -> int -> unit
val show_cursor : Stdlib.out_channel -> bool -> unit
val wrap : Stdlib.out_channel -> bool -> unit
val screen :
Stdlib.out_channel ->
?size:int * int ->
?cursor:bool -> ?wrap:bool -> (Stdlib.out_channel -> 'a) -> 'a
val output_substring_utf8 :
Stdlib.out_channel -> string -> int -> int -> unit
val output_string_utf8 : Stdlib.out_channel -> string -> unit
val is_terminal_in : Stdlib.in_channel -> bool
val buffered_in : Stdlib.in_channel -> int
val buffered_line_in : Stdlib.in_channel -> int
val mode :
Stdlib.in_channel ->
?echo:bool ->
?canonical:bool -> ?control_c:bool -> ?mouse:bool -> (unit -> 'a) -> 'a
val input_line_utf8 : Stdlib.in_channel -> string
val utf8_of_locale : string -> string
val locale_of_utf8 : string -> string
end