¹è©® - }j
A - ncurses
ncurses
CUIɨ¢ÄCXN[âCL[üÍCJ[\ÈÇðÇ·éCuÅ·D
±ÌCuðp·é±ÆÅCCUIx[XÅ_CAOðoµ½èC¢ë¢ëoéæ¤Å·D
±±ÅÍC©ªÅg¤ÆvÁ½ÖÌÝÈPÈà¾ð¢Ä¢Ü·D
±Ìy[WÍCBSDÌ}j
AðQlÉCªðßµ½àÌÅ·D
ÔáÁÄ¢é©àµêܹñÌÅC©ÈÓCÅQlɵľ³¢D
æèÚµmè½¢êÍCBSDÌ}j
Að©Äº³¢D
wb_t@Cncurses.hÌCN[hÆCuncurses.aÌNªKvÅ·
#include <ncurses.h>
-lncurses
g¢û
- ì¬
initscr àµÍ newterm
- Ýè
ÈÆàcbreak àµÍ nocbreakðÄÑo·×«D
- p
- ã
endwinÅ[ÌZbgÆJ[\ð¶ºÉÚ®·éD
ܽCKvɶÄCendwinÌãÉdelscreenðÄÔD
XN[ÆEBhE
cursesæÊÍCXN[Æ¢¤[ÆC[ãÌEBhEÌQíÞ©ç\¬³êÜ·D
EBhEÍCÊíÌEBhE̼ÉCpbhÆÄÎêéæÊTCYÉe¿³êÈ¢EBhEà èÜ·D
¼OÌKñH
Úª«ÉæèCøªÏíéæ¤Å·D
wÅnÜéÖÍCøÉEBhEðwèµÜ·D
pÅnÜéÖÍCøÉpbhðwèµÜ·D
Úª«Ì³¢ÖÍCstdscrðgpµÜ·D
mvÅnÜéÖÍAÀÛÌðs¤OÉysCxñÚÉmoveµÜ·D
mvwÅnÜéÖÍCEBhEÆ x,y ÀW̼ûðwèµÜ·
±±ÅÍCÅàPÈ`®ÌÝ̹ĢܷD
Öé¾ÌãëÉt¯çêévtBbNXêðæ¹Ä¨«Ü·D
ܽCCh¶pÌÖà¶ÝµÜ·ªC±±ÅÍȪµÜ·D
vtBbNXÌá
int addch(chtype ch); [w,mv,mvw]
int waddch(WINDOW *win, chtype ch);
int mvaddch(int y, int x, chtype ch);
int mvwaddch(WINDOW *win, int y, int x, chtype ch);
Öê
XN[ÍC[ÌîbÆÈéªÅ·D
ÁÉKvªÈ¢Àèinitscr¾¯Å\ª©Æv¢Ü·D
1: initscr();
2: ...
3: endwin();
WINDOW *iniscr(void);
[Ìú»D
«ÏTERMCWüoÍðpµC[ðú»µÜ·D
int endwin(void);
XN[ðZbgµCJ[\ð¶ºÉÚ®µÜ·D
XN[ÖAÌÈÇÍðúµÈ¢½ßCKvɶÄdelscreenðÄÑo·Kvª èÜ·D
bool isendwin(void);
»ÝÌXN[ãɨ¢ÄC·ÅÉCendwinªÄÎêÄ¢é©ÔµÜ·D
SCREEN *newterm(const char *type, FILE *outfd, FILE *infd);
wè³ê½[^CvCüoÍpt@CfBXNv^ðpµÄVµ¢XN[ð쬵ܷD
SCREEN *set_term(SCREEN *new);
»ÝÌXN[ðØèÖ¦éD
ÔlÍC¡ÜÅÌXN[D
void delscreen(SCREEN* sp);
XN[ÅpµÄ¢éððúµÜ·D
»ÝgpÌXN[ððúµÈ¢æ¤ÉÓ
EBhEÍCXN[©çÍÝo·æ¤Éìé±ÆÍūܹñD
ì¬EÚ®ÉæÁÄÍÝoĵܤƫÍG[ÆÈèÜ·D
1: WINDOW *wnd = subwin(stdscr, 10, 20, 10, 5);
2: if(wnd) wprintw(wnd, "(10, 5)");
3: else printw("error");
4: delwin(wnd);
WINDOW *newwin(int nlines, int ncols, int begin_y, int begin_x);
nlinessCncolsñÌVµ¢EBhEðCbegin_ysCbegin_xñÚÉ쬵ܷD
WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begin_y, int begin_x);
nlinessCncolsñÌVµ¢EBhEðwèµ½EBhEÌbegin_ysCbegin_xñÚÉ쬵ܷD
int delwin(WINDOW *win);
wèµ½EBhEðíµÜ·D
WINDOW *derwin(WINDOW *orig, int nlines, int ncols, int begin_y, int begin_x);
int mvderwin(WINDOW *win, int par_y, int par_x);
WINDOW *dupwin(WINDOW *win);
void wsyncup(WINDOW *win);
void wsyncdown(WINDOW *win);
int syncok(WINDOW *win, bool bf);
void wcursyncup(WINDOW *win);
pbhÍCTCY§ÀÌÈ¢EBhEÅ·D
pbhðpµ½êCæÊÌXVÍsíêÈ¢½ßCKvɶÄprefreshÅæÊðXV·éKvª èÜ·D
WINDOW *newpad(int nlines, int ncols);
nlinessCncolsñÌVµ¢pbhð쬵ܷD
WINDOW *subpad(WINDOW *orig, int nlines, int ncols, int begin_y, int begin_x);
nlinessCncolsñÌVµ¢pbhðwèµ½EBhEÌbegin_ysCbegin_xñÚÉ쬵ܷD
int mvwin(WINDOW *win, int y, int x);
wèµ½EBhEðCysÚCxñÚÉÚ®µÜ·D
int wresize(WINDOW *win, int lines, int columns);
wèµ½EBhEðClinessCcolumnsñÉTCYµÜ·D
int overlay(const WINDOW *srcwin, WINDOW *dstwin);
dstwinEBhEÉCsrcwinEBhEªdÈéæ¤ÉzuµÜ·D
srcwinªXV³êÄàCdstwinÌàeÍjó³êܹñD
2ÂÌEBhEÍá¤å«³Åà©Ü¢Ü¹ñD
int overwrite(const WINDOW *srcwin, WINDOW *dstwin);
srcwinÌXVÉæèdstwinªjó³êé±ÆÈOÍCoverlayƯ¶Å·D
int copywin(WINDOW *srcwin, WINDOW *dstwin, int sminrow, int smincol, int dminrow, int dmincol, int dmaxrow, int dmaxcol, int overlay);
zu·éÀWðwèÅ«é±ÆÈOÍCoverlayƯ¶Å·D
int scrl(int n); [w]
nª³ÌÌêCãûüÉnsXN[µÜ·D
ÌÌêCºûüÉnsXN[µÜ·D
±ÌÖðg¤êCscrollokÅXN[ªLøÉÈÁÄ¢éKvª èÜ·D
int scroll(WINDOW *win);
wscrl(win, 1)ƯŷD
int beep(void);
Â\Å êÎ[Ìx¹ðÂçµÜ·D
Â緱ƪūȢêC[ðtbV
(rWux)³¹Ü·D
Ç¿çàÅ«È¢êCÈÉàN«Ü¹ñD
int flash(void);
[ðtbV
³¹Ü·D
tbV
³¹é±ÆªÅ«È¢êCx¹ðÂçµÜ·D
Ç¿çàÅ«È¢êCÈÉàN«Ü¹ñD
void getparyx(WINDOW *win, int y, int x);
wèµ½EBhEªTuEBhEÅ éÆ«CeEBhEɨ¯é¶ãÀWð澵ܷD
TuEBhEÅÍȢƫCxÆyÉÍ-1ªüêçêêÜ·D
±êÍCÖÅÍÈ}NÅÀ³êĢܷD
void getbegyx(WINDOW *win, int y, int x);
wè³ê½EBhEÌÀWð澵ܷD
±êÍCÖÅÍÈ}NÅÀ³êĢܷD
void getmaxyx(WINDOW *win, int y, int x);
wè³ê½EBhEÌTCYð澵ܷD
±êÍCÖÅÍÈ}NÅÀ³êĢܷD
int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br); [w]
EBhEÉgð쬵ܷD
øÉÍC»ê¼êÌÊuÉoÍ·é¶ðwè·é±ÆªÅ«C0ðwèµ½êCftHg̶ªgp³êÜ·D
øÆftHg̶
ls ¶¤ ACS_VLINE
rs E¤ ACS_VLINE
ts 㤠ACS_HLINE
ds º¤ ACS_HLINE
tl ¶ã÷ ACS_ULCORNER
tr Eã÷ ACS_URCORNER
bl ¶º÷ ACS_LLCORNER
br Eº÷ ACS_LRCORNER
COtBbNXÉÖµÄÍC
±¿çQÆD
int box(WINDOW *win, chtype verch, chtype horch);
wborder(win, verch, verch, horch, horch, 0, 0, 0, 0)ƯŷD
int hline(chtype ch, int n); [w,mv,mvw]
»ÝÌJ[\Êu©çÅånÌ·³ðÂ
½üðø«Ü·D
J[\ÊuÍÏíèܹñD
int vline(chtype ch, int n); [w,mv,mvw]
¼üðø±ÆÈOÍChlineƯ¶Å·D
void bkgdset(const chtype ch); [w]
EBhEÌwiðÝèµÜ·D
int bkgd(const chtype ch); [w]
chtype getbkgd(WINDOW *win);
EBhEÌwið澵ܷD
int attron(int attrs); [w]
EBhEÌ®«Ìwèµ½®«ðLøɵܷD
wèū鮫ÉÖµÄÍC
±¿çQÆD
int attroff(int attrs); [w]
EBhEÌ®«Ìwèµ½®«ð³øɵܷD
wèū鮫ÉÖµÄÍC
±¿çQÆD
int attrset(int attrs);
EBhEÌ®«ðCwèµ½®«ÉÝèµÜ·D
wèū鮫ÉÖµÄÍC
±¿çQÆD
int standend(void); [w]
attrset(A_NORMAL)ƯŷD
int standout(void); [w]
attron(A_STANDOUT)ƯŷD
int color_set(short color_pair_number, void* opts); [w]
EBhEÌOi / wiðÝèµÜ·D
optͫ̽ßÌ\ñÏÅC»ÝÌƱëNULLðn³È¢Æ¢¯Ü¹ñD
int attr_on(attr_t attrs, void *opts); [w]
®«Ìwèªattr_t^Å é±ÆÈOÍCattronƯ¶Å·D
optͫ̽ßÌ\ñÏÅC»ÝÌƱëNULLðn³È¢Æ¢¯Ü¹ñD
int attr_off(attr_t attrs, void *opts); [w]
®«Ìwèªattr_t^Å é±ÆÈOÍCattroffƯ¶Å·D
optͫ̽ßÌ\ñÏÅC»ÝÌƱëNULLðn³È¢Æ¢¯Ü¹ñD
int attr_set(attr_t attrs, short pair, void *opts); [w]
®«Ìwèªattr_t^Å é±ÆÈOÍCattrsetƯ¶Å·D
optͫ̽ßÌ\ñÏÅC»ÝÌƱëNULLðn³È¢Æ¢¯Ü¹ñD
int attr_get(attr_t *attrs, short *pair, void *opts); [w]
»ÝÌ®«¨æÑFÌyAð澵ܷD
optͫ̽ßÌ\ñÏÅC»ÝÌƱëNULLðn³È¢Æ¢¯Ü¹ñD
int chgat(int n, attr_t attr, short color, const void *opts) [w,mv,mvw]
J[\Êu©çCn¶Ì®«ðÏXµÜ·D
optͫ̽ßÌ\ñÏÅC»ÝÌƱëNULLðn³È¢Æ¢¯Ü¹ñD
J[®«ðµ¤½ßÌÖÅ·D
±êçÌÖðg¤êC 究ßstart_colorðÄÑoµÄ¨Kvª èÜ·D
int start_color(void);
J[®«ðµ¤½ßÉCú»µÜ·D
±ÌÖÍCinitscrÆêÉÄÑoµÄ¨±ÆD
int init_pair(short pair, short f, short b);
FÌyAÌè`ðú»EÏXµÜ·D
pairÍyAÌÔÅC1©çCOLOR_PAIRS-1ÌÔÌlðwèµÜ·D
fÆbÍOiFÆwiFÅC0©çCOLORSÌÔÌlðwèµÜ·D
pair = 0ÍOiFªCwiFªÉÝè³êĨèCÏX·é±ÆÍūܹñD
int pair_content(short pair, short *f, short *b);
wèµ½yAÔÌOiFÆwiFð澵ܷD
int init_color(short color, short r, short g, short b);
FÌè`ðú»EÏXµÜ·D
colorÍFÌÔÅC1©çCOLORÌÔÌlðwèµÜ·D
rCgCbÍFÌÔCÎCÂÌvf̳ÅC0©ç1000ÌÔÌlðwèµÜ·D
±±ÅÏX³ê½Fͼ¿ÉæÊÖ½f³êÜ·D
int color_content(short color, short *r, short *g, short *b);
wèµ½FÔÌRGB̳ð澵ܷD
bool has_colors(void);
»ÝÌ[ªFðµ¦é©ÔµÜ·D
µ¦éêÍCTRUEªÔ³êÜ·D
bool can_change_color(void);
»ÝÌ[ªFðµ¦C©ÂCFÌÏXðT|[gµÄ¢é©ÔµÜ·D
µ¦éêÍCTRUEªÔ³êÜ·D
int assume_default_colors(int fg, int bg);
ftHgÌwiFÆOiFƵÄg¤FÔðwèµÜ·D
±êÍCBêFyA0ÌFÌgÝí¹ðÏX·éèiÉÈèÜ·D
±ÌÖÍCncursesÌg£ÖÅ·D
int use_default_colors(void);
assume_default_colors(-1, -1)Æ¿Å·D
int move(int y, int x); [w]
J[\ðysxñÉÚ®µÜ·D
void getyx(WINDOW *win, int y, int x);
J[\ÌÀWð澵ܷD
±êÍCÖÅÍÈ}NÅÀ³êĢܷD
int getmouse(MEVENT *event);
int ungetmouse(MEVENT *event);
mmask_t mousemask(mmask_t newmask, mmask_t *oldmask);
bool wenclose(WINDOW *win, int y, int x);
bool mouse_trafo(int* pY, int* pX, bool to_screen); [w]
int mouseinterval(int erval);
[©çÌüÍ̧äÅ·D
1: cbreak();
2: noecho();
int cbreak(void);
L[ÌüÍðRaw ModeɵܷD
±Ì[hÅÍCL[üÍÍobt@³ê¸C·®ÉvOÉn³êÜ·
int nocbreak(void);
L[ÌüÍðCooked ModeɵܷD
±Ì[hÅÍCüs©LbW^[ªüͳêéÜÅCL[üÍðobt@µÜ·D
int halfdelay(int tenths);
Raw ModeÆÙÚ¯¶Å·ªCthnths * 10ªÌ1bÒÁÄüͪ³©Á½êG[ÆÈèÜ·D
±Ì[hð²¯éÆ«ÍCnocbreakðÄÑÜ·D
int echo(void);
L[ð^Cvµ½Æ«ÉCXN[ÉGR[·é[hɵܷD
int noecho(void);
L[ð^CvµÄàCXN[ÉGR[µÈ¢[hɵܷD
int intrflush(WINDOW *win, bool bf);
L[{[h©çÌèÝ(interrupt(SIGINT),break,quit(SIGQUIT))ª¶µ½Æ«ÉCEBhEÌàeðflash·é©wèµÜ·D
int keypad(WINDOW *win, bool bf);
bfÉTRUEðwèµ½êCwgetchɨ¢ÄCt@NVL[ðµ½Æ«Ét@NVL[ÌR[hðÔ·æ¤ÉÈèÜ·D
FALSEÌêCGXP[vV[PXÌÜÜæèo³êÜ·D
Ô³êéL[R[hÉÖµÄÍC}j
ACàµÍ
±¿çQÆD
int define_key(char *definition, int keycode);
L[R[hÉL[ðèÄÜ·D
definitionªNULLÅ Á½êC»ÌL[R[hÍí³êÜ·D
char * keybound(int keycode, int count);
wèµ½L[R[hÉèÄçê½L[ð澵ܷD
int keyok(int keycode, bool enable);
wèµ½L[R[hÌLø/³øðØè֦ܷ
int meta(WINDOW *win, bool bf);
int nodelay(WINDOW *win, bool bf);
bfÉTRUEðwèµ½êCgetchÈÇÌÄÑoµªCñubLO[hÉÈèÜ·D
ñubLO[hÅÍCüÍÌõª³¢iobt@Éf[^ª³¢jêCERRªÔ³êÜ·D
int raw(void);
int noraw(void);
void noqiflush(void);
void qiflush(void);
int notimeout(WINDOW *win, bool bf);
timeoutÖÆyAÅͳ¢±ÆÉÓ
ÌL[üÍÜÅÌ^CAEgðp·é©wèµÜ·D
±êÍCGXP[vV[PXÌðßÉp³êÜ·D
void timeout(int delay); [w]
nodelayÆÙÚ¯¶Å·ªCERRðÔ·ÜÅÌ^CAEgÔðwèÅ«é_ªá¢Ü·D
delayÉÌlðwè·éÆCubLO[hÉÈèÜ·D
delayÉ0ðwè·éÆCñubLO[hÉÈèÜ·D
delayɳÌlðwè·éÆCdelay~bÒ¿C»ÌÔÉüͪ³¢êERRðԵܷD
int typeahead(int fd);
üÍÍCscanwnÖÆCgetnÖCinnÖª èÜ·D
á¢ÍÙÆñÇ èܹñªC
scanwnÖÍ®t«üÍC
getnÖÍÊíÌüÍC
innÖÍEBhE̶ÌÇÝÝ
Æ¢Á½Æ±ëŵ天D
int scanw(char *fmt [, arg] ...); [w,mv,mvw]
getstrɨ¢Äüͳ꽶ñð³ÉCscanfÉ]¢®»µ½êƯŷD
int vwscanw(WINDOW *win, char *fmt, va_list varglist);
ÂÏøðva_listƵÄn·±ÆÈOÍCscanwƯ¶Å·D
±ÌÖðg¤êCwb_t@Cvarargs.hàCN[hµÄ¨Kvª èÜ·D
int getch(void); [w,mv,mvw]
1¶ÇÝÝÜ·D
keypadª
TRUEÉÝè³êÄ¢éêÍCL[R[hªAÁÄéÂ\«ª èÜ·D
Ô³êéL[R[hÉÖµÄÍC}j
ACàµÍ
±¿çQÆD
int ungetch(int ch);
1¶µÝÜ·D
±±Åµñ¾¶ªCÌgetchÅÔ³êÜ·D
µÝªÛسêÄ¢éÌÍC1¶ÌÝÅ·D
int getstr(char *str); [w,mv,mvw]
üs©LbW^[ªðó¯æéÜÅCL[{[h©ç¶ñðÇÝÝÜ·D
int getnstr(char *str, int n); [w,mv,mvw]
ÇÝÞ¶ñÌÅå·ðwè·é±ÆÈOÍCgetstrƯ¶Å·D
chtype inch(void); [w,mv,mvw]
J[\Êu̶ð®«t«ÅÇÝoµÜ·D
int instr(char *str); [w,mv,mvw]
J[\Êu©çk¶ÜÅðÇÝoµÜ·D
int innstr(char *str, int n); [w,mv,mvw]
ÇÝÞ¶ñÌÅå·ðwè·é±ÆÈOÍCinstrƯ¶Å·D
int inchstr(chtype *chstr); [w,mv,mvw]
ÇÝo·¶ñª®«t«Å é±ÆÈOÍCinstrƯ¶Å·D
int inchnstr(chtype *chstr, int n); [w,mv,mvw]
ÇÝÞ¶ñÌÅå·ðwè·é±ÆÈOÍCinchstrƯ¶Å·D
[ÖÌoÍÉÖ·éÝèÅ·D
1: idlok();
2: scrollok();
int clearok(WINDOW *win, bool bf);
æÊðNAµCSæÊðÄ`æ·éæ¤ÉµÜ·D
[ðZbg·éÆ«âoøÊ𾽢ƫÉg¢Ü·H
int idlok(WINDOW *win, bool bf);
sÌ}ü^íðs¦éæ¤ÉµÜ·D
æÊÌXN[ÍCźsÉsðÇÁ·éÌÅCscrollokðÄÑo·Æ«ÍC±ÌÖàÄÑo·Kvª èÜ·D
void idcok(WINDOW *win, bool bf);
¶Ì}ü^íðs¦éæ¤ÉµÜ·D
ftHgÅLøÉÈÁÄ¢éÍlD
void immedok(WINDOW *win, bool bf);
int leaveok(WINDOW *win, bool bf);
int setscrreg(int top, int bot); [w]
XN[·éÌæðwèµÜ·D
int scrollok(WINDOW *win, bool bf);
ÅIsÅüsª¶µ½Æ«CXN[·é©wèµÜ·D
int nl(void);
üsð^[ÆCtB[hÉÏ·µÜ·D
int nonl(void);
üsð^[ÆCtB[hÉÏ·µÜ¹ñD
oÍÍCprintwnÖÆCaddnÖCinsnÖª èÜ·D
á¢ÍÙÆñÇ èܹñªC
printwnÖÍ®t«oÍC
addnÖÍJ[\ÌãëɶñðÇÁC
insnÖÍJ[\ÌOɶñð}ü
Æ¢Á½Æ±ëŵ天D
int printw(char *fmt [, arg] ...); [w,mv,mvw]
printfÉ]¢®»µ½¶ñðCaddstrÉnµ½êƯŷD
int vwprintw(WINDOW *win, char *fmt, va_list varglist);
ÂÏøðva_listƵÄn·±ÆÈOÍCprintwƯ¶Å·D
±ÌÖðg¤êCwb_t@Cvarargs.hàCN[hµÄ¨Kvª èÜ·D
int addch(chtype ch); [w,mv,mvw]
J[\ÊuɶðÇÁµCJ[\ðißÜ·D
±ÌÆ«CE[Å êÎÌsÌæªÉJ[\ðÚ®µÜ·D
ܽCźsÅ èCXN[Â\(scrollok)Å êÎCXN[µÜ·D
±ÌÖÅÍCC`æ¶ðoÍ·é±ÆªÅ«Ü·D
g¦éC`æ¶Í
±¿çQÆD
int echochar(chtype ch); [w]
addchÆrefresh±¯ÄÄÑo³ê½êƯŷD
oͷ鶪C§ä¶ÅÍÈC©ÂC1¶¾¯Å éêÍC±¿çÌÖðgÁ½ûª¢¢æ¤Å·D
int pechochar(WINDOW *pad, chtype ch);
ÎÛªpbhÅ é±ÆÈOCechocharƯŷD
int addstr(const char *str); [w,mv,mvw]
J[\ÊuɶñðÇÁµCJ[\ðißÜ·D
addchƯlÉCKvɶÄüsEXN[³êÜ·D
int addnstr(const char *str, int n); [w,mv,mvw]
oÍ·é¶ñÌÅå·ðwè·é±ÆÈOÍCaddstrƯ¶Å·D
nÉÌðwèµ½êCàÅn = strlen(str)ðÄÑoµÄ¢éÍlD
int addchstr(const chtype *chstr); [w,mv,mvw]
addstrÉĢܷªCȺÌ_ɨ¢ÄÙÈèÜ·D
- J[\ðißÈ¢±Æ
- obNXy[XÈÇ̶ððߵȢ±Æ
- sÜÅ«ÄàüsµÈ¢±Æ
»Ì½ßC
addstrÆärµÄC¬É®ìµÜ·D
int addchnstr(const chtype *chstr, int n); [w,mv,mvw]
oÍ·é¶ñÌÅå·ðwè·é±ÆÈOÍCaddchstrƯ¶Å·D
nÉÌðwèµ½êCàÅn = strlen(str)ðÄÑoµÄ¢éÍlD
int insch(chtype ch); [w,mv,mvw]
J[\ÊuÉchð}üµÜ·D
±ÌÊC»ÌsÌÅã̶ªí³êé©àµêܹñD
ܽC±ÌÖÅÍCJ[\ÌÊuÍÏ»µÜ¹ñD
int insstr(const char *str); [w,mv,mvw]
J[\ÌÊuɶñð}üµÜ·D
ܽC±ÌÖÅÍCJ[\ÌÊuÍÏ»µÜ¹ñD
int insnstr(const char *str, int n); [w,mv,mvw]
oÍ·é¶ñÌÅå·ðwè·é±ÆÈOÍCinsstrƯ¶Å·D
nÉÌðwèµ½êCàÅn = strlen(str)ðÄÑoµÄ¢éÍlD
int insnstr(const char *str, int n); [w,mv,mvw]
oÍ·é¶ñÌÅå·ðwè·é±ÆÈOÍCinsstrƯ¶Å·D
nÉÌðwèµ½êCàÅn = strlen(str)ðÄÑoµÄ¢éÍlD
int insdelln(int n); [w]
»ÝsÌãÉnsósðÇÁµÜ·D
»ÌÊCº[ÌnsªÁ¦é©àµêܹñD
nÉÌðwèµ½êC»Ýs̺Ìs©çnsí³êÜ·D
int insertln(void); [w]
insdelln(1)ðÄÑo·ÌƯŷD
int erase(void); [w]
EBhEÉóðRs[·é±ÆÉæè¶ðÁµÜ·D
int clear(void); [w]
clearokðÄÑoµCÌrefreshÌÄÑoµÉæÊSÌðÄ`æµÜ·D
int clrtoeol(void); [w]
J[\Êu©çsÌIíèÜÅðíµÜ·D
int clrtobot(void); [w]
J[\Êu©çæÊÌIíèÜÅðíµÜ·D
int delch(void);
J[\Êu̶ðíµÜ·D
±êÉæèCJ[\æèE̶ªC긶ɸêÜ·D
int deleteln(void);
J[\Ì ésðíµÜ·D
±êÉæèCÌsÈ~ªês¸ÂãɸêÜ·D
int refresh(void); [w]
[ðEBhEf[^ÉîëÄ`æµÜ·D
±ÌÖÍCwnoutrefreshÆdoupdateðA±ÅÄÑo·ÌÆÙÚ¿Å·D
int prefresh(WINDOW *pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol);
ÎÛªpbhÅ é±ÆÈOCwrefreshƯŷD
½¾µCEBhEɨ¯épbhÌÊuÖWð¦·øªÇÁ³êĢܷD
pminrowCpmincolÍpbhàÅÌÀWC
sminrowCsmincolCsmaxrowCsmaxcolÍXN[àÅÌÀWÉÈèÜ·D
pbhÌƳÍCXN[ÀW©çvZ³êÜ·D
ÂÜèCpmaxrow = pminrow + (pmaxrow - pminrow)ÉÈèÜ·D
±êçÌÀWÍC®SÉpbhCEBhEÌàÉ éKvª èÜ·D
int wnoutrefresh(WINDOW *win);
EBhEf[^ð¼zæÊÉRs[µÜ·D
¡ÌEBhEðXV·éêCPÉrefreshÖðÄÑo·æèø¦IÉæÊÌXVðs¤±ÆªÅ«Ü·D
int pnoutrefresh(WINDOW *pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol);
ÎÛªpbhÅ é±ÆÈOCwnoutrefreshƯŷD
ÇÁøÉÖµÄÍCprefreshƯ¶Å·D
int doupdate(void);
¼zæÊÆÀÛÌæÊðärµCæÊðXVµÜ·D
int touchwin(WINDOW *win);
wèµ½EBhEðXVÎÛÉwèµÜ·D
int redrawwin(WINDOW *win);
touchwinÆÙگŷD
int touchline(WINDOW *win, int start, int count);
wèµ½sðXVÎÛÉwèµÜ·D
int wredrawln(WINDOW *win, int beg_line, int num_lines);
touchlineÆÙگŷD
int untouchwin(WINDOW *win);
ÅãÌrefreshÈ~CXVª³©Á½æ¤ÉµÜ·D
int wtouchln(WINDOW *win, int y, int n, int changed);
ysÚÉnsÌósð쬵ܷD
changedÉ0ðwèµ½êCæÊÌXVðÝèµÜ¹ñD
0ÈOÅ êÎCæʪXV³ê½æ¤ÉÝèµÜ·D
bool is_wintouched(WINDOW *win);
wèµ½EBhEªXV³êĢ驲×Ü·D
XV³êÄ¢êÎCTRUEªÔ³êÜ·D
bool is_linetouched(WINDOW *win, int line);
wèµ½sªXV³êĢ驲×Ü·D
XV³êÄ¢êÎCTRUEªÔ³êÜ·D
int slk_init(int fmt);
int slk_set(int labnum, const char *label, int fmt);
char *slk_label(int labnum);
int slk_attron(const chtype attrs);
int slk_attroff(const chtype attrs);
int slk_attrset(const chtype attrs);
int slk_attr_on(attr_t attrs, void* opts);
int slk_attr_off(const attr_t attrs, void * opts);
int slk_attr_set(const attr_t attrs, short color_pair_number, void* opts);
attr_t slk_attr(void);
int slk_color(short color_pair_number);
int slk_refresh(void);
int slk_noutrefresh(void);
int slk_clear(void);
int slk_restore(void);
int slk_touch(void);
[Ìîñðæ¾·é½ßÌÖÅ·
curses «â¢í¹ (NG) [`
int baudrate(void);
char erasechar(void);
int erasewchar(wchar_t *ch);
bool has_ic(void);
bool has_il(void);
char killchar(void);
int killwchar(wchar_t *ch);
char *longname(void);
attr_t term_attrs(void);
chtype termattrs(void);
char *termname(void);
int has_key(int ch);
wèµ½t@NVL[ð»ÝÌ[ªF¯·é©²×Ü·D
F¯Å«éêC
TRUEªÔ³êÜ·D
wèÅ«éL[R[hÉÖµÄÍC}j
ACàµÍ
±¿çQÆD
char *unctrl(chtype c);
c©ç®«ðæè«C\¦·é¶ðԵܷD
wunctrlÆ¢¤Öà¶ÝµÜ·ªC±êÍCh¶pÌÖÅ·D
char *keyname(int c);
L[cÉηé¶ñðԵܷD
void filter(void);
void use_env(bool f);
FALSEðwèµÄ¨±ÆÅC
LINES, COLUMNÌlðC«ϩçÅÍÈC
terminfo f[^x[XÉ©çÇÝo·æ¤ÉµÜ·D
initscrðÄÑo·OÉÄÑoµÄ¨Kvª èÜ·D
int putwin(WINDOW *win, FILE *filep);
EBhEÉÖ·éîñð·×ÄCfilepÉo͵ܷD
WINDOW *getwin(FILE *filep);
putwinÉo굀 éîñ©çCEBhEð쬵ܷD
int delay_output(int ms);
oÍðms~bxç¹Ü·D
±ÌÖÍsleep·éí¯ÅÍÈ¢ÌÅC Üègpͧ³êܹñD
int flushinp(void);
æsµÄü굀 éf[^ð·×ÄjüµÜ·D
const char * curses_version(void);
cursesCuÌo[WðԵܷD
int use_extended_names(bool enable);
int resize_term(int lines, int columns);
X[pÅ·D
[ÌTCYðÏXµÜ·D
int resizeterm(int lines, int columns);
X[pÅ·D
SIGWINCH nh̽ßðÜÞ±ÆÈOÍCresize_termƯ¶Å·D
bool is_term_resized(int lines, int columns);
X[pÅ·D
[ÌTCYªÏX³êÄ¢êÎTRUEðԵܷD
fobOpÌÖÅ·D
±êçÌÖðg¤êCncursesCuÌãíèÉCncurses_gCuðN·éKvª èÜ·D
g[Xt@CÍCJgfBNgÌtraceÆ¢¤¼OÌt@CÉÈèÜ·D
void trace(const unsigned int param);
g[X·éxðwèµÜ·D
wèÅ«ép[^ÉÖµÄÍC
±¿çQÆD
void _tracef(const char *format, ...);
®t«Åo͵ܷD
void _tracedump(const char *label, WINDOW *win);
char *_traceattr(attr_t attr);
char *_traceattr2(int buffer, chtype ch);
char *_nc_tracebits(void);
char *_tracechar(const unsigned char ch);
char *_tracechtype(chtype ch);
char *_tracechtype2(int buffer, chtype ch);
char *_tracemouse(const MEVENT *event);
int scr_dump(const char *filename);
»ÝÌXN[Ìàeðt@CÖ_vµÜ·D
int scr_restore(const char *filename);
scr_dumpÉæè_v³ê½t@C©çæÊðA³¹Ü·D
int scr_init(const char *filename);
scr_dumpÉæè_v³ê½t@CÌîñð³ÉCXN[ðú»µÜ·D
int scr_set(const char *filename);
scr_initCscr_resutoreðA±ÅÄÑo·ÌÆ¿Å·D
ȺÌÖÍCgpª§³êܹñD
Â\ÈÀèCWÌcursesÖðg¤æ¤ÉµÄ¾³¢D
curses[`
int def_prog_mode(void);
int def_shell_mode(void);
int reset_prog_mode(void);
int reset_shell_mode(void);
int resetty(void);
int savetty(void);
void getsyx(int y, int x);
void setsyx(int y, int x);
int ripoffline(int line, int (*init)(WINDOW *, int));
int curs_set(int visibility);
int napms(int ms);
ms~b sleep µÜ·D
terminfo P[preBf[^x[XÖÌC^tF[X
±ÌÖðg¤êCwb_t@Cterm.hðCN[hµC
extern char PC; extern char * UP; extern char * BC; extern short ospeed;
ðé¾·éKvª èÜ·D
int tgetent(char *bp, const char *name);
int tgetflag(char *id);
int tgetnum(char *id);
char *tgetstr(char *id, char **area);
char *tgoto(const char *cap, int col, int row);
int tputs(const char *str, int affcnt, int (*putc)(int));
terminfo f[^x[XÖÌC^tF[X
±ÌÖðg¤êCwb_t@Cterm.hðCN[h·éKvª èÜ·D
int setupterm(const char *term, int fildes, int *errret);
int setterm(const char *term);
TERMINAL *set_curterm(TERMINAL *nterm);
int del_curterm(TERMINAL *oterm);
int restartterm(const char *term, int fildes, int *errret);
char *tparm(const char *str, ...);
int tputs(const char *str, int affcnt, int (*putc)(int));
int putp(const char *str);
int vidputs(chtype attrs, int (*putc)(char));
int vidattr(chtype attrs);
int vid_puts(attr_t attrs, short pair, void *opts, int (*putc)(char));
int vid_attr(attr_t attrs, short pair, void *opts);
int mvcur(int oldrow, int oldcol, int newrow, int newcol);
int tigetflag(const char *capname);
int tigetnum(const char *capname);
char *tigetstr(const char *capname);
Ó
EBhEÌÏÝdËÍCpanelCug¤Kvª éæ¤Å·D
gbvÖ