src/input.h

changeset 32
8a0b85303ee8
parent 30
a285ee393860
child 35
6c64b7a073af
equal deleted inserted replaced
31:ed440bcd9740 32:8a0b85303ee8
43 43
44 void init_colorpairs(); 44 void init_colorpairs();
45 45
46 int prompt_yesno(char *msg); 46 int prompt_yesno(char *msg);
47 47
48 int mvwasyncgetnstr(WINDOW* w, int y, int x, char *str, size_t len); 48
49 #define mvasyncgetnstr(y,x,str,len) mvwasyncgetnstr(stdscr,y,x,str,len) 49 /**
50 #define asyncgetnstr(str,len) mvwasyncgetnstr(stdscr, stdscr->_cury, \ 50 * Asynchronous variant of mvwgetnstr().
51 stdscr->_curx, str, len) 51 *
52 * Needs halfdelay mode enabled!
53 *
54 * @param w the window
55 * @param y the window y position
56 * @param x the window x position
57 * @param str the buffer for the read string
58 * @param pos a pointer to the object containing the current buffer position
59 * @param len the length of the buffer
60 * @return 0 if reading is in progress and 1 when a complete line is read
61 */
62 int mvwasyncgetnstr(WINDOW* w,int y,int x,char *str,size_t *pos,size_t len);
63
64 /**
65 * Asynchronous variant of mvgetnstr().
66 *
67 * Needs halfdelay mode enabled!
68 *
69 * @param y the window y position
70 * @param x the window x position
71 * @param str the buffer for the read string
72 * @param pos a pointer to the object containing the current buffer position
73 * @param len the length of the buffer
74 * @return 0 if reading is in progress and 1 when a complete line is read
75 */
76 #define mvasyncgetnstr(y,x,str,pos,len) mvwasyncgetnstr(stdscr,y,x,str,pos,len)
77
78 /**
79 * Asynchronous variant of getnstr().
80 *
81 * Needs halfdelay mode enabled!
82 *
83 * @param str the buffer for the read string
84 * @param pos a pointer to the object containing the current buffer position
85 * @param len the length of the buffer
86 * @return 0 if reading is in progress and 1 when a complete line is read
87 */
88 #define asyncgetnstr(str,pos,len) mvwasyncgetnstr(stdscr, stdscr->_cury, \
89 stdscr->_curx, str, pos, len)
52 90
53 91
54 #ifdef __cplusplus 92 #ifdef __cplusplus
55 } 93 }
56 #endif 94 #endif

mercurial