mvwget_wch.html
来自「unix 下的C开发手册,还用详细的例程。」· HTML 代码 · 共 97 行
HTML
97 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>get_wch</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_002_001_392"> </a>NAME</h4><blockquote>get_wch, mvget_wch, mvwget_wch, wget_wch- get a wide character from a terminal</blockquote><h4><a name = "tag_002_001_393"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="curses.h.html">curses.h</a>>int get_wch(wint_t *<i>ch</i>);int mvget_wch(int <i>y</i>, int <i>x</i>, wint_t *<i>ch</i>);int mvwget_wch(WINDOW *<i>win</i>, int <i>y</i>, int <i>x</i>, wint_t *<i>ch</i>);int wget_wch(WINDOW *<i>win</i>, wint_t *<i>ch</i>);</code></pre></blockquote><h4><a name = "tag_002_001_394"> </a>DESCRIPTION</h4><blockquote>These functions read a character from the terminal associated with thecurrent or specified window. If<i><a href="keypad.html">keypad()</a></i>is enabled, these functions respond to the pressing of a function key bysetting the object pointed to by<i>ch</i>to the corresponding KEY_ value defined in<i><a href="curses.h.html"><curses.h></a></i>and returning KEY_CODE_YES.<p>Processing of terminal input is subject to the general rules described in<xref href=terminalinput><a href="intov.html#tag_001_005">Input Processing</a></xref>.<p>If echoing is enabled, then the character is echoed as though it wereprovided as an input argument to<i><a href="add_wch.html">add_wch()</a></i>,except for the following characters:<p><table align=center><tr valign=top><th align=left><i> <backspace>, <left-arrow> and the current erase character: </i><th align=left><i> The input is interpreted as specified in and then the character at the resulting cursor position is deleted as though were called, except that if the cursor was originally in the first column of the line, then the user is alerted as though were called. </i><tr valign=top><td align=left><i>Function keys</i><td align=left><i> The user is alerted as though were called. Information concerning the function keys is not returned to the caller. </i></table><p>If the current or specified window is not a pad, and it has been moved ormodified since the last refresh operation, then it will be refreshed beforeanother character is read.</blockquote><h4><a name = "tag_002_001_395"> </a>RETURN VALUE</h4><blockquote>When these functions successfully report the pressing of a function key, theyreturn KEY_CODE_YES. When they successfully report a wide character, theyreturn OK. Otherwise, they return ERR.</blockquote><h4><a name = "tag_002_001_396"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_002_001_397"> </a>APPLICATION USAGE</h4><blockquote>Applications should not define the escape key by itself as a single-characterfunction.<p>When using these functions,<i><a href="nocbreak.html">nocbreak()</a></i>mode and<i><a href="echo.html">echo()</a></i>mode should not be used at the same time. Depending on the state of theterminal when each character is typed, the application may produce undesirableresults.</blockquote><h4><a name = "tag_002_001_398"> </a>SEE ALSO</h4><blockquote><xref href=terminalinput><a href="intov.html#tag_001_005">Input Processing</a></xref>,<i><a href="beep.html">beep()</a></i>,<i><a href="cbreak.html">cbreak()</a></i>,<i><a href="ins_wch.html">ins_wch()</a></i>,<i><a href="keypad.html">keypad()</a></i>,<i><a href="move.html">move()</a></i>,<i><a href="curses.h.html"><curses.h></a></i>,<i><a href="../xsh/wchar.h.html"><wchar.h></a></i>(in the <b>XSH</b> specification).</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?