module NCurses

Overview

Low-level bindings to the ncurses library. This is actually a very, very thin wrapper around the LibNCurses C bindings. It is expected that you use this module rather than calling directly into LibNCurses.

Extended Modules

Defined in:

remicharms/lib.cr

Constant Summary

ALL_MOUSE_EVENTS = 134217727
BUTTON1_CLICKED = 4
BUTTON1_DOUBLE_CLICKED = 8
BUTTON1_PRESSED = 2
BUTTON1_RELEASED = 1
BUTTON1_TRIPLE_CLICKED = 16
BUTTON2_CLICKED = 256
BUTTON2_DOUBLE_CLICKED = 512
BUTTON2_PRESSED = 128
BUTTON2_RELEASED = 64
BUTTON2_TRIPLE_CLICKED = 1024
BUTTON3_CLICKED = 16384
BUTTON3_DOUBLE_CLICKED = 32768
BUTTON3_PRESSED = 8192
BUTTON3_RELEASED = 4096
BUTTON3_TRIPLE_CLICKED = 65536
BUTTON_ALT = 67108864
BUTTON_CTRL = 16777216
BUTTON_SHIFT = 33554432
ERR = -1
FALSE = 0_u8
OK = 0
REPORT_MOUSE_POSITION = 134217728
TRUE = 1_u8

Instance Method Summary

Instance Method Detail

def addch(ch) #

[View source]
def addchnstr(chstr, n) #

[View source]
def addchstr(chstr) #

[View source]
def addnstr(str, n) #

[View source]
def addstr(str) #

[View source]
def assume_default_colors(fg, bg) #

[View source]
def attr_get(attrs, pair, opts) #

[View source]
def attr_off(attrs, opts) #

[View source]
def attr_on(attrs, opts) #

[View source]
def attr_set(attrs, pair, opts) #

[View source]
def attroff(attrs) #

[View source]
def attron(attrs) #

[View source]
def attrset(attrs) #

[View source]
def baudrate #

[View source]
def beep #

[View source]
def bkgd(ch) #

[View source]
def bkgdset(ch) #

[View source]
def border(ls : Int, rs : Int, ts : Int, bs : Int, tl : Int, tr : Int, bl : Int, br : Int) : Int32 #

[View source]
def border(ls : Acs, rs : Acs, ts : Acs, bs : Acs, tl : Acs, tr : Acs, bl : Acs, br : Acs) : Int32 #

[View source]
def box(win : WindowPtr, verCh : Int, horCh : Int) : Int32 #

[View source]
def box(win : WindowPtr, verCh : Acs, horCh : Acs) : Int32 #

[View source]
def can_change_color #

[View source]
def cbreak #

[View source]
def chgat(n, attrs, color, opts) #

[View source]
def clear #

[View source]
def clearok(win, bf) #

[View source]
def clrtobot #

[View source]
def clrtoeol #

[View source]
def color_content(color, r, g, b) #

[View source]
def color_pair(pair) #

[View source]
def color_set(colorPairNum, opts) #

[View source]
def curs_set(visibility) #

[View source]
def curses_version #

[View source]
def def_prog_mode #

[View source]
def def_shell_mode #

[View source]
def delay_output(ms) #

[View source]
def delch #

[View source]
def deleteln #

[View source]
def delscreen(sp) #

[View source]
def delwin(win) #

[View source]
def doupdate #

[View source]
def dupwin(win) #

[View source]
def echo #

[View source]
def echochar(ch) #

[View source]
def endwin #

[View source]
def erase #

[View source]
def erasechar #

[View source]
def filter #

[View source]
def flash #

[View source]
def flushinp #

[View source]
def getbegx(win) #

[View source]
def getbegy(win) #

[View source]
def getbegyx(win : WindowPtr) : Tuple(Int32, Int32) #

[View source]
def getbkgd(win) #

[View source]
def getch #

[View source]
def getcurx(win) #

[View source]
def getcury(win) #

[View source]
def getmaxx(win) #

[View source]
def getmaxy(win) #

