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

📄 intov.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>chgat()</i><td align=left>change renditions of characters in a window<td align=center>-<td align=center>N<td align=center>N<td align=left><i><a href="chgat.html">chgat()</a></i><tr valign=top><td align=left>&nbsp;<td align=left></i><b>Delete</b><i><td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>delch()</i><td align=left>delete a character<td align=center>-<td align=center>-<td align=center>N<td align=left><i><a href="delch.html">delch()</a></i><tr valign=top><td align=left>&nbsp;<td align=left></i><b>Get (Input from Keyboard to Window)</b><i><td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>getch()</i><td align=left>get a character<td align=center>Y<td align=center>Y<td align=center>Y<td align=left><i><a href="getch.html">getch()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>get</i>[<i>n</i>]<i>str()</i><td align=left>get a character string<td align=center>Y<td align=center>Y<td align=center>Y<td align=left><i><a href="getnstr.html">getnstr()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>get_wch()</i><td align=left>get a wide character<td align=center>Y<td align=center>Y<td align=center>Y<td align=left><i><a href="get_wch.html">get_wch()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>get</i>[<i>n</i>]<i>_wstr()</i><td align=left>get an array of wide characters and key codes<td align=center>Y<td align=center>Y<td align=center>Y<td align=left><i><a href="get_wstr.html">get_wstr()</a></i><tr valign=top><td align=left>&nbsp;<td align=left></i><b>Explicit Cursor Movement</b><i><td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<tr valign=top><td align=left><i></i>[<i>w</i>]<i>move()</i><td align=left>move the cursor<td align=center>-<td align=center>-<td align=center>-<td align=left><i><a href="move.html">move()</a></i><tr valign=top><td align=left>&nbsp;<td align=left></i><b>Input (Read Back from Window)</b><i><td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>inch()</i><td align=left>input a character<td align=center>-<td align=center>-<td align=center>-<td align=left><i><a href="inch.html">inch()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>inch</i>[<i>n</i>]<i>str()</i><td align=left>input an array of characters and attributes<td align=center>-<td align=center>-<td align=center>-<td align=left><i><a href="inchnstr.html">inchnstr()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>in</i>[<i>n</i>]<i>str()</i><td align=left>input a string<td align=center>-<td align=center>-<td align=center>-<td align=left><i><a href="innstr.html">innstr()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>in</i>[<i>n</i>]<i>wstr()</i><td align=left>input a string of wide characters<td align=center>-<td align=center>-<td align=center>-<td align=left><i><a href="innwstr.html">innwstr()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>in_wch()</i><td align=left>input a wide character and rendition<td align=center>-<td align=center>-<td align=center>-<td align=left><i><a href="in_wch.html">in_wch()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>in_wch</i>[<i>n</i>]<i>str()</i><td align=left>input an array of wide characters and renditions<td align=center>-<td align=center>-<td align=center>-<td align=left><i><a href="inchnstr.html">inchnstr()</a></i><tr valign=top><td align=left>&nbsp;<td align=left></i><b>Insert</b><i><td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>insch()</i><td align=left>insert a character<td align=center>Y<td align=center>N<td align=center>N<td align=left><i><a href="insch.html">insch()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>ins</i>[<i>n</i>]<i>str()</i><td align=left>insert a character string<td align=center>Y<td align=center>N<td align=center>N<td align=left><i><a href="insnstr.html">insnstr()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>ins_</i>[<i>n</i>]<i>wstr()</i><td align=left>insert a wide-character string<td align=center>Y<td align=center>N<td align=center>N<td align=left><i><a href="ins_nwstr.html">ins_nwstr()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>ins_wch()</i><td align=left>insert a wide character<td align=center>Y<td align=center>N<td align=center>N<td align=left><i><a href="ins_wch.html">ins_wch()</a></i><tr valign=top><td align=left>&nbsp;<td align=left></i><b>Print and Scan</b><i><td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<td align=center>&nbsp;<tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>printw()</i><td align=left>print formatted output<td align=center>-<td align=center>-<td align=center>-<td align=left><i><a href="mvprintw.html">mvprintw()</a></i><tr valign=top><td align=left><i></i>[<i>mv</i>][<i>w</i>]<i>scanw()</i><td align=left>convert formatted output<td align=center>-<td align=center>-<td align=center>-<td align=left><i><a href="mvscanw.html">mvscanw()</a></i></table><p><h5><a name = "tag_001_006_002_001">&nbsp;</a>Legend</h5>The following notation indicates the effect when characters are moved to thescreen.  (For the Get functions, this applies only when echoing is enabled.)<dl compact><dt>s<dd>Y means these functions perform special-character processing (see<xref href=specialchars><a href="#tag_001_004_003">Special Characters</a></xref>).N means they do not.  ? means the results are unspecified when thesefunctions are applied to special characters.<dt>w<dd>Y means these functions perform wrapping (see<xref href=truncation><a href="#tag_001_004_002_002">Truncation, Wrapping and Scrolling</a></xref>).N means they do not.<dt>c<dd>Y means these functions advance the cursor (see<xref href=truncation><a href="#tag_001_004_002_002">Truncation, Wrapping and Scrolling</a></xref>).N means they do not.<dt>-<dd>The attribute specified by this column does not apply to these functions.</dl><h3><a name = "tag_001_007">&nbsp;</a>Interfaces Implemented as Macros</h3>The following interfaces with arguments must be implemented as macros.  Therelevance to the application programmer is that the `&amp;</i>' charactercannot be used before the arguments.<p><p><table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Macros</b><th align=center><b>Chapter 4 Entry</b><tr valign=top><td align=left><i>getbegyx</i>(), <i>getmaxyx</i>(), <i>getparyx</i>(), <i>getyx</i>()<td align=left><i>getbegyx</i>()</table><p>The header file reference manual pages list other macros, like COLOR_BLACK,that do not take arguments.<h3><a name = "tag_001_008">&nbsp;</a>Initialised Curses Environment</h3>Before executing an application that uses Curses, the terminal must be prepared as follows:<ul><p><li>If the terminal has hardware tab stops, they should be set.<p><li>Any initialisation strings defined for the terminal must be output to theterminal.<p></ul><p>The resulting state of the terminal must be compatible with the model of theterminal that Curses has, as reflected in the terminal's entry in the<b>terminfo</b>database (see<xref href=chapTERMINFO><a href="terminfo.html#tag_002">Terminfo Source Format (ENHANCED CURSES)</a></xref>).<p>To initialise Curses, the application must call<i><a href="initscr.html">initscr()</a></i>or<i><a href="newterm.html">newterm()</a></i>before calling any of the other functions that deal with windows andscreens, and it must call<i><a href="endwin.html">endwin()</a></i>before exiting.  To get character-at-a-time inputwithout echoing (most interactive, screen-oriented programs want this), thefollowing sequence should be used:<p><pre><dl compact><dt> <dd><i><a href="initscr.html">initscr()</a></i><i><a href="cbreak.html">cbreak()</a></i><i><a href="noecho.html">noecho()</a></i></dl></pre><p>Most programs would additionally use the sequence:<p><pre><dl compact><dt> <dd><i><a href="nonl.html">nonl()</a></i><i>intrflush</i>(<i>stdscr</i>, FALSE)<i>keypad</i>(<i>stdscr</i>, TRUE)</dl></pre><h3><a name = "tag_001_009">&nbsp;</a>Synchronous and Networked Asynchronous Terminals</h3><xref type="2" name="oldchapter13"></xref>This section indicates to the application writer some considerations to beborne in mind when driving synchronous, networked asynchronous (NWA) ornon-standard directly-connected asynchronous terminals.<p>Such terminals are often used in a mainframe environment and communicate tothe host in block mode.  That is, the user types characters at the terminalthen presses a special key to initiate transmission of the characters to thehost.<p>Frequently, although it may be possible to send arbitrary sized blocks to thehost, it is not possible or desirable to cause a character to betransmitted with only a single keystroke.<p>This can cause severe problems to an application wishing to make use ofsingle-character input; see<xref href=terminalinput><a href="#tag_001_005">Input Processing</a></xref>.<h5><a name = "tag_001_009_000_001">&nbsp;</a>Output</h5>The Curses interface can be used in the normal way for all operationspertaining to output to the terminal, with the possible exception that on someterminals the<i><a href="refresh.html">refresh()</a></i>routine may have to redraw the entire screen contents in order to perform anyupdate.<p>If it is additionally necessary to clear the screen before each suchoperation, the result could be undesirable.<h5><a name = "tag_001_009_000_002">&nbsp;</a>Input</h5>Because of the nature of operation of synchronous (block-mode) and NWAterminals, it might not be possible to support all or any of the Cursesinput functions.  In particular, the following points should be noted:<ul><p><li>Single-character input might not be possible.  It may be necessary to press aspecial key to cause all characters typed at the terminal to be transmitted tothe host.<p><li>It is sometimes not possible to disable echo.  Character echo may be performeddirectly by the terminal.  On terminals that behave in this way, any Cursesapplication that performs input should be aware that any characters typed willappear on the screen at wherever the cursor is positioned.  This does notnecessarily correspond to the position of the cursor in the window.<p></ul><p></blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -