curses.h 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417
  1. /*----------------------------------------------------------------------*
  2. * PDCurses *
  3. *----------------------------------------------------------------------*/
  4. #ifndef __PDCURSES__
  5. #define __PDCURSES__ 1
  6. /*man-start**************************************************************
  7. Define before inclusion (only those needed):
  8. XCURSES if building / built for X11
  9. PDC_RGB if you want to use RGB color definitions
  10. (Red = 1, Green = 2, Blue = 4) instead of BGR
  11. PDC_WIDE if building / built with wide-character support
  12. PDC_DLL_BUILD if building / built as a Windows DLL
  13. PDC_NCMOUSE to use the ncurses mouse API instead
  14. of PDCurses' traditional mouse API
  15. Defined by this header:
  16. PDCURSES PDCurses-only features are available
  17. PDC_BUILD API build version
  18. PDC_VER_MAJOR major version number
  19. PDC_VER_MINOR minor version number
  20. PDC_VERDOT version string
  21. **man-end****************************************************************/
  22. #define PDCURSES 1
  23. #define PDC_BUILD 3906
  24. #define PDC_VER_MAJOR 3
  25. #define PDC_VER_MINOR 9
  26. #define PDC_VERDOT "3.9"
  27. #define CHTYPE_LONG 1 /* chtype >= 32 bits */
  28. #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  29. # define PDC_99 1
  30. #endif
  31. #if defined(__cplusplus) && __cplusplus >= 199711L
  32. # define PDC_PP98 1
  33. #endif
  34. /*----------------------------------------------------------------------*/
  35. #include <stdarg.h>
  36. #include <stddef.h>
  37. #include <stdio.h>
  38. #ifdef PDC_WIDE
  39. # include <wchar.h>
  40. #endif
  41. #if defined(PDC_99) && !defined(__bool_true_false_are_defined)
  42. # include <stdbool.h>
  43. #endif
  44. #ifdef __cplusplus
  45. extern "C"
  46. {
  47. # ifndef PDC_PP98
  48. # define bool _bool
  49. # endif
  50. #endif
  51. /*----------------------------------------------------------------------
  52. *
  53. * Constants and Types
  54. *
  55. */
  56. #undef FALSE
  57. #define FALSE 0
  58. #undef TRUE
  59. #define TRUE 1
  60. #undef ERR
  61. #define ERR (-1)
  62. #undef OK
  63. #define OK 0
  64. #if !defined(PDC_PP98) && !defined(__bool_true_false_are_defined)
  65. typedef unsigned char bool;
  66. #endif
  67. #if _LP64
  68. typedef unsigned int chtype;
  69. #else
  70. typedef unsigned long chtype; /* 16-bit attr + 16-bit char */
  71. #endif
  72. #ifdef PDC_WIDE
  73. typedef chtype cchar_t;
  74. #endif
  75. typedef chtype attr_t;
  76. /*----------------------------------------------------------------------
  77. *
  78. * Version Info
  79. *
  80. */
  81. /* Use this structure with PDC_get_version() for run-time info about the
  82. way the library was built, in case it doesn't match the header. */
  83. typedef struct
  84. {
  85. short flags; /* flags OR'd together (see below) */
  86. short build; /* PDC_BUILD at compile time */
  87. unsigned char major; /* PDC_VER_MAJOR */
  88. unsigned char minor; /* PDC_VER_MINOR */
  89. unsigned char csize; /* sizeof chtype */
  90. unsigned char bsize; /* sizeof bool */
  91. } PDC_VERSION;
  92. enum
  93. {
  94. PDC_VFLAG_DEBUG = 1, /* set if built with -DPDCDEBUG */
  95. PDC_VFLAG_WIDE = 2, /* -DPDC_WIDE */
  96. PDC_VFLAG_UTF8 = 4, /* -DPDC_FORCE_UTF8 */
  97. PDC_VFLAG_DLL = 8, /* -DPDC_DLL_BUILD */
  98. PDC_VFLAG_RGB = 16 /* -DPDC_RGB */
  99. };
  100. /*----------------------------------------------------------------------
  101. *
  102. * Mouse Interface
  103. *
  104. */
  105. #if _LP64
  106. typedef unsigned int mmask_t;
  107. #else
  108. typedef unsigned long mmask_t;
  109. #endif
  110. typedef struct
  111. {
  112. int x; /* absolute column, 0 based, measured in characters */
  113. int y; /* absolute row, 0 based, measured in characters */
  114. short button[3]; /* state of each button */
  115. int changes; /* flags indicating what has changed with the mouse */
  116. } MOUSE_STATUS;
  117. #define BUTTON_RELEASED 0x0000
  118. #define BUTTON_PRESSED 0x0001
  119. #define BUTTON_CLICKED 0x0002
  120. #define BUTTON_DOUBLE_CLICKED 0x0003
  121. #define BUTTON_TRIPLE_CLICKED 0x0004
  122. #define BUTTON_MOVED 0x0005 /* PDCurses */
  123. #define WHEEL_SCROLLED 0x0006 /* PDCurses */
  124. #define BUTTON_ACTION_MASK 0x0007 /* PDCurses */
  125. #define PDC_BUTTON_SHIFT 0x0008 /* PDCurses */
  126. #define PDC_BUTTON_CONTROL 0x0010 /* PDCurses */
  127. #define PDC_BUTTON_ALT 0x0020 /* PDCurses */
  128. #define BUTTON_MODIFIER_MASK 0x0038 /* PDCurses */
  129. #define MOUSE_X_POS (Mouse_status.x)
  130. #define MOUSE_Y_POS (Mouse_status.y)
  131. /*
  132. * Bits associated with the .changes field:
  133. * 3 2 1 0
  134. * 210987654321098765432109876543210
  135. * 1 <- button 1 has changed
  136. * 10 <- button 2 has changed
  137. * 100 <- button 3 has changed
  138. * 1000 <- mouse has moved
  139. * 10000 <- mouse position report
  140. * 100000 <- mouse wheel up
  141. * 1000000 <- mouse wheel down
  142. * 10000000 <- mouse wheel left
  143. * 100000000 <- mouse wheel right
  144. */
  145. #define PDC_MOUSE_MOVED 0x0008
  146. #define PDC_MOUSE_POSITION 0x0010
  147. #define PDC_MOUSE_WHEEL_UP 0x0020
  148. #define PDC_MOUSE_WHEEL_DOWN 0x0040
  149. #define PDC_MOUSE_WHEEL_LEFT 0x0080
  150. #define PDC_MOUSE_WHEEL_RIGHT 0x0100
  151. #define A_BUTTON_CHANGED (Mouse_status.changes & 7)
  152. #define MOUSE_MOVED (Mouse_status.changes & PDC_MOUSE_MOVED)
  153. #define MOUSE_POS_REPORT (Mouse_status.changes & PDC_MOUSE_POSITION)
  154. #define BUTTON_CHANGED(x) (Mouse_status.changes & (1 << ((x) - 1)))
  155. #define BUTTON_STATUS(x) (Mouse_status.button[(x) - 1])
  156. #define MOUSE_WHEEL_UP (Mouse_status.changes & PDC_MOUSE_WHEEL_UP)
  157. #define MOUSE_WHEEL_DOWN (Mouse_status.changes & PDC_MOUSE_WHEEL_DOWN)
  158. #define MOUSE_WHEEL_LEFT (Mouse_status.changes & PDC_MOUSE_WHEEL_LEFT)
  159. #define MOUSE_WHEEL_RIGHT (Mouse_status.changes & PDC_MOUSE_WHEEL_RIGHT)
  160. /* mouse bit-masks */
  161. #define BUTTON1_RELEASED 0x00000001L
  162. #define BUTTON1_PRESSED 0x00000002L
  163. #define BUTTON1_CLICKED 0x00000004L
  164. #define BUTTON1_DOUBLE_CLICKED 0x00000008L
  165. #define BUTTON1_TRIPLE_CLICKED 0x00000010L
  166. #define BUTTON1_MOVED 0x00000010L /* PDCurses */
  167. #define BUTTON2_RELEASED 0x00000020L
  168. #define BUTTON2_PRESSED 0x00000040L
  169. #define BUTTON2_CLICKED 0x00000080L
  170. #define BUTTON2_DOUBLE_CLICKED 0x00000100L
  171. #define BUTTON2_TRIPLE_CLICKED 0x00000200L
  172. #define BUTTON2_MOVED 0x00000200L /* PDCurses */
  173. #define BUTTON3_RELEASED 0x00000400L
  174. #define BUTTON3_PRESSED 0x00000800L
  175. #define BUTTON3_CLICKED 0x00001000L
  176. #define BUTTON3_DOUBLE_CLICKED 0x00002000L
  177. #define BUTTON3_TRIPLE_CLICKED 0x00004000L
  178. #define BUTTON3_MOVED 0x00004000L /* PDCurses */
  179. /* For the ncurses-compatible functions only, BUTTON4_PRESSED and
  180. BUTTON5_PRESSED are returned for mouse scroll wheel up and down;
  181. otherwise PDCurses doesn't support buttons 4 and 5 */
  182. #define BUTTON4_RELEASED 0x00008000L
  183. #define BUTTON4_PRESSED 0x00010000L
  184. #define BUTTON4_CLICKED 0x00020000L
  185. #define BUTTON4_DOUBLE_CLICKED 0x00040000L
  186. #define BUTTON4_TRIPLE_CLICKED 0x00080000L
  187. #define BUTTON5_RELEASED 0x00100000L
  188. #define BUTTON5_PRESSED 0x00200000L
  189. #define BUTTON5_CLICKED 0x00400000L
  190. #define BUTTON5_DOUBLE_CLICKED 0x00800000L
  191. #define BUTTON5_TRIPLE_CLICKED 0x01000000L
  192. #define MOUSE_WHEEL_SCROLL 0x02000000L /* PDCurses */
  193. #define BUTTON_MODIFIER_SHIFT 0x04000000L /* PDCurses */
  194. #define BUTTON_MODIFIER_CONTROL 0x08000000L /* PDCurses */
  195. #define BUTTON_MODIFIER_ALT 0x10000000L /* PDCurses */
  196. #define ALL_MOUSE_EVENTS 0x1fffffffL
  197. #define REPORT_MOUSE_POSITION 0x20000000L
  198. /* ncurses mouse interface */
  199. typedef struct
  200. {
  201. short id; /* unused, always 0 */
  202. int x, y, z; /* x, y same as MOUSE_STATUS; z unused */
  203. mmask_t bstate; /* equivalent to changes + button[], but
  204. in the same format as used for mousemask() */
  205. } MEVENT;
  206. #if defined(PDC_NCMOUSE) && !defined(NCURSES_MOUSE_VERSION)
  207. # define NCURSES_MOUSE_VERSION 2
  208. #endif
  209. #ifdef NCURSES_MOUSE_VERSION
  210. # define BUTTON_SHIFT BUTTON_MODIFIER_SHIFT
  211. # define BUTTON_CONTROL BUTTON_MODIFIER_CONTROL
  212. # define BUTTON_CTRL BUTTON_MODIFIER_CONTROL
  213. # define BUTTON_ALT BUTTON_MODIFIER_ALT
  214. #else
  215. # define BUTTON_SHIFT PDC_BUTTON_SHIFT
  216. # define BUTTON_CONTROL PDC_BUTTON_CONTROL
  217. # define BUTTON_ALT PDC_BUTTON_ALT
  218. #endif
  219. /*----------------------------------------------------------------------
  220. *
  221. * Window and Screen Structures
  222. *
  223. */
  224. typedef struct _win /* definition of a window */
  225. {
  226. int _cury; /* current pseudo-cursor */
  227. int _curx;
  228. int _maxy; /* max window coordinates */
  229. int _maxx;
  230. int _begy; /* origin on screen */
  231. int _begx;
  232. int _flags; /* window properties */
  233. chtype _attrs; /* standard attributes and colors */
  234. chtype _bkgd; /* background, normally blank */
  235. bool _clear; /* causes clear at next refresh */
  236. bool _leaveit; /* leaves cursor where it is */
  237. bool _scroll; /* allows window scrolling */
  238. bool _nodelay; /* input character wait flag */
  239. bool _immed; /* immediate update flag */
  240. bool _sync; /* synchronise window ancestors */
  241. bool _use_keypad; /* flags keypad key mode active */
  242. chtype **_y; /* pointer to line pointer array */
  243. int *_firstch; /* first changed character in line */
  244. int *_lastch; /* last changed character in line */
  245. int _tmarg; /* top of scrolling region */
  246. int _bmarg; /* bottom of scrolling region */
  247. int _delayms; /* milliseconds of delay for getch() */
  248. int _parx, _pary; /* coords relative to parent (0,0) */
  249. struct _win *_parent; /* subwin's pointer to parent win */
  250. } WINDOW;
  251. /* Color pair structure */
  252. typedef struct
  253. {
  254. short f; /* foreground color */
  255. short b; /* background color */
  256. int count; /* allocation order */
  257. bool set; /* pair has been set */
  258. } PDC_PAIR;
  259. /* Avoid using the SCREEN struct directly -- use the corresponding
  260. functions if possible. This struct may eventually be made private. */
  261. typedef struct
  262. {
  263. bool alive; /* if initscr() called, and not endwin() */
  264. bool autocr; /* if cr -> lf */
  265. bool cbreak; /* if terminal unbuffered */
  266. bool echo; /* if terminal echo */
  267. bool raw_inp; /* raw input mode (v. cooked input) */
  268. bool raw_out; /* raw output mode (7 v. 8 bits) */
  269. bool audible; /* FALSE if the bell is visual */
  270. bool mono; /* TRUE if current screen is mono */
  271. bool resized; /* TRUE if TERM has been resized */
  272. bool orig_attr; /* TRUE if we have the original colors */
  273. short orig_fore; /* original screen foreground color */
  274. short orig_back; /* original screen foreground color */
  275. int cursrow; /* position of physical cursor */
  276. int curscol; /* position of physical cursor */
  277. int visibility; /* visibility of cursor */
  278. int orig_cursor; /* original cursor size */
  279. int lines; /* new value for LINES */
  280. int cols; /* new value for COLS */
  281. mmask_t _trap_mbe; /* trap these mouse button events */
  282. int mouse_wait; /* time to wait (in ms) for a
  283. button release after a press, in
  284. order to count it as a click */
  285. int slklines; /* lines in use by slk_init() */
  286. WINDOW *slk_winptr; /* window for slk */
  287. int linesrippedoff; /* lines ripped off via ripoffline() */
  288. int linesrippedoffontop; /* lines ripped off on
  289. top via ripoffline() */
  290. int delaytenths; /* 1/10ths second to wait block
  291. getch() for */
  292. bool _preserve; /* TRUE if screen background
  293. to be preserved */
  294. int _restore; /* specifies if screen background
  295. to be restored, and how */
  296. unsigned long key_modifiers; /* key modifiers (SHIFT, CONTROL, etc.)
  297. on last key press */
  298. bool return_key_modifiers; /* TRUE if modifier keys are
  299. returned as "real" keys */
  300. bool key_code; /* TRUE if last key is a special key;
  301. used internally by get_wch() */
  302. MOUSE_STATUS mouse_status; /* last returned mouse status */
  303. short line_color; /* color of line attributes - default -1 */
  304. attr_t termattrs; /* attribute capabilities */
  305. WINDOW *lastscr; /* the last screen image */
  306. FILE *dbfp; /* debug trace file pointer */
  307. bool color_started; /* TRUE after start_color() */
  308. bool dirty; /* redraw on napms() after init_color() */
  309. int sel_start; /* start of selection (y * COLS + x) */
  310. int sel_end; /* end of selection */
  311. int *c_buffer; /* character buffer */
  312. int c_pindex; /* putter index */
  313. int c_gindex; /* getter index */
  314. int *c_ungch; /* array of ungotten chars */
  315. int c_ungind; /* ungetch() push index */
  316. int c_ungmax; /* allocated size of ungetch() buffer */
  317. PDC_PAIR *atrtab; /* table of color pairs */
  318. } SCREEN;
  319. /*----------------------------------------------------------------------
  320. *
  321. * External Variables
  322. *
  323. */
  324. #ifdef PDC_DLL_BUILD
  325. # ifdef CURSES_LIBRARY
  326. # define PDCEX __declspec(dllexport) extern
  327. # else
  328. # define PDCEX __declspec(dllimport)
  329. # endif
  330. #else
  331. # define PDCEX extern
  332. #endif
  333. PDCEX int LINES; /* terminal height */
  334. PDCEX int COLS; /* terminal width */
  335. PDCEX WINDOW *stdscr; /* the default screen window */
  336. PDCEX WINDOW *curscr; /* the current screen image */
  337. PDCEX SCREEN *SP; /* curses variables */
  338. PDCEX MOUSE_STATUS Mouse_status;
  339. PDCEX int COLORS;
  340. PDCEX int COLOR_PAIRS;
  341. PDCEX int TABSIZE;
  342. PDCEX chtype acs_map[]; /* alternate character set map */
  343. PDCEX char ttytype[]; /* terminal name/description */
  344. /*man-start**************************************************************
  345. Text Attributes
  346. ===============
  347. PDCurses uses a 32-bit integer for its chtype:
  348. +--------------------------------------------------------------------+
  349. |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|..| 2| 1| 0|
  350. +--------------------------------------------------------------------+
  351. color pair | modifiers | character eg 'a'
  352. There are 256 color pairs (8 bits), 8 bits for modifiers, and 16 bits
  353. for character data. The modifiers are bold, underline, right-line,
  354. left-line, italic, reverse and blink, plus the alternate character set
  355. indicator.
  356. **man-end****************************************************************/
  357. /*** Video attribute macros ***/
  358. #define A_NORMAL (chtype)0
  359. #define A_ALTCHARSET (chtype)0x00010000
  360. #define A_RIGHT (chtype)0x00020000
  361. #define A_LEFT (chtype)0x00040000
  362. #define A_ITALIC (chtype)0x00080000
  363. #define A_UNDERLINE (chtype)0x00100000
  364. #define A_REVERSE (chtype)0x00200000
  365. #define A_BLINK (chtype)0x00400000
  366. #define A_BOLD (chtype)0x00800000
  367. #define A_ATTRIBUTES (chtype)0xffff0000
  368. #define A_CHARTEXT (chtype)0x0000ffff
  369. #define A_COLOR (chtype)0xff000000
  370. #define PDC_COLOR_SHIFT 24
  371. #define A_LEFTLINE A_LEFT
  372. #define A_RIGHTLINE A_RIGHT
  373. #define A_STANDOUT (A_REVERSE | A_BOLD) /* X/Open */
  374. #define A_DIM A_NORMAL
  375. #define A_INVIS A_NORMAL
  376. #define A_PROTECT A_NORMAL
  377. #define A_HORIZONTAL A_NORMAL
  378. #define A_LOW A_NORMAL
  379. #define A_TOP A_NORMAL
  380. #define A_VERTICAL A_NORMAL
  381. #define CHR_MSK A_CHARTEXT /* Obsolete */
  382. #define ATR_MSK A_ATTRIBUTES /* Obsolete */
  383. #define ATR_NRM A_NORMAL /* Obsolete */
  384. /* For use with attr_t -- X/Open says, "these shall be distinct", so
  385. this is a non-conforming implementation. */
  386. #define WA_NORMAL A_NORMAL
  387. #define WA_ALTCHARSET A_ALTCHARSET
  388. #define WA_BLINK A_BLINK
  389. #define WA_BOLD A_BOLD
  390. #define WA_DIM A_DIM
  391. #define WA_INVIS A_INVIS
  392. #define WA_ITALIC A_ITALIC
  393. #define WA_LEFT A_LEFT
  394. #define WA_PROTECT A_PROTECT
  395. #define WA_REVERSE A_REVERSE
  396. #define WA_RIGHT A_RIGHT
  397. #define WA_STANDOUT A_STANDOUT
  398. #define WA_UNDERLINE A_UNDERLINE
  399. #define WA_HORIZONTAL A_HORIZONTAL
  400. #define WA_LOW A_LOW
  401. #define WA_TOP A_TOP
  402. #define WA_VERTICAL A_VERTICAL
  403. #define WA_ATTRIBUTES A_ATTRIBUTES
  404. /*** Alternate character set macros ***/
  405. #define PDC_ACS(w) ((chtype)w | A_ALTCHARSET)
  406. /* VT100-compatible symbols -- box chars */
  407. #define ACS_ULCORNER PDC_ACS('l')
  408. #define ACS_LLCORNER PDC_ACS('m')
  409. #define ACS_URCORNER PDC_ACS('k')
  410. #define ACS_LRCORNER PDC_ACS('j')
  411. #define ACS_RTEE PDC_ACS('u')
  412. #define ACS_LTEE PDC_ACS('t')
  413. #define ACS_BTEE PDC_ACS('v')
  414. #define ACS_TTEE PDC_ACS('w')
  415. #define ACS_HLINE PDC_ACS('q')
  416. #define ACS_VLINE PDC_ACS('x')
  417. #define ACS_PLUS PDC_ACS('n')
  418. /* VT100-compatible symbols -- other */
  419. #define ACS_S1 PDC_ACS('o')
  420. #define ACS_S9 PDC_ACS('s')
  421. #define ACS_DIAMOND PDC_ACS('`')
  422. #define ACS_CKBOARD PDC_ACS('a')
  423. #define ACS_DEGREE PDC_ACS('f')
  424. #define ACS_PLMINUS PDC_ACS('g')
  425. #define ACS_BULLET PDC_ACS('~')
  426. /* Teletype 5410v1 symbols -- these are defined in SysV curses, but
  427. are not well-supported by most terminals. Stick to VT100 characters
  428. for optimum portability. */
  429. #define ACS_LARROW PDC_ACS(',')
  430. #define ACS_RARROW PDC_ACS('+')
  431. #define ACS_DARROW PDC_ACS('.')
  432. #define ACS_UARROW PDC_ACS('-')
  433. #define ACS_BOARD PDC_ACS('h')
  434. #define ACS_LANTERN PDC_ACS('i')
  435. #define ACS_BLOCK PDC_ACS('0')
  436. /* That goes double for these -- undocumented SysV symbols. Don't use
  437. them. */
  438. #define ACS_S3 PDC_ACS('p')
  439. #define ACS_S7 PDC_ACS('r')
  440. #define ACS_LEQUAL PDC_ACS('y')
  441. #define ACS_GEQUAL PDC_ACS('z')
  442. #define ACS_PI PDC_ACS('{')
  443. #define ACS_NEQUAL PDC_ACS('|')
  444. #define ACS_STERLING PDC_ACS('}')
  445. /* Box char aliases */
  446. #define ACS_BSSB ACS_ULCORNER
  447. #define ACS_SSBB ACS_LLCORNER
  448. #define ACS_BBSS ACS_URCORNER
  449. #define ACS_SBBS ACS_LRCORNER
  450. #define ACS_SBSS ACS_RTEE
  451. #define ACS_SSSB ACS_LTEE
  452. #define ACS_SSBS ACS_BTEE
  453. #define ACS_BSSS ACS_TTEE
  454. #define ACS_BSBS ACS_HLINE
  455. #define ACS_SBSB ACS_VLINE
  456. #define ACS_SSSS ACS_PLUS
  457. /* cchar_t aliases */
  458. #ifdef PDC_WIDE
  459. # define WACS_ULCORNER (&(acs_map['l']))
  460. # define WACS_LLCORNER (&(acs_map['m']))
  461. # define WACS_URCORNER (&(acs_map['k']))
  462. # define WACS_LRCORNER (&(acs_map['j']))
  463. # define WACS_RTEE (&(acs_map['u']))
  464. # define WACS_LTEE (&(acs_map['t']))
  465. # define WACS_BTEE (&(acs_map['v']))
  466. # define WACS_TTEE (&(acs_map['w']))
  467. # define WACS_HLINE (&(acs_map['q']))
  468. # define WACS_VLINE (&(acs_map['x']))
  469. # define WACS_PLUS (&(acs_map['n']))
  470. # define WACS_S1 (&(acs_map['o']))
  471. # define WACS_S9 (&(acs_map['s']))
  472. # define WACS_DIAMOND (&(acs_map['`']))
  473. # define WACS_CKBOARD (&(acs_map['a']))
  474. # define WACS_DEGREE (&(acs_map['f']))
  475. # define WACS_PLMINUS (&(acs_map['g']))
  476. # define WACS_BULLET (&(acs_map['~']))
  477. # define WACS_LARROW (&(acs_map[',']))
  478. # define WACS_RARROW (&(acs_map['+']))
  479. # define WACS_DARROW (&(acs_map['.']))
  480. # define WACS_UARROW (&(acs_map['-']))
  481. # define WACS_BOARD (&(acs_map['h']))
  482. # define WACS_LANTERN (&(acs_map['i']))
  483. # define WACS_BLOCK (&(acs_map['0']))
  484. # define WACS_S3 (&(acs_map['p']))
  485. # define WACS_S7 (&(acs_map['r']))
  486. # define WACS_LEQUAL (&(acs_map['y']))
  487. # define WACS_GEQUAL (&(acs_map['z']))
  488. # define WACS_PI (&(acs_map['{']))
  489. # define WACS_NEQUAL (&(acs_map['|']))
  490. # define WACS_STERLING (&(acs_map['}']))
  491. # define WACS_BSSB WACS_ULCORNER
  492. # define WACS_SSBB WACS_LLCORNER
  493. # define WACS_BBSS WACS_URCORNER
  494. # define WACS_SBBS WACS_LRCORNER
  495. # define WACS_SBSS WACS_RTEE
  496. # define WACS_SSSB WACS_LTEE
  497. # define WACS_SSBS WACS_BTEE
  498. # define WACS_BSSS WACS_TTEE
  499. # define WACS_BSBS WACS_HLINE
  500. # define WACS_SBSB WACS_VLINE
  501. # define WACS_SSSS WACS_PLUS
  502. #endif
  503. /*** Color macros ***/
  504. #define COLOR_BLACK 0
  505. #ifdef PDC_RGB /* RGB */
  506. # define COLOR_RED 1
  507. # define COLOR_GREEN 2
  508. # define COLOR_BLUE 4
  509. #else /* BGR */
  510. # define COLOR_BLUE 1
  511. # define COLOR_GREEN 2
  512. # define COLOR_RED 4
  513. #endif
  514. #define COLOR_CYAN (COLOR_BLUE | COLOR_GREEN)
  515. #define COLOR_MAGENTA (COLOR_RED | COLOR_BLUE)
  516. #define COLOR_YELLOW (COLOR_RED | COLOR_GREEN)
  517. #define COLOR_WHITE 7
  518. /*----------------------------------------------------------------------
  519. *
  520. * Function and Keypad Key Definitions
  521. * Many are just for compatibility
  522. *
  523. */
  524. #define KEY_CODE_YES 0x100 /* If get_wch() gives a key code */
  525. #define KEY_BREAK 0x101 /* Not on PC KBD */
  526. #define KEY_DOWN 0x102 /* Down arrow key */
  527. #define KEY_UP 0x103 /* Up arrow key */
  528. #define KEY_LEFT 0x104 /* Left arrow key */
  529. #define KEY_RIGHT 0x105 /* Right arrow key */
  530. #define KEY_HOME 0x106 /* home key */
  531. #define KEY_BACKSPACE 0x107 /* not on pc */
  532. #define KEY_F0 0x108 /* function keys; 64 reserved */
  533. #define KEY_DL 0x148 /* delete line */
  534. #define KEY_IL 0x149 /* insert line */
  535. #define KEY_DC 0x14a /* delete character */
  536. #define KEY_IC 0x14b /* insert char or enter ins mode */
  537. #define KEY_EIC 0x14c /* exit insert char mode */
  538. #define KEY_CLEAR 0x14d /* clear screen */
  539. #define KEY_EOS 0x14e /* clear to end of screen */
  540. #define KEY_EOL 0x14f /* clear to end of line */
  541. #define KEY_SF 0x150 /* scroll 1 line forward */
  542. #define KEY_SR 0x151 /* scroll 1 line back (reverse) */
  543. #define KEY_NPAGE 0x152 /* next page */
  544. #define KEY_PPAGE 0x153 /* previous page */
  545. #define KEY_STAB 0x154 /* set tab */
  546. #define KEY_CTAB 0x155 /* clear tab */
  547. #define KEY_CATAB 0x156 /* clear all tabs */
  548. #define KEY_ENTER 0x157 /* enter or send (unreliable) */
  549. #define KEY_SRESET 0x158 /* soft/reset (partial/unreliable) */
  550. #define KEY_RESET 0x159 /* reset/hard reset (unreliable) */
  551. #define KEY_PRINT 0x15a /* print/copy */
  552. #define KEY_LL 0x15b /* home down/bottom (lower left) */
  553. #define KEY_ABORT 0x15c /* abort/terminate key (any) */
  554. #define KEY_SHELP 0x15d /* short help */
  555. #define KEY_LHELP 0x15e /* long help */
  556. #define KEY_BTAB 0x15f /* Back tab key */
  557. #define KEY_BEG 0x160 /* beg(inning) key */
  558. #define KEY_CANCEL 0x161 /* cancel key */
  559. #define KEY_CLOSE 0x162 /* close key */
  560. #define KEY_COMMAND 0x163 /* cmd (command) key */
  561. #define KEY_COPY 0x164 /* copy key */
  562. #define KEY_CREATE 0x165 /* create key */
  563. #define KEY_END 0x166 /* end key */
  564. #define KEY_EXIT 0x167 /* exit key */
  565. #define KEY_FIND 0x168 /* find key */
  566. #define KEY_HELP 0x169 /* help key */
  567. #define KEY_MARK 0x16a /* mark key */
  568. #define KEY_MESSAGE 0x16b /* message key */
  569. #define KEY_MOVE 0x16c /* move key */
  570. #define KEY_NEXT 0x16d /* next object key */
  571. #define KEY_OPEN 0x16e /* open key */
  572. #define KEY_OPTIONS 0x16f /* options key */
  573. #define KEY_PREVIOUS 0x170 /* previous object key */
  574. #define KEY_REDO 0x171 /* redo key */
  575. #define KEY_REFERENCE 0x172 /* ref(erence) key */
  576. #define KEY_REFRESH 0x173 /* refresh key */
  577. #define KEY_REPLACE 0x174 /* replace key */
  578. #define KEY_RESTART 0x175 /* restart key */
  579. #define KEY_RESUME 0x176 /* resume key */
  580. #define KEY_SAVE 0x177 /* save key */
  581. #define KEY_SBEG 0x178 /* shifted beginning key */
  582. #define KEY_SCANCEL 0x179 /* shifted cancel key */
  583. #define KEY_SCOMMAND 0x17a /* shifted command key */
  584. #define KEY_SCOPY 0x17b /* shifted copy key */
  585. #define KEY_SCREATE 0x17c /* shifted create key */
  586. #define KEY_SDC 0x17d /* shifted delete char key */
  587. #define KEY_SDL 0x17e /* shifted delete line key */
  588. #define KEY_SELECT 0x17f /* select key */
  589. #define KEY_SEND 0x180 /* shifted end key */
  590. #define KEY_SEOL 0x181 /* shifted clear line key */
  591. #define KEY_SEXIT 0x182 /* shifted exit key */
  592. #define KEY_SFIND 0x183 /* shifted find key */
  593. #define KEY_SHOME 0x184 /* shifted home key */
  594. #define KEY_SIC 0x185 /* shifted input key */
  595. #define KEY_SLEFT 0x187 /* shifted left arrow key */
  596. #define KEY_SMESSAGE 0x188 /* shifted message key */
  597. #define KEY_SMOVE 0x189 /* shifted move key */
  598. #define KEY_SNEXT 0x18a /* shifted next key */
  599. #define KEY_SOPTIONS 0x18b /* shifted options key */
  600. #define KEY_SPREVIOUS 0x18c /* shifted prev key */
  601. #define KEY_SPRINT 0x18d /* shifted print key */
  602. #define KEY_SREDO 0x18e /* shifted redo key */
  603. #define KEY_SREPLACE 0x18f /* shifted replace key */
  604. #define KEY_SRIGHT 0x190 /* shifted right arrow */
  605. #define KEY_SRSUME 0x191 /* shifted resume key */
  606. #define KEY_SSAVE 0x192 /* shifted save key */
  607. #define KEY_SSUSPEND 0x193 /* shifted suspend key */
  608. #define KEY_SUNDO 0x194 /* shifted undo key */
  609. #define KEY_SUSPEND 0x195 /* suspend key */
  610. #define KEY_UNDO 0x196 /* undo key */
  611. /* PDCurses-specific key definitions -- PC only */
  612. #define ALT_0 0x197
  613. #define ALT_1 0x198
  614. #define ALT_2 0x199
  615. #define ALT_3 0x19a
  616. #define ALT_4 0x19b
  617. #define ALT_5 0x19c
  618. #define ALT_6 0x19d
  619. #define ALT_7 0x19e
  620. #define ALT_8 0x19f
  621. #define ALT_9 0x1a0
  622. #define ALT_A 0x1a1
  623. #define ALT_B 0x1a2
  624. #define ALT_C 0x1a3
  625. #define ALT_D 0x1a4
  626. #define ALT_E 0x1a5
  627. #define ALT_F 0x1a6
  628. #define ALT_G 0x1a7
  629. #define ALT_H 0x1a8
  630. #define ALT_I 0x1a9
  631. #define ALT_J 0x1aa
  632. #define ALT_K 0x1ab
  633. #define ALT_L 0x1ac
  634. #define ALT_M 0x1ad
  635. #define ALT_N 0x1ae
  636. #define ALT_O 0x1af
  637. #define ALT_P 0x1b0
  638. #define ALT_Q 0x1b1
  639. #define ALT_R 0x1b2
  640. #define ALT_S 0x1b3
  641. #define ALT_T 0x1b4
  642. #define ALT_U 0x1b5
  643. #define ALT_V 0x1b6
  644. #define ALT_W 0x1b7
  645. #define ALT_X 0x1b8
  646. #define ALT_Y 0x1b9
  647. #define ALT_Z 0x1ba
  648. #define CTL_LEFT 0x1bb /* Control-Left-Arrow */
  649. #define CTL_RIGHT 0x1bc
  650. #define CTL_PGUP 0x1bd
  651. #define CTL_PGDN 0x1be
  652. #define CTL_HOME 0x1bf
  653. #define CTL_END 0x1c0
  654. #define KEY_A1 0x1c1 /* upper left on Virtual keypad */
  655. #define KEY_A2 0x1c2 /* upper middle on Virt. keypad */
  656. #define KEY_A3 0x1c3 /* upper right on Vir. keypad */
  657. #define KEY_B1 0x1c4 /* middle left on Virt. keypad */
  658. #define KEY_B2 0x1c5 /* center on Virt. keypad */
  659. #define KEY_B3 0x1c6 /* middle right on Vir. keypad */
  660. #define KEY_C1 0x1c7 /* lower left on Virt. keypad */
  661. #define KEY_C2 0x1c8 /* lower middle on Virt. keypad */
  662. #define KEY_C3 0x1c9 /* lower right on Vir. keypad */
  663. #define PADSLASH 0x1ca /* slash on keypad */
  664. #define PADENTER 0x1cb /* enter on keypad */
  665. #define CTL_PADENTER 0x1cc /* ctl-enter on keypad */
  666. #define ALT_PADENTER 0x1cd /* alt-enter on keypad */
  667. #define PADSTOP 0x1ce /* stop on keypad */
  668. #define PADSTAR 0x1cf /* star on keypad */
  669. #define PADMINUS 0x1d0 /* minus on keypad */
  670. #define PADPLUS 0x1d1 /* plus on keypad */
  671. #define CTL_PADSTOP 0x1d2 /* ctl-stop on keypad */
  672. #define CTL_PADCENTER 0x1d3 /* ctl-enter on keypad */
  673. #define CTL_PADPLUS 0x1d4 /* ctl-plus on keypad */
  674. #define CTL_PADMINUS 0x1d5 /* ctl-minus on keypad */
  675. #define CTL_PADSLASH 0x1d6 /* ctl-slash on keypad */
  676. #define CTL_PADSTAR 0x1d7 /* ctl-star on keypad */
  677. #define ALT_PADPLUS 0x1d8 /* alt-plus on keypad */
  678. #define ALT_PADMINUS 0x1d9 /* alt-minus on keypad */
  679. #define ALT_PADSLASH 0x1da /* alt-slash on keypad */
  680. #define ALT_PADSTAR 0x1db /* alt-star on keypad */
  681. #define ALT_PADSTOP 0x1dc /* alt-stop on keypad */
  682. #define CTL_INS 0x1dd /* ctl-insert */
  683. #define ALT_DEL 0x1de /* alt-delete */
  684. #define ALT_INS 0x1df /* alt-insert */
  685. #define CTL_UP 0x1e0 /* ctl-up arrow */
  686. #define CTL_DOWN 0x1e1 /* ctl-down arrow */
  687. #define CTL_TAB 0x1e2 /* ctl-tab */
  688. #define ALT_TAB 0x1e3
  689. #define ALT_MINUS 0x1e4
  690. #define ALT_EQUAL 0x1e5
  691. #define ALT_HOME 0x1e6
  692. #define ALT_PGUP 0x1e7
  693. #define ALT_PGDN 0x1e8
  694. #define ALT_END 0x1e9
  695. #define ALT_UP 0x1ea /* alt-up arrow */
  696. #define ALT_DOWN 0x1eb /* alt-down arrow */
  697. #define ALT_RIGHT 0x1ec /* alt-right arrow */
  698. #define ALT_LEFT 0x1ed /* alt-left arrow */
  699. #define ALT_ENTER 0x1ee /* alt-enter */
  700. #define ALT_ESC 0x1ef /* alt-escape */
  701. #define ALT_BQUOTE 0x1f0 /* alt-back quote */
  702. #define ALT_LBRACKET 0x1f1 /* alt-left bracket */
  703. #define ALT_RBRACKET 0x1f2 /* alt-right bracket */
  704. #define ALT_SEMICOLON 0x1f3 /* alt-semi-colon */
  705. #define ALT_FQUOTE 0x1f4 /* alt-forward quote */
  706. #define ALT_COMMA 0x1f5 /* alt-comma */
  707. #define ALT_STOP 0x1f6 /* alt-stop */
  708. #define ALT_FSLASH 0x1f7 /* alt-forward slash */
  709. #define ALT_BKSP 0x1f8 /* alt-backspace */
  710. #define CTL_BKSP 0x1f9 /* ctl-backspace */
  711. #define PAD0 0x1fa /* keypad 0 */
  712. #define CTL_PAD0 0x1fb /* ctl-keypad 0 */
  713. #define CTL_PAD1 0x1fc
  714. #define CTL_PAD2 0x1fd
  715. #define CTL_PAD3 0x1fe
  716. #define CTL_PAD4 0x1ff
  717. #define CTL_PAD5 0x200
  718. #define CTL_PAD6 0x201
  719. #define CTL_PAD7 0x202
  720. #define CTL_PAD8 0x203
  721. #define CTL_PAD9 0x204
  722. #define ALT_PAD0 0x205 /* alt-keypad 0 */
  723. #define ALT_PAD1 0x206
  724. #define ALT_PAD2 0x207
  725. #define ALT_PAD3 0x208
  726. #define ALT_PAD4 0x209
  727. #define ALT_PAD5 0x20a
  728. #define ALT_PAD6 0x20b
  729. #define ALT_PAD7 0x20c
  730. #define ALT_PAD8 0x20d
  731. #define ALT_PAD9 0x20e
  732. #define CTL_DEL 0x20f /* clt-delete */
  733. #define ALT_BSLASH 0x210 /* alt-back slash */
  734. #define CTL_ENTER 0x211 /* ctl-enter */
  735. #define SHF_PADENTER 0x212 /* shift-enter on keypad */
  736. #define SHF_PADSLASH 0x213 /* shift-slash on keypad */
  737. #define SHF_PADSTAR 0x214 /* shift-star on keypad */
  738. #define SHF_PADPLUS 0x215 /* shift-plus on keypad */
  739. #define SHF_PADMINUS 0x216 /* shift-minus on keypad */
  740. #define SHF_UP 0x217 /* shift-up on keypad */
  741. #define SHF_DOWN 0x218 /* shift-down on keypad */
  742. #define SHF_IC 0x219 /* shift-insert on keypad */
  743. #define SHF_DC 0x21a /* shift-delete on keypad */
  744. #define KEY_MOUSE 0x21b /* "mouse" key */
  745. #define KEY_SHIFT_L 0x21c /* Left-shift */
  746. #define KEY_SHIFT_R 0x21d /* Right-shift */
  747. #define KEY_CONTROL_L 0x21e /* Left-control */
  748. #define KEY_CONTROL_R 0x21f /* Right-control */
  749. #define KEY_ALT_L 0x220 /* Left-alt */
  750. #define KEY_ALT_R 0x221 /* Right-alt */
  751. #define KEY_RESIZE 0x222 /* Window resize */
  752. #define KEY_SUP 0x223 /* Shifted up arrow */
  753. #define KEY_SDOWN 0x224 /* Shifted down arrow */
  754. #define KEY_MIN KEY_BREAK /* Minimum curses key value */
  755. #define KEY_MAX KEY_SDOWN /* Maximum curses key */
  756. #define KEY_F(n) (KEY_F0 + (n))
  757. /*----------------------------------------------------------------------
  758. *
  759. * Functions
  760. *
  761. */
  762. /* Standard */
  763. PDCEX int addch(const chtype);
  764. PDCEX int addchnstr(const chtype *, int);
  765. PDCEX int addchstr(const chtype *);
  766. PDCEX int addnstr(const char *, int);
  767. PDCEX int addstr(const char *);
  768. PDCEX int attroff(chtype);
  769. PDCEX int attron(chtype);
  770. PDCEX int attrset(chtype);
  771. PDCEX int attr_get(attr_t *, short *, void *);
  772. PDCEX int attr_off(attr_t, void *);
  773. PDCEX int attr_on(attr_t, void *);
  774. PDCEX int attr_set(attr_t, short, void *);
  775. PDCEX int baudrate(void);
  776. PDCEX int beep(void);
  777. PDCEX int bkgd(chtype);
  778. PDCEX void bkgdset(chtype);
  779. PDCEX int border(chtype, chtype, chtype, chtype,
  780. chtype, chtype, chtype, chtype);
  781. PDCEX int box(WINDOW *, chtype, chtype);
  782. PDCEX bool can_change_color(void);
  783. PDCEX int cbreak(void);
  784. PDCEX int chgat(int, attr_t, short, const void *);
  785. PDCEX int clearok(WINDOW *, bool);
  786. PDCEX int clear(void);
  787. PDCEX int clrtobot(void);
  788. PDCEX int clrtoeol(void);
  789. PDCEX int color_content(short, short *, short *, short *);
  790. PDCEX int color_set(short, void *);
  791. PDCEX int copywin(const WINDOW *, WINDOW *, int, int, int,
  792. int, int, int, int);
  793. PDCEX int curs_set(int);
  794. PDCEX int def_prog_mode(void);
  795. PDCEX int def_shell_mode(void);
  796. PDCEX int delay_output(int);
  797. PDCEX int delch(void);
  798. PDCEX int deleteln(void);
  799. PDCEX void delscreen(SCREEN *);
  800. PDCEX int delwin(WINDOW *);
  801. PDCEX WINDOW *derwin(WINDOW *, int, int, int, int);
  802. PDCEX int doupdate(void);
  803. PDCEX WINDOW *dupwin(WINDOW *);
  804. PDCEX int echochar(const chtype);
  805. PDCEX int echo(void);
  806. PDCEX int endwin(void);
  807. PDCEX char erasechar(void);
  808. PDCEX int erase(void);
  809. PDCEX void filter(void);
  810. PDCEX int flash(void);
  811. PDCEX int flushinp(void);
  812. PDCEX chtype getbkgd(WINDOW *);
  813. PDCEX int getnstr(char *, int);
  814. PDCEX int getstr(char *);
  815. PDCEX WINDOW *getwin(FILE *);
  816. PDCEX int halfdelay(int);
  817. PDCEX bool has_colors(void);
  818. PDCEX bool has_ic(void);
  819. PDCEX bool has_il(void);
  820. PDCEX int hline(chtype, int);
  821. PDCEX void idcok(WINDOW *, bool);
  822. PDCEX int idlok(WINDOW *, bool);
  823. PDCEX void immedok(WINDOW *, bool);
  824. PDCEX int inchnstr(chtype *, int);
  825. PDCEX int inchstr(chtype *);
  826. PDCEX chtype inch(void);
  827. PDCEX int init_color(short, short, short, short);
  828. PDCEX int init_pair(short, short, short);
  829. PDCEX WINDOW *initscr(void);
  830. PDCEX int innstr(char *, int);
  831. PDCEX int insch(chtype);
  832. PDCEX int insdelln(int);
  833. PDCEX int insertln(void);
  834. PDCEX int insnstr(const char *, int);
  835. PDCEX int insstr(const char *);
  836. PDCEX int instr(char *);
  837. PDCEX int intrflush(WINDOW *, bool);
  838. PDCEX bool isendwin(void);
  839. PDCEX bool is_linetouched(WINDOW *, int);
  840. PDCEX bool is_wintouched(WINDOW *);
  841. PDCEX char *keyname(int);
  842. PDCEX int keypad(WINDOW *, bool);
  843. PDCEX char killchar(void);
  844. PDCEX int leaveok(WINDOW *, bool);
  845. PDCEX char *longname(void);
  846. PDCEX int meta(WINDOW *, bool);
  847. PDCEX int move(int, int);
  848. PDCEX int mvaddch(int, int, const chtype);
  849. PDCEX int mvaddchnstr(int, int, const chtype *, int);
  850. PDCEX int mvaddchstr(int, int, const chtype *);
  851. PDCEX int mvaddnstr(int, int, const char *, int);
  852. PDCEX int mvaddstr(int, int, const char *);
  853. PDCEX int mvchgat(int, int, int, attr_t, short, const void *);
  854. PDCEX int mvcur(int, int, int, int);
  855. PDCEX int mvdelch(int, int);
  856. PDCEX int mvderwin(WINDOW *, int, int);
  857. PDCEX int mvgetch(int, int);
  858. PDCEX int mvgetnstr(int, int, char *, int);
  859. PDCEX int mvgetstr(int, int, char *);
  860. PDCEX int mvhline(int, int, chtype, int);
  861. PDCEX chtype mvinch(int, int);
  862. PDCEX int mvinchnstr(int, int, chtype *, int);
  863. PDCEX int mvinchstr(int, int, chtype *);
  864. PDCEX int mvinnstr(int, int, char *, int);
  865. PDCEX int mvinsch(int, int, chtype);
  866. PDCEX int mvinsnstr(int, int, const char *, int);
  867. PDCEX int mvinsstr(int, int, const char *);
  868. PDCEX int mvinstr(int, int, char *);
  869. PDCEX int mvprintw(int, int, const char *, ...);
  870. PDCEX int mvscanw(int, int, const char *, ...);
  871. PDCEX int mvvline(int, int, chtype, int);
  872. PDCEX int mvwaddchnstr(WINDOW *, int, int, const chtype *, int);
  873. PDCEX int mvwaddchstr(WINDOW *, int, int, const chtype *);
  874. PDCEX int mvwaddch(WINDOW *, int, int, const chtype);
  875. PDCEX int mvwaddnstr(WINDOW *, int, int, const char *, int);
  876. PDCEX int mvwaddstr(WINDOW *, int, int, const char *);
  877. PDCEX int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *);
  878. PDCEX int mvwdelch(WINDOW *, int, int);
  879. PDCEX int mvwgetch(WINDOW *, int, int);
  880. PDCEX int mvwgetnstr(WINDOW *, int, int, char *, int);
  881. PDCEX int mvwgetstr(WINDOW *, int, int, char *);
  882. PDCEX int mvwhline(WINDOW *, int, int, chtype, int);
  883. PDCEX int mvwinchnstr(WINDOW *, int, int, chtype *, int);
  884. PDCEX int mvwinchstr(WINDOW *, int, int, chtype *);
  885. PDCEX chtype mvwinch(WINDOW *, int, int);
  886. PDCEX int mvwinnstr(WINDOW *, int, int, char *, int);
  887. PDCEX int mvwinsch(WINDOW *, int, int, chtype);
  888. PDCEX int mvwinsnstr(WINDOW *, int, int, const char *, int);
  889. PDCEX int mvwinsstr(WINDOW *, int, int, const char *);
  890. PDCEX int mvwinstr(WINDOW *, int, int, char *);
  891. PDCEX int mvwin(WINDOW *, int, int);
  892. PDCEX int mvwprintw(WINDOW *, int, int, const char *, ...);
  893. PDCEX int mvwscanw(WINDOW *, int, int, const char *, ...);
  894. PDCEX int mvwvline(WINDOW *, int, int, chtype, int);
  895. PDCEX int napms(int);
  896. PDCEX WINDOW *newpad(int, int);
  897. PDCEX SCREEN *newterm(const char *, FILE *, FILE *);
  898. PDCEX WINDOW *newwin(int, int, int, int);
  899. PDCEX int nl(void);
  900. PDCEX int nocbreak(void);
  901. PDCEX int nodelay(WINDOW *, bool);
  902. PDCEX int noecho(void);
  903. PDCEX int nonl(void);
  904. PDCEX void noqiflush(void);
  905. PDCEX int noraw(void);
  906. PDCEX int notimeout(WINDOW *, bool);
  907. PDCEX int overlay(const WINDOW *, WINDOW *);
  908. PDCEX int overwrite(const WINDOW *, WINDOW *);
  909. PDCEX int pair_content(short, short *, short *);
  910. PDCEX int pechochar(WINDOW *, chtype);
  911. PDCEX int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
  912. PDCEX int prefresh(WINDOW *, int, int, int, int, int, int);
  913. PDCEX int printw(const char *, ...);
  914. PDCEX int putwin(WINDOW *, FILE *);
  915. PDCEX void qiflush(void);
  916. PDCEX int raw(void);
  917. PDCEX int redrawwin(WINDOW *);
  918. PDCEX int refresh(void);
  919. PDCEX int reset_prog_mode(void);
  920. PDCEX int reset_shell_mode(void);
  921. PDCEX int resetty(void);
  922. PDCEX int ripoffline(int, int (*)(WINDOW *, int));
  923. PDCEX int savetty(void);
  924. PDCEX int scanw(const char *, ...);
  925. PDCEX int scr_dump(const char *);
  926. PDCEX int scr_init(const char *);
  927. PDCEX int scr_restore(const char *);
  928. PDCEX int scr_set(const char *);
  929. PDCEX int scrl(int);
  930. PDCEX int scroll(WINDOW *);
  931. PDCEX int scrollok(WINDOW *, bool);
  932. PDCEX SCREEN *set_term(SCREEN *);
  933. PDCEX int setscrreg(int, int);
  934. PDCEX int slk_attroff(const chtype);
  935. PDCEX int slk_attr_off(const attr_t, void *);
  936. PDCEX int slk_attron(const chtype);
  937. PDCEX int slk_attr_on(const attr_t, void *);
  938. PDCEX int slk_attrset(const chtype);
  939. PDCEX int slk_attr_set(const attr_t, short, void *);
  940. PDCEX int slk_clear(void);
  941. PDCEX int slk_color(short);
  942. PDCEX int slk_init(int);
  943. PDCEX char *slk_label(int);
  944. PDCEX int slk_noutrefresh(void);
  945. PDCEX int slk_refresh(void);
  946. PDCEX int slk_restore(void);
  947. PDCEX int slk_set(int, const char *, int);
  948. PDCEX int slk_touch(void);
  949. PDCEX int standend(void);
  950. PDCEX int standout(void);
  951. PDCEX int start_color(void);
  952. PDCEX WINDOW *subpad(WINDOW *, int, int, int, int);
  953. PDCEX WINDOW *subwin(WINDOW *, int, int, int, int);
  954. PDCEX int syncok(WINDOW *, bool);
  955. PDCEX chtype termattrs(void);
  956. PDCEX attr_t term_attrs(void);
  957. PDCEX char *termname(void);
  958. PDCEX void timeout(int);
  959. PDCEX int touchline(WINDOW *, int, int);
  960. PDCEX int touchwin(WINDOW *);
  961. PDCEX int typeahead(int);
  962. PDCEX int untouchwin(WINDOW *);
  963. PDCEX void use_env(bool);
  964. PDCEX int vidattr(chtype);
  965. PDCEX int vid_attr(attr_t, short, void *);
  966. PDCEX int vidputs(chtype, int (*)(int));
  967. PDCEX int vid_puts(attr_t, short, void *, int (*)(int));
  968. PDCEX int vline(chtype, int);
  969. PDCEX int vw_printw(WINDOW *, const char *, va_list);
  970. PDCEX int vwprintw(WINDOW *, const char *, va_list);
  971. PDCEX int vw_scanw(WINDOW *, const char *, va_list);
  972. PDCEX int vwscanw(WINDOW *, const char *, va_list);
  973. PDCEX int waddchnstr(WINDOW *, const chtype *, int);
  974. PDCEX int waddchstr(WINDOW *, const chtype *);
  975. PDCEX int waddch(WINDOW *, const chtype);
  976. PDCEX int waddnstr(WINDOW *, const char *, int);
  977. PDCEX int waddstr(WINDOW *, const char *);
  978. PDCEX int wattroff(WINDOW *, chtype);
  979. PDCEX int wattron(WINDOW *, chtype);
  980. PDCEX int wattrset(WINDOW *, chtype);
  981. PDCEX int wattr_get(WINDOW *, attr_t *, short *, void *);
  982. PDCEX int wattr_off(WINDOW *, attr_t, void *);
  983. PDCEX int wattr_on(WINDOW *, attr_t, void *);
  984. PDCEX int wattr_set(WINDOW *, attr_t, short, void *);
  985. PDCEX void wbkgdset(WINDOW *, chtype);
  986. PDCEX int wbkgd(WINDOW *, chtype);
  987. PDCEX int wborder(WINDOW *, chtype, chtype, chtype, chtype,
  988. chtype, chtype, chtype, chtype);
  989. PDCEX int wchgat(WINDOW *, int, attr_t, short, const void *);
  990. PDCEX int wclear(WINDOW *);
  991. PDCEX int wclrtobot(WINDOW *);
  992. PDCEX int wclrtoeol(WINDOW *);
  993. PDCEX int wcolor_set(WINDOW *, short, void *);
  994. PDCEX void wcursyncup(WINDOW *);
  995. PDCEX int wdelch(WINDOW *);
  996. PDCEX int wdeleteln(WINDOW *);
  997. PDCEX int wechochar(WINDOW *, const chtype);
  998. PDCEX int werase(WINDOW *);
  999. PDCEX int wgetch(WINDOW *);
  1000. PDCEX int wgetnstr(WINDOW *, char *, int);
  1001. PDCEX int wgetstr(WINDOW *, char *);
  1002. PDCEX int whline(WINDOW *, chtype, int);
  1003. PDCEX int winchnstr(WINDOW *, chtype *, int);
  1004. PDCEX int winchstr(WINDOW *, chtype *);
  1005. PDCEX chtype winch(WINDOW *);
  1006. PDCEX int winnstr(WINDOW *, char *, int);
  1007. PDCEX int winsch(WINDOW *, chtype);
  1008. PDCEX int winsdelln(WINDOW *, int);
  1009. PDCEX int winsertln(WINDOW *);
  1010. PDCEX int winsnstr(WINDOW *, const char *, int);
  1011. PDCEX int winsstr(WINDOW *, const char *);
  1012. PDCEX int winstr(WINDOW *, char *);
  1013. PDCEX int wmove(WINDOW *, int, int);
  1014. PDCEX int wnoutrefresh(WINDOW *);
  1015. PDCEX int wprintw(WINDOW *, const char *, ...);
  1016. PDCEX int wredrawln(WINDOW *, int, int);
  1017. PDCEX int wrefresh(WINDOW *);
  1018. PDCEX int wscanw(WINDOW *, const char *, ...);
  1019. PDCEX int wscrl(WINDOW *, int);
  1020. PDCEX int wsetscrreg(WINDOW *, int, int);
  1021. PDCEX int wstandend(WINDOW *);
  1022. PDCEX int wstandout(WINDOW *);
  1023. PDCEX void wsyncdown(WINDOW *);
  1024. PDCEX void wsyncup(WINDOW *);
  1025. PDCEX void wtimeout(WINDOW *, int);
  1026. PDCEX int wtouchln(WINDOW *, int, int, int);
  1027. PDCEX int wvline(WINDOW *, chtype, int);
  1028. /* Wide-character functions */
  1029. #ifdef PDC_WIDE
  1030. PDCEX int addnwstr(const wchar_t *, int);
  1031. PDCEX int addwstr(const wchar_t *);
  1032. PDCEX int add_wch(const cchar_t *);
  1033. PDCEX int add_wchnstr(const cchar_t *, int);
  1034. PDCEX int add_wchstr(const cchar_t *);
  1035. PDCEX int bkgrnd(const cchar_t *);
  1036. PDCEX void bkgrndset(const cchar_t *);
  1037. PDCEX int border_set(const cchar_t *, const cchar_t *, const cchar_t *,
  1038. const cchar_t *, const cchar_t *, const cchar_t *,
  1039. const cchar_t *, const cchar_t *);
  1040. PDCEX int box_set(WINDOW *, const cchar_t *, const cchar_t *);
  1041. PDCEX int echo_wchar(const cchar_t *);
  1042. PDCEX int erasewchar(wchar_t *);
  1043. PDCEX int getbkgrnd(cchar_t *);
  1044. PDCEX int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *);
  1045. PDCEX int getn_wstr(wint_t *, int);
  1046. PDCEX int get_wch(wint_t *);
  1047. PDCEX int get_wstr(wint_t *);
  1048. PDCEX int hline_set(const cchar_t *, int);
  1049. PDCEX int innwstr(wchar_t *, int);
  1050. PDCEX int ins_nwstr(const wchar_t *, int);
  1051. PDCEX int ins_wch(const cchar_t *);
  1052. PDCEX int ins_wstr(const wchar_t *);
  1053. PDCEX int inwstr(wchar_t *);
  1054. PDCEX int in_wch(cchar_t *);
  1055. PDCEX int in_wchnstr(cchar_t *, int);
  1056. PDCEX int in_wchstr(cchar_t *);
  1057. PDCEX char *key_name(wchar_t);
  1058. PDCEX int killwchar(wchar_t *);
  1059. PDCEX int mvaddnwstr(int, int, const wchar_t *, int);
  1060. PDCEX int mvaddwstr(int, int, const wchar_t *);
  1061. PDCEX int mvadd_wch(int, int, const cchar_t *);
  1062. PDCEX int mvadd_wchnstr(int, int, const cchar_t *, int);
  1063. PDCEX int mvadd_wchstr(int, int, const cchar_t *);
  1064. PDCEX int mvgetn_wstr(int, int, wint_t *, int);
  1065. PDCEX int mvget_wch(int, int, wint_t *);
  1066. PDCEX int mvget_wstr(int, int, wint_t *);
  1067. PDCEX int mvhline_set(int, int, const cchar_t *, int);
  1068. PDCEX int mvinnwstr(int, int, wchar_t *, int);
  1069. PDCEX int mvins_nwstr(int, int, const wchar_t *, int);
  1070. PDCEX int mvins_wch(int, int, const cchar_t *);
  1071. PDCEX int mvins_wstr(int, int, const wchar_t *);
  1072. PDCEX int mvinwstr(int, int, wchar_t *);
  1073. PDCEX int mvin_wch(int, int, cchar_t *);
  1074. PDCEX int mvin_wchnstr(int, int, cchar_t *, int);
  1075. PDCEX int mvin_wchstr(int, int, cchar_t *);
  1076. PDCEX int mvvline_set(int, int, const cchar_t *, int);
  1077. PDCEX int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int);
  1078. PDCEX int mvwaddwstr(WINDOW *, int, int, const wchar_t *);
  1079. PDCEX int mvwadd_wch(WINDOW *, int, int, const cchar_t *);
  1080. PDCEX int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int);
  1081. PDCEX int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *);
  1082. PDCEX int mvwgetn_wstr(WINDOW *, int, int, wint_t *, int);
  1083. PDCEX int mvwget_wch(WINDOW *, int, int, wint_t *);
  1084. PDCEX int mvwget_wstr(WINDOW *, int, int, wint_t *);
  1085. PDCEX int mvwhline_set(WINDOW *, int, int, const cchar_t *, int);
  1086. PDCEX int mvwinnwstr(WINDOW *, int, int, wchar_t *, int);
  1087. PDCEX int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int);
  1088. PDCEX int mvwins_wch(WINDOW *, int, int, const cchar_t *);
  1089. PDCEX int mvwins_wstr(WINDOW *, int, int, const wchar_t *);
  1090. PDCEX int mvwin_wch(WINDOW *, int, int, cchar_t *);
  1091. PDCEX int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int);
  1092. PDCEX int mvwin_wchstr(WINDOW *, int, int, cchar_t *);
  1093. PDCEX int mvwinwstr(WINDOW *, int, int, wchar_t *);
  1094. PDCEX int mvwvline_set(WINDOW *, int, int, const cchar_t *, int);
  1095. PDCEX int pecho_wchar(WINDOW *, const cchar_t*);
  1096. PDCEX int setcchar(cchar_t*, const wchar_t*, const attr_t,
  1097. short, const void*);
  1098. PDCEX int slk_wset(int, const wchar_t *, int);
  1099. PDCEX int unget_wch(const wchar_t);
  1100. PDCEX int vline_set(const cchar_t *, int);
  1101. PDCEX int waddnwstr(WINDOW *, const wchar_t *, int);
  1102. PDCEX int waddwstr(WINDOW *, const wchar_t *);
  1103. PDCEX int wadd_wch(WINDOW *, const cchar_t *);
  1104. PDCEX int wadd_wchnstr(WINDOW *, const cchar_t *, int);
  1105. PDCEX int wadd_wchstr(WINDOW *, const cchar_t *);
  1106. PDCEX int wbkgrnd(WINDOW *, const cchar_t *);
  1107. PDCEX void wbkgrndset(WINDOW *, const cchar_t *);
  1108. PDCEX int wborder_set(WINDOW *, const cchar_t *, const cchar_t *,
  1109. const cchar_t *, const cchar_t *, const cchar_t *,
  1110. const cchar_t *, const cchar_t *, const cchar_t *);
  1111. PDCEX int wecho_wchar(WINDOW *, const cchar_t *);
  1112. PDCEX int wgetbkgrnd(WINDOW *, cchar_t *);
  1113. PDCEX int wgetn_wstr(WINDOW *, wint_t *, int);
  1114. PDCEX int wget_wch(WINDOW *, wint_t *);
  1115. PDCEX int wget_wstr(WINDOW *, wint_t *);
  1116. PDCEX int whline_set(WINDOW *, const cchar_t *, int);
  1117. PDCEX int winnwstr(WINDOW *, wchar_t *, int);
  1118. PDCEX int wins_nwstr(WINDOW *, const wchar_t *, int);
  1119. PDCEX int wins_wch(WINDOW *, const cchar_t *);
  1120. PDCEX int wins_wstr(WINDOW *, const wchar_t *);
  1121. PDCEX int winwstr(WINDOW *, wchar_t *);
  1122. PDCEX int win_wch(WINDOW *, cchar_t *);
  1123. PDCEX int win_wchnstr(WINDOW *, cchar_t *, int);
  1124. PDCEX int win_wchstr(WINDOW *, cchar_t *);
  1125. PDCEX wchar_t *wunctrl(cchar_t *);
  1126. PDCEX int wvline_set(WINDOW *, const cchar_t *, int);
  1127. #endif
  1128. /* Quasi-standard */
  1129. PDCEX chtype getattrs(WINDOW *);
  1130. PDCEX int getbegx(WINDOW *);
  1131. PDCEX int getbegy(WINDOW *);
  1132. PDCEX int getmaxx(WINDOW *);
  1133. PDCEX int getmaxy(WINDOW *);
  1134. PDCEX int getparx(WINDOW *);
  1135. PDCEX int getpary(WINDOW *);
  1136. PDCEX int getcurx(WINDOW *);
  1137. PDCEX int getcury(WINDOW *);
  1138. PDCEX void traceoff(void);
  1139. PDCEX void traceon(void);
  1140. PDCEX char *unctrl(chtype);
  1141. PDCEX int crmode(void);
  1142. PDCEX int nocrmode(void);
  1143. PDCEX int draino(int);
  1144. PDCEX int resetterm(void);
  1145. PDCEX int fixterm(void);
  1146. PDCEX int saveterm(void);
  1147. PDCEX void setsyx(int, int);
  1148. PDCEX int mouse_set(mmask_t);
  1149. PDCEX int mouse_on(mmask_t);
  1150. PDCEX int mouse_off(mmask_t);
  1151. PDCEX int request_mouse_pos(void);
  1152. PDCEX void wmouse_position(WINDOW *, int *, int *);
  1153. PDCEX mmask_t getmouse(void);
  1154. /* ncurses */
  1155. PDCEX int alloc_pair(int, int);
  1156. PDCEX int assume_default_colors(int, int);
  1157. PDCEX const char *curses_version(void);
  1158. PDCEX int find_pair(int, int);
  1159. PDCEX int free_pair(int);
  1160. PDCEX bool has_key(int);
  1161. PDCEX bool is_keypad(const WINDOW *);
  1162. PDCEX bool is_leaveok(const WINDOW *);
  1163. PDCEX bool is_pad(const WINDOW *);
  1164. PDCEX int set_tabsize(int);
  1165. PDCEX int use_default_colors(void);
  1166. PDCEX int wresize(WINDOW *, int, int);
  1167. PDCEX bool has_mouse(void);
  1168. PDCEX int mouseinterval(int);
  1169. PDCEX mmask_t mousemask(mmask_t, mmask_t *);
  1170. PDCEX bool mouse_trafo(int *, int *, bool);
  1171. PDCEX int nc_getmouse(MEVENT *);
  1172. PDCEX int ungetmouse(MEVENT *);
  1173. PDCEX bool wenclose(const WINDOW *, int, int);
  1174. PDCEX bool wmouse_trafo(const WINDOW *, int *, int *, bool);
  1175. /* PDCurses */
  1176. PDCEX int addrawch(chtype);
  1177. PDCEX int insrawch(chtype);
  1178. PDCEX bool is_termresized(void);
  1179. PDCEX int mvaddrawch(int, int, chtype);
  1180. PDCEX int mvdeleteln(int, int);
  1181. PDCEX int mvinsertln(int, int);
  1182. PDCEX int mvinsrawch(int, int, chtype);
  1183. PDCEX int mvwaddrawch(WINDOW *, int, int, chtype);
  1184. PDCEX int mvwdeleteln(WINDOW *, int, int);
  1185. PDCEX int mvwinsertln(WINDOW *, int, int);
  1186. PDCEX int mvwinsrawch(WINDOW *, int, int, chtype);
  1187. PDCEX int raw_output(bool);
  1188. PDCEX int resize_term(int, int);
  1189. PDCEX WINDOW *resize_window(WINDOW *, int, int);
  1190. PDCEX int waddrawch(WINDOW *, chtype);
  1191. PDCEX int winsrawch(WINDOW *, chtype);
  1192. PDCEX char wordchar(void);
  1193. #ifdef PDC_WIDE
  1194. PDCEX wchar_t *slk_wlabel(int);
  1195. #endif
  1196. PDCEX void PDC_debug(const char *, ...);
  1197. PDCEX void PDC_get_version(PDC_VERSION *);
  1198. PDCEX int PDC_ungetch(int);
  1199. PDCEX int PDC_set_blink(bool);
  1200. PDCEX int PDC_set_bold(bool);
  1201. PDCEX int PDC_set_line_color(short);
  1202. PDCEX void PDC_set_title(const char *);
  1203. PDCEX int PDC_clearclipboard(void);
  1204. PDCEX int PDC_freeclipboard(char *);
  1205. PDCEX int PDC_getclipboard(char **, long *);
  1206. PDCEX int PDC_setclipboard(const char *, long);
  1207. PDCEX unsigned long PDC_get_key_modifiers(void);
  1208. PDCEX int PDC_return_key_modifiers(bool);
  1209. #ifdef XCURSES
  1210. PDCEX WINDOW *Xinitscr(int, char **);
  1211. PDCEX void XCursesExit(void);
  1212. PDCEX int sb_init(void);
  1213. PDCEX int sb_set_horz(int, int, int);
  1214. PDCEX int sb_set_vert(int, int, int);
  1215. PDCEX int sb_get_horz(int *, int *, int *);
  1216. PDCEX int sb_get_vert(int *, int *, int *);
  1217. PDCEX int sb_refresh(void);
  1218. #endif
  1219. /* NetBSD */
  1220. PDCEX int touchoverlap(const WINDOW *, WINDOW *);
  1221. PDCEX int underend(void);
  1222. PDCEX int underscore(void);
  1223. PDCEX int wunderend(WINDOW *);
  1224. PDCEX int wunderscore(WINDOW *);
  1225. /*** Functions defined as macros ***/
  1226. /* getch() and ungetch() conflict with some DOS libraries */
  1227. #define getch() wgetch(stdscr)
  1228. #define ungetch(ch) PDC_ungetch(ch)
  1229. #define COLOR_PAIR(n) (((chtype)(n) << PDC_COLOR_SHIFT) & A_COLOR)
  1230. #define PAIR_NUMBER(n) (((n) & A_COLOR) >> PDC_COLOR_SHIFT)
  1231. /* These will _only_ work as macros */
  1232. #define getbegyx(w, y, x) (y = getbegy(w), x = getbegx(w))
  1233. #define getmaxyx(w, y, x) (y = getmaxy(w), x = getmaxx(w))
  1234. #define getparyx(w, y, x) (y = getpary(w), x = getparx(w))
  1235. #define getyx(w, y, x) (y = getcury(w), x = getcurx(w))
  1236. #define getsyx(y, x) { if (curscr->_leaveit) (y)=(x)=-1; \
  1237. else getyx(curscr,(y),(x)); }
  1238. #ifdef NCURSES_MOUSE_VERSION
  1239. # define getmouse(x) nc_getmouse(x)
  1240. #endif
  1241. /* Deprecated */
  1242. #define PDC_save_key_modifiers(x) (OK)
  1243. #define PDC_get_input_fd() 0
  1244. /* return codes from PDC_getclipboard() and PDC_setclipboard() calls */
  1245. #define PDC_CLIP_SUCCESS 0
  1246. #define PDC_CLIP_ACCESS_ERROR 1
  1247. #define PDC_CLIP_EMPTY 2
  1248. #define PDC_CLIP_MEMORY_ERROR 3
  1249. /* PDCurses key modifier masks */
  1250. #define PDC_KEY_MODIFIER_SHIFT 1
  1251. #define PDC_KEY_MODIFIER_CONTROL 2
  1252. #define PDC_KEY_MODIFIER_ALT 4
  1253. #define PDC_KEY_MODIFIER_NUMLOCK 8
  1254. #ifdef __cplusplus
  1255. # ifndef PDC_PP98
  1256. # undef bool
  1257. # endif
  1258. }
  1259. #endif
  1260. #endif /* __PDCURSES__ */