[View source]
def getmaxyx(win : WindowPtr) : Tuple(Int32, Int32) #

[View source]
def getmouse : Tuple(UInt64, Int32, Int32, Int32, Int16) #

[View source]
def getnstr(str, n) #

[View source]
def getparx(win) #

[View source]
def getpary(win) #

[View source]
def getparyx(win : WindowPtr) : Tuple(Int32, Int32) #

[View source]
def getstr(str) #

[View source]
def getwch : Tuple(UInt32 | Nil, Int32) #

[View source]
def getyx(win : WindowPtr) : Tuple(Int32, Int32) #

[View source]
def halfdelay(tenths) #

[View source]
def has_colors #

[View source]
def has_ic #

[View source]
def has_il #

[View source]
def has_mouse #

[View source]
def hline(ch : Int, n : Int) : Int32 #

[View source]
def hline(ch : Acs, n : Int) : Int32 #

[View source]
def idcok(win, bf) #

[View source]
def idlok(win, bf) #

[View source]
def immedok(win, bf) #

[View source]
def inch #

[View source]
def inchnstr(chstr, n) #

[View source]
def inchstr(chstr) #

[View source]
def init_color(color, r, g, b) #

[View source]
def init_pair(pair, f, b) #

[View source]
def initscr #

[View source]
def innstr(str, n) #

[View source]
def insch(ch) #

[View source]
def insdelln(n) #

[View source]
def insertln #

[View source]
def insnstr(str, n) #

[View source]
def insstr(str) #

[View source]
def instr(str) #

[View source]
def intrflush(win, bf) #

[View source]
def is_linetouched(win, line) #

[View source]
def is_term_resized(lines, columns) #

[View source]
def is_wintouched(win) #

[View source]
def isendwin #

[View source]
def keybound(keycode, count) #

[View source]
def keyname(c) #

[View source]
def keyok(keycode, enable) #

[View source]
def keypad(win, bf) #

[View source]
def killchar #

[View source]
def leaveok(win, bf) #

[View source]
def longname #

[View source]
def mcprint(data, len) #

[View source]
def meta(win, bf) #

[View source]
def mouse_trafo(py, px, toScreen) #

[View source]
def mouse_wtrafo(win, py, px, toScreen) #

[View source]
def mouseinterval(erval) #

[View source]
def mousemask(newMask : UInt32) : UInt32 #

[View source]
def move(y, x) #

[View source]
def mvaddch(y, x, ch) #

[View source]
def mvaddchnstr(y, x, chstr, n) #

[View source]
def mvaddchstr(y, x, chstr) #

[View source]
def mvaddnstr(y, x, str, n) #

[View source]
def mvaddstr(y, x, str) #

[View source]
def mvchgat(y, x, n, attrs, color, opts) #

[View source]
def mvdelch(y, x) #

[View source]
def mvderwin(win, y, x) #

[View source]
def mvgetch(y, x) #

[View source]
def mvgetnstr(y, x, str, n) #

[View source]
def mvgetstr(y, x, str) #

[View source]
def mvgetwch(y : Int32, x : Int32) : Tuple(UInt32 | Nil, Int32) #

[View source]
def mvhline(y : Int, x : Int, ch : Int, n : Int) : Int32 #

[View source]
def mvhline(y : Int, x : Int, ch : Acs, n : Int) : Int32 #

[View source]
def mvinch(y, x) #

[View source]
def mvinchnstr(y, x, chstr, n) #

[View source]
def mvinchstr(y, x, chstr) #

[View source]
def mvinnstr(y, x, str, n) #

[View source]
def mvinsch(y, x, ch) #

[View source]
def mvinsnstr(y, x, str, n) #

[View source]
def mvinsstr(y, x, str) #

[View source]
def mvinstr(y, x, str) #

[View source]
def mvprintw(y, x, fmt) #

[View source]
def mvvline(y : Int, x : Int, ch : Int, n : Int) : Int32 #

[View source]
def mvvline(y : Int, x : Int, ch : Acs, n : Int) : Int32 #

[View source]
def mvwaddch(win, y, x, ch) #

