Skip to content

Instantly share code, notes, and snippets.

@genotrance
Last active June 24, 2020 04:06
Show Gist options
  • Save genotrance/a05279d6ca27abcd3e45d7e89ca251e4 to your computer and use it in GitHub Desktop.
Save genotrance/a05279d6ca27abcd3e45d7e89ca251e4 to your computer and use it in GitHub Desktop.
Nim wrapper for libncurses using nimterop
# nim c -d:FLAGS ncurses.nim
#
# FLAGS
# -d:cursesStd | -d:cursesGit | -d:cursesConan | -d:cursesJBB
# -d:cursesStatic
import os
import nimterop/[build, cimport]
const
baseDir = getProjectCacheDir("nimncurses")
libname =
when defined(cursesStd) or defined(cursesJBB):
"ncursesw"
else:
"ncurses"
getHeader(
header = "curses.h",
giturl = "https://github.com/mirror/ncurses",
conanuri = "ncurses",
jbburi = "ncurses",
outdir = baseDir,
conFlags = "--with-shared",
altNames = libname
)
static:
cDebug()
cSkipSymbol(@[
# Stylistic duplicates
"attroff", "attron", "attrset",
"slk_attroff", "slk_attron", "slk_attrset",
"slk_attrset_sp",
"vwprintf", "vwprintw",
"vwscanw",
"wattron", "wattroff", "wattrset",
"resizeterm", "resizeterm_sp",
"acs_map", "ttytype"
])
cOverride:
type
screen = object
const
dynlib = when isDefined(cursesStatic): "" else: cursesLPath
cIncludeDir(cursesPath.parentDir().parentDir())
cImport(cursesPath, dynlib = dynlib, flags="-E_ -F_ -f:ast2")
{.passL: "-ltinfo".}
# Removing /home/gt/.cache/nim/nimterop/nimncurses
# Including library /lib/x86_64-linux-gnu/libncursesw.so.5
# Overriding screen
# Importing /usr/include/curses.h
# Generated @ 2020-06-23T22:50:04-05:00
# Command line:
# /home/gt/nimterop/nimterop/toast --preprocess -m:c -E_ -F_ -f:ast2 --pnim --dynlib=/lib/x86_64-linux-gnu/libncursesw.so.5 --symOverride=attroff,attron,attrset,slk_attroff,slk_attron,slk_attrset,slk_attrset_sp,vwprintf,vwprintw,vwscanw,wattron,wattroff,wattrset,resizeterm,resizeterm_sp,acs_map,ttytype,screen --nim:/home/gt/.choosenim/toolchains/nim-1.0.6/bin/nim --pluginSourcePath=/home/gt/.cache/nim/nimterop/cPlugins/nimterop_471454757.nim /usr/include/curses.h
import nimterop/types
{.push hint[ConvFromXtoItselfNotNeeded]: off.}
# const 'NCURSES_ATTR_T' has unsupported value 'int'
# const 'NCURSES_CONST' has unsupported value 'const'
# const 'NCURSES_INLINE' has unsupported value 'inline'
# const 'NCURSES_COLOR_T' has unsupported value 'short'
# const 'NCURSES_PAIRS_T' has unsupported value 'short'
# const 'NCURSES_SIZE_T' has unsupported value 'short'
# const 'NCURSES_TPARM_ARG' has unsupported value 'long'
# const 'NCURSES_CH_T' has unsupported value 'chtype'
# const 'NCURSES_BOOL' has unsupported value 'bool'
# const 'WA_ATTRIBUTES' has unsupported value 'A_ATTRIBUTES'
# const 'WA_NORMAL' has unsupported value 'A_NORMAL'
# const 'WA_STANDOUT' has unsupported value 'A_STANDOUT'
# const 'WA_UNDERLINE' has unsupported value 'A_UNDERLINE'
# const 'WA_REVERSE' has unsupported value 'A_REVERSE'
# const 'WA_BLINK' has unsupported value 'A_BLINK'
# const 'WA_DIM' has unsupported value 'A_DIM'
# const 'WA_BOLD' has unsupported value 'A_BOLD'
# const 'WA_ALTCHARSET' has unsupported value 'A_ALTCHARSET'
# const 'WA_INVIS' has unsupported value 'A_INVIS'
# const 'WA_PROTECT' has unsupported value 'A_PROTECT'
# const 'WA_HORIZONTAL' has unsupported value 'A_HORIZONTAL'
# const 'WA_LEFT' has unsupported value 'A_LEFT'
# const 'WA_LOW' has unsupported value 'A_LOW'
# const 'WA_RIGHT' has unsupported value 'A_RIGHT'
# const 'WA_TOP' has unsupported value 'A_TOP'
# const 'WA_VERTICAL' has unsupported value 'A_VERTICAL'
# const 'WA_ITALIC' has unsupported value 'A_ITALIC /* ncurses extension */'
# var 'acs_map' skipped
# const 'ACS_ULCORNER' has unsupported value 'NCURSES_ACS('l') /* upper left corner */'
# const 'ACS_LLCORNER' has unsupported value 'NCURSES_ACS('m') /* lower left corner */'
# const 'ACS_URCORNER' has unsupported value 'NCURSES_ACS('k') /* upper right corner */'
# const 'ACS_LRCORNER' has unsupported value 'NCURSES_ACS('j') /* lower right corner */'
# const 'ACS_LTEE' has unsupported value 'NCURSES_ACS('t') /* tee pointing right */'
# const 'ACS_RTEE' has unsupported value 'NCURSES_ACS('u') /* tee pointing left */'
# const 'ACS_BTEE' has unsupported value 'NCURSES_ACS('v') /* tee pointing up */'
# const 'ACS_TTEE' has unsupported value 'NCURSES_ACS('w') /* tee pointing down */'
# const 'ACS_HLINE' has unsupported value 'NCURSES_ACS('q') /* horizontal line */'
# const 'ACS_VLINE' has unsupported value 'NCURSES_ACS('x') /* vertical line */'
# const 'ACS_PLUS' has unsupported value 'NCURSES_ACS('n') /* large plus or crossover */'
# const 'ACS_S1' has unsupported value 'NCURSES_ACS('o') /* scan line 1 */'
# const 'ACS_S9' has unsupported value 'NCURSES_ACS('s') /* scan line 9 */'
# const 'ACS_DIAMOND' has unsupported value 'NCURSES_ACS('`') /* diamond */'
# const 'ACS_CKBOARD' has unsupported value 'NCURSES_ACS('a') /* checker board (stipple) */'
# const 'ACS_DEGREE' has unsupported value 'NCURSES_ACS('f') /* degree symbol */'
# const 'ACS_PLMINUS' has unsupported value 'NCURSES_ACS('g') /* plus/minus */'
# const 'ACS_BULLET' has unsupported value 'NCURSES_ACS('~') /* bullet */'
# const 'ACS_LARROW' has unsupported value 'NCURSES_ACS(',') /* arrow pointing left */'
# const 'ACS_RARROW' has unsupported value 'NCURSES_ACS('+') /* arrow pointing right */'
# const 'ACS_DARROW' has unsupported value 'NCURSES_ACS('.') /* arrow pointing down */'
# const 'ACS_UARROW' has unsupported value 'NCURSES_ACS('-') /* arrow pointing up */'
# const 'ACS_BOARD' has unsupported value 'NCURSES_ACS('h') /* board of squares */'
# const 'ACS_LANTERN' has unsupported value 'NCURSES_ACS('i') /* lantern symbol */'
# const 'ACS_BLOCK' has unsupported value 'NCURSES_ACS('0') /* solid square block */'
# const 'ACS_S3' has unsupported value 'NCURSES_ACS('p') /* scan line 3 */'
# const 'ACS_S7' has unsupported value 'NCURSES_ACS('r') /* scan line 7 */'
# const 'ACS_LEQUAL' has unsupported value 'NCURSES_ACS('y') /* less/equal */'
# const 'ACS_GEQUAL' has unsupported value 'NCURSES_ACS('z') /* greater/equal */'
# const 'ACS_PI' has unsupported value 'NCURSES_ACS('{') /* Pi */'
# const 'ACS_NEQUAL' has unsupported value 'NCURSES_ACS('|') /* not equal */'
# const 'ACS_STERLING' has unsupported value 'NCURSES_ACS('}') /* UK pound sign */'
# const 'ACS_BSSB' has unsupported value 'ACS_ULCORNER'
# const 'ACS_SSBB' has unsupported value 'ACS_LLCORNER'
# const 'ACS_BBSS' has unsupported value 'ACS_URCORNER'
# const 'ACS_SBBS' has unsupported value 'ACS_LRCORNER'
# const 'ACS_SBSS' has unsupported value 'ACS_RTEE'
# const 'ACS_SSSB' has unsupported value 'ACS_LTEE'
# const 'ACS_SSBS' has unsupported value 'ACS_BTEE'
# const 'ACS_BSSS' has unsupported value 'ACS_TTEE'
# const 'ACS_BSBS' has unsupported value 'ACS_HLINE'
# const 'ACS_SBSB' has unsupported value 'ACS_VLINE'
# const 'ACS_SSSS' has unsupported value 'ACS_PLUS'
# proc 'attroff' skipped
# proc 'attron' skipped
# proc 'attrset' skipped
# proc 'slk_attroff' skipped
# proc 'slk_attron' skipped
# proc 'slk_attrset' skipped
# proc 'vwprintw' skipped
# proc 'vwscanw' skipped
# proc 'wattron' skipped
# proc 'wattroff' skipped
# proc 'wattrset' skipped
# proc 'resizeterm' skipped
# const 'NCURSES_SP_OUTC' has unsupported value 'NCURSES_OUTC'
# const 'A_ATTRIBUTES' has unsupported value 'NCURSES_BITS(~(1UL - 1UL),0)'
# const 'A_CHARTEXT' has unsupported value '(NCURSES_BITS(1UL,0) - 1UL)'
# const 'A_COLOR' has unsupported value 'NCURSES_BITS(((1UL) << 8) - 1UL,0)'
# const 'A_STANDOUT' has unsupported value 'NCURSES_BITS(1UL,8)'
# const 'A_UNDERLINE' has unsupported value 'NCURSES_BITS(1UL,9)'
# const 'A_REVERSE' has unsupported value 'NCURSES_BITS(1UL,10)'
# const 'A_BLINK' has unsupported value 'NCURSES_BITS(1UL,11)'
# const 'A_DIM' has unsupported value 'NCURSES_BITS(1UL,12)'
# const 'A_BOLD' has unsupported value 'NCURSES_BITS(1UL,13)'
# const 'A_ALTCHARSET' has unsupported value 'NCURSES_BITS(1UL,14)'
# const 'A_INVIS' has unsupported value 'NCURSES_BITS(1UL,15)'
# const 'A_PROTECT' has unsupported value 'NCURSES_BITS(1UL,16)'
# const 'A_HORIZONTAL' has unsupported value 'NCURSES_BITS(1UL,17)'
# const 'A_LEFT' has unsupported value 'NCURSES_BITS(1UL,18)'
# const 'A_LOW' has unsupported value 'NCURSES_BITS(1UL,19)'
# const 'A_RIGHT' has unsupported value 'NCURSES_BITS(1UL,20)'
# const 'A_TOP' has unsupported value 'NCURSES_BITS(1UL,21)'
# const 'A_VERTICAL' has unsupported value 'NCURSES_BITS(1UL,22)'
# const 'A_ITALIC' has unsupported value 'NCURSES_BITS(1UL,23) /* ncurses extension */'
# const 'vw_printw' has unsupported value 'vwprintw'
# const 'vw_scanw' has unsupported value 'vwscanw'
# var 'ttytype' skipped
# const 'BUTTON1_RELEASED' has unsupported value 'NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED)'
# const 'BUTTON1_PRESSED' has unsupported value 'NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED)'
# const 'BUTTON1_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_CLICKED)'
# const 'BUTTON1_DOUBLE_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED)'
# const 'BUTTON1_TRIPLE_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED)'
# const 'BUTTON2_RELEASED' has unsupported value 'NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_RELEASED)'
# const 'BUTTON2_PRESSED' has unsupported value 'NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED)'
# const 'BUTTON2_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_CLICKED)'
# const 'BUTTON2_DOUBLE_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(2, NCURSES_DOUBLE_CLICKED)'
# const 'BUTTON2_TRIPLE_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(2, NCURSES_TRIPLE_CLICKED)'
# const 'BUTTON3_RELEASED' has unsupported value 'NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_RELEASED)'
# const 'BUTTON3_PRESSED' has unsupported value 'NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_PRESSED)'
# const 'BUTTON3_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(3, NCURSES_BUTTON_CLICKED)'
# const 'BUTTON3_DOUBLE_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(3, NCURSES_DOUBLE_CLICKED)'
# const 'BUTTON3_TRIPLE_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(3, NCURSES_TRIPLE_CLICKED)'
# const 'BUTTON4_RELEASED' has unsupported value 'NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_RELEASED)'
# const 'BUTTON4_PRESSED' has unsupported value 'NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_PRESSED)'
# const 'BUTTON4_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(4, NCURSES_BUTTON_CLICKED)'
# const 'BUTTON4_DOUBLE_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(4, NCURSES_DOUBLE_CLICKED)'
# const 'BUTTON4_TRIPLE_CLICKED' has unsupported value 'NCURSES_MOUSE_MASK(4, NCURSES_TRIPLE_CLICKED)'
# const 'BUTTON1_RESERVED_EVENT' has unsupported value 'NCURSES_MOUSE_MASK(1, NCURSES_RESERVED_EVENT)'
# const 'BUTTON2_RESERVED_EVENT' has unsupported value 'NCURSES_MOUSE_MASK(2, NCURSES_RESERVED_EVENT)'
# const 'BUTTON3_RESERVED_EVENT' has unsupported value 'NCURSES_MOUSE_MASK(3, NCURSES_RESERVED_EVENT)'
# const 'BUTTON4_RESERVED_EVENT' has unsupported value 'NCURSES_MOUSE_MASK(4, NCURSES_RESERVED_EVENT)'
# const 'BUTTON_CTRL' has unsupported value 'NCURSES_MOUSE_MASK(5, 0001L)'
# const 'BUTTON_SHIFT' has unsupported value 'NCURSES_MOUSE_MASK(5, 0002L)'
# const 'BUTTON_ALT' has unsupported value 'NCURSES_MOUSE_MASK(5, 0004L)'
# const 'REPORT_MOUSE_POSITION' has unsupported value 'NCURSES_MOUSE_MASK(5, 0010L)'
# const 'ALL_MOUSE_EVENTS' has unsupported value '(REPORT_MOUSE_POSITION - 1)'
# const '_tracech_t' has unsupported value '_tracechtype'
# const '_tracech_t2' has unsupported value '_tracechtype2'
{.pragma: impcursesHdr, header: "/usr/include/curses.h".}
{.pragma: impcursesDyn, dynlib: "/lib/x86_64-linux-gnu/libncursesw.so.5".}
{.experimental: "codeReordering".}
const
CURSES* = 1
CURSES_H* = 1
NCURSES_VERSION_MAJOR* = 6
NCURSES_VERSION_MINOR* = 1
NCURSES_VERSION_PATCH* = 20180127
NCURSES_VERSION* = "6.1"
NCURSES_MOUSE_VERSION* = 1
NCURSES_ENABLE_STDBOOL_H* = 1
NCURSES_OPAQUE* = 0
NCURSES_OPAQUE_FORM* = 0
NCURSES_OPAQUE_MENU* = 0
NCURSES_OPAQUE_PANEL* = 0
NCURSES_WATTR_MACROS* = 1
NCURSES_REENTRANT* = 0
NCURSES_INTEROP_FUNCS* = 0
NCURSES_TPARM_VARARGS* = 1
NCURSES_WCWIDTH_GRAPHICS* = 1
NCURSES_WIDECHAR* = 0
TRUE* = 1
FALSE* = 0
COLOR_BLACK* = 0
COLOR_RED* = 1
COLOR_GREEN* = 2
COLOR_YELLOW* = 3
COLOR_BLUE* = 4
COLOR_MAGENTA* = 5
COLOR_CYAN* = 6
COLOR_WHITE* = 7
ERR* = (-1)
OK* = (0)
SUBWIN* = 0x00000001
ENDLINE* = 0x00000002
FULLWIN* = 0x00000004
SCROLLWIN* = 0x00000008
ISPAD* = 0x00000010
HASMOVED* = 0x00000020
WRAPPED* = 0x00000040
NOCHANGE* = -1
NEWINDEX* = -1
NCURSES_EXT_FUNCS* = 20180127
NCURSES_SP_FUNCS* = 0
NCURSES_ATTR_SHIFT* = 8
A_NORMAL* = (1'u32 - typeof(1'u32)(1'u32))
KEY_CODE_YES* = 0o000000000400
KEY_MIN* = 0o000000000401
KEY_BREAK* = 0o000000000401
KEY_SRESET* = 0o000000000530
KEY_RESET* = 0o000000000531
KEY_DOWN* = 0o000000000402
KEY_UP* = 0o000000000403
KEY_LEFT* = 0o000000000404
KEY_RIGHT* = 0o000000000405
KEY_HOME* = 0o000000000406
KEY_BACKSPACE* = 0o000000000407
KEY_F0* = 0o000000000410
KEY_DL* = 0o000000000510
KEY_IL* = 0o000000000511
KEY_DC* = 0o000000000512
KEY_IC* = 0o000000000513
KEY_EIC* = 0o000000000514
KEY_CLEAR* = 0o000000000515
KEY_EOS* = 0o000000000516
KEY_EOL* = 0o000000000517
KEY_SF* = 0o000000000520
KEY_SR* = 0o000000000521
KEY_NPAGE* = 0o000000000522
KEY_PPAGE* = 0o000000000523
KEY_STAB* = 0o000000000524
KEY_CTAB* = 0o000000000525
KEY_CATAB* = 0o000000000526
KEY_ENTER* = 0o000000000527
KEY_PRINT* = 0o000000000532
KEY_LL* = 0o000000000533
KEY_A1* = 0o000000000534
KEY_A3* = 0o000000000535
KEY_B2* = 0o000000000536
KEY_C1* = 0o000000000537
KEY_C3* = 0o000000000540
KEY_BTAB* = 0o000000000541
KEY_BEG* = 0o000000000542
KEY_CANCEL* = 0o000000000543
KEY_CLOSE* = 0o000000000544
KEY_COMMAND* = 0o000000000545
KEY_COPY* = 0o000000000546
KEY_CREATE* = 0o000000000547
KEY_END* = 0o000000000550
KEY_EXIT* = 0o000000000551
KEY_FIND* = 0o000000000552
KEY_HELP* = 0o000000000553
KEY_MARK* = 0o000000000554
KEY_MESSAGE* = 0o000000000555
KEY_MOVE* = 0o000000000556
KEY_NEXT* = 0o000000000557
KEY_OPEN* = 0o000000000560
KEY_OPTIONS* = 0o000000000561
KEY_PREVIOUS* = 0o000000000562
KEY_REDO* = 0o000000000563
KEY_REFERENCE* = 0o000000000564
KEY_REFRESH* = 0o000000000565
KEY_REPLACE* = 0o000000000566
KEY_RESTART* = 0o000000000567
KEY_RESUME* = 0o000000000570
KEY_SAVE* = 0o000000000571
KEY_SBEG* = 0o000000000572
KEY_SCANCEL* = 0o000000000573
KEY_SCOMMAND* = 0o000000000574
KEY_SCOPY* = 0o000000000575
KEY_SCREATE* = 0o000000000576
KEY_SDC* = 0o000000000577
KEY_SDL* = 0o000000000600
KEY_SELECT* = 0o000000000601
KEY_SEND* = 0o000000000602
KEY_SEOL* = 0o000000000603
KEY_SEXIT* = 0o000000000604
KEY_SFIND* = 0o000000000605
KEY_SHELP* = 0o000000000606
KEY_SHOME* = 0o000000000607
KEY_SIC* = 0o000000000610
KEY_SLEFT* = 0o000000000611
KEY_SMESSAGE* = 0o000000000612
KEY_SMOVE* = 0o000000000613
KEY_SNEXT* = 0o000000000614
KEY_SOPTIONS* = 0o000000000615
KEY_SPREVIOUS* = 0o000000000616
KEY_SPRINT* = 0o000000000617
KEY_SREDO* = 0o000000000620
KEY_SREPLACE* = 0o000000000621
KEY_SRIGHT* = 0o000000000622
KEY_SRSUME* = 0o000000000623
KEY_SSAVE* = 0o000000000624
KEY_SSUSPEND* = 0o000000000625
KEY_SUNDO* = 0o000000000626
KEY_SUSPEND* = 0o000000000627
KEY_UNDO* = 0o000000000630
KEY_MOUSE* = 0o000000000631
KEY_RESIZE* = 0o000000000632
KEY_EVENT* = 0o000000000633
KEY_MAX* = 0o000000000777
NCURSES_BUTTON_RELEASED* = 0o000000000001'i32
NCURSES_BUTTON_PRESSED* = 0o000000000002'i32
NCURSES_BUTTON_CLICKED* = 0o000000000004'i32
NCURSES_DOUBLE_CLICKED* = 0o000000000010'i32
NCURSES_TRIPLE_CLICKED* = 0o000000000020'i32
NCURSES_RESERVED_EVENT* = 0o000000000040'i32
TRACE_DISABLE* = 0x00000000
TRACE_TIMES* = 0x00000001
TRACE_TPUTS* = 0x00000002
TRACE_UPDATE* = 0x00000004
TRACE_MOVE* = 0x00000008
TRACE_CHARPUT* = 0x00000010
TRACE_ORDINARY* = 0x0000001F
TRACE_CALLS* = 0x00000020
TRACE_VIRTPUT* = 0x00000040
TRACE_IEVENT* = 0x00000080
TRACE_BITS* = 0x00000100
TRACE_ICALLS* = 0x00000200
TRACE_CCALLS* = 0x00000400
TRACE_DATABASE* = 0x00000800
TRACE_ATTRS* = 0x00001000
TRACE_SHIFT* = 13
TRACE_MAXIMUM* = ((1 shl typeof(1)(TRACE_SHIFT)) - typeof(1)(1))
type
screen = object
chtype* {.importc, impcursesHdr.} = culong
mmask_t* {.importc, impcursesHdr.} = culong
NCURSES_BOOL* {.importc, impcursesHdr.} = cuchar
SCREEN* {.importc, impcursesHdr.} = screen
WINDOW* {.importc, impcursesHdr.} = win_st
attr_t* {.importc, impcursesHdr.} = chtype ## ```
## ...must be at least as wide as chtype
## ```
ldat* {.incompleteStruct, impcursesHdr, importc: "struct ldat".} = object
pdat* {.bycopy, impcursesHdr, importc: "struct pdat".} = object ## ```
## pointer to parent if a sub-window
## these are used only if this is a pad
## ```
pad_y*: cshort
pad_x*: cshort
pad_top*: cshort
pad_left*: cshort
pad_bottom*: cshort
pad_right*: cshort
win_st* {.bycopy, impcursesHdr, importc: "struct _win_st".} = object
cury*: cshort ## ```
## current cursor position
## window location and size
## ```
curx*: cshort ## ```
## current cursor position
## window location and size
## ```
maxy*: cshort ## ```
## maximums of x and y, NOT window size
## ```
maxx*: cshort ## ```
## maximums of x and y, NOT window size
## ```
begy*: cshort ## ```
## screen coords of upper-left-hand corner
## ```
begx*: cshort ## ```
## screen coords of upper-left-hand corner
## ```
flags*: cshort ## ```
## window state flags
## attribute tracking
## ```
attrs*: attr_t ## ```
## current attribute for non-space character
## ```
bkgd*: chtype ## ```
## current background char/attribute pair
## option values set by user
## ```
notimeout*: bool ## ```
## no time out on function-key entry?
## ```
clear*: bool ## ```
## consider all data in the window invalid?
## ```
leaveok*: bool ## ```
## OK to not reset cursor on exit?
## ```
scroll*: bool ## ```
## OK to scroll this window?
## ```
idlok*: bool ## ```
## OK to use insert/delete line?
## ```
idcok*: bool ## ```
## OK to use insert/delete char?
## ```
immed*: bool ## ```
## window in immed mode? (not yet used)
## ```
sync*: bool ## ```
## window in sync mode?
## ```
use_keypad*: bool ## ```
## process function keys into KEY_ symbols?
## ```
delay*: cint ## ```
## 0 = nodelay, <0 = blocking, >0 = delay
## ```
line*: ptr ldat ## ```
## the actual line data
## global screen state
## ```
regtop*: cshort ## ```
## top line of scrolling region
## ```
regbottom*: cshort ## ```
## bottom line of scrolling region
## these are used only if this is a sub-window
## ```
parx*: cint ## ```
## x coordinate of this window in parent
## ```
pary*: cint ## ```
## y coordinate of this window in parent
## ```
parent*: ptr WINDOW ## ```
## pointer to parent if a sub-window
## these are used only if this is a pad
## ```
pad*: pdat ## ```
## pointer to parent if a sub-window
## these are used only if this is a pad
## ```
yoffset*: cshort ## ```
## real begy is _begy + _yoffset
## ```
NCURSES_OUTC* {.importc, impcursesHdr.} = proc (a1: cint): cint {.cdecl.}
NCURSES_WINDOW_CB* {.importc, impcursesHdr.} = proc (a1: ptr WINDOW; a2: pointer): cint {.
cdecl.}
NCURSES_SCREEN_CB* {.importc, impcursesHdr.} = proc (a1: ptr SCREEN; a2: pointer): cint {.
cdecl.}
MEVENT* {.bycopy, importc, impcursesHdr.} = object
id*: cshort ## ```
## ID to distinguish multiple devices
## ```
x*: cint ## ```
## event coordinates (character-cell)
## ```
y*: cint ## ```
## event coordinates (character-cell)
## ```
z*: cint ## ```
## event coordinates (character-cell)
## ```
bstate*: mmask_t ## ```
## button state bits
## ```
var
curscr* {.importc, impcursesDyn.}: ptr WINDOW ## ```
## Public variables.
##
## Notes:
## a. ESCDELAY was an undocumented feature under AIX curses.
## It gives the ESC expire time in milliseconds.
## b. ttytype is needed for backward compatibility
## ```
newscr* {.importc, impcursesDyn.}: ptr WINDOW
stdscr* {.importc, impcursesDyn.}: ptr WINDOW
COLORS* {.importc, impcursesDyn.}: cint
COLOR_PAIRS* {.importc, impcursesDyn.}: cint
COLS* {.importc, impcursesDyn.}: cint
ESCDELAY* {.importc, impcursesDyn.}: cint
LINES* {.importc, impcursesDyn.}: cint
TABSIZE* {.importc, impcursesDyn.}: cint
proc addch*(a1: chtype): cint {.importc, cdecl, impcursesDyn.}
proc addchnstr*(a1: ptr chtype; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc addchstr*(a1: ptr chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc addnstr*(a1: cstring; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc addstr*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc attr_get*(a1: ptr attr_t; a2: ptr cshort; a3: pointer): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc attr_off*(a1: attr_t; a2: pointer): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc attr_on*(a1: attr_t; a2: pointer): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc attr_set*(a1: attr_t; a2: cshort; a3: pointer): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc baudrate*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc beep*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc bkgd*(a1: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc bkgdset*(a1: chtype) {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc border*(a1: chtype; a2: chtype; a3: chtype; a4: chtype; a5: chtype; a6: chtype;
a7: chtype; a8: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc box*(a1: ptr WINDOW; a2: chtype; a3: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc can_change_color*(): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc cbreak*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc chgat*(a1: cint; a2: attr_t; a3: cshort; a4: pointer): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc clear*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc clearok*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc clrtobot*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc clrtoeol*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc color_content*(a1: cshort; a2: ptr cshort; a3: ptr cshort; a4: ptr cshort): cint {.
importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc color_set*(a1: cshort; a2: pointer): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc COLOR_PAIR*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc copywin*(a1: ptr WINDOW; a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint; a7: cint;
a8: cint; a9: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc curs_set*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc def_prog_mode*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc def_shell_mode*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc delay_output*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc delch*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc delscreen*(a1: ptr SCREEN) {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc delwin*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc deleteln*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc derwin*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cint; a5: cint): ptr WINDOW {.importc,
cdecl, impcursesDyn.}
## ```
## generated
## ```
proc doupdate*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc dupwin*(a1: ptr WINDOW): ptr WINDOW {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc echo*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc echochar*(a1: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc erase*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc endwin*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc erasechar*(): cchar {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc filter*() {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc flash*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc flushinp*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc getbkgd*(a1: ptr WINDOW): chtype {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc getch*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getnstr*(a1: cstring; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getstr*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getwin*(a1: File): ptr WINDOW {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc halfdelay*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc has_colors*(): bool {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc has_ic*(): bool {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc has_il*(): bool {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc hline*(a1: chtype; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc idcok*(a1: ptr WINDOW; a2: bool) {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc idlok*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc immedok*(a1: ptr WINDOW; a2: bool) {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc inch*(): chtype {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc inchnstr*(a1: ptr chtype; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc inchstr*(a1: ptr chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc initscr*(): ptr WINDOW {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc init_color*(a1: cshort; a2: cshort; a3: cshort; a4: cshort): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc init_pair*(a1: cshort; a2: cshort; a3: cshort): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc innstr*(a1: cstring; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc insch*(a1: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc insdelln*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc insertln*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc insnstr*(a1: cstring; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc insstr*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc instr*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc intrflush*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc isendwin*(): bool {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc is_linetouched*(a1: ptr WINDOW; a2: cint): bool {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc is_wintouched*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc keyname*(a1: cint): cstring {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc keypad*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc killchar*(): cchar {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc leaveok*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc longname*(): cstring {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc meta*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc move*(a1: cint; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc mvaddch*(a1: cint; a2: cint; a3: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvaddchnstr*(a1: cint; a2: cint; a3: ptr chtype; a4: cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvaddchstr*(a1: cint; a2: cint; a3: ptr chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvaddnstr*(a1: cint; a2: cint; a3: cstring; a4: cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvaddstr*(a1: cint; a2: cint; a3: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvchgat*(a1: cint; a2: cint; a3: cint; a4: attr_t; a5: cshort; a6: pointer): cint {.
importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvcur*(a1: cint; a2: cint; a3: cint; a4: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvdelch*(a1: cint; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc mvderwin*(a1: ptr WINDOW; a2: cint; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvgetch*(a1: cint; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc mvgetnstr*(a1: cint; a2: cint; a3: cstring; a4: cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvgetstr*(a1: cint; a2: cint; a3: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvhline*(a1: cint; a2: cint; a3: chtype; a4: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvinch*(a1: cint; a2: cint): chtype {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvinchnstr*(a1: cint; a2: cint; a3: ptr chtype; a4: cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvinchstr*(a1: cint; a2: cint; a3: ptr chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvinnstr*(a1: cint; a2: cint; a3: cstring; a4: cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvinsch*(a1: cint; a2: cint; a3: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvinsnstr*(a1: cint; a2: cint; a3: cstring; a4: cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvinsstr*(a1: cint; a2: cint; a3: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvinstr*(a1: cint; a2: cint; a3: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvprintw*(a1: cint; a2: cint; a3: cstring): cint {.importc, cdecl, impcursesDyn,
varargs.}
## ```
## generated
## ```
proc mvscanw*(a1: cint; a2: cint; a3: cstring): cint {.importc, cdecl, impcursesDyn,
varargs.}
proc mvvline*(a1: cint; a2: cint; a3: chtype; a4: cint): cint {.importc, cdecl, impcursesDyn.}
proc mvwaddch*(a1: ptr WINDOW; a2: cint; a3: cint; a4: chtype): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvwaddchnstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: ptr chtype; a5: cint): cint {.
importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwaddchstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: ptr chtype): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvwaddnstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring; a5: cint): cint {.importc,
cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwaddstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvwchgat*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cint; a5: attr_t; a6: cshort;
a7: pointer): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwdelch*(a1: ptr WINDOW; a2: cint; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwgetch*(a1: ptr WINDOW; a2: cint; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwgetnstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring; a5: cint): cint {.importc,
cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwgetstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvwhline*(a1: ptr WINDOW; a2: cint; a3: cint; a4: chtype; a5: cint): cint {.importc,
cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwin*(a1: ptr WINDOW; a2: cint; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwinch*(a1: ptr WINDOW; a2: cint; a3: cint): chtype {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc mvwinchnstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: ptr chtype; a5: cint): cint {.
importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwinchstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: ptr chtype): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvwinnstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring; a5: cint): cint {.importc,
cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwinsch*(a1: ptr WINDOW; a2: cint; a3: cint; a4: chtype): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvwinsnstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring; a5: cint): cint {.importc,
cdecl, impcursesDyn.}
## ```
## generated
## ```
proc mvwinsstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvwinstr*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc mvwprintw*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring): cint {.importc, cdecl,
impcursesDyn, varargs.}
## ```
## generated
## ```
proc mvwscanw*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cstring): cint {.importc, cdecl,
impcursesDyn, varargs.}
proc mvwvline*(a1: ptr WINDOW; a2: cint; a3: cint; a4: chtype; a5: cint): cint {.importc,
cdecl, impcursesDyn.}
proc napms*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc newpad*(a1: cint; a2: cint): ptr WINDOW {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc newterm*(a1: cstring; a2: File; a3: File): ptr SCREEN {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc newwin*(a1: cint; a2: cint; a3: cint; a4: cint): ptr WINDOW {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc nl*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc nocbreak*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc nodelay*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc noecho*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc nonl*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc noqiflush*() {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc noraw*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc notimeout*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc overlay*(a1: ptr WINDOW; a2: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc overwrite*(a1: ptr WINDOW; a2: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc pair_content*(a1: cshort; a2: ptr cshort; a3: ptr cshort): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc PAIR_NUMBER*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc pechochar*(a1: ptr WINDOW; a2: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc pnoutrefresh*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cint; a5: cint; a6: cint; a7: cint): cint {.
importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc prefresh*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cint; a5: cint; a6: cint; a7: cint): cint {.
importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc printw*(a1: cstring): cint {.importc, cdecl, impcursesDyn, varargs.}
## ```
## implemented
## ```
proc putwin*(a1: ptr WINDOW; a2: File): cint {.importc, cdecl, impcursesDyn.}
proc qiflush*() {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc raw*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc redrawwin*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc refresh*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc resetty*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc reset_prog_mode*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc reset_shell_mode*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc ripoffline*(a1: cint; a2: proc (a1: ptr WINDOW; a2: cint): cint {.cdecl.}): cint {.
importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc savetty*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc scanw*(a1: cstring): cint {.importc, cdecl, impcursesDyn, varargs.}
## ```
## implemented
## ```
proc scr_dump*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
proc scr_init*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc scrl*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc scroll*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc scrollok*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc scr_restore*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc scr_set*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc setscrreg*(a1: cint; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc set_term*(a1: ptr SCREEN): ptr SCREEN {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc slk_attr_off*(a1: attr_t; a2: pointer): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_attr_on*(a1: attr_t; a2: pointer): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_attr*(): attr_t {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_attr_set*(a1: attr_t; a2: cshort; a3: pointer): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc slk_clear*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_color*(a1: cshort): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_init*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_label*(a1: cint): cstring {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_noutrefresh*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_refresh*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_restore*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_set*(a1: cint; a2: cstring; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc slk_touch*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc standout*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc standend*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc start_color*(): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc subpad*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cint; a5: cint): ptr WINDOW {.importc,
cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc subwin*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cint; a5: cint): ptr WINDOW {.importc,
cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc syncok*(a1: ptr WINDOW; a2: bool): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc termattrs*(): chtype {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc termname*(): cstring {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc timeout*(a1: cint) {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc touchline*(a1: ptr WINDOW; a2: cint; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc touchwin*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc typeahead*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc ungetch*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc untouchwin*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc use_env*(a1: bool) {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc use_tioctl*(a1: bool) {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc vidattr*(a1: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc vidputs*(a1: chtype; a2: NCURSES_OUTC): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc vline*(a1: chtype; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc vw_printw*(a1: ptr WINDOW; a2: cstring; a3: va_list): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc vw_scanw*(a1: ptr WINDOW; a2: cstring; a3: va_list): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc waddch*(a1: ptr WINDOW; a2: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc waddchnstr*(a1: ptr WINDOW; a2: ptr chtype; a3: cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc waddchstr*(a1: ptr WINDOW; a2: ptr chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc waddnstr*(a1: ptr WINDOW; a2: cstring; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc waddstr*(a1: ptr WINDOW; a2: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wattr_get*(a1: ptr WINDOW; a2: ptr attr_t; a3: ptr cshort; a4: pointer): cint {.importc,
cdecl, impcursesDyn.}
## ```
## generated
## ```
proc wattr_on*(a1: ptr WINDOW; a2: attr_t; a3: pointer): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc wattr_off*(a1: ptr WINDOW; a2: attr_t; a3: pointer): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc wattr_set*(a1: ptr WINDOW; a2: attr_t; a3: cshort; a4: pointer): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc wbkgd*(a1: ptr WINDOW; a2: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc wbkgdset*(a1: ptr WINDOW; a2: chtype) {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wborder*(a1: ptr WINDOW; a2: chtype; a3: chtype; a4: chtype; a5: chtype; a6: chtype;
a7: chtype; a8: chtype; a9: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wchgat*(a1: ptr WINDOW; a2: cint; a3: attr_t; a4: cshort; a5: pointer): cint {.importc,
cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wclear*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wclrtobot*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wclrtoeol*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wcolor_set*(a1: ptr WINDOW; a2: cshort; a3: pointer): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc wcursyncup*(a1: ptr WINDOW) {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wdelch*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wdeleteln*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wechochar*(a1: ptr WINDOW; a2: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc werase*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wgetch*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wgetnstr*(a1: ptr WINDOW; a2: cstring; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wgetstr*(a1: ptr WINDOW; a2: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc whline*(a1: ptr WINDOW; a2: chtype; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc winch*(a1: ptr WINDOW): chtype {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc winchnstr*(a1: ptr WINDOW; a2: ptr chtype; a3: cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc winchstr*(a1: ptr WINDOW; a2: ptr chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc winnstr*(a1: ptr WINDOW; a2: cstring; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc winsch*(a1: ptr WINDOW; a2: chtype): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc winsdelln*(a1: ptr WINDOW; a2: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc winsertln*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc winsnstr*(a1: ptr WINDOW; a2: cstring; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc winsstr*(a1: ptr WINDOW; a2: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc winstr*(a1: ptr WINDOW; a2: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc wmove*(a1: ptr WINDOW; a2: cint; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc wnoutrefresh*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wprintw*(a1: ptr WINDOW; a2: cstring): cint {.importc, cdecl, impcursesDyn, varargs.}
## ```
## implemented
## ```
proc wredrawln*(a1: ptr WINDOW; a2: cint; a3: cint): cint {.importc, cdecl, impcursesDyn.}
proc wrefresh*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wscanw*(a1: ptr WINDOW; a2: cstring): cint {.importc, cdecl, impcursesDyn, varargs.}
## ```
## implemented
## ```
proc wscrl*(a1: ptr WINDOW; a2: cint): cint {.importc, cdecl, impcursesDyn.}
proc wsetscrreg*(a1: ptr WINDOW; a2: cint; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wstandout*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wstandend*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc wsyncdown*(a1: ptr WINDOW) {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc wsyncup*(a1: ptr WINDOW) {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wtimeout*(a1: ptr WINDOW; a2: cint) {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc wtouchln*(a1: ptr WINDOW; a2: cint; a3: cint; a4: cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## implemented
## ```
proc wvline*(a1: ptr WINDOW; a2: chtype; a3: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc tigetflag*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
##
## These are also declared in <term.h>:
## ```
proc tigetnum*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc tigetstr*(a1: cstring): cstring {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc putp*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
## ```
## implemented
## ```
proc tparm*(a1: cstring): cstring {.importc, cdecl, impcursesDyn, varargs.}
proc tiparm*(a1: cstring): cstring {.importc, cdecl, impcursesDyn, varargs.}
proc getattrs*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## These functions are not in X/Open, but we use them in macro definitions:
## ```
proc getcurx*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getcury*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getbegx*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getbegy*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getmaxx*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getmaxy*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getparx*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc getpary*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_term_resized*(a1: cint; a2: cint): bool {.importc, cdecl, impcursesDyn.}
proc keybound*(a1: cint; a2: cint): cstring {.importc, cdecl, impcursesDyn.}
proc curses_version*(): cstring {.importc, cdecl, impcursesDyn.}
proc alloc_pair*(a1: cint; a2: cint): cint {.importc, cdecl, impcursesDyn.}
proc assume_default_colors*(a1: cint; a2: cint): cint {.importc, cdecl, impcursesDyn.}
proc define_key*(a1: cstring; a2: cint): cint {.importc, cdecl, impcursesDyn.}
proc extended_color_content*(a1: cint; a2: ptr cint; a3: ptr cint; a4: ptr cint): cint {.
importc, cdecl, impcursesDyn.}
proc extended_pair_content*(a1: cint; a2: ptr cint; a3: ptr cint): cint {.importc, cdecl,
impcursesDyn.}
proc extended_slk_color*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
proc find_pair*(a1: cint; a2: cint): cint {.importc, cdecl, impcursesDyn.}
proc free_pair*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
proc get_escdelay*(): cint {.importc, cdecl, impcursesDyn.}
proc init_extended_color*(a1: cint; a2: cint; a3: cint; a4: cint): cint {.importc, cdecl,
impcursesDyn.}
proc init_extended_pair*(a1: cint; a2: cint; a3: cint): cint {.importc, cdecl,
impcursesDyn.}
proc key_defined*(a1: cstring): cint {.importc, cdecl, impcursesDyn.}
proc keyok*(a1: cint; a2: bool): cint {.importc, cdecl, impcursesDyn.}
proc reset_color_pairs*() {.importc, cdecl, impcursesDyn.}
proc resize_term*(a1: cint; a2: cint): cint {.importc, cdecl, impcursesDyn.}
proc set_escdelay*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
proc set_tabsize*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
proc use_default_colors*(): cint {.importc, cdecl, impcursesDyn.}
proc use_extended_names*(a1: bool): cint {.importc, cdecl, impcursesDyn.}
proc use_legacy_coding*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
proc use_screen*(a1: ptr SCREEN; a2: NCURSES_SCREEN_CB; a3: pointer): cint {.importc,
cdecl, impcursesDyn.}
proc use_window*(a1: ptr WINDOW; a2: NCURSES_WINDOW_CB; a3: pointer): cint {.importc,
cdecl, impcursesDyn.}
proc wresize*(a1: ptr WINDOW; a2: cint; a3: cint): cint {.importc, cdecl, impcursesDyn.}
proc nofilter*() {.importc, cdecl, impcursesDyn.}
proc wgetparent*(a1: ptr WINDOW): ptr WINDOW {.importc, cdecl, impcursesDyn.}
## ```
## These extensions provide access to information stored in the WINDOW even
## when NCURSES_OPAQUE is set:
## ```
proc is_cleared*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_idcok*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_idlok*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_immedok*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_keypad*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_leaveok*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_nodelay*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_notimeout*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_pad*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_scrollok*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_subwin*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc is_syncok*(a1: ptr WINDOW): bool {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc wgetdelay*(a1: ptr WINDOW): cint {.importc, cdecl, impcursesDyn.}
## ```
## generated
## ```
proc wgetscrreg*(a1: ptr WINDOW; a2: ptr cint; a3: ptr cint): cint {.importc, cdecl,
impcursesDyn.}
## ```
## generated
## ```
proc has_mouse*(): bool {.importc, cdecl, impcursesDyn.}
proc getmouse*(a1: ptr MEVENT): cint {.importc, cdecl, impcursesDyn.}
proc ungetmouse*(a1: ptr MEVENT): cint {.importc, cdecl, impcursesDyn.}
proc mousemask*(a1: mmask_t; a2: ptr mmask_t): mmask_t {.importc, cdecl, impcursesDyn.}
proc wenclose*(a1: ptr WINDOW; a2: cint; a3: cint): bool {.importc, cdecl, impcursesDyn.}
proc mouseinterval*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
proc wmouse_trafo*(a1: ptr WINDOW; a2: ptr cint; a3: ptr cint; a4: bool): bool {.importc,
cdecl, impcursesDyn.}
proc mouse_trafo*(a1: ptr cint; a2: ptr cint; a3: bool): bool {.importc, cdecl, impcursesDyn.}
proc mcprint*(a1: cstring; a2: cint): cint {.importc, cdecl, impcursesDyn.}
proc has_key*(a1: cint): cint {.importc, cdecl, impcursesDyn.}
## ```
## direct data to printer
## ```
proc tracef*(a1: cstring) {.importc: "_tracef", cdecl, impcursesDyn, varargs.}
proc traceattr*(a1: attr_t): cstring {.importc: "_traceattr", cdecl, impcursesDyn.}
proc traceattr2*(a1: cint; a2: chtype): cstring {.importc: "_traceattr2", cdecl,
impcursesDyn.}
proc tracechar*(a1: cint): cstring {.importc: "_tracechar", cdecl, impcursesDyn.}
proc tracechtype*(a1: chtype): cstring {.importc: "_tracechtype", cdecl, impcursesDyn.}
proc tracechtype2*(a1: cint; a2: chtype): cstring {.importc: "_tracechtype2", cdecl,
impcursesDyn.}
proc trace*(a1: cuint) {.importc, cdecl, impcursesDyn.}
{.pop.}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment