2 * Copyright (c) 2014, Facebook, Inc.
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the "hack" directory of this source tree. An additional grant
7 * of patent rights can be found in the PATENTS file in the same directory.
25 | NormalWithBG
of raw_color
* raw_color
26 | BoldWithBG
of raw_color
* raw_color
34 * Print a sequence of colorized strings to stdout, using ANSI color escapes
37 val print
: ?color_mode
:color_mode
-> (style
* string) list
-> unit
38 val printf
: ?color_mode
:color_mode
-> style
-> ('a
, unit, string, unit) format4
-> 'a
40 (* These two functions provide a four-state TTY-friendly spinner that
41 * a client can output between sleeps if it happens to be waiting on
42 * a busy server (e.g. one that's initializing) *)
43 val spinner
: unit -> string
44 val spinner_used
: unit -> bool
46 (* Output a "clear current line" escape sequence to out_channel if it's
47 * a TTY and a newline otherwise *)
48 val print_clear_line
: out_channel
-> unit
50 (* Read a single char and return immediately, without waiting for a newline. *)
51 val read_char
: unit -> char
53 (* Prompt the user to pick one character out of a given list. If other
54 * characters are entered, the prompt repeats indefinitely. *)
55 val read_choice
: string -> char list
-> char