[View source]
def mvwaddchnstr(win, y, x, chstr, n) #

[View source]
def mvwaddchstr(win, y, x, chstr) #

[View source]
def mvwaddnstr(win, y, x, str, n) #

[View source]
def mvwaddstr(win, y, x, str) #

[View source]
def mvwchgat(win, y, x, n, attrs, color, opts) #

[View source]
def mvwdelch(win, y, x) #

[View source]
def mvwgetch(win, y, x) #

[View source]
def mvwgetnstr(win, y, x, str, n) #

[View source]
def mvwgetstr(win, y, x, str) #

[View source]
def mvwgetwch(win : WindowPtr, y : Int32, x : Int32) : Tuple(UInt32 | Nil, Int32) #

[View source]
def mvwhline(win : WindowPtr, y : Int, x : Int, ch : Int, n : Int) : Int32 #

[View source]
def mvwhline(win : WindowPtr, y : Int, x : Int, ch : Acs, n : Int) : Int32 #

[View source]
def mvwin(win, y, x) #

[View source]
def mvwinch(win, y, x) #

[View source]
def mvwinchnstr(win, y, x, chstr, n) #

[View source]
def mvwinchstr(win, y, x, chstr) #

[View source]
def mvwinsch(y, x, win, ch) #

[View source]
def mvwinsnstr(win, y, x, str, n) #

[View source]
def mvwinsstr(win, y, x, str) #

[View source]
def mvwprintw(win, y, x, fmt) #

[View source]
def mvwvline(win : WindowPtr, y : Int, x : Int, ch : Int, n : Int) : Int32 #

[View source]
def mvwvline(win : WindowPtr, y : Int, x : Int, ch : Acs, n : Int) : Int32 #

[View source]
def napms(ms) #

[View source]
def newpad(nlines, ncols) #

[View source]
def newterm(typ, outd, infd) #

[View source]
def newwin(nlines, ncols, beginY, beginX) #

[View source]
def nl #

[View source]
def nocbreak #

[View source]
def nodelay(win, bf) #

[View source]
def noecho #

[View source]
def nonl #

[View source]
def noqiflush #

[View source]
def noraw #

[View source]
def notimeout(win, bf) #

[View source]
def overlay(srcwin, dstwin) #

[View source]
def overwrite(srcwin, dstwin) #

[View source]
def pair_content(pair, f, b) #

[View source]
def pechochar(pad, ch) #

[View source]
def pnoutrefresh(pad, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol) #

[View source]
def prefresh(pad, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol) #

[View source]
def printw(fmt) #

[View source]
def qiflush #

[View source]
def raw #

[View source]
def redrawwin(win) #

[View source]
def refresh #

[View source]
def reset_prog_mode #

[View source]
def reset_shell_mode #

[View source]
def resetty #

[View source]
def resize_term(line, columns) #

[View source]
def resizeterm(line, columns) #

[View source]
def savetty #

[View source]
def scr_dump(filename) #

[View source]
def scr_init(filename) #

[View source]
def scr_restore(filename) #

[View source]
def scr_set(filename) #

[View source]
def scrl(n) #

[View source]
def scroll(win) #

[View source]
def scrollok(win, bf) #

[View source]
def set_term(sp) #

[View source]
def setscrreg(top, bot) #

[View source]
def slk_attroff(attrs) #

[View source]
def slk_attron(attrs) #

[View source]
def slk_attrset(attrs) #

[View source]
def slk_clear #

[View source]
def slk_color(color_pair_number) #

[View source]
def slk_init(fmt) #

[View source]
def slk_label(labnum) #

[View source]
def slk_noutrefresh #

[View source]
def slk_refresh #

[View source]
def slk_restore #

[View source]
def slk_set(labnum, label, fmt) #

[View source]
def slk_touch #

[View source]
def standend #

[View source]
def standout #

[View source]
def start_color #

[View source]
def subpad(orig, nlines, ncols, beginY, beginX) #

[View source]
def subwin(orig, nlines, ncols, beginY, beginX) #

[View source]
def syncok(win, bf) #

