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

📄 scounix下curses编程函数说明11.htm

📁 curses界面编程
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html dir="LTR"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="Content-Style-Type" content="text/css"><link rel="top" href="index.php" title="" /><link rel="search" href="search.php" title="" /><link rel="help" href="faq.php" title="" /><link rel="author" href="memberlist.php" title="" /><link rel="prev" href="/forum/viewtopic.php?t=16854&amp;view=previous" title="阅读上一个主题" /><link rel="next" href="/forum/viewtopic.php?t=16854&amp;view=next" title="阅读下一个主题" /><link rel="up" href="/forum/viewforum.php?f=7" title="SCO UNIX" /><link rel="chapter forum" href="viewforum.php?f=2" title="站务交流" /><link rel="chapter forum" href="viewforum.php?f=3" title="版主会议室" /><link rel="chapter forum" href="viewforum.php?f=46" title="业界新闻与评论" /><link rel="chapter forum" href="viewforum.php?f=4" title="Linux" /><link rel="chapter forum" href="viewforum.php?f=5" title="BSD" /><link rel="chapter forum" href="viewforum.php?f=6" title="Solaris" /><link rel="chapter forum" href="viewforum.php?f=7" title="SCO UNIX" /><link rel="chapter forum" href="viewforum.php?f=8" title="HP-UX" /><link rel="chapter forum" href="viewforum.php?f=9" title="AIX" /><link rel="chapter forum" href="viewforum.php?f=10" title="IBM AS400应用论坛" /><link rel="chapter forum" href="viewforum.php?f=11" title="Tru64 UNIX" /><link rel="chapter forum" href="viewforum.php?f=12" title="IRIX" /><link rel="chapter forum" href="viewforum.php?f=36" title="UNIX高级技术" /><link rel="chapter forum" href="viewforum.php?f=41" title="Mac OS X" /><link rel="chapter forum" href="viewforum.php?f=13" title="Web服务器" /><link rel="chapter forum" href="viewforum.php?f=14" title="Mail服务器" /><link rel="chapter forum" href="viewforum.php?f=15" title="FTP服务器" /><link rel="chapter forum" href="viewforum.php?f=16" title="DNS服务器" /><link rel="chapter forum" href="viewforum.php?f=38" title="Proxy服务器" /><link rel="chapter forum" href="viewforum.php?f=49" title="LDAP" /><link rel="chapter forum" href="viewforum.php?f=50" title="VPN" /><link rel="chapter forum" href="viewforum.php?f=35" title="其它应用" /><link rel="chapter forum" href="viewforum.php?f=17" title="MySQL" /><link rel="chapter forum" href="viewforum.php?f=18" title="PostgreSQL" /><link rel="chapter forum" href="viewforum.php?f=19" title="Oracle" /><link rel="chapter forum" href="viewforum.php?f=20" title="Informix" /><link rel="chapter forum" href="viewforum.php?f=21" title="Sybase" /><link rel="chapter forum" href="viewforum.php?f=22" title="DB2" /><link rel="chapter forum" href="viewforum.php?f=47" title="数据库开发" /><link rel="chapter forum" href="viewforum.php?f=24" title="Shell" /><link rel="chapter forum" href="viewforum.php?f=23" title="C/C++" /><link rel="chapter forum" href="viewforum.php?f=25" title="Perl" /><link rel="chapter forum" href="viewforum.php?f=26" title="Java" /><link rel="chapter forum" href="viewforum.php?f=27" title="Php" /><link rel="chapter forum" href="viewforum.php?f=28" title="软件工程技术" /><link rel="chapter forum" href="viewforum.php?f=29" title="系统和网络安全" /><link rel="chapter forum" href="viewforum.php?f=30" title="网络技术及应用" /><link rel="chapter forum" href="viewforum.php?f=34" title="存储备份之家" /><link rel="chapter forum" href="viewforum.php?f=45" title="硬件技术" /><link rel="chapter forum" href="viewforum.php?f=31" title="清茶斋" /><link rel="chapter forum" href="viewforum.php?f=32" title="IT职业生涯" /><link rel="chapter forum" href="viewforum.php?f=33" title="English Forum" /><link rel="chapter forum" href="viewforum.php?f=39" title="运动地带" /><link rel="chapter forum" href="viewforum.php?f=40" title="快乐数码摄影" /><link rel="chapter forum" href="viewforum.php?f=48" title="影音文字" /><title>ChinaUnix.net - 中国UNIX技术社区 :: 精华帖子 - 精华版:scounix下curses编程函数说明;兄弟拿出来共享的别客气  </title><!-- link rel="stylesheet" href="/forum/templates/subSilver/subSilver.css" type="text/css" --><style type="text/css"><!--/* General page style. The scroll bar colours only visible in IE5.5+ */body {	background-color: #FFFFFF;	scrollbar-face-color: #DEE3E7;	scrollbar-highlight-color: #FFFFFF;	scrollbar-shadow-color: #DEE3E7;	scrollbar-3dlight-color: #D1D7DC;	scrollbar-arrow-color:  #;	scrollbar-track-color: #EFEFEF;	scrollbar-darkshadow-color: #98AAB1;}/* General font families for common tags */font,th,td,p { font-family: 'song',Verdana }a:link,a:active,a:visited { color : #; }a:hover		{ text-decoration: underline; color : #DD6900; }hr	{ height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}/* This is the border line & background colour round the entire page */.bodyline	{ background-color: #FFFFFF; border: 1px #98AAB1 solid; }/* This is the outline round the main forum tables */.forumline	{ background-color: #000000; border: 0px #9898ba solid; }/* Main table cell colours and backgrounds */td.row1	{ background-color: #f0f3fa; }td.row2	{ background-color: #fafbfc; }td.row3	{ background-color: #D1D7DC; }/*  This is for the table cell above the Topics, Post & Last posts on the index.php page  By default this is the fading out gradiated silver background.  However, you could replace this with a bitmap specific for each forum*/td.rowpic {		background-color: #D1D9E2;/*		background-image: url(/forum/templates/subSilver/images/cellpic2.jpg); */		background-repeat: repeat-y;}/* Header cells - the blue and silver gradient backgrounds */th	{	color: #333333; font-size: 12px; font-weight : bold;	background-color: #9898BA; height: 25px;/*	background-image: url(/forum/templates/subSilver/images/cellpic3.gif); */}td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {/*			background-image: url(/forum/templates/subSilver/images/cellpic1.gif);*/			background-color:#d1d9e2; border: #9898ba; border-style: solid; height: 28px;}td.cat,td.catHead,td.catBottom {	height: 29px;	border-width: 0px 0px 0px 0px;}th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {	font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px;}td.row3Right,td.spaceRow {	background-color: #D1D7DC; border: #9898ba; border-style: solid;}th.thHead,td.catHead { font-size: 13px; border-width: 1px 1px 0px 1px; }th.thSides,td.catSides,td.spaceRow	 { border-width: 0px 1px 0px 1px; }th.thRight,td.catRight,td.row3Right	 { border-width: 0px 1px 0px 0px; }th.thLeft,td.catLeft	  { border-width: 0px 0px 0px 1px; }th.thBottom,td.catBottom  { border-width: 0px 1px 1px 1px; }th.thTop	 { border-width: 1px 0px 0px 0px; }th.thCornerL { border-width: 1px 0px 0px 1px; }th.thCornerR { border-width: 1px 1px 0px 0px; }/* The largest text used in the index page title and toptic title etc. */.maintitle	{	font-weight: bold; font-size: 22px; font-family: "'song',Verdana",'song',Verdana;	text-decoration: none; line-height : 120%; color : #;}/* General text */.gen { font-size : 13px; }.genmed { font-size : 12px; }.gensmall { font-size : 12px; }.gen,.genmed,.gensmall { color : #; }a.gen,a.genmed,a.gensmall { color: #; text-decoration: none; }a.gen:hover,a.genmed:hover,a.gensmall:hover	{ color: #DD6900; text-decoration: underline; }/* The register, login, search etc links at the top of the page */.mainmenu		{ font-size : 12px; color : # }a.mainmenu		{ text-decoration: none; color : #;  }a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }/* Forum category titles */.cattitle		{ font-weight: bold; font-size: 13px ; letter-spacing: 1px; color : #}a.cattitle		{ text-decoration: none; color : #; }a.cattitle:hover{ text-decoration: underline; }/* Forum title: Text and link to the forums used in: index.php */.forumlink		{ font-weight: bold; font-size: 13px; color : #; }a.forumlink 	{ text-decoration: none; color : #; }a.forumlink:hover{ text-decoration: underline; color : #DD6900; }/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */.nav			{ font-weight: bold; font-size: 12px; color : #;}a.nav			{ text-decoration: none; color : #; }a.nav:hover		{ text-decoration: underline; }/* titles for the topics: could specify viewed link colour too */.topictitle       {font-size: 12px; color : #; }h1,h2       { font-weight: bold; font-size: 12px; color : #; }a.topictitle:link   { text-decoration: none; color : #; }a.topictitle:visited { text-decoration: none; color : #333333; }a.topictitle:hover	{ text-decoration: underline; color : #DD6900; }/* Name of poster in viewmsg.php and viewtopic.php and other places */.name			{ font-size : 12px; color : #;}/* Location, number of posts, post date etc */.postdetails		{ font-size : 12px; color : #; }/* The content of the posts (body of text) */.postbody { font-size : 13px; line-height: 18px}a.postlink:link	{ text-decoration: none; color : # }a.postlink:visited { text-decoration: none; color : #333333; }a.postlink:hover { text-decoration: underline; color : #DD6900}/* Quote & Code blocks */.code {	font-family: 'song',Verdana; font-size: 12px; color: #006600;	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px}.quote {	font-family: 'song',Verdana; font-size: 12px; color: #444444; line-height: 125%;	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px}/* Copyright and bottom info */.copyright		{ font-size: 12px; font-family: 'song',Verdana; color: #444444; letter-spacing: -1px;}a.copyright		{ color: #444444; text-decoration: none;}a.copyright:hover { color: #; text-decoration: underline;}/* Form elements */input,textarea, select {	color : #;	font: normal 12px 'song',Verdana;	border-color : #;}/* The text input fields background colour */input.post, textarea.post, select {	background-color : #FFFFFF;}input { text-indent : 2px; }/* The buttons used for bbCode styling in message post */input.button {	background-color : #EFEFEF;	color : #;	font-size: 12px; font-family: 'song',Verdana;}/* The main submit button option */input.mainoption {	background-color : #FAFAFA;	font-weight : bold;}/* None-bold submit button */input.liteoption {	background-color : #FAFAFA;	font-weight : normal;}/* This is the line in the posting page which shows the rollover  help line. This is actually a text box, but if set to be the same  colour as the background no one will know ;)*/.helpline { background-color: #DEE3E7; border-style: none; }/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */@import url("templates/subSilver/formIE.css");--></style></head><body  bgcolor="#FFFFFF" text="#" link="#" vlink="#333333" /><a name="top"></a><!--栏目条--><style type=text/css>A.title1:link {font-size:17.9px;font-family:arial;font-weight:bold;text-decoration:none;color:#ffffff;}A.title1:visited {font-size:17.9px;font-family:arial;font-weight:bold;text-decoration:none;color:#ffffff;}A.title1:active {font-size:17.9px;font-family:arial;font-weight:bold;text-decoration:none;color:#ffffff;}A.title1:hover {font-size:17.9px;font-family:arial;font-weight:bold;text-decoration:none;color:#ffffff;}A.title2:link {text-decoration:none;color:#000000;font-size:12px}A.title2:visited {text-decoration:none;color:#000000;font-size:12px}A.title2:active {text-decoration:none;color:#ff0000;font-size:12px}A.title2:hover {text-decoration:none;color:#ff0000;font-size:12px}</style><table width=95% border=0 cellspacing=0 cellpadding=0 align=center><tr><td height=1 colspan=2 bgcolor=#000000><img src=http://www.chinaunix.net/images/c.gif width=1 height=1></td></tr><tr><td height=2 colspan=2></td></tr><tr><td width=150 height=18 bgcolor=#9999CC align=center><a href=http://www.chinaunix.net/ class=title1>ChinaUnix.net</a></td><td width=600 align=right>	<table width=600 border=0 cellspacing=0 cellpadding=0><tr align=center><td align=right><a href=http://www.chinaunix.net class=title2>首页</a> | <a href=http://bbs.chinaunix.net/forum/ class=title2>论坛</a> | <a href=http://www.chinaunix.net/jh class=title2>精华</a> | <a href=http://www.fanqiang.com class=title2 target=_blank>资料</a> | <a href=http://www.chinaunix.net/job class=title2>人才</a> | <a href=http://www.chinaunix.net/salon_doc/ class=title2>沙龙</a> | <a href=http://www.chinaunix.net/search.html class=title2>搜索</a></td></tr>	</table></td></tr><tr><td height=2 colspan=2></td></tr><tr><td height=1 colspan=2 bgcolor=#000000><img src=http://www.chinaunix.net/images width=1 height=1></td></tr></table><!---------><table width="95%" cellspacing="0" cellpadding="10" border="0" align="center"><tr><td class="bodyline">	<table width="100%" cellspacing="0" cellpadding="0" border="0">	   <tr>	   <td ><form method=post action=/forum/login.php><span class=gensmall>会员:<input class=post type=text name=username size=10 > &nbsp;密码:<input class=post type=password name=password size=10><br>是否自动登录<input class=text type=checkbox name=autologin>&nbsp;&nbsp;<input type=submit class=mainoption name=login value=登陆> &nbsp;&nbsp;&nbsp;&nbsp;<a href=http://bbs.chinaunix.net/forum/profile.php?mode=register target=_blank>注册用户</a> | <a href=http://bbs.chinaunix.net/forum/profile.php?mode=sendpassword target=_blank>忘记密码</a></span></form></td>	   <td>	   <!--广告位置-->	   </td>	   <form action="http://www.chinaunix.net/cgi-bin/forum/search.cgi" method=post name=search>	   <td align=center> <span class="mainmenu"><img src="/forum/templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="搜索" hspace="3" /><input type=text name=key size=20 /> <input type=submit value="GO" /> <br><br> <a  class="nav" href=http://www.mailer.com.cn target=_blank>金笛邮件系统-因Linux而精彩</a> <br>	   </td>	   </tr></form>	</table><!---广告条开始----><table width=760 border="0" cellspacing="0" cellpadding="0" align="center">	<tr>	<td align=center>	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="760" height="80">	<param name=movie value="http://www.chinaunix.net/ad/chinait/20040428school.swf">	<param name=quality value=high>	<param name="wmode" value="transparent">	<embed src="http://www.chinaunix.net/ad/chinait/20040428school.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="760" height="80"></embed>	</object>	</td>	</tr></table><!---广告条结束-----><table width="100%" cellspacing="2" cellpadding="2" border="0"  align="center">  <tr>	<td align="left" valign="bottom" colspan="2"><a class="maintitle" href="/forum/viewtopic.php?t=16854&amp;start=0&amp;postdays=0&amp;postorder=asc&amp;highlight=">精华版:scounix下curses编程函数说明;兄弟拿出来共享的别客气  </a><br />	  <span class="gensmall"><b>前往页面 <b>1</b>, <a href="/forum/viewtopic.php?t=16854&amp;postdays=0&amp;postorder=asc&amp;start=15">2</a>,...&nbsp;&nbsp;<a href="/forum/viewtopic.php?t=16854&amp;postdays=0&amp;postorder=asc&amp;start=15">下一页</a> </b><br />	  &nbsp; </span></td>	<td ></td>  </tr><tr><td><!--广告语 --></td></tr></table><table width="100%" cellspacing="2" cellpadding="2" border="0"  align="center">  <tr>	<td align="left" valign="bottom" nowrap="nowrap" width=10%><span class="nav"><a href="/forum/posting.php?mode=newtopic&amp;f=7"><img src="/forum/templates/subSilver/images/lang_chinese_simplified/post.gif" border="0" alt="发表新帖" align="middle" /></a>&nbsp;&nbsp;&nbsp;<a href="/forum/posting.php?mode=reply&amp;t=16854"><img src="/forum/templates/subSilver/images/lang_chinese_simplified/reply.gif" border="0" alt="回复帖子" align="middle" /></a></span></td>	<td align="left" valign="middle" width=*><span class="nav">&nbsp;&nbsp;&nbsp;<a href="http://www.chinaunix.net" class="nav">ChinaUnix.net首页</a> -> <a href="/forum" class="nav">论坛首页</a>	  -> <a href="/forum/viewforum.php?f=7" class="nav">SCO UNIX</a></span></td>	<td align=right width=40%><a href="http://www.chinaunix.net/jh" class="nav" target=_blank>[<span style=color:red>CU精华区</span>]</a>&nbsp;&nbsp;	</td>  </tr></table></td></tr></table><!--<iframe src=http://www.chinaunix.net/other/frame_announce.html width="95%" height=15 frameborder=0 border=0 marginwidth=0 marginheight=0 scrolling=no> </iframe>--><table class="forumline" width="95%" cellspacing="1" cellpadding="3" border="0"  align="center" style='border-collapse: collapse; WORD-BREAK: break-all'>	<tr align="right">		<td class="catHead" colspan="2" height="28"><!--广告---begin-<span class=gensmall><a href=http://bbs.chinaunix.net/forum/2/20040312/279513.html target=_blank><font color=#ff0000>==欢迎测试为CU提供的邮件系统==</font></a> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--广告---end--->		<span class="nav"><a href="/forum/viewtopic.php?t=16854&amp;view=previous" class="nav">阅读上一个主题</a> :: <a href="/forum/viewtopic.php?t=16854&amp;view=next" class="nav">阅读下一个主题</a> &nbsp;</span></td>	</tr>		<tr>		<th class="thLeft" width="150" height="26" nowrap="nowrap">作者</th>		<th class="thRight" nowrap="nowrap">留言</th>	</tr>	<tr>		<td width="150" align="left" valign="top" class="row1">			<span class="name"><a name="132632"></a>						<b>小肚子&nbsp;&nbsp;			<img src="/forum/templates/subSilver/images/icon_minigender_male.gif" alt="性别:帅哥" title="性别:帅哥" border="0" /></b>&nbsp;&nbsp;			</span><br />			<span class="postdetails">圣骑士<br /><br />			<br />			<img src="/forum/images/level/pips3.gif" alt="圣骑士" title="圣骑士" border="0" /><br />			注册时间: 2002-09-02<br />			最后登录: 2002-12-05<br />			帖子总数: <a href=http://www.chinaunix.net/cgi-bin/forum/search.cgi?mode=all_author&key=小肚子&u=17947 target=_blank>81</a><br />			精华帖子: <a href=http://www.chinaunix.net/cgi-bin/forum/search.cgi?forum_num=-1&mode=author_name&key=小肚子&u=17947 target=_blank>2</a><br />			原创精华: 0<br />			来自: 广东广州<br />			在线状态: ...<font color=#999999>离线</font>...<br />			</span>		</td>		<td class="row1" width="100%" height="28" valign="top"><table width="95%" border="0" cellspacing="0" cellpadding="0">			<tr>				<td width="100%"><a href="/forum//forum/viewtopic.php?p=132632#132632"><img src="/forum/templates/subSilver/images/icon_minipost.gif" width="12" height="9" alt="帖子总数" title="帖子总数" border="0" /></a><span class="postdetails">发表于: 2002-09-02 09:09<span class="gen">&nbsp;</span>&nbsp; &nbsp;发表主题: 精华版:scounix下curses编程函数说明;兄弟拿出来共享的别客气  </span></td>				<td valign="top" align="right" nowrap="nowrap"><a href="/forum/posting.php?mode=quote&amp;p=132632"><img src="/forum/templates/subSilver/images/lang_chinese_simplified/icon_quote.gif" alt="引用并回复" title="引用并回复" border="0" /></a>   </td>			</tr>			<tr>				<td colspan="2"><hr /></td>			</tr>			<tr>				<td colspan="2"><span class="postbody">INDDW*curscr:当前屏幕<br />WINDOW  *stdscr:标准屏幕<br />int LINES:终端上的行数<br />int COLS:终端上的列数<br />bool  TRUE:真标志,1<br />bool  FALSE:假标志,0<br />int  ERR:错误标志,-1<br />int  OK:OK标志,0<br />---------------------------------------------<br />win:WINDOW  *<br />bf:bool<br />ch:chty  pe<br />str:char  *<br />chstr:chty  pe*<br />fmt:char  *<br />否则:int  <br />---------------------------------------------<br />初始化<br /><br />WINDOW  *initscr()<br />SCREEN*newterm(char  *type, FILE  *outfd, FILE  *infd)<br />对用户访问的每个终端都应该调用newterm<br />t y p e是终端的名称,包括在$ T E R M中(如ansi, xterm, vt100等等)<br />SCREEN*set_term(SCREEN  *new)<br />用户可以切换当前终端。所有的函数都将在设置的当前终端上起作用。<br />int    endwin()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -