pdcurses.nim 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561
  1. #
  2. #
  3. # Nim's Runtime Library
  4. # (c) Copyright 2015 Andreas Rumpf
  5. #
  6. # See the file "copying.txt", included in this
  7. # distribution, for details about the copyright.
  8. #
  9. {.deadCodeElim: on.}
  10. discard """
  11. curses.h:
  12. #ifdef C2NIM
  13. #dynlib pdcursesdll
  14. #skipinclude
  15. #prefix PDC_
  16. #def FALSE
  17. #def TRUE
  18. #def NULL
  19. #def bool unsigned char
  20. #def chtype unsigned long
  21. #def cchar_t unsigned long
  22. #def attr_t unsigned long
  23. #def mmask_t unsigned long
  24. #def wchar_t char
  25. #def PDCEX
  26. #cdecl
  27. #endif
  28. pdcwin.h:
  29. #ifdef C2NIM
  30. #dynlib pdcursesdll
  31. #skipinclude
  32. #prefix pdc_
  33. #prefix PDC_
  34. #stdcall
  35. #endif
  36. """
  37. when defined(windows):
  38. import windows
  39. when defined(nimOldDlls):
  40. const pdcursesdll = "pdcurses.dll"
  41. elif defined(cpu64):
  42. const pdcursesdll = "pdcurses64.dll"
  43. else:
  44. const pdcursesdll = "pdcurses32.dll"
  45. const
  46. unixOS = false
  47. {.pragma: extdecl, stdcall.}
  48. when not defined(windows):
  49. const
  50. unixOS = true
  51. {.pragma: extdecl, cdecl.}
  52. type
  53. cunsignedchar = char
  54. cunsignedlong = uint32
  55. const
  56. BUILD* = 3401
  57. PDCURSES* = 1 # PDCurses-only routines
  58. XOPEN* = 1 # X/Open Curses routines
  59. SYSVcurses* = 1 # System V Curses routines
  60. BSDcurses* = 1 # BSD Curses routines
  61. CHTYPE_LONG* = 1 # size of chtype; long
  62. ERR* = (- 1)
  63. OK* = 0
  64. BUTTON_RELEASED* = 0x00000000
  65. BUTTON_PRESSED* = 0x00000001
  66. BUTTON_CLICKED* = 0x00000002
  67. BUTTON_DOUBLE_CLICKED* = 0x00000003
  68. BUTTON_TRIPLE_CLICKED* = 0x00000004
  69. BUTTON_MOVED* = 0x00000005 # PDCurses
  70. WHEEL_SCROLLED* = 0x00000006 # PDCurses
  71. BUTTON_ACTION_MASK* = 0x00000007 # PDCurses
  72. BUTTON_MODIFIER_MASK* = 0x00000038 # PDCurses
  73. MOUSE_MOVED* = 0x00000008
  74. MOUSE_POSITION* = 0x00000010
  75. MOUSE_WHEEL_UP* = 0x00000020
  76. MOUSE_WHEEL_DOWN* = 0x00000040
  77. BUTTON1_RELEASED* = 0x00000001
  78. BUTTON1_PRESSED* = 0x00000002
  79. BUTTON1_CLICKED* = 0x00000004
  80. BUTTON1_DOUBLE_CLICKED* = 0x00000008
  81. BUTTON1_TRIPLE_CLICKED* = 0x00000010
  82. BUTTON1_MOVED* = 0x00000010 # PDCurses
  83. BUTTON2_RELEASED* = 0x00000020
  84. BUTTON2_PRESSED* = 0x00000040
  85. BUTTON2_CLICKED* = 0x00000080
  86. BUTTON2_DOUBLE_CLICKED* = 0x00000100
  87. BUTTON2_TRIPLE_CLICKED* = 0x00000200
  88. BUTTON2_MOVED* = 0x00000200 # PDCurses
  89. BUTTON3_RELEASED* = 0x00000400
  90. BUTTON3_PRESSED* = 0x00000800
  91. BUTTON3_CLICKED* = 0x00001000
  92. BUTTON3_DOUBLE_CLICKED* = 0x00002000
  93. BUTTON3_TRIPLE_CLICKED* = 0x00004000
  94. BUTTON3_MOVED* = 0x00004000 # PDCurses
  95. BUTTON4_RELEASED* = 0x00008000
  96. BUTTON4_PRESSED* = 0x00010000
  97. BUTTON4_CLICKED* = 0x00020000
  98. BUTTON4_DOUBLE_CLICKED* = 0x00040000
  99. BUTTON4_TRIPLE_CLICKED* = 0x00080000
  100. BUTTON5_RELEASED* = 0x00100000
  101. BUTTON5_PRESSED* = 0x00200000
  102. BUTTON5_CLICKED* = 0x00400000
  103. BUTTON5_DOUBLE_CLICKED* = 0x00800000
  104. BUTTON5_TRIPLE_CLICKED* = 0x01000000
  105. MOUSE_WHEEL_SCROLL* = 0x02000000 # PDCurses
  106. BUTTON_MODIFIER_SHIFT* = 0x04000000 # PDCurses
  107. BUTTON_MODIFIER_CONTROL* = 0x08000000 # PDCurses
  108. BUTTON_MODIFIER_ALT* = 0x10000000 # PDCurses
  109. ALL_MOUSE_EVENTS* = 0x1FFFFFFF
  110. REPORT_MOUSE_POSITION* = 0x20000000
  111. A_NORMAL* = 0
  112. A_ALTCHARSET* = 0x00010000
  113. A_RIGHTLINE* = 0x00020000
  114. A_LEFTLINE* = 0x00040000
  115. A_INVIS* = 0x00080000
  116. A_UNDERLINE* = 0x00100000
  117. A_REVERSE* = 0x00200000
  118. A_BLINK* = 0x00400000
  119. A_BOLD* = 0x00800000
  120. A_ATTRIBUTES* = 0xFFFF0000
  121. A_CHARTEXT* = 0x0000FFFF
  122. A_COLOR* = 0xFF000000
  123. A_ITALIC* = A_INVIS
  124. A_PROTECT* = (A_UNDERLINE or A_LEFTLINE or A_RIGHTLINE)
  125. ATTR_SHIFT* = 19
  126. COLOR_SHIFT* = 24
  127. A_STANDOUT* = (A_REVERSE or A_BOLD) # X/Open
  128. A_DIM* = A_NORMAL
  129. CHR_MSK* = A_CHARTEXT # Obsolete
  130. ATR_MSK* = A_ATTRIBUTES # Obsolete
  131. ATR_NRM* = A_NORMAL # Obsolete
  132. WA_ALTCHARSET* = A_ALTCHARSET
  133. WA_BLINK* = A_BLINK
  134. WA_BOLD* = A_BOLD
  135. WA_DIM* = A_DIM
  136. WA_INVIS* = A_INVIS
  137. WA_LEFT* = A_LEFTLINE
  138. WA_PROTECT* = A_PROTECT
  139. WA_REVERSE* = A_REVERSE
  140. WA_RIGHT* = A_RIGHTLINE
  141. WA_STANDOUT* = A_STANDOUT
  142. WA_UNDERLINE* = A_UNDERLINE
  143. WA_HORIZONTAL* = A_NORMAL
  144. WA_LOW* = A_NORMAL
  145. WA_TOP* = A_NORMAL
  146. WA_VERTICAL* = A_NORMAL
  147. COLOR_BLACK* = 0
  148. COLOR_RED* = 1
  149. COLOR_GREEN* = 2
  150. COLOR_BLUE* = 4
  151. COLOR_CYAN* = (COLOR_BLUE or COLOR_GREEN)
  152. COLOR_MAGENTA* = (COLOR_RED or COLOR_BLUE)
  153. COLOR_YELLOW* = (COLOR_RED or COLOR_GREEN)
  154. COLOR_WHITE* = 7
  155. KEY_CODE_YES* = 0x00000100 # If get_wch() gives a key code
  156. KEY_BREAK* = 0x00000101 # Not on PC KBD
  157. KEY_DOWN* = 0x00000102 # Down arrow key
  158. KEY_UP* = 0x00000103 # Up arrow key
  159. KEY_LEFT* = 0x00000104 # Left arrow key
  160. KEY_RIGHT* = 0x00000105 # Right arrow key
  161. KEY_HOME* = 0x00000106 # home key
  162. KEY_BACKSPACE* = 0x00000107 # not on pc
  163. KEY_F0* = 0x00000108 # function keys; 64 reserved
  164. KEY_DL* = 0x00000148 # delete line
  165. KEY_IL* = 0x00000149 # insert line
  166. KEY_DC* = 0x0000014A # delete character
  167. KEY_IC* = 0x0000014B # insert char or enter ins mode
  168. KEY_EIC* = 0x0000014C # exit insert char mode
  169. KEY_CLEAR* = 0x0000014D # clear screen
  170. KEY_EOS* = 0x0000014E # clear to end of screen
  171. KEY_EOL* = 0x0000014F # clear to end of line
  172. KEY_SF* = 0x00000150 # scroll 1 line forward
  173. KEY_SR* = 0x00000151 # scroll 1 line back (reverse)
  174. KEY_NPAGE* = 0x00000152 # next page
  175. KEY_PPAGE* = 0x00000153 # previous page
  176. KEY_STAB* = 0x00000154 # set tab
  177. KEY_CTAB* = 0x00000155 # clear tab
  178. KEY_CATAB* = 0x00000156 # clear all tabs
  179. KEY_ENTER* = 0x00000157 # enter or send (unreliable)
  180. KEY_SRESET* = 0x00000158 # soft/reset (partial/unreliable)
  181. KEY_RESET* = 0x00000159 # reset/hard reset (unreliable)
  182. KEY_PRINT* = 0x0000015A # print/copy
  183. KEY_LL* = 0x0000015B # home down/bottom (lower left)
  184. KEY_ABORT* = 0x0000015C # abort/terminate key (any)
  185. KEY_SHELP* = 0x0000015D # short help
  186. KEY_LHELP* = 0x0000015E # long help
  187. KEY_BTAB* = 0x0000015F # Back tab key
  188. KEY_BEG* = 0x00000160 # beg(inning) key
  189. KEY_CANCEL* = 0x00000161 # cancel key
  190. KEY_CLOSE* = 0x00000162 # close key
  191. KEY_COMMAND* = 0x00000163 # cmd (command) key
  192. KEY_COPY* = 0x00000164 # copy key
  193. KEY_CREATE* = 0x00000165 # create key
  194. KEY_END* = 0x00000166 # end key
  195. KEY_EXIT* = 0x00000167 # exit key
  196. KEY_FIND* = 0x00000168 # find key
  197. KEY_HELP* = 0x00000169 # help key
  198. KEY_MARK* = 0x0000016A # mark key
  199. KEY_MESSAGE* = 0x0000016B # message key
  200. KEY_MOVE* = 0x0000016C # move key
  201. KEY_NEXT* = 0x0000016D # next object key
  202. KEY_OPEN* = 0x0000016E # open key
  203. KEY_OPTIONS* = 0x0000016F # options key
  204. KEY_PREVIOUS* = 0x00000170 # previous object key
  205. KEY_REDO* = 0x00000171 # redo key
  206. KEY_REFERENCE* = 0x00000172 # ref(erence) key
  207. KEY_REFRESH* = 0x00000173 # refresh key
  208. KEY_REPLACE* = 0x00000174 # replace key
  209. KEY_RESTART* = 0x00000175 # restart key
  210. KEY_RESUME* = 0x00000176 # resume key
  211. KEY_SAVE* = 0x00000177 # save key
  212. KEY_SBEG* = 0x00000178 # shifted beginning key
  213. KEY_SCANCEL* = 0x00000179 # shifted cancel key
  214. KEY_SCOMMAND* = 0x0000017A # shifted command key
  215. KEY_SCOPY* = 0x0000017B # shifted copy key
  216. KEY_SCREATE* = 0x0000017C # shifted create key
  217. KEY_SDC* = 0x0000017D # shifted delete char key
  218. KEY_SDL* = 0x0000017E # shifted delete line key
  219. KEY_SELECT* = 0x0000017F # select key
  220. KEY_SEND* = 0x00000180 # shifted end key
  221. KEY_SEOL* = 0x00000181 # shifted clear line key
  222. KEY_SEXIT* = 0x00000182 # shifted exit key
  223. KEY_SFIND* = 0x00000183 # shifted find key
  224. KEY_SHOME* = 0x00000184 # shifted home key
  225. KEY_SIC* = 0x00000185 # shifted input key
  226. KEY_SLEFT* = 0x00000187 # shifted left arrow key
  227. KEY_SMESSAGE* = 0x00000188 # shifted message key
  228. KEY_SMOVE* = 0x00000189 # shifted move key
  229. KEY_SNEXT* = 0x0000018A # shifted next key
  230. KEY_SOPTIONS* = 0x0000018B # shifted options key
  231. KEY_SPREVIOUS* = 0x0000018C # shifted prev key
  232. KEY_SPRINT* = 0x0000018D # shifted print key
  233. KEY_SREDO* = 0x0000018E # shifted redo key
  234. KEY_SREPLACE* = 0x0000018F # shifted replace key
  235. KEY_SRIGHT* = 0x00000190 # shifted right arrow
  236. KEY_SRSUME* = 0x00000191 # shifted resume key
  237. KEY_SSAVE* = 0x00000192 # shifted save key
  238. KEY_SSUSPEND* = 0x00000193 # shifted suspend key
  239. KEY_SUNDO* = 0x00000194 # shifted undo key
  240. KEY_SUSPEND* = 0x00000195 # suspend key
  241. KEY_UNDO* = 0x00000196 # undo key
  242. ALT_0* = 0x00000197
  243. ALT_1* = 0x00000198
  244. ALT_2* = 0x00000199
  245. ALT_3* = 0x0000019A
  246. ALT_4* = 0x0000019B
  247. ALT_5* = 0x0000019C
  248. ALT_6* = 0x0000019D
  249. ALT_7* = 0x0000019E
  250. ALT_8* = 0x0000019F
  251. ALT_9* = 0x000001A0
  252. ALT_A* = 0x000001A1
  253. ALT_B* = 0x000001A2
  254. ALT_C* = 0x000001A3
  255. ALT_D* = 0x000001A4
  256. ALT_E* = 0x000001A5
  257. ALT_F* = 0x000001A6
  258. ALT_G* = 0x000001A7
  259. ALT_H* = 0x000001A8
  260. ALT_I* = 0x000001A9
  261. ALT_J* = 0x000001AA
  262. ALT_K* = 0x000001AB
  263. ALT_L* = 0x000001AC
  264. ALT_M* = 0x000001AD
  265. ALT_N* = 0x000001AE
  266. ALT_O* = 0x000001AF
  267. ALT_P* = 0x000001B0
  268. ALT_Q* = 0x000001B1
  269. ALT_R* = 0x000001B2
  270. ALT_S* = 0x000001B3
  271. ALT_T* = 0x000001B4
  272. ALT_U* = 0x000001B5
  273. ALT_V* = 0x000001B6
  274. ALT_W* = 0x000001B7
  275. ALT_X* = 0x000001B8
  276. ALT_Y* = 0x000001B9
  277. ALT_Z* = 0x000001BA
  278. CTL_LEFT* = 0x000001BB # Control-Left-Arrow
  279. CTL_RIGHT* = 0x000001BC
  280. CTL_PGUP* = 0x000001BD
  281. CTL_PGDN* = 0x000001BE
  282. CTL_HOME* = 0x000001BF
  283. CTL_END* = 0x000001C0
  284. KEY_A1* = 0x000001C1 # upper left on Virtual keypad
  285. KEY_A2* = 0x000001C2 # upper middle on Virt. keypad
  286. KEY_A3* = 0x000001C3 # upper right on Vir. keypad
  287. KEY_B1* = 0x000001C4 # middle left on Virt. keypad
  288. KEY_B2* = 0x000001C5 # center on Virt. keypad
  289. KEY_B3* = 0x000001C6 # middle right on Vir. keypad
  290. KEY_C1* = 0x000001C7 # lower left on Virt. keypad
  291. KEY_C2* = 0x000001C8 # lower middle on Virt. keypad
  292. KEY_C3* = 0x000001C9 # lower right on Vir. keypad
  293. PADSLASH* = 0x000001CA # slash on keypad
  294. PADENTER* = 0x000001CB # enter on keypad
  295. CTL_PADENTER* = 0x000001CC # ctl-enter on keypad
  296. ALT_PADENTER* = 0x000001CD # alt-enter on keypad
  297. PADSTOP* = 0x000001CE # stop on keypad
  298. PADSTAR* = 0x000001CF # star on keypad
  299. PADMINUS* = 0x000001D0 # minus on keypad
  300. PADPLUS* = 0x000001D1 # plus on keypad
  301. CTL_PADSTOP* = 0x000001D2 # ctl-stop on keypad
  302. CTL_PADCENTER* = 0x000001D3 # ctl-enter on keypad
  303. CTL_PADPLUS* = 0x000001D4 # ctl-plus on keypad
  304. CTL_PADMINUS* = 0x000001D5 # ctl-minus on keypad
  305. CTL_PADSLASH* = 0x000001D6 # ctl-slash on keypad
  306. CTL_PADSTAR* = 0x000001D7 # ctl-star on keypad
  307. ALT_PADPLUS* = 0x000001D8 # alt-plus on keypad
  308. ALT_PADMINUS* = 0x000001D9 # alt-minus on keypad
  309. ALT_PADSLASH* = 0x000001DA # alt-slash on keypad
  310. ALT_PADSTAR* = 0x000001DB # alt-star on keypad
  311. ALT_PADSTOP* = 0x000001DC # alt-stop on keypad
  312. CTL_INS* = 0x000001DD # ctl-insert
  313. ALT_DEL* = 0x000001DE # alt-delete
  314. ALT_INS* = 0x000001DF # alt-insert
  315. CTL_UP* = 0x000001E0 # ctl-up arrow
  316. CTL_DOWN* = 0x000001E1 # ctl-down arrow
  317. CTL_TAB* = 0x000001E2 # ctl-tab
  318. ALT_TAB* = 0x000001E3
  319. ALT_MINUS* = 0x000001E4
  320. ALT_EQUAL* = 0x000001E5
  321. ALT_HOME* = 0x000001E6
  322. ALT_PGUP* = 0x000001E7
  323. ALT_PGDN* = 0x000001E8
  324. ALT_END* = 0x000001E9
  325. ALT_UP* = 0x000001EA # alt-up arrow
  326. ALT_DOWN* = 0x000001EB # alt-down arrow
  327. ALT_RIGHT* = 0x000001EC # alt-right arrow
  328. ALT_LEFT* = 0x000001ED # alt-left arrow
  329. ALT_ENTER* = 0x000001EE # alt-enter
  330. ALT_ESC* = 0x000001EF # alt-escape
  331. ALT_BQUOTE* = 0x000001F0 # alt-back quote
  332. ALT_LBRACKET* = 0x000001F1 # alt-left bracket
  333. ALT_RBRACKET* = 0x000001F2 # alt-right bracket
  334. ALT_SEMICOLON* = 0x000001F3 # alt-semi-colon
  335. ALT_FQUOTE* = 0x000001F4 # alt-forward quote
  336. ALT_COMMA* = 0x000001F5 # alt-comma
  337. ALT_STOP* = 0x000001F6 # alt-stop
  338. ALT_FSLASH* = 0x000001F7 # alt-forward slash
  339. ALT_BKSP* = 0x000001F8 # alt-backspace
  340. CTL_BKSP* = 0x000001F9 # ctl-backspace
  341. PAD0* = 0x000001FA # keypad 0
  342. CTL_PAD0* = 0x000001FB # ctl-keypad 0
  343. CTL_PAD1* = 0x000001FC
  344. CTL_PAD2* = 0x000001FD
  345. CTL_PAD3* = 0x000001FE
  346. CTL_PAD4* = 0x000001FF
  347. CTL_PAD5* = 0x00000200
  348. CTL_PAD6* = 0x00000201
  349. CTL_PAD7* = 0x00000202
  350. CTL_PAD8* = 0x00000203
  351. CTL_PAD9* = 0x00000204
  352. ALT_PAD0* = 0x00000205 # alt-keypad 0
  353. ALT_PAD1* = 0x00000206
  354. ALT_PAD2* = 0x00000207
  355. ALT_PAD3* = 0x00000208
  356. ALT_PAD4* = 0x00000209
  357. ALT_PAD5* = 0x0000020A
  358. ALT_PAD6* = 0x0000020B
  359. ALT_PAD7* = 0x0000020C
  360. ALT_PAD8* = 0x0000020D
  361. ALT_PAD9* = 0x0000020E
  362. CTL_DEL* = 0x0000020F # clt-delete
  363. ALT_BSLASH* = 0x00000210 # alt-back slash
  364. CTL_ENTER* = 0x00000211 # ctl-enter
  365. SHF_PADENTER* = 0x00000212 # shift-enter on keypad
  366. SHF_PADSLASH* = 0x00000213 # shift-slash on keypad
  367. SHF_PADSTAR* = 0x00000214 # shift-star on keypad
  368. SHF_PADPLUS* = 0x00000215 # shift-plus on keypad
  369. SHF_PADMINUS* = 0x00000216 # shift-minus on keypad
  370. SHF_UP* = 0x00000217 # shift-up on keypad
  371. SHF_DOWN* = 0x00000218 # shift-down on keypad
  372. SHF_IC* = 0x00000219 # shift-insert on keypad
  373. SHF_DC* = 0x0000021A # shift-delete on keypad
  374. KEY_MOUSE* = 0x0000021B # "mouse" key
  375. KEY_SHIFT_L* = 0x0000021C # Left-shift
  376. KEY_SHIFT_R* = 0x0000021D # Right-shift
  377. KEY_CONTROL_L* = 0x0000021E # Left-control
  378. KEY_CONTROL_R* = 0x0000021F # Right-control
  379. KEY_ALT_L* = 0x00000220 # Left-alt
  380. KEY_ALT_R* = 0x00000221 # Right-alt
  381. KEY_RESIZE* = 0x00000222 # Window resize
  382. KEY_SUP* = 0x00000223 # Shifted up arrow
  383. KEY_SDOWN* = 0x00000224 # Shifted down arrow
  384. KEY_MIN* = KEY_BREAK # Minimum curses key value
  385. KEY_MAX* = KEY_SDOWN # Maximum curses key
  386. CLIP_SUCCESS* = 0
  387. CLIP_ACCESS_ERROR* = 1
  388. CLIP_EMPTY* = 2
  389. CLIP_MEMORY_ERROR* = 3
  390. KEY_MODIFIER_SHIFT* = 1
  391. KEY_MODIFIER_CONTROL* = 2
  392. KEY_MODIFIER_ALT* = 4
  393. KEY_MODIFIER_NUMLOCK* = 8
  394. when appType == "gui":
  395. const
  396. BUTTON_SHIFT* = BUTTON_MODIFIER_SHIFT
  397. BUTTON_CONTROL* = BUTTON_MODIFIER_CONTROL
  398. BUTTON_CTRL* = BUTTON_MODIFIER_CONTROL
  399. BUTTON_ALT* = BUTTON_MODIFIER_ALT
  400. else:
  401. const
  402. BUTTON_SHIFT* = 0x00000008
  403. BUTTON_CONTROL* = 0x00000010
  404. BUTTON_ALT* = 0x00000020
  405. type
  406. TMOUSE_STATUS*{.pure, final.} = object
  407. x*: cint # absolute column, 0 based, measured in characters
  408. y*: cint # absolute row, 0 based, measured in characters
  409. button*: array[0..3 - 1, cshort] # state of each button
  410. changes*: cint # flags indicating what has changed with the mouse
  411. MEVENT*{.pure, final.} = object
  412. id*: cshort # unused, always 0
  413. x*: cint
  414. y*: cint
  415. z*: cint # x, y same as TMOUSE_STATUS; z unused
  416. bstate*: cunsignedlong # equivalent to changes + button[], but
  417. # in the same format as used for mousemask()
  418. WINDOW*{.pure, final.} = object
  419. cury*: cint # current pseudo-cursor
  420. curx*: cint
  421. maxy*: cint # max window coordinates
  422. maxx*: cint
  423. begy*: cint # origin on screen
  424. begx*: cint
  425. flags*: cint # window properties
  426. attrs*: cunsignedlong # standard attributes and colors
  427. bkgd*: cunsignedlong # background, normally blank
  428. clear*: cunsignedchar # causes clear at next refresh
  429. leaveit*: cunsignedchar # leaves cursor where it is
  430. scroll*: cunsignedchar # allows window scrolling
  431. nodelay*: cunsignedchar # input character wait flag
  432. immed*: cunsignedchar # immediate update flag
  433. sync*: cunsignedchar # synchronise window ancestors
  434. use_keypad*: cunsignedchar # flags keypad key mode active
  435. y*: ptr ptr cunsignedlong # pointer to line pointer array
  436. firstch*: ptr cint # first changed character in line
  437. lastch*: ptr cint # last changed character in line
  438. tmarg*: cint # top of scrolling region
  439. bmarg*: cint # bottom of scrolling region
  440. delayms*: cint # milliseconds of delay for getch()
  441. parx*: cint
  442. pary*: cint # coords relative to parent (0,0)
  443. parent*: ptr WINDOW # subwin's pointer to parent win
  444. PANELOBS*{.pure, final.} = object
  445. above*: ptr PANELOBS
  446. pan*: ptr PANEL
  447. PANEL*{.pure, final.} = object
  448. win*: ptr WINDOW
  449. wstarty*: cint
  450. wendy*: cint
  451. wstartx*: cint
  452. wendx*: cint
  453. below*: ptr PANEL
  454. above*: ptr PANEL
  455. user*: pointer
  456. obscure*: ptr PANELOBS
  457. {.deprecated: [
  458. #TMOUSE_STATUS: MOUSE_STATUS, # Name conflict when we drop the `T`
  459. TMEVENT: MEVENT, TWINDOW: WINDOW,
  460. TPANELOBS: PANELOBS, TPANEL:PANEL].}
  461. when unixOS:
  462. type
  463. SCREEN*{.pure, final.} = object
  464. alive*: cunsignedchar # if initscr() called, and not endwin()
  465. autocr*: cunsignedchar # if cr -> lf
  466. cbreak*: cunsignedchar # if terminal unbuffered
  467. echo*: cunsignedchar # if terminal echo
  468. raw_inp*: cunsignedchar # raw input mode (v. cooked input)
  469. raw_out*: cunsignedchar # raw output mode (7 v. 8 bits)
  470. audible*: cunsignedchar # FALSE if the bell is visual
  471. mono*: cunsignedchar # TRUE if current screen is mono
  472. resized*: cunsignedchar # TRUE if TERM has been resized
  473. orig_attr*: cunsignedchar # TRUE if we have the original colors
  474. orig_fore*: cshort # original screen foreground color
  475. orig_back*: cshort # original screen foreground color
  476. cursrow*: cint # position of physical cursor
  477. curscol*: cint # position of physical cursor
  478. visibility*: cint # visibility of cursor
  479. orig_cursor*: cint # original cursor size
  480. lines*: cint # new value for LINES
  481. cols*: cint # new value for COLS
  482. trap_mbe*: cunsignedlong # trap these mouse button events
  483. map_mbe_to_key*: cunsignedlong # map mouse buttons to slk
  484. mouse_wait*: cint # time to wait (in ms) for a button release after a press
  485. slklines*: cint # lines in use by slk_init()
  486. slk_winptr*: ptr WINDOW # window for slk
  487. linesrippedoff*: cint # lines ripped off via ripoffline()
  488. linesrippedoffontop*: cint # lines ripped off on top via ripoffline()
  489. delaytenths*: cint # 1/10ths second to wait block getch() for
  490. preserve*: cunsignedchar # TRUE if screen background to be preserved
  491. restore*: cint # specifies if screen background to be restored, and how
  492. save_key_modifiers*: cunsignedchar # TRUE if each key modifiers saved with each key press
  493. return_key_modifiers*: cunsignedchar # TRUE if modifier keys are returned as "real" keys
  494. key_code*: cunsignedchar # TRUE if last key is a special key;
  495. XcurscrSize*: cint # size of Xcurscr shared memory block
  496. sb_on*: cunsignedchar
  497. sb_viewport_y*: cint
  498. sb_viewport_x*: cint
  499. sb_total_y*: cint
  500. sb_total_x*: cint
  501. sb_cur_y*: cint
  502. sb_cur_x*: cint
  503. line_color*: cshort # color of line attributes - default -1
  504. {.deprecated: [TSCREEN: SCREEN].}
  505. else:
  506. type
  507. SCREEN*{.pure, final.} = object
  508. alive*: cunsignedchar # if initscr() called, and not endwin()
  509. autocr*: cunsignedchar # if cr -> lf
  510. cbreak*: cunsignedchar # if terminal unbuffered
  511. echo*: cunsignedchar # if terminal echo
  512. raw_inp*: cunsignedchar # raw input mode (v. cooked input)
  513. raw_out*: cunsignedchar # raw output mode (7 v. 8 bits)
  514. audible*: cunsignedchar # FALSE if the bell is visual
  515. mono*: cunsignedchar # TRUE if current screen is mono
  516. resized*: cunsignedchar # TRUE if TERM has been resized
  517. orig_attr*: cunsignedchar # TRUE if we have the original colors
  518. orig_fore*: cshort # original screen foreground color
  519. orig_back*: cshort # original screen foreground color
  520. cursrow*: cint # position of physical cursor
  521. curscol*: cint # position of physical cursor
  522. visibility*: cint # visibility of cursor
  523. orig_cursor*: cint # original cursor size
  524. lines*: cint # new value for LINES
  525. cols*: cint # new value for COLS
  526. trap_mbe*: cunsignedlong # trap these mouse button events
  527. map_mbe_to_key*: cunsignedlong # map mouse buttons to slk
  528. mouse_wait*: cint # time to wait (in ms) for a button release after a press
  529. slklines*: cint # lines in use by slk_init()
  530. slk_winptr*: ptr WINDOW # window for slk
  531. linesrippedoff*: cint # lines ripped off via ripoffline()
  532. linesrippedoffontop*: cint # lines ripped off on top via ripoffline()
  533. delaytenths*: cint # 1/10ths second to wait block getch() for
  534. preserve*: cunsignedchar # TRUE if screen background to be preserved
  535. restore*: cint # specifies if screen background to be restored, and how
  536. save_key_modifiers*: cunsignedchar # TRUE if each key modifiers saved with each key press
  537. return_key_modifiers*: cunsignedchar # TRUE if modifier keys are returned as "real" keys
  538. key_code*: cunsignedchar # TRUE if last key is a special key;
  539. line_color*: cshort # color of line attributes - default -1
  540. {.deprecated: [TSCREEN: SCREEN].}
  541. var
  542. LINES*{.importc: "LINES", dynlib: pdcursesdll.}: cint
  543. COLS*{.importc: "COLS", dynlib: pdcursesdll.}: cint
  544. stdscr*{.importc: "stdscr", dynlib: pdcursesdll.}: ptr WINDOW
  545. curscr*{.importc: "curscr", dynlib: pdcursesdll.}: ptr WINDOW
  546. SP*{.importc: "SP", dynlib: pdcursesdll.}: ptr SCREEN
  547. Mouse_status*{.importc: "Mouse_status", dynlib: pdcursesdll.}: MOUSE_STATUS
  548. COLORS*{.importc: "COLORS", dynlib: pdcursesdll.}: cint
  549. COLOR_PAIRS*{.importc: "COLOR_PAIRS", dynlib: pdcursesdll.}: cint
  550. TABSIZE*{.importc: "TABSIZE", dynlib: pdcursesdll.}: cint
  551. acs_map*{.importc: "acs_map", dynlib: pdcursesdll.}: ptr cunsignedlong
  552. ttytype*{.importc: "ttytype", dynlib: pdcursesdll.}: cstring
  553. template BUTTON_CHANGED*(x: expr): expr =
  554. (Mouse_status.changes and (1 shl ((x) - 1)))
  555. template BUTTON_STATUS*(x: expr): expr =
  556. (Mouse_status.button[(x) - 1])
  557. template ACS_PICK*(w, n: expr): expr = int32(w) or A_ALTCHARSET
  558. template KEY_F*(n: expr): expr = KEY_F0 + n
  559. template COLOR_PAIR*(n: expr): expr =
  560. ((cunsignedlong(n) shl COLOR_SHIFT) and A_COLOR)
  561. template PAIR_NUMBER*(n: expr): expr =
  562. (((n) and A_COLOR) shr COLOR_SHIFT)
  563. const
  564. #MOUSE_X_POS* = (Mouse_status.x)
  565. #MOUSE_Y_POS* = (Mouse_status.y)
  566. #A_BUTTON_CHANGED* = (Mouse_status.changes and 7)
  567. #MOUSE_MOVED* = (Mouse_status.changes and MOUSE_MOVED)
  568. #MOUSE_POS_REPORT* = (Mouse_status.changes and MOUSE_POSITION)
  569. #MOUSE_WHEEL_UP* = (Mouse_status.changes and MOUSE_WHEEL_UP)
  570. #MOUSE_WHEEL_DOWN* = (Mouse_status.changes and MOUSE_WHEEL_DOWN)
  571. ACS_ULCORNER* = ACS_PICK('l', '+')
  572. ACS_LLCORNER* = ACS_PICK('m', '+')
  573. ACS_URCORNER* = ACS_PICK('k', '+')
  574. ACS_LRCORNER* = ACS_PICK('j', '+')
  575. ACS_RTEE* = ACS_PICK('u', '+')
  576. ACS_LTEE* = ACS_PICK('t', '+')
  577. ACS_BTEE* = ACS_PICK('v', '+')
  578. ACS_TTEE* = ACS_PICK('w', '+')
  579. ACS_HLINE* = ACS_PICK('q', '-')
  580. ACS_VLINE* = ACS_PICK('x', '|')
  581. ACS_PLUS* = ACS_PICK('n', '+')
  582. ACS_S1* = ACS_PICK('o', '-')
  583. ACS_S9* = ACS_PICK('s', '_')
  584. ACS_DIAMOND* = ACS_PICK('`', '+')
  585. ACS_CKBOARD* = ACS_PICK('a', ':')
  586. ACS_DEGREE* = ACS_PICK('f', '\'')
  587. ACS_PLMINUS* = ACS_PICK('g', '#')
  588. ACS_BULLET* = ACS_PICK('~', 'o')
  589. ACS_LARROW* = ACS_PICK(',', '<')
  590. ACS_RARROW* = ACS_PICK('+', '>')
  591. ACS_DARROW* = ACS_PICK('.', 'v')
  592. ACS_UARROW* = ACS_PICK('-', '^')
  593. ACS_BOARD* = ACS_PICK('h', '#')
  594. ACS_LANTERN* = ACS_PICK('i', '*')
  595. ACS_BLOCK* = ACS_PICK('0', '#')
  596. ACS_S3* = ACS_PICK('p', '-')
  597. ACS_S7* = ACS_PICK('r', '-')
  598. ACS_LEQUAL* = ACS_PICK('y', '<')
  599. ACS_GEQUAL* = ACS_PICK('z', '>')
  600. ACS_PI* = ACS_PICK('{', 'n')
  601. ACS_NEQUAL* = ACS_PICK('|', '+')
  602. ACS_STERLING* = ACS_PICK('}', 'L')
  603. ACS_BSSB* = ACS_ULCORNER
  604. ACS_SSBB* = ACS_LLCORNER
  605. ACS_BBSS* = ACS_URCORNER
  606. ACS_SBBS* = ACS_LRCORNER
  607. ACS_SBSS* = ACS_RTEE
  608. ACS_SSSB* = ACS_LTEE
  609. ACS_SSBS* = ACS_BTEE
  610. ACS_BSSS* = ACS_TTEE
  611. ACS_BSBS* = ACS_HLINE
  612. ACS_SBSB* = ACS_VLINE
  613. ACS_SSSS* = ACS_PLUS
  614. discard """WACS_ULCORNER* = (addr((acs_map['l'])))
  615. WACS_LLCORNER* = (addr((acs_map['m'])))
  616. WACS_URCORNER* = (addr((acs_map['k'])))
  617. WACS_LRCORNER* = (addr((acs_map['j'])))
  618. WACS_RTEE* = (addr((acs_map['u'])))
  619. WACS_LTEE* = (addr((acs_map['t'])))
  620. WACS_BTEE* = (addr((acs_map['v'])))
  621. WACS_TTEE* = (addr((acs_map['w'])))
  622. WACS_HLINE* = (addr((acs_map['q'])))
  623. WACS_VLINE* = (addr((acs_map['x'])))
  624. WACS_PLUS* = (addr((acs_map['n'])))
  625. WACS_S1* = (addr((acs_map['o'])))
  626. WACS_S9* = (addr((acs_map['s'])))
  627. WACS_DIAMOND* = (addr((acs_map['`'])))
  628. WACS_CKBOARD* = (addr((acs_map['a'])))
  629. WACS_DEGREE* = (addr((acs_map['f'])))
  630. WACS_PLMINUS* = (addr((acs_map['g'])))
  631. WACS_BULLET* = (addr((acs_map['~'])))
  632. WACS_LARROW* = (addr((acs_map[','])))
  633. WACS_RARROW* = (addr((acs_map['+'])))
  634. WACS_DARROW* = (addr((acs_map['.'])))
  635. WACS_UARROW* = (addr((acs_map['-'])))
  636. WACS_BOARD* = (addr((acs_map['h'])))
  637. WACS_LANTERN* = (addr((acs_map['i'])))
  638. WACS_BLOCK* = (addr((acs_map['0'])))
  639. WACS_S3* = (addr((acs_map['p'])))
  640. WACS_S7* = (addr((acs_map['r'])))
  641. WACS_LEQUAL* = (addr((acs_map['y'])))
  642. WACS_GEQUAL* = (addr((acs_map['z'])))
  643. WACS_PI* = (addr((acs_map['{'])))
  644. WACS_NEQUAL* = (addr((acs_map['|'])))
  645. WACS_STERLING* = (addr((acs_map['}'])))
  646. WACS_BSSB* = WACS_ULCORNER
  647. WACS_SSBB* = WACS_LLCORNER
  648. WACS_BBSS* = WACS_URCORNER
  649. WACS_SBBS* = WACS_LRCORNER
  650. WACS_SBSS* = WACS_RTEE
  651. WACS_SSSB* = WACS_LTEE
  652. WACS_SSBS* = WACS_BTEE
  653. WACS_BSSS* = WACS_TTEE
  654. WACS_BSBS* = WACS_HLINE
  655. WACS_SBSB* = WACS_VLINE
  656. WACS_SSSS* = WACS_PLUS"""
  657. proc addch*(a2: cunsignedlong): cint{.extdecl, importc: "addch",
  658. dynlib: pdcursesdll.}
  659. proc addchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
  660. importc: "addchnstr", dynlib: pdcursesdll.}
  661. proc addchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "addchstr",
  662. dynlib: pdcursesdll.}
  663. proc addnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "addnstr",
  664. dynlib: pdcursesdll.}
  665. proc addstr*(a2: cstring): cint{.extdecl, importc: "addstr", dynlib: pdcursesdll.}
  666. proc attroff*(a2: cunsignedlong): cint{.extdecl, importc: "attroff",
  667. dynlib: pdcursesdll.}
  668. proc attron*(a2: cunsignedlong): cint{.extdecl, importc: "attron",
  669. dynlib: pdcursesdll.}
  670. proc attrset*(a2: cunsignedlong): cint{.extdecl, importc: "attrset",
  671. dynlib: pdcursesdll.}
  672. proc attr_get*(a2: ptr cunsignedlong; a3: ptr cshort; a4: pointer): cint{.extdecl,
  673. importc: "attr_get", dynlib: pdcursesdll.}
  674. proc attr_off*(a2: cunsignedlong; a3: pointer): cint{.extdecl,
  675. importc: "attr_off", dynlib: pdcursesdll.}
  676. proc attr_on*(a2: cunsignedlong; a3: pointer): cint{.extdecl, importc: "attr_on",
  677. dynlib: pdcursesdll.}
  678. proc attr_set*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl,
  679. importc: "attr_set", dynlib: pdcursesdll.}
  680. proc baudrate*(): cint{.extdecl, importc: "baudrate", dynlib: pdcursesdll.}
  681. proc beep*(): cint{.extdecl, importc: "beep", dynlib: pdcursesdll.}
  682. proc bkgd*(a2: cunsignedlong): cint{.extdecl, importc: "bkgd", dynlib: pdcursesdll.}
  683. proc bkgdset*(a2: cunsignedlong){.extdecl, importc: "bkgdset", dynlib: pdcursesdll.}
  684. proc border*(a2: cunsignedlong; a3: cunsignedlong; a4: cunsignedlong;
  685. a5: cunsignedlong; a6: cunsignedlong; a7: cunsignedlong;
  686. a8: cunsignedlong; a9: cunsignedlong): cint{.extdecl,
  687. importc: "border", dynlib: pdcursesdll.}
  688. proc box*(a2: ptr WINDOW; a3: cunsignedlong; a4: cunsignedlong): cint{.extdecl,
  689. importc: "box", dynlib: pdcursesdll.}
  690. proc can_change_color*(): cunsignedchar{.extdecl, importc: "can_change_color",
  691. dynlib: pdcursesdll.}
  692. proc cbreak*(): cint{.extdecl, importc: "cbreak", dynlib: pdcursesdll.}
  693. proc chgat*(a2: cint; a3: cunsignedlong; a4: cshort; a5: pointer): cint{.extdecl,
  694. importc: "chgat", dynlib: pdcursesdll.}
  695. proc clearok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
  696. importc: "clearok", dynlib: pdcursesdll.}
  697. proc clear*(): cint{.extdecl, importc: "clear", dynlib: pdcursesdll.}
  698. proc clrtobot*(): cint{.extdecl, importc: "clrtobot", dynlib: pdcursesdll.}
  699. proc clrtoeol*(): cint{.extdecl, importc: "clrtoeol", dynlib: pdcursesdll.}
  700. proc color_content*(a2: cshort; a3: ptr cshort; a4: ptr cshort; a5: ptr cshort): cint{.
  701. extdecl, importc: "color_content", dynlib: pdcursesdll.}
  702. proc color_set*(a2: cshort; a3: pointer): cint{.extdecl, importc: "color_set",
  703. dynlib: pdcursesdll.}
  704. proc copywin*(a2: ptr WINDOW; a3: ptr WINDOW; a4: cint; a5: cint; a6: cint;
  705. a7: cint; a8: cint; a9: cint; a10: cint): cint{.extdecl,
  706. importc: "copywin", dynlib: pdcursesdll.}
  707. proc curs_set*(a2: cint): cint{.extdecl, importc: "curs_set", dynlib: pdcursesdll.}
  708. proc def_prog_mode*(): cint{.extdecl, importc: "def_prog_mode",
  709. dynlib: pdcursesdll.}
  710. proc def_shell_mode*(): cint{.extdecl, importc: "def_shell_mode",
  711. dynlib: pdcursesdll.}
  712. proc delay_output*(a2: cint): cint{.extdecl, importc: "delay_output",
  713. dynlib: pdcursesdll.}
  714. proc delch*(): cint{.extdecl, importc: "delch", dynlib: pdcursesdll.}
  715. proc deleteln*(): cint{.extdecl, importc: "deleteln", dynlib: pdcursesdll.}
  716. proc delscreen*(a2: ptr SCREEN){.extdecl, importc: "delscreen",
  717. dynlib: pdcursesdll.}
  718. proc delwin*(a2: ptr WINDOW): cint{.extdecl, importc: "delwin",
  719. dynlib: pdcursesdll.}
  720. proc derwin*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr WINDOW{.
  721. extdecl, importc: "derwin", dynlib: pdcursesdll.}
  722. proc doupdate*(): cint{.extdecl, importc: "doupdate", dynlib: pdcursesdll.}
  723. proc dupwin*(a2: ptr WINDOW): ptr WINDOW{.extdecl, importc: "dupwin",
  724. dynlib: pdcursesdll.}
  725. proc echochar*(a2: cunsignedlong): cint{.extdecl, importc: "echochar",
  726. dynlib: pdcursesdll.}
  727. proc echo*(): cint{.extdecl, importc: "echo", dynlib: pdcursesdll.}
  728. proc endwin*(): cint{.extdecl, importc: "endwin", dynlib: pdcursesdll.}
  729. proc erasechar*(): char{.extdecl, importc: "erasechar", dynlib: pdcursesdll.}
  730. proc erase*(): cint{.extdecl, importc: "erase", dynlib: pdcursesdll.}
  731. proc filter*(){.extdecl, importc: "filter", dynlib: pdcursesdll.}
  732. proc flash*(): cint{.extdecl, importc: "flash", dynlib: pdcursesdll.}
  733. proc flushinp*(): cint{.extdecl, importc: "flushinp", dynlib: pdcursesdll.}
  734. proc getbkgd*(a2: ptr WINDOW): cunsignedlong{.extdecl, importc: "getbkgd",
  735. dynlib: pdcursesdll.}
  736. proc getnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "getnstr",
  737. dynlib: pdcursesdll.}
  738. proc getstr*(a2: cstring): cint{.extdecl, importc: "getstr", dynlib: pdcursesdll.}
  739. proc getwin*(a2: File): ptr WINDOW{.extdecl, importc: "getwin",
  740. dynlib: pdcursesdll.}
  741. proc halfdelay*(a2: cint): cint{.extdecl, importc: "halfdelay",
  742. dynlib: pdcursesdll.}
  743. proc has_colors*(): cunsignedchar{.extdecl, importc: "has_colors",
  744. dynlib: pdcursesdll.}
  745. proc has_ic*(): cunsignedchar{.extdecl, importc: "has_ic", dynlib: pdcursesdll.}
  746. proc has_il*(): cunsignedchar{.extdecl, importc: "has_il", dynlib: pdcursesdll.}
  747. proc hline*(a2: cunsignedlong; a3: cint): cint{.extdecl, importc: "hline",
  748. dynlib: pdcursesdll.}
  749. proc idcok*(a2: ptr WINDOW; a3: cunsignedchar){.extdecl, importc: "idcok",
  750. dynlib: pdcursesdll.}
  751. proc idlok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "idlok",
  752. dynlib: pdcursesdll.}
  753. proc immedok*(a2: ptr WINDOW; a3: cunsignedchar){.extdecl, importc: "immedok",
  754. dynlib: pdcursesdll.}
  755. proc inchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
  756. importc: "inchnstr", dynlib: pdcursesdll.}
  757. proc inchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "inchstr",
  758. dynlib: pdcursesdll.}
  759. proc inch*(): cunsignedlong{.extdecl, importc: "inch", dynlib: pdcursesdll.}
  760. proc init_color*(a2: cshort; a3: cshort; a4: cshort; a5: cshort): cint{.extdecl,
  761. importc: "init_color", dynlib: pdcursesdll.}
  762. proc init_pair*(a2: cshort; a3: cshort; a4: cshort): cint{.extdecl,
  763. importc: "init_pair", dynlib: pdcursesdll.}
  764. proc initscr*(): ptr WINDOW{.extdecl, importc: "initscr", dynlib: pdcursesdll.}
  765. proc innstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "innstr",
  766. dynlib: pdcursesdll.}
  767. proc insch*(a2: cunsignedlong): cint{.extdecl, importc: "insch",
  768. dynlib: pdcursesdll.}
  769. proc insdelln*(a2: cint): cint{.extdecl, importc: "insdelln", dynlib: pdcursesdll.}
  770. proc insertln*(): cint{.extdecl, importc: "insertln", dynlib: pdcursesdll.}
  771. proc insnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "insnstr",
  772. dynlib: pdcursesdll.}
  773. proc insstr*(a2: cstring): cint{.extdecl, importc: "insstr", dynlib: pdcursesdll.}
  774. proc instr*(a2: cstring): cint{.extdecl, importc: "instr", dynlib: pdcursesdll.}
  775. proc intrflush*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
  776. importc: "intrflush", dynlib: pdcursesdll.}
  777. proc isendwin*(): cunsignedchar{.extdecl, importc: "isendwin", dynlib: pdcursesdll.}
  778. proc is_linetouched*(a2: ptr WINDOW; a3: cint): cunsignedchar{.extdecl,
  779. importc: "is_linetouched", dynlib: pdcursesdll.}
  780. proc is_wintouched*(a2: ptr WINDOW): cunsignedchar{.extdecl,
  781. importc: "is_wintouched", dynlib: pdcursesdll.}
  782. proc keyname*(a2: cint): cstring{.extdecl, importc: "keyname", dynlib: pdcursesdll.}
  783. proc keypad*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "keypad",
  784. dynlib: pdcursesdll.}
  785. proc killchar*(): char{.extdecl, importc: "killchar", dynlib: pdcursesdll.}
  786. proc leaveok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
  787. importc: "leaveok", dynlib: pdcursesdll.}
  788. proc longname*(): cstring{.extdecl, importc: "longname", dynlib: pdcursesdll.}
  789. proc meta*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "meta",
  790. dynlib: pdcursesdll.}
  791. proc move*(a2: cint; a3: cint): cint{.extdecl, importc: "move",
  792. dynlib: pdcursesdll.}
  793. proc mvaddch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl,
  794. importc: "mvaddch", dynlib: pdcursesdll.}
  795. proc mvaddchnstr*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
  796. extdecl, importc: "mvaddchnstr", dynlib: pdcursesdll.}
  797. proc mvaddchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
  798. importc: "mvaddchstr", dynlib: pdcursesdll.}
  799. proc mvaddnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
  800. importc: "mvaddnstr", dynlib: pdcursesdll.}
  801. proc mvaddstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
  802. importc: "mvaddstr", dynlib: pdcursesdll.}
  803. proc mvchgat*(a2: cint; a3: cint; a4: cint; a5: cunsignedlong; a6: cshort;
  804. a7: pointer): cint{.extdecl, importc: "mvchgat", dynlib: pdcursesdll.}
  805. proc mvcur*(a2: cint; a3: cint; a4: cint; a5: cint): cint{.extdecl,
  806. importc: "mvcur", dynlib: pdcursesdll.}
  807. proc mvdelch*(a2: cint; a3: cint): cint{.extdecl, importc: "mvdelch",
  808. dynlib: pdcursesdll.}
  809. proc mvderwin*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
  810. importc: "mvderwin", dynlib: pdcursesdll.}
  811. proc mvgetch*(a2: cint; a3: cint): cint{.extdecl, importc: "mvgetch",
  812. dynlib: pdcursesdll.}
  813. proc mvgetnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
  814. importc: "mvgetnstr", dynlib: pdcursesdll.}
  815. proc mvgetstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
  816. importc: "mvgetstr", dynlib: pdcursesdll.}
  817. proc mvhline*(a2: cint; a3: cint; a4: cunsignedlong; a5: cint): cint{.extdecl,
  818. importc: "mvhline", dynlib: pdcursesdll.}
  819. proc mvinch*(a2: cint; a3: cint): cunsignedlong{.extdecl, importc: "mvinch",
  820. dynlib: pdcursesdll.}
  821. proc mvinchnstr*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
  822. extdecl, importc: "mvinchnstr", dynlib: pdcursesdll.}
  823. proc mvinchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
  824. importc: "mvinchstr", dynlib: pdcursesdll.}
  825. proc mvinnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
  826. importc: "mvinnstr", dynlib: pdcursesdll.}
  827. proc mvinsch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl,
  828. importc: "mvinsch", dynlib: pdcursesdll.}
  829. proc mvinsnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
  830. importc: "mvinsnstr", dynlib: pdcursesdll.}
  831. proc mvinsstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
  832. importc: "mvinsstr", dynlib: pdcursesdll.}
  833. proc mvinstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl, importc: "mvinstr",
  834. dynlib: pdcursesdll.}
  835. proc mvprintw*(a2: cint; a3: cint; a4: cstring): cint{.varargs, extdecl,
  836. importc: "mvprintw", dynlib: pdcursesdll.}
  837. proc mvscanw*(a2: cint; a3: cint; a4: cstring): cint{.varargs, extdecl,
  838. importc: "mvscanw", dynlib: pdcursesdll.}
  839. proc mvvline*(a2: cint; a3: cint; a4: cunsignedlong; a5: cint): cint{.extdecl,
  840. importc: "mvvline", dynlib: pdcursesdll.}
  841. proc mvwaddchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
  842. a6: cint): cint{.extdecl, importc: "mvwaddchnstr",
  843. dynlib: pdcursesdll.}
  844. proc mvwaddchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
  845. extdecl, importc: "mvwaddchstr", dynlib: pdcursesdll.}
  846. proc mvwaddch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
  847. extdecl, importc: "mvwaddch", dynlib: pdcursesdll.}
  848. proc mvwaddnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
  849. extdecl, importc: "mvwaddnstr", dynlib: pdcursesdll.}
  850. proc mvwaddstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
  851. importc: "mvwaddstr", dynlib: pdcursesdll.}
  852. proc mvwchgat*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cunsignedlong;
  853. a7: cshort; a8: pointer): cint{.extdecl, importc: "mvwchgat",
  854. dynlib: pdcursesdll.}
  855. proc mvwdelch*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
  856. importc: "mvwdelch", dynlib: pdcursesdll.}
  857. proc mvwgetch*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
  858. importc: "mvwgetch", dynlib: pdcursesdll.}
  859. proc mvwgetnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
  860. extdecl, importc: "mvwgetnstr", dynlib: pdcursesdll.}
  861. proc mvwgetstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
  862. importc: "mvwgetstr", dynlib: pdcursesdll.}
  863. proc mvwhline*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
  864. extdecl, importc: "mvwhline", dynlib: pdcursesdll.}
  865. proc mvwinchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
  866. a6: cint): cint{.extdecl, importc: "mvwinchnstr",
  867. dynlib: pdcursesdll.}
  868. proc mvwinchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
  869. extdecl, importc: "mvwinchstr", dynlib: pdcursesdll.}
  870. proc mvwinch*(a2: ptr WINDOW; a3: cint; a4: cint): cunsignedlong{.extdecl,
  871. importc: "mvwinch", dynlib: pdcursesdll.}
  872. proc mvwinnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
  873. extdecl, importc: "mvwinnstr", dynlib: pdcursesdll.}
  874. proc mvwinsch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
  875. extdecl, importc: "mvwinsch", dynlib: pdcursesdll.}
  876. proc mvwinsnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
  877. extdecl, importc: "mvwinsnstr", dynlib: pdcursesdll.}
  878. proc mvwinsstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
  879. importc: "mvwinsstr", dynlib: pdcursesdll.}
  880. proc mvwinstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
  881. importc: "mvwinstr", dynlib: pdcursesdll.}
  882. proc mvwin*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "mvwin",
  883. dynlib: pdcursesdll.}
  884. proc mvwprintw*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs,
  885. extdecl, importc: "mvwprintw", dynlib: pdcursesdll.}
  886. proc mvwscanw*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs,
  887. extdecl, importc: "mvwscanw", dynlib: pdcursesdll.}
  888. proc mvwvline*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
  889. extdecl, importc: "mvwvline", dynlib: pdcursesdll.}
  890. proc napms*(a2: cint): cint{.extdecl, importc: "napms", dynlib: pdcursesdll.}
  891. proc newpad*(a2: cint; a3: cint): ptr WINDOW{.extdecl, importc: "newpad",
  892. dynlib: pdcursesdll.}
  893. proc newterm*(a2: cstring; a3: File; a4: File): ptr SCREEN{.extdecl,
  894. importc: "newterm", dynlib: pdcursesdll.}
  895. proc newwin*(a2: cint; a3: cint; a4: cint; a5: cint): ptr WINDOW{.extdecl,
  896. importc: "newwin", dynlib: pdcursesdll.}
  897. proc nl*(): cint{.extdecl, importc: "nl", dynlib: pdcursesdll.}
  898. proc nocbreak*(): cint{.extdecl, importc: "nocbreak", dynlib: pdcursesdll.}
  899. proc nodelay*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
  900. importc: "nodelay", dynlib: pdcursesdll.}
  901. proc noecho*(): cint{.extdecl, importc: "noecho", dynlib: pdcursesdll.}
  902. proc nonl*(): cint{.extdecl, importc: "nonl", dynlib: pdcursesdll.}
  903. proc noqiflush*(){.extdecl, importc: "noqiflush", dynlib: pdcursesdll.}
  904. proc noraw*(): cint{.extdecl, importc: "noraw", dynlib: pdcursesdll.}
  905. proc notimeout*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
  906. importc: "notimeout", dynlib: pdcursesdll.}
  907. proc overlay*(a2: ptr WINDOW; a3: ptr WINDOW): cint{.extdecl, importc: "overlay",
  908. dynlib: pdcursesdll.}
  909. proc overwrite*(a2: ptr WINDOW; a3: ptr WINDOW): cint{.extdecl,
  910. importc: "overwrite", dynlib: pdcursesdll.}
  911. proc pair_content*(a2: cshort; a3: ptr cshort; a4: ptr cshort): cint{.extdecl,
  912. importc: "pair_content", dynlib: pdcursesdll.}
  913. proc pechochar*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
  914. importc: "pechochar", dynlib: pdcursesdll.}
  915. proc pnoutrefresh*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint;
  916. a7: cint; a8: cint): cint{.extdecl, importc: "pnoutrefresh",
  917. dynlib: pdcursesdll.}
  918. proc prefresh*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint; a7: cint;
  919. a8: cint): cint{.extdecl, importc: "prefresh", dynlib: pdcursesdll.}
  920. proc printw*(a2: cstring): cint{.varargs, extdecl, importc: "printw",
  921. dynlib: pdcursesdll.}
  922. proc putwin*(a2: ptr WINDOW; a3: File): cint{.extdecl, importc: "putwin",
  923. dynlib: pdcursesdll.}
  924. proc qiflush*(){.extdecl, importc: "qiflush", dynlib: pdcursesdll.}
  925. proc raw*(): cint{.extdecl, importc: "raw", dynlib: pdcursesdll.}
  926. proc redrawwin*(a2: ptr WINDOW): cint{.extdecl, importc: "redrawwin",
  927. dynlib: pdcursesdll.}
  928. proc refresh*(): cint{.extdecl, importc: "refresh", dynlib: pdcursesdll.}
  929. proc reset_prog_mode*(): cint{.extdecl, importc: "reset_prog_mode",
  930. dynlib: pdcursesdll.}
  931. proc reset_shell_mode*(): cint{.extdecl, importc: "reset_shell_mode",
  932. dynlib: pdcursesdll.}
  933. proc resetty*(): cint{.extdecl, importc: "resetty", dynlib: pdcursesdll.}
  934. #int ripoffline(int, int (*)(WINDOW *, int));
  935. proc savetty*(): cint{.extdecl, importc: "savetty", dynlib: pdcursesdll.}
  936. proc scanw*(a2: cstring): cint{.varargs, extdecl, importc: "scanw",
  937. dynlib: pdcursesdll.}
  938. proc scr_dump*(a2: cstring): cint{.extdecl, importc: "scr_dump",
  939. dynlib: pdcursesdll.}
  940. proc scr_init*(a2: cstring): cint{.extdecl, importc: "scr_init",
  941. dynlib: pdcursesdll.}
  942. proc scr_restore*(a2: cstring): cint{.extdecl, importc: "scr_restore",
  943. dynlib: pdcursesdll.}
  944. proc scr_set*(a2: cstring): cint{.extdecl, importc: "scr_set", dynlib: pdcursesdll.}
  945. proc scrl*(a2: cint): cint{.extdecl, importc: "scrl", dynlib: pdcursesdll.}
  946. proc scroll*(a2: ptr WINDOW): cint{.extdecl, importc: "scroll",
  947. dynlib: pdcursesdll.}
  948. proc scrollok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
  949. importc: "scrollok", dynlib: pdcursesdll.}
  950. proc set_term*(a2: ptr SCREEN): ptr SCREEN{.extdecl, importc: "set_term",
  951. dynlib: pdcursesdll.}
  952. proc setscrreg*(a2: cint; a3: cint): cint{.extdecl, importc: "setscrreg",
  953. dynlib: pdcursesdll.}
  954. proc slk_attroff*(a2: cunsignedlong): cint{.extdecl, importc: "slk_attroff",
  955. dynlib: pdcursesdll.}
  956. proc slk_attr_off*(a2: cunsignedlong; a3: pointer): cint{.extdecl,
  957. importc: "slk_attr_off", dynlib: pdcursesdll.}
  958. proc slk_attron*(a2: cunsignedlong): cint{.extdecl, importc: "slk_attron",
  959. dynlib: pdcursesdll.}
  960. proc slk_attr_on*(a2: cunsignedlong; a3: pointer): cint{.extdecl,
  961. importc: "slk_attr_on", dynlib: pdcursesdll.}
  962. proc slk_attrset*(a2: cunsignedlong): cint{.extdecl, importc: "slk_attrset",
  963. dynlib: pdcursesdll.}
  964. proc slk_attr_set*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl,
  965. importc: "slk_attr_set", dynlib: pdcursesdll.}
  966. proc slk_clear*(): cint{.extdecl, importc: "slk_clear", dynlib: pdcursesdll.}
  967. proc slk_color*(a2: cshort): cint{.extdecl, importc: "slk_color",
  968. dynlib: pdcursesdll.}
  969. proc slk_init*(a2: cint): cint{.extdecl, importc: "slk_init", dynlib: pdcursesdll.}
  970. proc slk_label*(a2: cint): cstring{.extdecl, importc: "slk_label",
  971. dynlib: pdcursesdll.}
  972. proc slk_noutrefresh*(): cint{.extdecl, importc: "slk_noutrefresh",
  973. dynlib: pdcursesdll.}
  974. proc slk_refresh*(): cint{.extdecl, importc: "slk_refresh", dynlib: pdcursesdll.}
  975. proc slk_restore*(): cint{.extdecl, importc: "slk_restore", dynlib: pdcursesdll.}
  976. proc slk_set*(a2: cint; a3: cstring; a4: cint): cint{.extdecl, importc: "slk_set",
  977. dynlib: pdcursesdll.}
  978. proc slk_touch*(): cint{.extdecl, importc: "slk_touch", dynlib: pdcursesdll.}
  979. proc standend*(): cint{.extdecl, importc: "standend", dynlib: pdcursesdll.}
  980. proc standout*(): cint{.extdecl, importc: "standout", dynlib: pdcursesdll.}
  981. proc start_color*(): cint{.extdecl, importc: "start_color", dynlib: pdcursesdll.}
  982. proc subpad*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr WINDOW{.
  983. extdecl, importc: "subpad", dynlib: pdcursesdll.}
  984. proc subwin*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr WINDOW{.
  985. extdecl, importc: "subwin", dynlib: pdcursesdll.}
  986. proc syncok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "syncok",
  987. dynlib: pdcursesdll.}
  988. proc termattrs*(): cunsignedlong{.extdecl, importc: "termattrs",
  989. dynlib: pdcursesdll.}
  990. proc termattrs2*(): cunsignedlong{.extdecl, importc: "term_attrs",
  991. dynlib: pdcursesdll.}
  992. proc termname*(): cstring{.extdecl, importc: "termname", dynlib: pdcursesdll.}
  993. proc timeout*(a2: cint){.extdecl, importc: "timeout", dynlib: pdcursesdll.}
  994. proc touchline*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
  995. importc: "touchline", dynlib: pdcursesdll.}
  996. proc touchwin*(a2: ptr WINDOW): cint{.extdecl, importc: "touchwin",
  997. dynlib: pdcursesdll.}
  998. proc typeahead*(a2: cint): cint{.extdecl, importc: "typeahead",
  999. dynlib: pdcursesdll.}
  1000. proc untouchwin*(a2: ptr WINDOW): cint{.extdecl, importc: "untouchwin",
  1001. dynlib: pdcursesdll.}
  1002. proc use_env*(a2: cunsignedchar){.extdecl, importc: "use_env", dynlib: pdcursesdll.}
  1003. proc vidattr*(a2: cunsignedlong): cint{.extdecl, importc: "vidattr",
  1004. dynlib: pdcursesdll.}
  1005. proc vid_attr*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl,
  1006. importc: "vid_attr", dynlib: pdcursesdll.}
  1007. #int vidputs(chtype, int (*)(int));
  1008. #int vid_puts(attr_t, short, void *, int (*)(int));
  1009. proc vline*(a2: cunsignedlong; a3: cint): cint{.extdecl, importc: "vline",
  1010. dynlib: pdcursesdll.}
  1011. proc vwprintw*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
  1012. importc: "vw_printw", dynlib: pdcursesdll.}
  1013. proc vwprintw2*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
  1014. importc: "vwprintw", dynlib: pdcursesdll.}
  1015. proc vwscanw*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
  1016. importc: "vw_scanw", dynlib: pdcursesdll.}
  1017. proc vwscanw2*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
  1018. importc: "vwscanw", dynlib: pdcursesdll.}
  1019. proc waddchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
  1020. importc: "waddchnstr", dynlib: pdcursesdll.}
  1021. proc waddchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1022. importc: "waddchstr", dynlib: pdcursesdll.}
  1023. proc waddch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl, importc: "waddch",
  1024. dynlib: pdcursesdll.}
  1025. proc waddnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
  1026. importc: "waddnstr", dynlib: pdcursesdll.}
  1027. proc waddstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "waddstr",
  1028. dynlib: pdcursesdll.}
  1029. proc wattroff*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
  1030. importc: "wattroff", dynlib: pdcursesdll.}
  1031. proc wattron*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
  1032. importc: "wattron", dynlib: pdcursesdll.}
  1033. proc wattrset*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
  1034. importc: "wattrset", dynlib: pdcursesdll.}
  1035. proc wattr_get*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: ptr cshort;
  1036. a5: pointer): cint{.extdecl, importc: "wattr_get",
  1037. dynlib: pdcursesdll.}
  1038. proc wattr_off*(a2: ptr WINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl,
  1039. importc: "wattr_off", dynlib: pdcursesdll.}
  1040. proc wattr_on*(a2: ptr WINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl,
  1041. importc: "wattr_on", dynlib: pdcursesdll.}
  1042. proc wattr_set*(a2: ptr WINDOW; a3: cunsignedlong; a4: cshort; a5: pointer): cint{.
  1043. extdecl, importc: "wattr_set", dynlib: pdcursesdll.}
  1044. proc wbkgdset*(a2: ptr WINDOW; a3: cunsignedlong){.extdecl, importc: "wbkgdset",
  1045. dynlib: pdcursesdll.}
  1046. proc wbkgd*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl, importc: "wbkgd",
  1047. dynlib: pdcursesdll.}
  1048. proc wborder*(a2: ptr WINDOW; a3: cunsignedlong; a4: cunsignedlong;
  1049. a5: cunsignedlong; a6: cunsignedlong; a7: cunsignedlong;
  1050. a8: cunsignedlong; a9: cunsignedlong; a10: cunsignedlong): cint{.
  1051. extdecl, importc: "wborder", dynlib: pdcursesdll.}
  1052. proc wchgat*(a2: ptr WINDOW; a3: cint; a4: cunsignedlong; a5: cshort;
  1053. a6: pointer): cint{.extdecl, importc: "wchgat", dynlib: pdcursesdll.}
  1054. proc wclear*(a2: ptr WINDOW): cint{.extdecl, importc: "wclear",
  1055. dynlib: pdcursesdll.}
  1056. proc wclrtobot*(a2: ptr WINDOW): cint{.extdecl, importc: "wclrtobot",
  1057. dynlib: pdcursesdll.}
  1058. proc wclrtoeol*(a2: ptr WINDOW): cint{.extdecl, importc: "wclrtoeol",
  1059. dynlib: pdcursesdll.}
  1060. proc wcolor_set*(a2: ptr WINDOW; a3: cshort; a4: pointer): cint{.extdecl,
  1061. importc: "wcolor_set", dynlib: pdcursesdll.}
  1062. proc wcursyncup*(a2: ptr WINDOW){.extdecl, importc: "wcursyncup",
  1063. dynlib: pdcursesdll.}
  1064. proc wdelch*(a2: ptr WINDOW): cint{.extdecl, importc: "wdelch",
  1065. dynlib: pdcursesdll.}
  1066. proc wdeleteln*(a2: ptr WINDOW): cint{.extdecl, importc: "wdeleteln",
  1067. dynlib: pdcursesdll.}
  1068. proc wechochar*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
  1069. importc: "wechochar", dynlib: pdcursesdll.}
  1070. proc werase*(a2: ptr WINDOW): cint{.extdecl, importc: "werase",
  1071. dynlib: pdcursesdll.}
  1072. proc wgetch*(a2: ptr WINDOW): cint{.extdecl, importc: "wgetch",
  1073. dynlib: pdcursesdll.}
  1074. proc wgetnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
  1075. importc: "wgetnstr", dynlib: pdcursesdll.}
  1076. proc wgetstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "wgetstr",
  1077. dynlib: pdcursesdll.}
  1078. proc whline*(a2: ptr WINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl,
  1079. importc: "whline", dynlib: pdcursesdll.}
  1080. proc winchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
  1081. importc: "winchnstr", dynlib: pdcursesdll.}
  1082. proc winchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1083. importc: "winchstr", dynlib: pdcursesdll.}
  1084. proc winch*(a2: ptr WINDOW): cunsignedlong{.extdecl, importc: "winch",
  1085. dynlib: pdcursesdll.}
  1086. proc winnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
  1087. importc: "winnstr", dynlib: pdcursesdll.}
  1088. proc winsch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl, importc: "winsch",
  1089. dynlib: pdcursesdll.}
  1090. proc winsdelln*(a2: ptr WINDOW; a3: cint): cint{.extdecl, importc: "winsdelln",
  1091. dynlib: pdcursesdll.}
  1092. proc winsertln*(a2: ptr WINDOW): cint{.extdecl, importc: "winsertln",
  1093. dynlib: pdcursesdll.}
  1094. proc winsnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
  1095. importc: "winsnstr", dynlib: pdcursesdll.}
  1096. proc winsstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "winsstr",
  1097. dynlib: pdcursesdll.}
  1098. proc winstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "winstr",
  1099. dynlib: pdcursesdll.}
  1100. proc wmove*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "wmove",
  1101. dynlib: pdcursesdll.}
  1102. proc wnoutrefresh*(a2: ptr WINDOW): cint{.extdecl, importc: "wnoutrefresh",
  1103. dynlib: pdcursesdll.}
  1104. proc wprintw*(a2: ptr WINDOW; a3: cstring): cint{.varargs, extdecl,
  1105. importc: "wprintw", dynlib: pdcursesdll.}
  1106. proc wredrawln*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
  1107. importc: "wredrawln", dynlib: pdcursesdll.}
  1108. proc wrefresh*(a2: ptr WINDOW): cint{.extdecl, importc: "wrefresh",
  1109. dynlib: pdcursesdll.}
  1110. proc wscanw*(a2: ptr WINDOW; a3: cstring): cint{.varargs, extdecl,
  1111. importc: "wscanw", dynlib: pdcursesdll.}
  1112. proc wscrl*(a2: ptr WINDOW; a3: cint): cint{.extdecl, importc: "wscrl",
  1113. dynlib: pdcursesdll.}
  1114. proc wsetscrreg*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
  1115. importc: "wsetscrreg", dynlib: pdcursesdll.}
  1116. proc wstandend*(a2: ptr WINDOW): cint{.extdecl, importc: "wstandend",
  1117. dynlib: pdcursesdll.}
  1118. proc wstandout*(a2: ptr WINDOW): cint{.extdecl, importc: "wstandout",
  1119. dynlib: pdcursesdll.}
  1120. proc wsyncdown*(a2: ptr WINDOW){.extdecl, importc: "wsyncdown",
  1121. dynlib: pdcursesdll.}
  1122. proc wsyncup*(a2: ptr WINDOW){.extdecl, importc: "wsyncup", dynlib: pdcursesdll.}
  1123. proc wtimeout*(a2: ptr WINDOW; a3: cint){.extdecl, importc: "wtimeout",
  1124. dynlib: pdcursesdll.}
  1125. proc wtouchln*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint): cint{.extdecl,
  1126. importc: "wtouchln", dynlib: pdcursesdll.}
  1127. proc wvline*(a2: ptr WINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl,
  1128. importc: "wvline", dynlib: pdcursesdll.}
  1129. proc addnwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "addnwstr",
  1130. dynlib: pdcursesdll.}
  1131. proc addwstr*(a2: cstring): cint{.extdecl, importc: "addwstr",
  1132. dynlib: pdcursesdll.}
  1133. proc add_wch*(a2: ptr cunsignedlong): cint{.extdecl, importc: "add_wch",
  1134. dynlib: pdcursesdll.}
  1135. proc add_wchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
  1136. importc: "add_wchnstr", dynlib: pdcursesdll.}
  1137. proc add_wchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "add_wchstr",
  1138. dynlib: pdcursesdll.}
  1139. proc border_set*(a2: ptr cunsignedlong; a3: ptr cunsignedlong;
  1140. a4: ptr cunsignedlong; a5: ptr cunsignedlong;
  1141. a6: ptr cunsignedlong; a7: ptr cunsignedlong;
  1142. a8: ptr cunsignedlong; a9: ptr cunsignedlong): cint{.extdecl,
  1143. importc: "border_set", dynlib: pdcursesdll.}
  1144. proc box_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong): cint{.
  1145. extdecl, importc: "box_set", dynlib: pdcursesdll.}
  1146. proc echo_wchar*(a2: ptr cunsignedlong): cint{.extdecl, importc: "echo_wchar",
  1147. dynlib: pdcursesdll.}
  1148. proc erasewchar*(a2: cstring): cint{.extdecl, importc: "erasewchar",
  1149. dynlib: pdcursesdll.}
  1150. proc getbkgrnd*(a2: ptr cunsignedlong): cint{.extdecl, importc: "getbkgrnd",
  1151. dynlib: pdcursesdll.}
  1152. proc getcchar*(a2: ptr cunsignedlong; a3: cstring; a4: ptr cunsignedlong;
  1153. a5: ptr cshort; a6: pointer): cint{.extdecl, importc: "getcchar",
  1154. dynlib: pdcursesdll.}
  1155. proc getn_wstr*(a2: ptr cint; a3: cint): cint{.extdecl, importc: "getn_wstr",
  1156. dynlib: pdcursesdll.}
  1157. proc get_wch*(a2: ptr cint): cint{.extdecl, importc: "get_wch",
  1158. dynlib: pdcursesdll.}
  1159. proc get_wstr*(a2: ptr cint): cint{.extdecl, importc: "get_wstr",
  1160. dynlib: pdcursesdll.}
  1161. proc hline_set*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
  1162. importc: "hline_set", dynlib: pdcursesdll.}
  1163. proc innwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "innwstr",
  1164. dynlib: pdcursesdll.}
  1165. proc ins_nwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "ins_nwstr",
  1166. dynlib: pdcursesdll.}
  1167. proc ins_wch*(a2: ptr cunsignedlong): cint{.extdecl, importc: "ins_wch",
  1168. dynlib: pdcursesdll.}
  1169. proc ins_wstr*(a2: cstring): cint{.extdecl, importc: "ins_wstr",
  1170. dynlib: pdcursesdll.}
  1171. proc inwstr*(a2: cstring): cint{.extdecl, importc: "inwstr",
  1172. dynlib: pdcursesdll.}
  1173. proc in_wch*(a2: ptr cunsignedlong): cint{.extdecl, importc: "in_wch",
  1174. dynlib: pdcursesdll.}
  1175. proc in_wchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
  1176. importc: "in_wchnstr", dynlib: pdcursesdll.}
  1177. proc in_wchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "in_wchstr",
  1178. dynlib: pdcursesdll.}
  1179. proc key_name*(a2: char): cstring{.extdecl, importc: "key_name",
  1180. dynlib: pdcursesdll.}
  1181. proc killwchar*(a2: cstring): cint{.extdecl, importc: "killwchar",
  1182. dynlib: pdcursesdll.}
  1183. proc mvaddnwstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
  1184. importc: "mvaddnwstr", dynlib: pdcursesdll.}
  1185. proc mvaddwstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
  1186. importc: "mvaddwstr", dynlib: pdcursesdll.}
  1187. proc mvadd_wch*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
  1188. importc: "mvadd_wch", dynlib: pdcursesdll.}
  1189. proc mvadd_wchnstr*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
  1190. extdecl, importc: "mvadd_wchnstr", dynlib: pdcursesdll.}
  1191. proc mvadd_wchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
  1192. importc: "mvadd_wchstr", dynlib: pdcursesdll.}
  1193. proc mvgetn_wstr*(a2: cint; a3: cint; a4: ptr cint; a5: cint): cint{.extdecl,
  1194. importc: "mvgetn_wstr", dynlib: pdcursesdll.}
  1195. proc mvget_wch*(a2: cint; a3: cint; a4: ptr cint): cint{.extdecl,
  1196. importc: "mvget_wch", dynlib: pdcursesdll.}
  1197. proc mvget_wstr*(a2: cint; a3: cint; a4: ptr cint): cint{.extdecl,
  1198. importc: "mvget_wstr", dynlib: pdcursesdll.}
  1199. proc mvhline_set*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
  1200. extdecl, importc: "mvhline_set", dynlib: pdcursesdll.}
  1201. proc mvinnwstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
  1202. importc: "mvinnwstr", dynlib: pdcursesdll.}
  1203. proc mvins_nwstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
  1204. importc: "mvins_nwstr", dynlib: pdcursesdll.}
  1205. proc mvins_wch*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
  1206. importc: "mvins_wch", dynlib: pdcursesdll.}
  1207. proc mvins_wstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
  1208. importc: "mvins_wstr", dynlib: pdcursesdll.}
  1209. proc mvinwstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
  1210. importc: "mvinwstr", dynlib: pdcursesdll.}
  1211. proc mvin_wch*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
  1212. importc: "mvin_wch", dynlib: pdcursesdll.}
  1213. proc mvin_wchnstr*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
  1214. extdecl, importc: "mvin_wchnstr", dynlib: pdcursesdll.}
  1215. proc mvin_wchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
  1216. importc: "mvin_wchstr", dynlib: pdcursesdll.}
  1217. proc mvvline_set*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
  1218. extdecl, importc: "mvvline_set", dynlib: pdcursesdll.}
  1219. proc mvwaddnwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
  1220. extdecl, importc: "mvwaddnwstr", dynlib: pdcursesdll.}
  1221. proc mvwaddwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.
  1222. extdecl, importc: "mvwaddwstr", dynlib: pdcursesdll.}
  1223. proc mvwadd_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
  1224. extdecl, importc: "mvwadd_wch", dynlib: pdcursesdll.}
  1225. proc mvwadd_wchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
  1226. a6: cint): cint{.extdecl, importc: "mvwadd_wchnstr",
  1227. dynlib: pdcursesdll.}
  1228. proc mvwadd_wchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
  1229. extdecl, importc: "mvwadd_wchstr", dynlib: pdcursesdll.}
  1230. proc mvwgetn_wstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cint; a6: cint): cint{.
  1231. extdecl, importc: "mvwgetn_wstr", dynlib: pdcursesdll.}
  1232. proc mvwget_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
  1233. extdecl, importc: "mvwget_wch", dynlib: pdcursesdll.}
  1234. proc mvwget_wstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
  1235. extdecl, importc: "mvwget_wstr", dynlib: pdcursesdll.}
  1236. proc mvwhline_set*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
  1237. a6: cint): cint{.extdecl, importc: "mvwhline_set",
  1238. dynlib: pdcursesdll.}
  1239. proc mvwinnwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
  1240. extdecl, importc: "mvwinnwstr", dynlib: pdcursesdll.}
  1241. proc mvwins_nwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
  1242. extdecl, importc: "mvwins_nwstr", dynlib: pdcursesdll.}
  1243. proc mvwins_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
  1244. extdecl, importc: "mvwins_wch", dynlib: pdcursesdll.}
  1245. proc mvwins_wstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.
  1246. extdecl, importc: "mvwins_wstr", dynlib: pdcursesdll.}
  1247. proc mvwin_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
  1248. extdecl, importc: "mvwin_wch", dynlib: pdcursesdll.}
  1249. proc mvwin_wchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
  1250. a6: cint): cint{.extdecl, importc: "mvwin_wchnstr",
  1251. dynlib: pdcursesdll.}
  1252. proc mvwin_wchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
  1253. extdecl, importc: "mvwin_wchstr", dynlib: pdcursesdll.}
  1254. proc mvwinwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.
  1255. extdecl, importc: "mvwinwstr", dynlib: pdcursesdll.}
  1256. proc mvwvline_set*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
  1257. a6: cint): cint{.extdecl, importc: "mvwvline_set",
  1258. dynlib: pdcursesdll.}
  1259. proc pecho_wchar*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1260. importc: "pecho_wchar", dynlib: pdcursesdll.}
  1261. proc setcchar*(a2: ptr cunsignedlong; a3: cstring; a4: cunsignedlong;
  1262. a5: cshort; a6: pointer): cint{.extdecl, importc: "setcchar",
  1263. dynlib: pdcursesdll.}
  1264. proc slk_wset*(a2: cint; a3: cstring; a4: cint): cint{.extdecl,
  1265. importc: "slk_wset", dynlib: pdcursesdll.}
  1266. proc unget_wch*(a2: char): cint{.extdecl, importc: "unget_wch",
  1267. dynlib: pdcursesdll.}
  1268. proc vline_set*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
  1269. importc: "vline_set", dynlib: pdcursesdll.}
  1270. proc waddnwstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
  1271. importc: "waddnwstr", dynlib: pdcursesdll.}
  1272. proc waddwstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl,
  1273. importc: "waddwstr", dynlib: pdcursesdll.}
  1274. proc wadd_wch*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1275. importc: "wadd_wch", dynlib: pdcursesdll.}
  1276. proc wadd_wchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.
  1277. extdecl, importc: "wadd_wchnstr", dynlib: pdcursesdll.}
  1278. proc wadd_wchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1279. importc: "wadd_wchstr", dynlib: pdcursesdll.}
  1280. proc wbkgrnd*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1281. importc: "wbkgrnd", dynlib: pdcursesdll.}
  1282. proc wbkgrndset*(a2: ptr WINDOW; a3: ptr cunsignedlong){.extdecl,
  1283. importc: "wbkgrndset", dynlib: pdcursesdll.}
  1284. proc wborder_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong;
  1285. a5: ptr cunsignedlong; a6: ptr cunsignedlong;
  1286. a7: ptr cunsignedlong; a8: ptr cunsignedlong;
  1287. a9: ptr cunsignedlong; a10: ptr cunsignedlong): cint{.extdecl,
  1288. importc: "wborder_set", dynlib: pdcursesdll.}
  1289. proc wecho_wchar*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1290. importc: "wecho_wchar", dynlib: pdcursesdll.}
  1291. proc wgetbkgrnd*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1292. importc: "wgetbkgrnd", dynlib: pdcursesdll.}
  1293. proc wgetn_wstr*(a2: ptr WINDOW; a3: ptr cint; a4: cint): cint{.extdecl,
  1294. importc: "wgetn_wstr", dynlib: pdcursesdll.}
  1295. proc wget_wch*(a2: ptr WINDOW; a3: ptr cint): cint{.extdecl,
  1296. importc: "wget_wch", dynlib: pdcursesdll.}
  1297. proc wget_wstr*(a2: ptr WINDOW; a3: ptr cint): cint{.extdecl,
  1298. importc: "wget_wstr", dynlib: pdcursesdll.}
  1299. proc whline_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
  1300. importc: "whline_set", dynlib: pdcursesdll.}
  1301. proc winnwstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
  1302. importc: "winnwstr", dynlib: pdcursesdll.}
  1303. proc wins_nwstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
  1304. importc: "wins_nwstr", dynlib: pdcursesdll.}
  1305. proc wins_wch*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1306. importc: "wins_wch", dynlib: pdcursesdll.}
  1307. proc wins_wstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl,
  1308. importc: "wins_wstr", dynlib: pdcursesdll.}
  1309. proc winwstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "winwstr",
  1310. dynlib: pdcursesdll.}
  1311. proc win_wch*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1312. importc: "win_wch", dynlib: pdcursesdll.}
  1313. proc win_wchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
  1314. importc: "win_wchnstr", dynlib: pdcursesdll.}
  1315. proc win_wchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
  1316. importc: "win_wchstr", dynlib: pdcursesdll.}
  1317. proc wunctrl*(a2: ptr cunsignedlong): cstring{.extdecl, importc: "wunctrl",
  1318. dynlib: pdcursesdll.}
  1319. proc wvline_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
  1320. importc: "wvline_set", dynlib: pdcursesdll.}
  1321. proc getattrs*(a2: ptr WINDOW): cunsignedlong{.extdecl, importc: "getattrs",
  1322. dynlib: pdcursesdll.}
  1323. proc getbegx*(a2: ptr WINDOW): cint{.extdecl, importc: "getbegx",
  1324. dynlib: pdcursesdll.}
  1325. proc getbegy*(a2: ptr WINDOW): cint{.extdecl, importc: "getbegy",
  1326. dynlib: pdcursesdll.}
  1327. proc getmaxx*(a2: ptr WINDOW): cint{.extdecl, importc: "getmaxx",
  1328. dynlib: pdcursesdll.}
  1329. proc getmaxy*(a2: ptr WINDOW): cint{.extdecl, importc: "getmaxy",
  1330. dynlib: pdcursesdll.}
  1331. proc getparx*(a2: ptr WINDOW): cint{.extdecl, importc: "getparx",
  1332. dynlib: pdcursesdll.}
  1333. proc getpary*(a2: ptr WINDOW): cint{.extdecl, importc: "getpary",
  1334. dynlib: pdcursesdll.}
  1335. proc getcurx*(a2: ptr WINDOW): cint{.extdecl, importc: "getcurx",
  1336. dynlib: pdcursesdll.}
  1337. proc getcury*(a2: ptr WINDOW): cint{.extdecl, importc: "getcury",
  1338. dynlib: pdcursesdll.}
  1339. proc traceoff*(){.extdecl, importc: "traceoff", dynlib: pdcursesdll.}
  1340. proc traceon*(){.extdecl, importc: "traceon", dynlib: pdcursesdll.}
  1341. proc unctrl*(a2: cunsignedlong): cstring{.extdecl, importc: "unctrl",
  1342. dynlib: pdcursesdll.}
  1343. proc crmode*(): cint{.extdecl, importc: "crmode", dynlib: pdcursesdll.}
  1344. proc nocrmode*(): cint{.extdecl, importc: "nocrmode", dynlib: pdcursesdll.}
  1345. proc draino*(a2: cint): cint{.extdecl, importc: "draino", dynlib: pdcursesdll.}
  1346. proc resetterm*(): cint{.extdecl, importc: "resetterm", dynlib: pdcursesdll.}
  1347. proc fixterm*(): cint{.extdecl, importc: "fixterm", dynlib: pdcursesdll.}
  1348. proc saveterm*(): cint{.extdecl, importc: "saveterm", dynlib: pdcursesdll.}
  1349. proc setsyx*(a2: cint; a3: cint): cint{.extdecl, importc: "setsyx",
  1350. dynlib: pdcursesdll.}
  1351. proc mouse_set*(a2: cunsignedlong): cint{.extdecl, importc: "mouse_set",
  1352. dynlib: pdcursesdll.}
  1353. proc mouse_on*(a2: cunsignedlong): cint{.extdecl, importc: "mouse_on",
  1354. dynlib: pdcursesdll.}
  1355. proc mouse_off*(a2: cunsignedlong): cint{.extdecl, importc: "mouse_off",
  1356. dynlib: pdcursesdll.}
  1357. proc request_mouse_pos*(): cint{.extdecl, importc: "request_mouse_pos",
  1358. dynlib: pdcursesdll.}
  1359. proc map_button*(a2: cunsignedlong): cint{.extdecl, importc: "map_button",
  1360. dynlib: pdcursesdll.}
  1361. proc wmouse_position*(a2: ptr WINDOW; a3: ptr cint; a4: ptr cint){.extdecl,
  1362. importc: "wmouse_position", dynlib: pdcursesdll.}
  1363. proc getmouse*(): cunsignedlong{.extdecl, importc: "getmouse", dynlib: pdcursesdll.}
  1364. proc getbmap*(): cunsignedlong{.extdecl, importc: "getbmap", dynlib: pdcursesdll.}
  1365. proc assume_default_colors*(a2: cint; a3: cint): cint{.extdecl,
  1366. importc: "assume_default_colors", dynlib: pdcursesdll.}
  1367. proc curses_version*(): cstring{.extdecl, importc: "curses_version",
  1368. dynlib: pdcursesdll.}
  1369. proc has_key*(a2: cint): cunsignedchar{.extdecl, importc: "has_key",
  1370. dynlib: pdcursesdll.}
  1371. proc use_default_colors*(): cint{.extdecl, importc: "use_default_colors",
  1372. dynlib: pdcursesdll.}
  1373. proc wresize*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
  1374. importc: "wresize", dynlib: pdcursesdll.}
  1375. proc mouseinterval*(a2: cint): cint{.extdecl, importc: "mouseinterval",
  1376. dynlib: pdcursesdll.}
  1377. proc mousemask*(a2: cunsignedlong; a3: ptr cunsignedlong): cunsignedlong{.extdecl,
  1378. importc: "mousemask", dynlib: pdcursesdll.}
  1379. proc mouse_trafo*(a2: ptr cint; a3: ptr cint; a4: cunsignedchar): cunsignedchar{.
  1380. extdecl, importc: "mouse_trafo", dynlib: pdcursesdll.}
  1381. proc nc_getmouse*(a2: ptr MEVENT): cint{.extdecl, importc: "nc_getmouse",
  1382. dynlib: pdcursesdll.}
  1383. proc ungetmouse*(a2: ptr MEVENT): cint{.extdecl, importc: "ungetmouse",
  1384. dynlib: pdcursesdll.}
  1385. proc wenclose*(a2: ptr WINDOW; a3: cint; a4: cint): cunsignedchar{.extdecl,
  1386. importc: "wenclose", dynlib: pdcursesdll.}
  1387. proc wmouse_trafo*(a2: ptr WINDOW; a3: ptr cint; a4: ptr cint; a5: cunsignedchar): cunsignedchar{.
  1388. extdecl, importc: "wmouse_trafo", dynlib: pdcursesdll.}
  1389. proc addrawch*(a2: cunsignedlong): cint{.extdecl, importc: "addrawch",
  1390. dynlib: pdcursesdll.}
  1391. proc insrawch*(a2: cunsignedlong): cint{.extdecl, importc: "insrawch",
  1392. dynlib: pdcursesdll.}
  1393. proc is_termresized*(): cunsignedchar{.extdecl, importc: "is_termresized",
  1394. dynlib: pdcursesdll.}
  1395. proc mvaddrawch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl,
  1396. importc: "mvaddrawch", dynlib: pdcursesdll.}
  1397. proc mvdeleteln*(a2: cint; a3: cint): cint{.extdecl, importc: "mvdeleteln",
  1398. dynlib: pdcursesdll.}
  1399. proc mvinsertln*(a2: cint; a3: cint): cint{.extdecl, importc: "mvinsertln",
  1400. dynlib: pdcursesdll.}
  1401. proc mvinsrawch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl,
  1402. importc: "mvinsrawch", dynlib: pdcursesdll.}
  1403. proc mvwaddrawch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
  1404. extdecl, importc: "mvwaddrawch", dynlib: pdcursesdll.}
  1405. proc mvwdeleteln*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
  1406. importc: "mvwdeleteln", dynlib: pdcursesdll.}
  1407. proc mvwinsertln*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
  1408. importc: "mvwinsertln", dynlib: pdcursesdll.}
  1409. proc mvwinsrawch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
  1410. extdecl, importc: "mvwinsrawch", dynlib: pdcursesdll.}
  1411. proc raw_output*(a2: cunsignedchar): cint{.extdecl, importc: "raw_output",
  1412. dynlib: pdcursesdll.}
  1413. proc resize_term*(a2: cint; a3: cint): cint{.extdecl, importc: "resize_term",
  1414. dynlib: pdcursesdll.}
  1415. proc resize_window*(a2: ptr WINDOW; a3: cint; a4: cint): ptr WINDOW{.extdecl,
  1416. importc: "resize_window", dynlib: pdcursesdll.}
  1417. proc waddrawch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
  1418. importc: "waddrawch", dynlib: pdcursesdll.}
  1419. proc winsrawch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
  1420. importc: "winsrawch", dynlib: pdcursesdll.}
  1421. proc wordchar*(): char{.extdecl, importc: "wordchar", dynlib: pdcursesdll.}
  1422. proc slk_wlabel*(a2: cint): cstring{.extdecl, importc: "slk_wlabel",
  1423. dynlib: pdcursesdll.}
  1424. proc debug*(a2: cstring){.varargs, extdecl, importc: "PDC_debug",
  1425. dynlib: pdcursesdll.}
  1426. proc ungetch*(a2: cint): cint{.extdecl, importc: "PDC_ungetch",
  1427. dynlib: pdcursesdll.}
  1428. proc set_blink*(a2: cunsignedchar): cint{.extdecl, importc: "PDC_set_blink",
  1429. dynlib: pdcursesdll.}
  1430. proc set_line_color*(a2: cshort): cint{.extdecl, importc: "PDC_set_line_color",
  1431. dynlib: pdcursesdll.}
  1432. proc set_title*(a2: cstring){.extdecl, importc: "PDC_set_title",
  1433. dynlib: pdcursesdll.}
  1434. proc clearclipboard*(): cint{.extdecl, importc: "PDC_clearclipboard",
  1435. dynlib: pdcursesdll.}
  1436. proc freeclipboard*(a2: cstring): cint{.extdecl, importc: "PDC_freeclipboard",
  1437. dynlib: pdcursesdll.}
  1438. proc getclipboard*(a2: cstringArray; a3: ptr clong): cint{.extdecl,
  1439. importc: "PDC_getclipboard", dynlib: pdcursesdll.}
  1440. proc setclipboard*(a2: cstring; a3: clong): cint{.extdecl,
  1441. importc: "PDC_setclipboard", dynlib: pdcursesdll.}
  1442. proc get_input_fd*(): cunsignedlong{.extdecl, importc: "PDC_get_input_fd",
  1443. dynlib: pdcursesdll.}
  1444. proc get_key_modifiers*(): cunsignedlong{.extdecl,
  1445. importc: "PDC_get_key_modifiers", dynlib: pdcursesdll.}
  1446. proc return_key_modifiers*(a2: cunsignedchar): cint{.extdecl,
  1447. importc: "PDC_return_key_modifiers", dynlib: pdcursesdll.}
  1448. proc save_key_modifiers*(a2: cunsignedchar): cint{.extdecl,
  1449. importc: "PDC_save_key_modifiers", dynlib: pdcursesdll.}
  1450. proc bottom_panel*(pan: ptr PANEL): cint{.extdecl, importc: "bottom_panel",
  1451. dynlib: pdcursesdll.}
  1452. proc del_panel*(pan: ptr PANEL): cint{.extdecl, importc: "del_panel",
  1453. dynlib: pdcursesdll.}
  1454. proc hide_panel*(pan: ptr PANEL): cint{.extdecl, importc: "hide_panel",
  1455. dynlib: pdcursesdll.}
  1456. proc move_panel*(pan: ptr PANEL; starty: cint; startx: cint): cint{.extdecl,
  1457. importc: "move_panel", dynlib: pdcursesdll.}
  1458. proc new_panel*(win: ptr WINDOW): ptr PANEL{.extdecl, importc: "new_panel",
  1459. dynlib: pdcursesdll.}
  1460. proc panel_above*(pan: ptr PANEL): ptr PANEL{.extdecl, importc: "panel_above",
  1461. dynlib: pdcursesdll.}
  1462. proc panel_below*(pan: ptr PANEL): ptr PANEL{.extdecl, importc: "panel_below",
  1463. dynlib: pdcursesdll.}
  1464. proc panel_hidden*(pan: ptr PANEL): cint{.extdecl, importc: "panel_hidden",
  1465. dynlib: pdcursesdll.}
  1466. proc panel_userptr*(pan: ptr PANEL): pointer{.extdecl, importc: "panel_userptr",
  1467. dynlib: pdcursesdll.}
  1468. proc panel_window*(pan: ptr PANEL): ptr WINDOW{.extdecl, importc: "panel_window",
  1469. dynlib: pdcursesdll.}
  1470. proc replace_panel*(pan: ptr PANEL; win: ptr WINDOW): cint{.extdecl,
  1471. importc: "replace_panel", dynlib: pdcursesdll.}
  1472. proc set_panel_userptr*(pan: ptr PANEL; uptr: pointer): cint{.extdecl,
  1473. importc: "set_panel_userptr", dynlib: pdcursesdll.}
  1474. proc show_panel*(pan: ptr PANEL): cint{.extdecl, importc: "show_panel",
  1475. dynlib: pdcursesdll.}
  1476. proc top_panel*(pan: ptr PANEL): cint{.extdecl, importc: "top_panel",
  1477. dynlib: pdcursesdll.}
  1478. proc update_panels*(){.extdecl, importc: "update_panels", dynlib: pdcursesdll.}
  1479. when unixOS:
  1480. proc Xinitscr*(a2: cint; a3: cstringArray): ptr WINDOW{.extdecl,
  1481. importc: "Xinitscr", dynlib: pdcursesdll.}
  1482. proc XCursesExit*(){.extdecl, importc: "XCursesExit", dynlib: pdcursesdll.}
  1483. proc sb_init*(): cint{.extdecl, importc: "sb_init", dynlib: pdcursesdll.}
  1484. proc sb_set_horz*(a2: cint; a3: cint; a4: cint): cint{.extdecl,
  1485. importc: "sb_set_horz", dynlib: pdcursesdll.}
  1486. proc sb_set_vert*(a2: cint; a3: cint; a4: cint): cint{.extdecl,
  1487. importc: "sb_set_vert", dynlib: pdcursesdll.}
  1488. proc sb_get_horz*(a2: ptr cint; a3: ptr cint; a4: ptr cint): cint{.extdecl,
  1489. importc: "sb_get_horz", dynlib: pdcursesdll.}
  1490. proc sb_get_vert*(a2: ptr cint; a3: ptr cint; a4: ptr cint): cint{.extdecl,
  1491. importc: "sb_get_vert", dynlib: pdcursesdll.}
  1492. proc sb_refresh*(): cint{.extdecl, importc: "sb_refresh", dynlib: pdcursesdll.}
  1493. template getch*(): expr =
  1494. wgetch(stdscr)
  1495. template ungetch*(ch: expr): expr =
  1496. ungetch(ch)
  1497. template getbegyx*(w, y, x: expr): expr =
  1498. y = getbegy(w)
  1499. x = getbegx(w)
  1500. template getmaxyx*(w, y, x: expr): expr =
  1501. y = getmaxy(w)
  1502. x = getmaxx(w)
  1503. template getparyx*(w, y, x: expr): expr =
  1504. y = getpary(w)
  1505. x = getparx(w)
  1506. template getyx*(w, y, x: expr): expr =
  1507. y = getcury(w)
  1508. x = getcurx(w)
  1509. template getsyx*(y, x: expr): stmt =
  1510. if curscr.leaveit:
  1511. (x) = - 1
  1512. (y) = (x)
  1513. else: getyx(curscr, (y), (x))
  1514. template getmouse*(x: expr): expr =
  1515. nc_getmouse(x)
  1516. when defined(windows):
  1517. var
  1518. atrtab*{.importc: "pdc_atrtab", dynlib: pdcursesdll.}: cstring
  1519. con_out*{.importc: "pdc_con_out", dynlib: pdcursesdll.}: HANDLE
  1520. con_in*{.importc: "pdc_con_in", dynlib: pdcursesdll.}: HANDLE
  1521. quick_edit*{.importc: "pdc_quick_edit", dynlib: pdcursesdll.}: DWORD
  1522. proc get_buffer_rows*(): cint{.extdecl, importc: "PDC_get_buffer_rows",
  1523. dynlib: pdcursesdll.}