diff options
author | erw7 <erw7.github@gmail.com> | 2019-10-02 14:14:12 +0900 |
---|---|---|
committer | Saúl Ibarra Corretgé <s@saghul.net> | 2019-10-09 09:36:36 +0200 |
commit | fd2ce38dd6ebfbeeb4bb205317774909e679afdf (patch) | |
tree | 764231973c697b3822a631685f6575961cc1bab5 /docs/src | |
parent | fdef604a1e25ac4a6df4abfff0f01b68a3a423b9 (diff) | |
download | libuv-fd2ce38dd6ebfbeeb4bb205317774909e679afdf.tar.gz libuv-fd2ce38dd6ebfbeeb4bb205317774909e679afdf.zip |
win,tty: add uv_tty_{get,set}_vterm_state
PR-URL: https://github.com/libuv/libuv/pull/2501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
Reviewed-By: Jameson Nash <vtjnash+github@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/tty.rst | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/src/tty.rst b/docs/src/tty.rst index 9889a0a0..ad379dab 100644 --- a/docs/src/tty.rst +++ b/docs/src/tty.rst @@ -33,6 +33,23 @@ Data types UV_TTY_MODE_IO } uv_tty_mode_t; +.. c:type:: uv_tty_vtermstate_t + Console virtual terminal mode type: + + :: + + typedef enum { + /* + * The console supports handling of virtual terminal sequences + * (Windows10 new console, ConEmu) + */ + UV_TTY_SUPPORTED, + /* The console cannot process virtual terminal sequences. (Legacy + * console) + */ + UV_TTY_UNSUPPORTED + } uv_tty_vtermstate_t + Public members @@ -98,3 +115,25 @@ API Gets the current Window size. On success it returns 0. .. seealso:: The :c:type:`uv_stream_t` API functions also apply. + +.. c:function:: void uv_tty_set_vterm_state(uv_tty_vtermstate_t state) + + Controls whether console virtual terminal sequences are processed by libuv + or console. + Useful in particular for enabling ConEmu support of ANSI X3.64 and Xterm + 256 colors. Otherwise Windows10 consoles are usually detected automatically. + + This function is only meaningful on Windows systems. On Unix it is silently + ignored. + + .. versionadded:: 1.33.0 + +.. c:function:: int uv_tty_get_vterm_state(uv_tty_vtermstate_t* state) + + Get the current state of whether console virtual terminal sequences are + handled by libuv or the console. + + This function is not implemented on Unix, where it returns ``UV_ENOTSUP``. + + .. versionadded:: 1.33.0 + |