2017-07-06 05:54:38 +00:00
|
|
|
import ncurses
|
|
|
|
export ncurses
|
|
|
|
|
2021-06-08 02:57:46 +00:00
|
|
|
#proc keypad*(win: PWindow, enable: bool): int {.cdecl, discardable, importc: "keypad", dynlib: libncurses.}
|
|
|
|
#proc scrollok*(win: PWindow, enable: bool): int {.cdecl, discardable, importc: "scrollok", dynlib: libncurses.}
|
|
|
|
#proc nodelay*(win: PWindow, enable: bool): int {.cdecl, discardable, importc: "nodelay", dynlib: libncurses.}
|
|
|
|
#proc nonl*(): int {.cdecl, discardable, importc: "nonl", dynlib: libncurses.}
|
|
|
|
|
|
|
|
proc newwin*(num_rows, num_cols, begin_x, begin_y: int): PWindow {.cdecl, discardable, importc: "newwin", dynlib: libncurses.}
|
|
|
|
proc delwin*(win: PWindow): int {.cdecl, discardable, importc: "delwin", dynlib: libncurses.}
|
|
|
|
#proc newwin(num_rows, num_cols, begin_x, begin_y: int): PWindow {.cdecl, discardable, importc: "newwin", dynlib: libncurses.}
|
|
|
|
|
|
|
|
#proc wgetch*(win: PWindow): int {.cdecl, discardable, importc: "wgetch", dynlib: libncurses.}
|
|
|
|
#proc wrefresh*(win: PWindow): int {.cdecl, discardable, importc: "wrefresh", dynlib: libncurses.}
|
|
|
|
proc wclear*(win: PWindow): int {.cdecl, discardable, importc: "wclear", dynlib: libncurses.}
|
|
|
|
proc mvwhline*(win: PWindow, rol, col: int, chType: char, n: int): int {.cdecl, discardable, importc: "whline", dynlib: libncurses.}
|
|
|
|
proc wmove*(win: PWindow, rol, col: int): int {.cdecl, discardable, importc: "wmove", dynlib: libncurses.}
|
|
|
|
#proc wprintw*(win: PWindow, str: cstring): int {.cdecl, discardable, importc: "wprintw", dynlib: libncurses.}
|
|
|
|
#proc mvwprintw*(win: PWindow, row, col: int, str: cstring): int {.cdecl, discardable, importc: "mvwprintw", dynlib: libncurses.}
|
|
|
|
|
|
|
|
proc box*(win: PWindow, vert_border, horiz_border: char): int {.cdecl, discardable, importc: "box", dynlib: libncurses.}
|
|
|
|
proc wborder*(win: PWindow, ls,rs,ts,bs,tl,tr,bl,br: char): int {.cdecl, discardable, importc: "wborder", dynlib: libncurses.}
|
2017-07-06 05:54:38 +00:00
|
|
|
|
|
|
|
proc init_pair*(n, f, b: int): int {.cdecl, discardable, importc: "init_pair", dynlib: libncurses.}
|
|
|
|
proc COLOR_PAIR*(n: int): int {.cdecl, discardable, importc: "COLOR_PAIR", dynlib: libncurses.}
|
|
|
|
|
2021-06-08 02:57:46 +00:00
|
|
|
proc wattron*(win: PWindow, attrs: int): int {.cdecl, discardable, importc: "wattron", dynlib: libncurses.}
|
|
|
|
proc wattroff*(win: PWindow, attrs: int): int {.cdecl, discardable, importc: "wattron", dynlib: libncurses.}
|
2017-07-06 05:54:38 +00:00
|
|
|
|
|
|
|
const BLACK* = 0
|
|
|
|
const RED* = 1
|
|
|
|
const GREEN* = 2
|
|
|
|
const YELLOW* = 3
|
|
|
|
const BLUE* = 4
|
|
|
|
const MAGENTA* = 5
|
|
|
|
const CYAN* = 6
|
|
|
|
const WHITE* = 7
|