module NCurses

Extended Modules

Defined in:

ncurses.cr
ncurses/mouse_event.cr
ncurses/version.cr
ncurses/window.cr

Constant Summary

ERR = -1

Possible integer result values

OK = 0
VERSION = "0.0.3"

Instance Method Summary

Instance Method Detail

def add_char(*args, **options) #

Output


[View source]
def add_char(*args, **options, &) #

Output


[View source]
def attr_get(*args, **options) #

Attribute


[View source]
def attr_get(*args, **options, &) #

Attribute


[View source]
def attr_off(*args, **options) #

Attribute


[View source]
def attr_off(*args, **options, &) #

Attribute


[View source]
def attr_on(*args, **options) #

[View source]
def attr_on(*args, **options, &) #

[View source]
def attribute_off(*args, **options) #

Attribute


[View source]
def attribute_off(*args, **options, &) #

Attribute


[View source]
def attribute_on(*args, **options) #

[View source]
def attribute_on(*args, **options, &) #

[View source]
def can_change_color? #

Terminal allows setting custom RGB color values Wrapper for can_change_color()


[View source]
def cbreak #

Disable buffering, key input is returned with no delay Wrapper for #cbreak()


[View source]
def change_attribute(*args, **options) #

[View source]
def change_attribute(*args, **options, &) #

[View source]
def change_background(*args, **options) #

Background


[View source]
def change_background(*args, **options, &) #

Background


[View source]
def change_color(slot, red, green, blue) #

Alias for #init_color


[View source]
def clear(*args, **options) #

[View source]
def clear(*args, **options, &) #

[View source]
def cols(*args, **options) #

General


[View source]
def cols(*args, **options, &) #

General


[View source]
def disable_line_buffer #

Alias for #cbreak


[View source]
def echo(option : Bool) #

If echoing back to terminal should be enabled


[View source]
def echo #

Re-enable echoing of input back to console Wrapper for #echo()


[View source]
def enable_line_buffer #

Alias for #nocbreak


[View source]
def end #

End curses mode Wrapper for endwin()


[View source]
def flush_input #

Clear (delete contents of) the input buffer Wrapper for flushinp()


[View source]
def get_attribute(*args, **options) #

Attribute


[View source]
def get_attribute(*args, **options, &) #

Attribute


[View source]
def get_background(*args, **options) #

Background


[View source]
def get_background(*args, **options, &) #

Background


[View source]
def get_char(*args, **options) #

[View source]
def get_char(*args, **options, &) #

[View source]
def get_mouse #

Should only be called if #get_char returned Key::Mouse

Returns a MouseEvent containing the mouse state and coordinates Wrapper for getmouse()


[View source]
def has_colors? #

Terminal supports colors Wrapper for has_colors()


[View source]
def has_mouse #

If the terminal has mouse support Wrapper for #has_mouse()


[View source]
def height(*args, **options) #

General


[View source]
def height(*args, **options, &) #

General


[View source]
def init_color(slot, red, green, blue) #

Change the RGB values of the color Between 0 and 1000

change_color Color::Red, 0, 0, 1000 # => Color::Red will now appear blue

[View source]
def init_color_pair(slot, foreground : Color, background : Color) #

Create a color pair to use Pass an integer for id of the pair in the slot Pass a Color for both the foreground and then background

init_color_pair 5, Color::Red, Color::Blue # => Color pair 5 is not red on black

Wrapper for init_pair()


[View source]
def keypad(*args, **options) #

Input


[View source]
def keypad(*args, **options, &) #

Input


[View source]
def line_buffer(option) #

If input should be buffered to new lines Enable if true, disable if false


[View source]
def lines(*args, **options) #

General


[View source]
def lines(*args, **options, &) #

General


[View source]
def max_dimensions(*args, **options) #

[View source]
def max_dimensions(*args, **options, &) #

[View source]
def max_dimensions_named(*args, **options) #

[View source]
def max_dimensions_named(*args, **options, &) #

[View source]
def max_x(*args, **options) #

General


[View source]
def max_x(*args, **options, &) #

General


[View source]
def max_y(*args, **options) #

General


[View source]
def max_y(*args, **options, &) #

General


[View source]
def mouse_mask(new_mask : Mouse) #

Sets the mouse events that should be returned Should be given a Mouse enum


[View source]
def move(*args, **options) #

[View source]
def move(*args, **options, &) #

[View source]
def new_term(terminal, out_io, in_io) #

Unknown functionality Wrpper for newterm()


[View source]
def no_delay(*args, **options) #

Input


[View source]
def no_delay(*args, **options, &) #

Input


[View source]
def no_echo #

Do not echo back to the console Wrapper for noecho()


[View source]
def no_raw #

Re-enable buffering of input and signals Wrapper for noraw()


[View source]
def no_timeout(*args, **options) #

Input


[View source]
def no_timeout(*args, **options, &) #

Input


[View source]
def nocbreak #

Re-enable buffering until new line Wrapper for #nocbreak()


[View source]
def print(*args, **options) #

Output


[View source]
def print(*args, **options, &) #

Output


[View source]
def raw(option) #

If buffering should be disabled for input and signals


[View source]
def raw #

Disable buffering of input and signals #cbreak but also passes signals

TODO Implement signals?


[View source]
def refresh(*args, **options) #

[View source]
def refresh(*args, **options, &) #

[View source]
def set_attr(*args, **options) #

[View source]
def set_attr(*args, **options, &) #

[View source]
def set_attribute(*args, **options) #

[View source]
def set_attribute(*args, **options, &) #

[View source]
def set_background(*args, **options) #

Background


[View source]
def set_background(*args, **options, &) #

Background


[View source]
def set_color(*args, **options) #

Attribute


[View source]
def set_color(*args, **options, &) #

Attribute


[View source]
def set_cursor(visibility : Cursor) #

Set the cursor state Use Cursor enum Wrapper for curs_set()


[View source]
def set_pos(*args, **options) #

[View source]
def set_pos(*args, **options, &) #

[View source]
def start #

Start curses mode Wrapper for initscr()


[View source]
def start_color #

Start color support Wrapper for #start_color()


[View source]
def stdscr #

Get stdscr May remove due to delegateing


[View source]
def term=(screen) #

Unknown functionality Wrapper for set_term()


[View source]
def timeout(*args, **options) #

Input


[View source]
def timeout(*args, **options, &) #

Input


[View source]
def width(*args, **options) #

General


[View source]
def width(*args, **options, &) #

General


[View source]
def with_attr(*args, **options) #

[View source]
def with_attr(*args, **options, &) #

[View source]
def with_attribute(*args, **options) #

[View source]
def with_attribute(*args, **options, &) #

[View source]