module LTerm_windows:sig
..end
Lwt_sys.Not_available
on Unix.val get_acp : unit -> int
val get_console_cp : unit -> int
val set_console_cp : int -> unit
val get_console_output_cp : unit -> int
val set_console_output_cp : int -> unit
type
input =
| |
Resize |
| |
Key of |
| |
Mouse of |
val read_console_input : Lwt_unix.file_descr -> input Lwt.t
read_console_input fd
reads one input from the given file
descriptor.type
text_attributes = {
|
foreground : |
(* |
The foreground color. Only bits 0 to 3 matters, other are
ignored.
| *) |
|
background : |
(* |
The background color. Only bits 0 to 3 matters, other are
ignored.
| *) |
type
console_screen_buffer_info = {
|
size : |
(* |
The size of the console buffer.
| *) |
|
cursor_position : |
(* |
The line and column of the cursor.
| *) |
|
attributes : |
(* |
Text attributes.
| *) |
|
window : |
(* |
The displayed windows in the console buffer.
| *) |
|
maximum_window_size : |
(* |
The maximum window size for the current screen.
| *) |
val get_console_screen_buffer_info : Lwt_unix.file_descr -> console_screen_buffer_info
get_console_screen_buffer_info fd
returns the current
informations about the given console.type
console_mode = {
|
cm_echo_input : |
|
cm_insert_mode : |
|
cm_line_input : |
|
cm_mouse_input : |
|
cm_processed_input : |
|
cm_quick_edit_mode : |
|
cm_window_input : |
val get_console_mode : Lwt_unix.file_descr -> console_mode
val set_console_mode : Lwt_unix.file_descr -> console_mode -> unit
val get_console_cursor_info : Lwt_unix.file_descr -> int * bool
val set_console_cursor_info : Lwt_unix.file_descr -> int -> bool -> unit
set_console_cursor_info fd size visible
sets the size and
visible status of the cursor on the given console.val set_console_cursor_position : Lwt_unix.file_descr -> LTerm_geom.coord -> unit
val set_console_text_attribute : Lwt_unix.file_descr -> text_attributes -> unit
set_console_text_attribute fd attributes
type
char_info = {
|
ci_char : |
(* |
The unicode character.
| *) |
|
ci_foreground : |
(* |
The foreground color.
| *) |
|
ci_background : |
(* |
The background color.
| *) |
val write_console_output : Lwt_unix.file_descr ->
char_info array array ->
LTerm_geom.size -> LTerm_geom.coord -> LTerm_geom.rect -> LTerm_geom.rect
write_console_output fd chars size coord rect
writes the given
matrix of characters with their attributes on the given console
at given position.val fill_console_output_character : Lwt_unix.file_descr ->
CamomileLibrary.UChar.t -> int -> LTerm_geom.coord -> int
fill_console_output_character fd char count coord
writes
count
times char
starting at coord
on the given
console.