[View source]
def termattrs #

[View source]
def termname #

[View source]
def tgetflag(id) #

[View source]
def tgetnum(id) #

[View source]
def timeout(delay) #

[View source]
def touchline(win, start, count) #

[View source]
def touchwin(win) #

[View source]
def typeahead(fd) #

[View source]
def unctrl(c) #

[View source]
def unget_wch(wch) #

[View source]
def ungetch(ch) #

[View source]
def untouchwin(win) #

[View source]
def use_default_colors #

[View source]
def use_env(f) #

[View source]
def use_extended_names(enable) #

[View source]
def vline(ch : Int, n : Int) : Int32 #

[View source]
def vline(ch : Acs, n : Int) : Int32 #

[View source]
def waddch(win, ch) #

[View source]
def waddchnstr(win, chstr, n) #

[View source]
def waddchstr(win, chstr) #

[View source]
def waddnstr(win, str, n) #

[View source]
def waddstr(win, str) #

[View source]
def wattr_get(win, attrs, pair, opts) #

[View source]
def wattr_off(win, attrs, opts) #

[View source]
def wattr_on(win, attrs, opts) #

[View source]
def wattr_set(win, attrs, pair, opts) #

[View source]
def wattroff(win, attrs) #

[View source]
def wattron(win, attrs) #

[View source]
def wattrset(win, attrs) #

[View source]
def wbkgd(win, ch) #

[View source]
def wbkgdset(win, ch) #

[View source]
def wborder(win : WindowPtr, ls : Int, rs : Int, ts : Int, bs : Int, tl : Int, tr : Int, bl : Int, br : Int) : Int32 #

[View source]
def wborder(win : WindowPtr, ls : Acs, rs : Acs, ts : Acs, bs : Acs, tl : Acs, tr : Acs, bl : Acs, br : Acs) : Int32 #

[View source]
def wchgat(win, n, attrs, color, opts) #

[View source]
def wclear(win) #

[View source]
def wclrtobot(win) #

[View source]
def wclrtoeol(win) #

[View source]
def wcolor_set(win, color, opts) #

[View source]
def wcursyncup(win) #

[View source]
def wdelch(win) #

[View source]
def wdeleteln(win) #

[View source]
def wechochar(win, ch) #

[View source]
def wenclose(win, y, x) #

[View source]
def werase(win) #

[View source]
def wgetch(win) #

[View source]
def wgetnstr(win, str, n) #

[View source]
def wgetstr(win, str) #

[View source]
def wgetwch(win : WindowPtr) : Tuple(UInt32 | Nil, CInt32) #

[View source]
def whline(win : WindowPtr, ch : Int, n : Int) : Int32 #

[View source]
def whline(win : WindowPtr, ch : Acs, n : Int) : Int32 #

[View source]
def winch(win) #

[View source]
def winchnstr(win, chstr, n) #

[View source]
def winchstr(win, chstr) #

[View source]
def winnstr(win, str, n) #

[View source]
def winsch(win, ch) #

[View source]
def winsdelln(win, n) #

[View source]
def winsertln(win) #

[View source]
def winsnstr(win, str, n) #

[View source]
def winsstr(win, str) #

[View source]
def winstr(win, str) #

[View source]
def wmove(win, y, x) #

[View source]
def wnoutrefresh(win) #

[View source]
def wprintw(win, fmt) #

[View source]
def wredrawln(win, begLine, numLines) #

[View source]
def wrefresh(win) #

[View source]
def wresize(win, lines, columns) #

[View source]
def wscrl(win, n) #

[View source]
def wsetscrreg(win, top, bot) #

[View source]
def wstandend(win) #

[View source]
def wstandout(win) #

[View source]
def wsyncdown(win) #

[View source]
def wsyncup(win) #

[View source]
def wtimeout(win, delay) #

[View source]
def wtouchln(win, y, n, changed) #

[View source]
def wvline(win : WindowPtr, ch : Int, n : Int) : Int32 #

[View source]
def wvline(win : WindowPtr, ch : Acs, n : Int) : Int32 #

[View source]