src/input.h

changeset 32
8a0b85303ee8
parent 30
a285ee393860
child 35
6c64b7a073af
     1.1 --- a/src/input.h	Tue Apr 08 21:13:28 2014 +0200
     1.2 +++ b/src/input.h	Wed Apr 09 09:34:07 2014 +0200
     1.3 @@ -45,10 +45,48 @@
     1.4  
     1.5  int prompt_yesno(char *msg);
     1.6  
     1.7 -int mvwasyncgetnstr(WINDOW* w, int y, int x, char *str, size_t len);
     1.8 -#define mvasyncgetnstr(y,x,str,len) mvwasyncgetnstr(stdscr,y,x,str,len)
     1.9 -#define asyncgetnstr(str,len) mvwasyncgetnstr(stdscr, stdscr->_cury, \
    1.10 -    stdscr->_curx, str, len)
    1.11 +
    1.12 +/**
    1.13 + * Asynchronous variant of mvwgetnstr().
    1.14 + * 
    1.15 + * Needs halfdelay mode enabled!
    1.16 + * 
    1.17 + * @param w the window
    1.18 + * @param y the window y position
    1.19 + * @param x the window x position
    1.20 + * @param str the buffer for the read string
    1.21 + * @param pos a pointer to the object containing the current buffer position
    1.22 + * @param len the length of the buffer
    1.23 + * @return 0 if reading is in progress and 1 when a complete line is read
    1.24 + */
    1.25 +int mvwasyncgetnstr(WINDOW* w,int y,int x,char *str,size_t *pos,size_t len);
    1.26 +
    1.27 +/**
    1.28 + * Asynchronous variant of mvgetnstr().
    1.29 + * 
    1.30 + * Needs halfdelay mode enabled!
    1.31 + * 
    1.32 + * @param y the window y position
    1.33 + * @param x the window x position
    1.34 + * @param str the buffer for the read string
    1.35 + * @param pos a pointer to the object containing the current buffer position
    1.36 + * @param len the length of the buffer
    1.37 + * @return 0 if reading is in progress and 1 when a complete line is read
    1.38 + */
    1.39 +#define mvasyncgetnstr(y,x,str,pos,len) mvwasyncgetnstr(stdscr,y,x,str,pos,len)
    1.40 +
    1.41 +/**
    1.42 + * Asynchronous variant of getnstr().
    1.43 + * 
    1.44 + * Needs halfdelay mode enabled!
    1.45 + * 
    1.46 + * @param str the buffer for the read string
    1.47 + * @param pos a pointer to the object containing the current buffer position
    1.48 + * @param len the length of the buffer
    1.49 + * @return 0 if reading is in progress and 1 when a complete line is read
    1.50 + */
    1.51 +#define asyncgetnstr(str,pos,len) mvwasyncgetnstr(stdscr, stdscr->_cury, \
    1.52 +    stdscr->_curx, str, pos, len)
    1.53  
    1.54  
    1.55  #ifdef	__cplusplus

mercurial