⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 curs_inopts.3x.html

📁 ncurses-5.4
💻 HTML
📖 第 1 页 / 共 2 页
字号:
       If  disabled (<EM>bf</EM> is <STRONG>FALSE</STRONG>), <STRONG>curses</STRONG> does not treat function       keys specially and the program has to interpret the escape       sequences  itself.   If  the keypad in the terminal can be       turned on  (made  to  transmit)  and  off  (made  to  work       locally),  turning on this option causes the terminal key-       pad to be turned on when <STRONG>wgetch</STRONG> is  called.   The  default       value for keypad is false.       Initially, whether the terminal returns 7 or 8 significant       bits on input depends on  the  control  mode  of  the  tty       driver  [see  <STRONG><A HREF="termio.7.html">termio(7)</A></STRONG>].  To force 8 bits to be returned,       invoke <STRONG>meta</STRONG>(<EM>win</EM>, <STRONG>TRUE</STRONG>); this is equivalent,  under  POSIX,       to  setting the CS8 flag on the terminal.  To force 7 bits       to be returned, invoke <STRONG>meta</STRONG>(<EM>win</EM>, <STRONG>FALSE</STRONG>); this  is  equiva-       lent,  under  POSIX, to setting the CS7 flag on the termi-       nal.  The window argument, <EM>win</EM>, is always ignored.  If the       terminfo capabilities <STRONG>smm</STRONG> (meta_on) and <STRONG>rmm</STRONG> (meta_off) are       defined for the terminal, <STRONG>smm</STRONG> is sent to the terminal when       <STRONG>meta</STRONG>(<EM>win</EM>,  <STRONG>TRUE</STRONG>)  is called and <STRONG>rmm</STRONG> is sent when <STRONG>meta</STRONG>(<EM>win</EM>,       <STRONG>FALSE</STRONG>) is called.       The <STRONG>nodelay</STRONG> option causes <STRONG>getch</STRONG> to be a non-blocking call.       If  no input is ready, <STRONG>getch</STRONG> returns <STRONG>ERR</STRONG>.  If disabled (<EM>bf</EM>       is <STRONG>FALSE</STRONG>), <STRONG>getch</STRONG> waits until a key is pressed.       While interpreting an input escape sequence, <STRONG>wgetch</STRONG> sets a       timer  while  waiting  for the next character.  If <STRONG>notime-</STRONG>       <STRONG>out(</STRONG><EM>win</EM>, <STRONG>TRUE</STRONG>) is called,  then  <STRONG>wgetch</STRONG>  does  not  set  a       timer.   The  purpose  of  the timeout is to differentiate       between sequences received from a function key  and  those       typed by a user.       The  <STRONG>raw</STRONG> and <STRONG>noraw</STRONG> routines place the terminal into or out       of raw mode.  Raw mode is similar to <STRONG>cbreak</STRONG> mode, in  that       characters  typed  are  immediately  passed through to the       user program.  The differences are that in raw  mode,  the       interrupt,  quit, suspend, and flow control characters are       all passed through uninterpreted, instead of generating  a       signal.   The  behavior  of the BREAK key depends on other       bits in the tty driver that are not set by <STRONG>curses</STRONG>.       When the <STRONG>noqiflush</STRONG> routine is used, normal flush of  input       and  output queues associated with the <STRONG>INTR</STRONG>, <STRONG>QUIT</STRONG> and <STRONG>SUSP</STRONG>       characters will not be done [see <STRONG><A HREF="termio.7.html">termio(7)</A></STRONG>].  When <STRONG>qiflush</STRONG>       is  called,  the queues will be flushed when these control       characters are read.  You may want to call <STRONG>noqiflush()</STRONG>  in       a  signal handler if you want output to continue as though       the interrupt had not occurred, after the handler exits.       The <STRONG>timeout</STRONG> and <STRONG>wtimeout</STRONG> routines  set  blocking  or  non-       blocking  read  for a given window.  If <EM>delay</EM> is negative,       blocking  read  is  used  (i.e.,  waits  indefinitely  for       input).   If <EM>delay</EM> is zero, then non-blocking read is used       (i.e., read returns <STRONG>ERR</STRONG> if no input is waiting).  If <EM>delay</EM>       is  positive, then read blocks for <EM>delay</EM> milliseconds, and       returns <STRONG>ERR</STRONG> if there is still no input.  Hence, these rou-       tines  provide the same functionality as <STRONG>nodelay</STRONG>, plus the       additional capability of being  able  to  block  for  only       <EM>delay</EM> milliseconds (where <EM>delay</EM> is positive).       The  <STRONG>curses</STRONG> library does ``line-breakout optimization'' by       looking for  typeahead  periodically  while  updating  the       screen.   If  input is found, and it is coming from a tty,       the current update is postponed until <STRONG>refresh</STRONG> or  <STRONG>doupdate</STRONG>       is  called again.  This allows faster response to commands       typed in advance.  Normally, the input FILE pointer passed       to  <STRONG>newterm</STRONG>,  or  <STRONG>stdin</STRONG> in the case that <STRONG>initscr</STRONG> was used,       will be used to do this typeahead checking.  The <STRONG>typeahead</STRONG>       routine  specifies  that  the  file descriptor <EM>fd</EM> is to be       used to check for typeahead instead.  If <EM>fd</EM> is -1, then no       typeahead checking is done.</PRE><H2>RETURN VALUE</H2><PRE>       All  routines that return an integer return <STRONG>ERR</STRONG> upon fail-       ure and OK (SVr4 specifies only "an  integer  value  other       than  <STRONG>ERR</STRONG>")  upon  successful completion, unless otherwise       noted in the preceding routine descriptions.</PRE><H2>PORTABILITY</H2><PRE>       These functions are described in the XSI Curses  standard,       Issue 4.       The  ncurses  library obeys the XPG4 standard and the his-       torical practice of the AT&amp;T  curses  implementations,  in       that  the  echo bit is cleared when curses initializes the       terminal state.  BSD curses differed from  this  slightly;       it left the echo bit on at initialization, but the BSD <STRONG>raw</STRONG>       call turned it off as a side-effect.  For  best  portabil-       ity,  set echo or noecho explicitly just after initializa-       tion, even if your program remains in cooked mode.</PRE><H2>NOTES</H2><PRE>       Note that <STRONG>echo</STRONG>, <STRONG>noecho</STRONG>, <STRONG>halfdelay</STRONG>, <STRONG>intrflush</STRONG>, <STRONG>meta</STRONG>,  <STRONG>node-</STRONG>       <STRONG>lay</STRONG>,  <STRONG>notimeout</STRONG>, <STRONG>noqiflush</STRONG>, <STRONG>qiflush</STRONG>, <STRONG>timeout</STRONG>, and <STRONG>wtimeout</STRONG>       may be macros.       The <STRONG>noraw</STRONG> and <STRONG>nocbreak</STRONG> calls follow historical practice in       that  they  attempt  to  restore to normal (`cooked') mode       from raw and cbreak modes respectively.  Mixing  raw/noraw       and  cbreak/nocbreak  calls  leads  to  tty driver control       states that are hard to predict or understand; it  is  not       recommended.</PRE><H2>SEE ALSO</H2><PRE>       <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>, <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></STRONG>, <STRONG><A HREF="termio.7.html">termio(7)</A></STRONG>                                                  <STRONG><A HREF="curs_inopts.3x.html">curs_inopts(3x)</A></STRONG></PRE><HR><ADDRESS>Man(1) output converted with<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a></ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -