24 struct private_init {};
27 explicit Tty(
const private_init&) {}
28 ~Tty() noexcept override = default;
49 uv_file fd,
bool readable) {
76 int width = 0, height = 0;
78 return std::pair{width, height};
bool Invoke(F &&f, Args &&... args) const
Definition Handle.hpp:265
void ReportError(int err) const
Report an error.
Definition Handle.hpp:250
Event loop.
Definition Loop.hpp:35
uv_tty_t * GetRaw() const noexcept
Definition Stream.hpp:323
StreamImpl()
Definition Stream.hpp:328
TTY handle.
Definition Tty.hpp:23
Tty(const private_init &)
Definition Tty.hpp:27
void SetMode(uv_tty_mode_t mode)
Set the TTY using the specified terminal mode.
Definition Tty.hpp:58
std::pair< int, int > GetWindowSize()
Gets the current window size.
Definition Tty.hpp:75
void ResetMode()
Reset TTY settings to default values for the next process to take over.
Definition Tty.hpp:69
~Tty() noexcept override=default
static std::shared_ptr< Tty > Create(Loop &loop, uv_file fd, bool readable)
Create a TTY handle.
Definition StringMap.hpp:773
Definition Errors.hpp:112
Definition Prepare.hpp:14
uv_tty_mode_t
Definition uv.h:795
UV_EXTERN int uv_tty_set_mode(uv_tty_t *, uv_tty_mode_t mode)
UV_EXTERN int uv_tty_reset_mode(void)
UV_EXTERN int uv_tty_get_winsize(uv_tty_t *, int *width, int *height)