derwin.html
来自「unix 下的C开发手册,还用详细的例程。」· HTML 代码 · 共 94 行
HTML
94 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>derwin</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_000_000_312"> </a>NAME</h4><blockquote>derwin, newwin, subwin - window creation functions</blockquote><h4><a name = "tag_000_000_313"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="curses.h.html">curses.h</a>>WINDOW *derwin(WINDOW *<i>orig</i>, int <i>nlines</i>, int <i>ncols</i>, int <i>begin_y</i>, int <i>begin_x</i>);WINDOW *newwin(int <i>nlines</i>, int <i>ncols</i>, int <i>begin_y</i>, int <i>begin_x</i>);WINDOW *subwin(WINDOW *<i>orig</i>, int <i>nlines</i>, int <i>ncols</i>, int <i>begin_y</i>, int <i>begin_x</i>);</code></pre></blockquote><h4><a name = "tag_000_000_314"> </a>DESCRIPTION</h4><blockquote>The<i>derwin()</i>function is the same as<i><a href="subwin.html">subwin()</a></i>,except that <i>begin_y</i> and <i>begin_x</i> are relative to the origin of thewindow <i>orig</i> rather than absolute screen positions.<p>The<i><a href="newwin.html">newwin()</a></i>function creates a new window with <i>nlines</i> lines and <i>ncols</i> columns,positioned so that the origin is (<i>begin_y</i>, <i>begin_x</i>). If<i>nlines</i> is zero, it defaults to<b>LINES</b>- <i>begin_y</i>; if <i>ncols</i> is zero, it defaults to<b>COLS</b>- <i>begin_x</i>.<p>The<i><a href="subwin.html">subwin()</a></i>function creates a new window with <i>nlines</i> lines and <i>ncols</i> columns,positioned so that the origin is at (<i>begin_y</i>, <i>begin_x</i>). (Thisposition is an absolute screen position, not a position relative to the window<i>orig</i>.) If any part of the new window is outside <i>orig</i>,the function fails and the window is not created.</blockquote><h4><a name = "tag_000_000_315"> </a>RETURN VALUE</h4><blockquote>Upon successful completion, these functionsreturn a pointer to the new window. Otherwise, they return a null pointer.</blockquote><h4><a name = "tag_000_000_316"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_000_000_317"> </a>APPLICATION USAGE</h4><blockquote>Before performing the first refresh of a subwindow, portable applicationsshould call<i><a href="touchwin.html">touchwin()</a></i>or<i><a href="touchline.html">touchline()</a></i>on the parent window.<p>Each window maintains internal descriptions of the screen image and status.The screen image is shared among all windows in the window hierarchy. Refreshoperations rely on information on what has changed within a window, which isprivate to each window. Refreshing a window, when updates were made to adifferent window, may fail to perform needed updates because the windows donot share this information.<p>A new full-screen window is created by calling:<pre><code>newwin(0, 0, 0, 0);</code></pre></blockquote><h4><a name = "tag_000_000_318"> </a>SEE ALSO</h4><blockquote><i><a href="delwin.html">delwin()</a></i>,<i><a href="is_linetouched.html">is_linetouched()</a></i>,<i><a href="doupdate.html">doupdate()</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 + -
显示快捷键?