📄 term.h
字号:
/* * term.h: header file for term.c * * Copyright 1990 Michael Sandrof * Copyright 1997 EPIC Software Labs * Copyright 1998 J. Kean Johnston * See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT */#ifndef __term_h__#define __term_h__/* To get declaration of "output_screen" */#include "screen.h"extern volatile int need_redraw;extern int meta_mode;/* * This puts a character to the current target, whatever it is. * All output everywhere should go through this. * This does not mangle its output, so its suitable for outputting * escape sequences. */#if !defined(WTERM_C) && !defined(WSERV_C)#define current_ftarget (output_screen ? output_screen->fpout : stdout)#ifdef __need_putchar_x____inline__ static int putchar_x (int c) { return fputc((int) c, current_ftarget ); }#endif#ifdef __need_term_flush____inline__static void term_flush (void) { fflush( current_ftarget ); }#endif#endif#define TERM_SGR_BOLD_ON 1#define TERM_SGR_BOLD_OFF 2#define TERM_SGR_BLINK_ON 3#define TERM_SGR_BLINK_OFF 4#define TERM_SGR_UNDL_ON 5#define TERM_SGR_UNDL_OFF 6#define TERM_SGR_REV_ON 7#define TERM_SGR_REV_OFF 8#define TERM_SGR_NORMAL 9#define TERM_SGR_RESET 10#define TERM_SGR_FOREGROUND 11#define TERM_SGR_BACKGROUND 12#define TERM_SGR_GCHAR 13#define TERM_SGR_ALTCHAR_ON 14#define TERM_SGR_ALTCHAR_OFF 15#define TERM_SGR_MAXVAL 16#define TERM_CAN_CUP 1 << 0#define TERM_CAN_CLEAR 1 << 1#define TERM_CAN_CLREOL 1 << 2#define TERM_CAN_RIGHT 1 << 3#define TERM_CAN_LEFT 1 << 4#define TERM_CAN_SCROLL 1 << 5#define TERM_CAN_DELETE 1 << 6#define TERM_CAN_INSERT 1 << 7#define TERM_CAN_DELLINES 1 << 8#define TERM_CAN_INSLINES 1 << 9#define TERM_CAN_REPEAT 1 << 10#define TERM_CAN_BOLD 1 << 11#define TERM_CAN_BLINK 1 << 12#define TERM_CAN_UNDL 1 << 13#define TERM_CAN_REVERSE 1 << 14#define TERM_CAN_COLOR 1 << 15#define TERM_CAN_GCHAR 1 << 16#if 0extern char *TI_cr, *TI_nl;extern int TI_lines, TI_cols;extern char *TI_sgrstrs[];extern char *TI_forecolors[];extern char *TI_backcolors[];#endifextern int termfeatures;extern struct term *current_term;/* Our variable name Cap / Info Description */struct term { int TI_bw; /* bw / bw cub1 wraps from column 0 to last column */ int TI_am; /* am / am terminal has automatic margins */ int TI_xsb; /* xb / xsb beehive (f1=escape, f2=ctrl C) */ int TI_xhp; /* xs / xhp standout not erased by overwriting (hp) */ int TI_xenl; /* xn / xenl newline ignored after 80 cols (concept) */ int TI_eo; /* eo / eo can erase overstrikes with a blank */ int TI_gn; /* gn / gn generic line type */ int TI_hc; /* hc / hc hardcopy terminal */ int TI_km; /* km / km Has a meta key (shift, sets parity bit) */ int TI_hs; /* hs / hs has extra status line */ int TI_in; /* in / in insert mode distinguishes nulls */ int TI_da; /* da / da display may be retained above the screen */ int TI_db; /* db / db display may be retained below the screen */ int TI_mir; /* mi / mir safe to move while in insert mode */ int TI_msgr; /* ms / msgr safe to move while in standout mode */ int TI_os; /* os / os terminal can overstrike */ int TI_eslok; /* es / eslok escape can be used on the status line */ int TI_xt; /* xt / xt tabs destructive, magic so char (t1061) */ int TI_hz; /* hz / hz can't print ~'s (hazeltine) */ int TI_ul; /* ul / ul underline character overstrikes */ int TI_xon; /* xo / xon terminal uses xon/xoff handshaking */ int TI_nxon; /* nx / nxon padding won't work, xon/xoff required */ int TI_mc5i; /* 5i / mc5i printer won't echo on screen */ int TI_chts; /* HC / chts cursor is hard to see */ int TI_nrrmc; /* NR / nrrmc smcup does not reverse rmcup */ int TI_npc; /* NP / npc pad character does not exist */ int TI_ndscr; /* ND / ndscr scrolling region is non-destructive */ int TI_ccc; /* cc / ccc terminal can re-define existing colors */ int TI_bce; /* ut / bce screen erased with background color */ int TI_hls; /* hl / hls terminal uses only HLS color notation (Tektronix) */ int TI_xhpa; /* YA / xhpa only positive motion for hpa/mhpa caps */ int TI_crxm; /* YB / crxm using cr turns off micro mode */ int TI_daisy; /* YC / daisy printer needs operator to change character set */ int TI_xvpa; /* YD / xvpa only positive motion for vpa/mvpa caps */ int TI_sam; /* YE / sam printing in last column causes cr */ int TI_cpix; /* YF / cpix changing character pitch changes resolution */ int TI_lpix; /* YG / lpix changing line pitch changes resolution */ int TI_cols; /* co / cols number of columns in a line */ int TI_it; /* it / it tabs initially every # spaces */ int TI_lines; /* li / lines number of lines on screen or page */ int TI_lm; /* lm / lm lines of memory if > line. 0 means varies */ int TI_xmc; /* sg / xmc number of blank characters left by smso or rmso */ int TI_pb; /* pb / pb lowest baud rate where padding needed */ int TI_vt; /* vt / vt virtual terminal number (CB/unix) */ int TI_wsl; /* ws / wsl number of columns in status line */ int TI_nlab; /* Nl / nlab number of labels on screen */ int TI_lh; /* lh / lh rows in each label */ int TI_lw; /* lw / lw columns in each label */ int TI_ma; /* ma / ma maximum combined attributes terminal can handle */ int TI_wnum; /* MW / wnum maximum number of defineable windows */ int TI_colors; /* Co / colors maximum number of colors on screen */ int TI_pairs; /* pa / pairs maximum number of color-pairs on the screen */ int TI_ncv; /* NC / ncv video attributes that can't be used with colors */ int TI_bufsz; /* Ya / bufsz numbers of bytes buffered before printing */ int TI_spinv; /* Yb / spinv spacing of pins vertically in pins per inch */ int TI_spinh; /* Yc / spinh spacing of dots horizontally in dots per inch */ int TI_maddr; /* Yd / maddr maximum value in micro_..._address */ int TI_mjump; /* Ye / mjump maximum value in parm_..._micro */ int TI_mcs; /* Yf / mcs character step size when in micro mode */ int TI_mls; /* Yg / mls line step size when in micro mode */ int TI_npins; /* Yh / npins numbers of pins in print-head */ int TI_orc; /* Yi / orc horizontal resolution in units per line */ int TI_orl; /* Yj / orl vertical resolution in units per line */ int TI_orhi; /* Yk / orhi horizontal resolution in units per inch */ int TI_orvi; /* Yl / orvi vertical resolution in units per inch */ int TI_cps; /* Ym / cps print rate in characters per second */ int TI_widcs; /* Yn / widcs character step size when in double wide mode */ int TI_btns; /* BT / btns number of buttons on mouse */ int TI_bitwin; /* Yo / bitwin number of passes for each bit-image row */ int TI_bitype; /* Yp / bitype type of bit-image device */ const char *TI_cbt; /* bt / cbt back tab (P) */ const char *TI_bel; /* bl / bel audible signal (bell) (P) */ const char *TI_cr; /* cr / cr carriage return (P*) (P*) */ const char *TI_csr; /* cs / csr change region to line #1 to line #2 (P) */ const char *TI_tbc; /* ct / tbc clear all tab stops (P) */ const char *TI_clear; /* cl / clear clear screen and home cursor (P*) */ const char *TI_el; /* ce / el clear to end of line (P) */ const char *TI_ed; /* cd / ed clear to end of screen (P*) */ const char *TI_hpa; /* ch / hpa horizontal position #1, absolute (P) */ const char *TI_cmdch; /* CC / cmdch terminal settable cmd character in prototype !? */ const char *TI_cup; /* cm / cup move to row #1 columns #2 */ const char *TI_cud1; /* do / cud1 down one line */ const char *TI_home; /* ho / home home cursor (if no cup) */ const char *TI_civis; /* vi / civis make cursor invisible */ const char *TI_cub1; /* le / cub1 move left one space */ const char *TI_mrcup; /* CM / mrcup memory relative cursor addressing */ const char *TI_cnorm; /* ve / cnorm make cursor appear normal (undo civis/cvvis) */ const char *TI_cuf1; /* nd / cuf1 non-destructive space (move right one space) */ const char *TI_ll; /* ll / ll last line, first column (if no cup) */ const char *TI_cuu1; /* up / cuu1 up one line */ const char *TI_cvvis; /* vs / cvvis make cursor very visible */ const char *TI_dch1; /* dc / dch1 delete character (P*) */ const char *TI_dl1; /* dl / dl1 delete line (P*) */ const char *TI_dsl; /* ds / dsl disable status line */ const char *TI_hd; /* hd / hd half a line down */ const char *TI_smacs; /* as / smacs start alternate character set (P) */ const char *TI_blink; /* mb / blink turn on blinking */ const char *TI_bold; /* md / bold turn on bold (extra bright) mode */ const char *TI_smcup; /* ti / smcup string to start programs using cup */ const char *TI_smdc; /* dm / smdc enter delete mode */ const char *TI_dim; /* mh / dim turn on half-bright mode */ const char *TI_smir; /* im / smir enter insert mode */ const char *TI_invis; /* mk / invis turn on blank mode (characters invisible) */ const char *TI_prot; /* mp / prot turn on protected mode */ const char *TI_rev; /* mr / rev turn on reverse video mode */ const char *TI_smso; /* so / smso begin standout mode */ const char *TI_smul; /* us / smul begin underline mode */ const char *TI_ech; /* ec / ech erase #1 characters (P) */ const char *TI_rmacs; /* ae / rmacs end alternate character set (P) */ const char *TI_sgr0; /* me / sgr0 turn off all attributes */ const char *TI_rmcup; /* te / rmcup strings to end programs using cup */ const char *TI_rmdc; /* ed / rmdc end delete mode */ const char *TI_rmir; /* ei / rmir exit insert mode */ const char *TI_rmso; /* se / rmso exit standout mode */ const char *TI_rmul; /* ue / rmul exit underline mode */ const char *TI_flash; /* vb / flash visible bell (may not move cursor) */ const char *TI_ff; /* ff / ff hardcopy terminal page eject (P*) */ const char *TI_fsl; /* fs / fsl return from status line */ const char *TI_is1; /* i1 / is1 initialization string */ const char *TI_is2; /* is / is2 initialization string */ const char *TI_is3; /* i3 / is3 initialization string */ const char *TI_if; /* if / if name of initialization file */ const char *TI_ich1; /* ic / ich1 insert character (P) */ const char *TI_il1; /* al / il1 insert line (P*) */ const char *TI_ip; /* ip / ip insert padding after inserted character */ const char *TI_kbs; /* kb / kbs backspace key */ const char *TI_ktbc; /* ka / ktbc clear-all-tabs key */ const char *TI_kclr; /* kC / kclr clear-screen or erase key */ const char *TI_kctab; /* kt / kctab clear-tab key */ const char *TI_kdch1; /* kD / kdch1 delete-character key */ const char *TI_kdl1; /* kL / kdl1 delete-line key */ const char *TI_kcud1; /* kd / kcud1 down-arrow key */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -