Sha256: a8ce06b5d25a6ba8a166886231495ef716a23663a579d1e95000b8175008facd
Contents?: true
Size: 503 Bytes
Versions: 6
Compression:
Stored size: 503 Bytes
Contents
module UV class TTY include Stream def enable_raw_mode check_result! UV.tty_set_mode(handle, 1) self end def disable_raw_mode check_result! UV.tty_set_mode(handle, 0) self end def reset_mode UV.tty_reset_mode self end def winsize width = FFI::MemoryPointer.new(:int) height = FFI::MemoryPointer.new(:int) UV.tty_get_winsize(handle, width, height) [width.get_int(0), height.get_int(0)] end end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
uvrb-0.2.0 | lib/uv/tty.rb |
uvrb-0.1.4 | lib/uv/tty.rb |
uvrb-0.1.3 | lib/uv/tty.rb |
uvrb-0.1.2 | lib/uv/tty.rb |
uvrb-0.1.1 | lib/uv/tty.rb |
uvrb-0.1.0 | lib/uv/tty.rb |