ripoffline.html
来自「unix 下的C开发手册,还用详细的例程。」· HTML 代码 · 共 111 行
HTML
111 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>ripoffline</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_001_009_791"> </a>NAME</h4><blockquote>ripoffline - reserve a line for a dedicated purpose</blockquote><h4><a name = "tag_001_009_792"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="curses.h.html">curses.h</a>>int ripoffline(int <i>line</i>, int (*<i>init</i>)(WINDOW *<i>win</i>, int columns));</code></pre></blockquote><h4><a name = "tag_001_009_793"> </a>DESCRIPTION</h4><blockquote>The<i>ripoffline()</i>function reserves a screen line for use by the application.<p>Any call to<i>ripoffline()</i>must precede the call to<i><a href="initscr.html">initscr()</a></i>or<i><a href="newterm.html">newterm()</a></i>.If <i>line</i> is positive, one line is removed from the beginning of<i>stdscr</i>;if <i>line</i> is negative, one line is removed from the end.Removal occurs during the subsequent call to<i><a href="initscr.html">initscr()</a></i>or<i><a href="newterm.html">newterm()</a></i>.When the subsequent call is made,the function pointed to by <i>init</i> is called with two arguments: a<b>WINDOW</b> pointer to the one-line window that has been allocated and aninteger with the number of columns in the window. The initialisation functioncannot use the<b>LINES</b>and<b>COLS</b>external variables and cannot call<i><a href="wrefresh.html">wrefresh()</a></i>or<i><a href="doupdate.html">doupdate()</a></i>,but may call<i><a href="wnoutrefresh.html">wnoutrefresh()</a></i>.<p>Up to five lines can be ripped off. Calls to<i>ripoffline()</i>above this limit have no effect but report success.</blockquote><h4><a name = "tag_001_009_794"> </a>RETURN VALUE</h4><blockquote>The<i>ripoffline()</i>function returns OK.</blockquote><h4><a name = "tag_001_009_795"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_001_009_796"> </a>APPLICATION USAGE</h4><blockquote>Calling<i><a href="slk_init.html">slk_init()</a></i>reduces the size of the screen by one line if<i><a href="initscr.html">initscr()</a></i>eventually uses a line from<i>stdscr</i>to emulate the soft labels. If<i><a href="slk_init.html">slk_init()</a></i>rips off a line, it thereby reduces by one the number of lines an applicationcan reserve by subsequent calls to<i>ripoffline()</i>.Thus, portable applications that use soft label functions should not call<i>ripoffline()</i>more than four times.<p>When<i><a href="initscr.html">initscr()</a></i>or<i><a href="newterm.html">newterm()</a></i>calls the initialisation function pointed to by<i>init</i>,the implementation may pass NULL for the<b>WINDOW</b>pointer argument<i>win</i>.This indicates inability to allocate a one-line window for the line that thecall to<i>ripoffline()</i>ripped off. Portable applications should verify that<i>win</i>is not NULL before performing any operation on the window it represents.</blockquote><h4><a name = "tag_001_009_797"> </a>SEE ALSO</h4><blockquote><i><a href="doupdate.html">doupdate()</a></i>,<i><a href="initscr.html">initscr()</a></i>,<i><a href="slk_attroff.html">slk_attroff()</a></i>,<i><a href="curses.h.html"><curses.h></a></i>.</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 + -
显示快捷键?