home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8710 / pc-curses-doc / 4 / rawgetch.m < prev    next >
Encoding:
Text File  |  1993-09-02  |  2.2 KB  |  81 lines

  1. NAME
  2.     getch() - ***same as wgetch()*** see curses.h
  3.     wgetch() flushinp() wungetch() mvgetch() mvwgetch() rawgetch() 
  4.     sysgetch() validchar() _cursespendch() - manipulate input characters
  5.  
  6. SYNOPSIS
  7.     #include <curses.h>
  8.     #include <curspriv.h>
  9.  
  10.     int wgetch(win)
  11.     WINDOW *win;
  12.  
  13.     void flushinp()
  14.  
  15.     int wungetch(ch)
  16.     int ch;
  17.  
  18.     int mvgetch(y,x)
  19.     int y;
  20.     int x;
  21.  
  22.     int mvwgetch(win,y,x)
  23.     WINDOW *win;
  24.     int y;
  25.     int x;
  26.  
  27.     static int rawgetch()
  28.  
  29.     static int sysgetch()
  30.  
  31.     static int validchar(c)
  32.     int c;
  33.  
  34.     bool _cursespendch()
  35.  
  36. DESCRIPTION
  37.     wgetch(win) gets a character from the terminal, in normal,  
  38.     cbreak or raw mode, optionally echoing to window 'win'.  
  39.  
  40.     flushinp() kills any pending input characters.  
  41.  
  42.     wungetch() pushes back it's argument on the input stream. If  
  43.     OK, returns 1, otherwise returns 0.  
  44.  
  45.     mvgetch() first moves the stdscr cursor to a new location,  
  46.     then does a wgetch() on stdscr.  
  47.  
  48.     mvwgetch() first moves the cursor of window 'win' to a new  
  49.     location, then does a wgetch() in 'win'.  
  50.  
  51.     rawgetch() gets a character without any interpretation at  
  52.     all and returns it. If keypad mode is active for the desig-  
  53.     nated window, function key translation will be performed.  
  54.     Otherwise, function keys are ignored.If nodelay mode is  
  55.     active in the window, then rawgetch() returns -1 if no cha-  
  56.     racter is available.  
  57.  
  58.     sysgetch() gets a character with normal ^S, ^Q, ^P and ^C  
  59.     interpretation and returns it. If keypad mode is active for  
  60.     the designated window, function key translation will be per-  
  61.     formed. Otherwise, function keys are ignored. If nodelay  
  62.     mode is active in the window, then sysgetch() returns -1 if  
  63.     no character is available.  
  64.  
  65.     validchar(c) checks that 'c' is a valid character, and  
  66.     if so returns it, with function key translation applied if  
  67.     'w' has keypad mode set. If char is invalid, returns -1.  
  68.  
  69.     _cursespendch() returns 1 if there is any character avai-  
  70.     lable, and 0 if there is none. this is not for programmer  
  71.     usage, but for the updatew routines.  
  72.  
  73. EXAMPLES
  74.  
  75. SEE ALSO
  76.     rawgetch(); _cursesgcb(); _cursesscb(); sysgetch(); _cursesscb();
  77.     waddch(); wrefresh(); _curseskey(); kbhit(); getch(); wmove();
  78.     wgetch(); _curseskeytst(); validchar();
  79.  
  80. BUGS
  81.