📄 term.h
字号:
const char *TI_dial; /* DI / dial dial number #1 */ const char *TI_qdial; /* QD / qdial dial number #1 without checking */ const char *TI_tone; /* TO / tone select touch tone dialing */ const char *TI_pulse; /* PU / pulse select pulse dialing */ const char *TI_hook; /* fh / hook flash switch hook */ const char *TI_pause; /* PA / pause pause for 2-3 seconds */ const char *TI_wait; /* WA / wait wait for dial-tone */ const char *TI_u0; /* u0 / u0 User string #0 */ const char *TI_u1; /* u1 / u1 User string #1 */ const char *TI_u2; /* u2 / u2 User string #2 */ const char *TI_u3; /* u3 / u3 User string #3 */ const char *TI_u4; /* u4 / u4 User string #4 */ const char *TI_u5; /* u5 / u5 User string #5 */ const char *TI_u6; /* u6 / u6 User string #6 */ const char *TI_u7; /* u7 / u7 User string #7 */ const char *TI_u8; /* u8 / u8 User string #8 */ const char *TI_u9; /* u9 / u9 User string #9 */ const char *TI_op; /* op / op Set default pair to its original value */ const char *TI_oc; /* oc / oc Set all color pairs to the original ones */ const char *TI_initc; /* Ic / initc initialize color #1 to (#2,#3,#4) */ const char *TI_initp; /* Ip / initp Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7) */ const char *TI_scp; /* sp / scp Set current color pair to #1 */ const char *TI_setf; /* Sf / setf Set foreground color #1 */ const char *TI_setb; /* Sb / setb Set background color #1 */ const char *TI_cpi; /* ZA / cpi Change number of characters per inch */ const char *TI_lpi; /* ZB / lpi Change number of lines per inch */ const char *TI_chr; /* ZC / chr Change horizontal resolution */ const char *TI_cvr; /* ZD / cvr Change vertical resolution */ const char *TI_defc; /* ZE / defc Define a character */ const char *TI_swidm; /* ZF / swidm Enter double-wide mode */ const char *TI_sdrfq; /* ZG / sdrfq Enter draft-quality mode */ const char *TI_sitm; /* ZH / sitm Enter italic mode */ const char *TI_slm; /* ZI / slm Start leftward carriage motion */ const char *TI_smicm; /* ZJ / smicm Start micro-motion mode */ const char *TI_snlq; /* ZK / snlq Enter NLQ mode */ const char *TI_snrmq; /* ZL / snrmq Enter normal-quality mode */ const char *TI_sshm; /* ZM / sshm Enter shadow-print mode */ const char *TI_ssubm; /* ZN / ssubm Enter subscript mode */ const char *TI_ssupm; /* ZO / ssupm Enter superscript mode */ const char *TI_sum; /* ZP / sum Start upward carriage motion */ const char *TI_rwidm; /* ZQ / rwidm End double-wide mode */ const char *TI_ritm; /* ZR / ritm End italic mode */ const char *TI_rlm; /* ZS / rlm End left-motion mode */ const char *TI_rmicm; /* ZT / rmicm End micro-motion mode */ const char *TI_rshm; /* ZU / rshm End shadow-print mode */ const char *TI_rsubm; /* ZV / rsubm End subscript mode */ const char *TI_rsupm; /* ZW / rsupm End superscript mode */ const char *TI_rum; /* ZX / rum End reverse character motion */ const char *TI_mhpa; /* ZY / mhpa Like column_address in micro mode */ const char *TI_mcud1; /* ZZ / mcud1 Like cursor_down in micro mode */ const char *TI_mcub1; /* Za / mcub1 Like cursor_left in micro mode */ const char *TI_mcuf1; /* Zb / mcuf1 Like cursor_right in micro mode */ const char *TI_mvpa; /* Zc / mvpa Like row_address in micro mode */ const char *TI_mcuu1; /* Zd / mcuu1 Like cursor_up in micro mode */ const char *TI_porder; /* Ze / porder Match software bits to print-head pins */ const char *TI_mcud; /* Zf / mcud Like parm_down_cursor in micro mode */ const char *TI_mcub; /* Zg / mcub Like parm_left_cursor in micro mode */ const char *TI_mcuf; /* Zh / mcuf Like parm_right_cursor in micro mode */ const char *TI_mcuu; /* Zi / mcuu Like parm_up_cursor in micro mode */ const char *TI_scs; /* Zj / scs Select character set */ const char *TI_smgb; /* Zk / smgb Set bottom margin at current line */ const char *TI_smgbp; /* Zl / smgbp Set bottom margin at line #1 or #2 lines from bottom */ const char *TI_smglp; /* Zm / smglp Set left (right) margin at column #1 (#2) */ const char *TI_smgrp; /* Zn / smgrp Set right margin at column #1 */ const char *TI_smgt; /* Zo / smgt Set top margin at current line */ const char *TI_smgtp; /* Zp / smgtp Set top (bottom) margin at row #1 (#2) */ const char *TI_sbim; /* Zq / sbim Start printing bit image graphics */ const char *TI_scsd; /* Zr / scsd Start character set definition */ const char *TI_rbim; /* Zs / rbim Stop printing bit image graphics */ const char *TI_rcsd; /* Zt / rcsd End definition of character set */ const char *TI_subcs; /* Zu / subcs List of subscriptable characters */ const char *TI_supcs; /* Zv / supcs List of superscriptable characters */ const char *TI_docr; /* Zw / docr Printing any of these characters causes CR */ const char *TI_zerom; /* Zx / zerom No motion for subsequent character */ const char *TI_csnm; /* Zy / csnm List of character set names */ const char *TI_kmous; /* Km / kmous Mouse event has occurred */ const char *TI_minfo; /* Mi / minfo Mouse status information */ const char *TI_reqmp; /* RQ / reqmp Request mouse position */ const char *TI_getm; /* Gm / getm Curses should get button events */ const char *TI_setaf; /* AF / setaf Set foreground color using ANSI escape */ const char *TI_setab; /* AB / setab Set background color using ANSI escape */ const char *TI_pfxl; /* xl / pfxl Program function key #1 to type string #2 and show string #3 */ const char *TI_devt; /* dv / devt Indicate language/codeset support */ const char *TI_csin; /* ci / csin Init sequence for multiple codesets */ const char *TI_s0ds; /* s0 / s0ds Shift to code set 0 (EUC set 0, ASCII) */ const char *TI_s1ds; /* s1 / s1ds Shift to code set 1 */ const char *TI_s2ds; /* s2 / s2ds Shift to code set 2 */ const char *TI_s3ds; /* s3 / s3ds Shift to code set 3 */ const char *TI_smglr; /* ML / smglr Set both left and right margins to #1, #2 */ const char *TI_smgtb; /* MT / smgtb Sets both top and bottom margins to #1, #2 */ const char *TI_birep; /* Xy / birep Repeat bit image cell #1 #2 times */ const char *TI_binel; /* Zz / binel Move to next row of the bit image */ const char *TI_bicr; /* Yv / bicr Move to beginning of same row */ const char *TI_colornm; /* Yw / colornm Give name for color #1 */ const char *TI_defbi; /* Yx / defbi Define rectangualar bit image region */ const char *TI_endbi; /* Yy / endbi End a bit-image region */ const char *TI_setcolor; /* Yz / setcolor Change to ribbon color #1 */ const char *TI_slines; /* YZ / slines Set page length to #1 lines */ const char *TI_dispc; /* S1 / dispc Display PC character */ const char *TI_smpch; /* S2 / smpch Enter PC character display mode */ const char *TI_rmpch; /* S3 / rmpch Exit PC character display mode */ const char *TI_smsc; /* S4 / smsc Enter PC scancode mode */ const char *TI_rmsc; /* S5 / rmsc Exit PC scancode mode */ const char *TI_pctrm; /* S6 / pctrm PC terminal options */ const char *TI_scesc; /* S7 / scesc Escape for scancode emulation */ const char *TI_scesa; /* S8 / scesa Alternate escape for scancode emulation */ const char *TI_ehhlm; /* Xh / ehhlm Enter horizontal highlight mode */ const char *TI_elhlm; /* Xl / elhlm Enter left highlight mode */ const char *TI_elohlm; /* Xo / elohlm Enter low highlight mode */ const char *TI_erhlm; /* Xr / erhlm Enter right highlight mode */ const char *TI_ethlm; /* Xt / ethlm Enter top highlight mode */ const char *TI_evhlm; /* Xv / evhlm Enter vertical highlight mode */ const char *TI_sgr1; /* sA / sgr1 Define second set of video attributes #1-#6 */ const char *TI_slength; /* sL / slength YI Set page length to #1 hundredth of an inch */ const char *TI_OTi2; /* i2 / OTi2 secondary initialization string */ const char *TI_OTrs; /* rs / OTrs terminal reset string */ int TI_OTug; /* ug / OTug number of blanks left by ul */ int TI_OTbs; /* bs / OTbs uses ^H to move left */ int TI_OTns; /* ns / OTns crt cannot scroll */ int TI_OTnc; /* nc / OTnc no way to go to start of line */ int TI_OTdC; /* dC / OTdC pad needed for CR */ int TI_OTdN; /* dN / OTdN pad needed for LF */ const char *TI_OTnl; /* nl / OTnl use to move down */ const char *TI_OTbc; /* bc / OTbc move left, if not ^H */ int TI_OTMT; /* MT / OTMT has meta key */ int TI_OTNL; /* NL / OTNL move down with \n */ int TI_OTdB; /* dB / OTdB padding required for ^H */ int TI_OTdT; /* dT / OTdT padding required for ^I */ int TI_OTkn; /* kn / OTkn count of function keys */ const char *TI_OTko; /* ko / OTko list of self-mapped keycaps */ const char *TI_OTma; /* ma / OTma map arrow keys rogue(1) motion keys */ int TI_OTpt; /* pt / OTpt has 8-const char tabs invoked with ^I */ int TI_OTxr; /* xr / OTxr return clears the line */ const char *TI_OTG2; /* G2 / OTG2 single upper left */ const char *TI_OTG3; /* G3 / OTG3 single lower left */ const char *TI_OTG1; /* G1 / OTG1 single upper right */ const char *TI_OTG4; /* G4 / OTG4 single lower right */ const char *TI_OTGR; /* GR / OTGR tee pointing right */ const char *TI_OTGL; /* GL / OTGL tee pointing left */ const char *TI_OTGU; /* GU / OTGU tee pointing up */ const char *TI_OTGD; /* GD / OTGD tee pointing down */ const char *TI_OTGH; /* GH / OTGH single horizontal line */ const char *TI_OTGV; /* GV / OTGV single vertical line */ const char *TI_OTGC; /* GC / OTGC single intersection */ const char *TI_meml; /* ml / meml memory lock above */ const char *TI_memu; /* mu / memu memory unlock */ const char *TI_box1; /* bx / box1 box characters primary set */ /* non termcap/terminfo terminal info (generated by epic) */ char TI_normal[256]; const char *TI_sgrstrs[TERM_SGR_MAXVAL]; const char *TI_forecolors[16]; const char *TI_backcolors[16]; int TI_meta_mode;/* int TI_need_redraw ; */};#define term_has(x) (termfeatures & (x))#define capstr(x) (current_term->TI_sgrstrs[(TERM_SGR_ ## x)-1])#define outcap(x) (tputs_x(capstr(x)))#ifndef TERM_DEBUG#define tputs_x(s) (tputs(s, 0, putchar_x))#elseint tputs_x(char *);#endif#define IFV(x) if (get_int_var((x ## _VIDEO_VAR)))#define term_underline_on() IFV(UNDERLINE) outcap(UNDL_ON)#define term_underline_off() IFV(UNDERLINE) outcap(UNDL_OFF)#define term_standout_on() IFV(INVERSE) outcap(REV_ON)#define term_standout_off() IFV(INVERSE) outcap(REV_OFF)#define term_blink_on() IFV(BLINK) outcap(BLINK_ON)#define term_blink_off() IFV(BLINK) outcap(BLINK_OFF)#define term_bold_on() IFV(BOLD) outcap(BOLD_ON)#define term_bold_off() IFV(BOLD) outcap(BOLD_OFF)#define term_altcharset_on() if (get_int_var(ALT_CHARSET_VAR)) \ outcap(ALTCHAR_ON)#define term_altcharset_off() if (get_int_var(ALT_CHARSET_VAR)) \ outcap(ALTCHAR_OFF)#define term_set_foreground(x) tputs_x(current_term->TI_forecolors[(x) & 0x0f])#define term_set_background(x) tputs_x(current_term->TI_backcolors[(x) & 0x0f])#define term_set_attribs(f,b) tputs_x(term_getsgr(TERM_SGR_COLORS,(f),(b)))#define term_putgchar(x) tputs_x(term_getsgr(TERM_SGR_GCHAR,(x),0))#define term_clear_screen() term_clrscr()#define term_move_cursor(c, r) term_gotoxy((c),(r))#define term_cr() tputs_x(current_term->TI_cr)#define term_newline() tputs_x(current_term->TI_nel)#define term_cursor_left() term_left(1)#define term_cursor_right() term_right(1)#define term_clear_to_eol() term_clreol()#define term_all_off() tputs_x(current_term->TI_normal); RETSIGTYPE term_cont (int); void term_beep (void); int term_echo (int); int term_init (void); int term_resize (void); void term_pause (char, char *); void term_putchar (unsigned char); void term_scroll (int, int, int); void term_insert (unsigned char); void term_delete (int); void term_repeat (unsigned char, int); void term_right (int); void term_left (int); void term_clreol (void); void term_clrscr (void); void term_gotoxy (int, int); void term_reset (void); int term_eight_bit (void); void set_term_eight_bit (int); void set_meta_8bit (const void *); const char * term_getsgr (int, int, int); const char * get_term_capability (const char *, int, int);#endif /* _TERM_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -