📄 scr_restore.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>scr_dump</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_825"> </a>NAME</h4><blockquote>scr_dump, scr_init, scr_restore, scr_set- screen file input/output functions</blockquote><h4><a name = "tag_001_009_826"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="curses.h.html">curses.h</a>>int scr_dump(const char *<i>filename</i>);int scr_init(const char *<i>filename</i>);int scr_restore(const char *<i>filename</i>);int scr_set(const char *<i>filename</i>);</code></pre></blockquote><h4><a name = "tag_001_009_827"> </a>DESCRIPTION</h4><blockquote>The<i>scr_dump()</i>function writes the current contents of the virtual screen to the file namedby <i>filename</i> in an unspecified format.<p>The<i>scr_restore()</i>function sets the virtual screen to the contents of the file named by<i>filename</i>, which must have been written using<i>scr_dump()</i>.The next refresh operation restores the screen to the way it looked in thedump file.<p>The<i>scr_init()</i>function reads the contents of the file named by <i>filename</i> and usesthem to initialise the Cursesdata structures to what the terminal currently has on its screen. The nextrefresh operation bases any updates on this information,unless either of the following conditions is true:<ul><p><li>The terminal has been written to since the virtual screen was dumped to<i>filename</i><p><li>The terminfo capabilities<b>rmcup</b>and<b>nrrmc</b>are defined for the current terminal.<p></ul><p>The<i>scr_set()</i>function is a combination of<i>scr_restore()</i>and<i>scr_init()</i>.It tells the program that the information in the file named by <i>filename</i>is what is currently on the screen, and also what the program wants on thescreen. This can be thought of as a screen inheritance function.</blockquote><h4><a name = "tag_001_009_828"> </a>RETURN VALUE</h4><blockquote>On successful completion, these functions return OK.Otherwise, they return ERR.</blockquote><h4><a name = "tag_001_009_829"> </a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_001_009_830"> </a>APPLICATION USAGE</h4><blockquote>The<i>scr_init()</i>function is called after<i><a href="initscr.html">initscr()</a></i>or a<i><a href="../xsh/system.html">system()</a></i>call to share the screen with another process that has done a<i>scr_dump()</i>after its<i><a href="endwin.html">endwin()</a></i>call.<p>To read a window from a file, call<i><a href="getwin.html">getwin()</a></i>;to write a window to a file, call<i><a href="putwin.html">putwin()</a></i>.</blockquote><h4><a name = "tag_001_009_831"> </a>SEE ALSO</h4><blockquote><i><a href="delscreen.html">delscreen()</a></i>,<i><a href="doupdate.html">doupdate()</a></i>,<i><a href="endwin.html">endwin()</a></i>,<i><a href="getwin.html">getwin()</a></i>,<i><a href="../xsh/open.html">open()</a></i>(in the <b>XSH</b> specification),<i><a href="../xsh/read.html">read()</a></i>(in the <b>XSH</b> specification),<i><a href="../xsh/write.html">write()</a></i>(in the <b>XSH</b> specification),<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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -