Module ANSI::Terminal
In: lib/ansi/terminal/curses.rb
lib/ansi/terminal/stty.rb
lib/ansi/terminal/termios.rb
lib/ansi/terminal/win32.rb
lib/ansi/terminal.rb

Terminal

This library is based of HighLine‘s SystemExtensions by James Edward Gray II.

Copyright 2006 Gray Productions

Distributed under the tems of the Ruby software license.

Methods

Constants

STD_INPUT_HANDLE = -10   win32 console APIs
STD_OUTPUT_HANDLE = -11
STD_ERROR_HANDLE = -12
ENABLE_PROCESSED_INPUT = 0x0001
ENABLE_LINE_INPUT = 0x0002
ENABLE_WRAP_AT_EOL_OUTPUT = 0x0002
ENABLE_ECHO_INPUT = 0x0004
ENABLE_WINDOW_INPUT = 0x0008
ENABLE_MOUSE_INPUT = 0x0010
ENABLE_INSERT_MODE = 0x0020
ENABLE_QUICK_EDIT_MODE = 0x0040
CHARACTER_MODE = mode

Public Instance methods

windows savvy console echo toggler

Unix savvy getc(). (First choice.)

WARNING: This method requires the "termios" library!

Unix savvy getc(). (Second choice.)

WARNING: This method requires the external "stty" program!

Curses savvy getc().

Windows savvy getc().

Switched the input mode to raw and disables echo.

WARNING: This method requires the external "stty" program!

Restores a previously saved input mode.

WARNING: This method requires the external "stty" program!

Console screen width (taken from progress bar)

NOTE: Don‘t know how portable screen_width is. TODO: How to fit into system?

Get the height of the terminal window.

A Windows savvy method to fetch the console columns, and rows.

A Unix savvy method to fetch the console columns, and rows.

A Unix savvy method to fetch the console columns, and rows.

Get the width of the terminal window.

[Validate]