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

📄 rxvt.h

📁 rxvt经典的linux下的终端.小巧实用
💻 H
📖 第 1 页 / 共 3 页
字号:
#define XTerm_Color_pointer	13	/* change actual 'Pointer' color */#define XTerm_Color_RV		17	/* change actual 'Highlight' color */#define XTerm_Color_BD		18	/* change actual 'Bold' color */#define XTerm_Color_UL		19	/* change actual 'Underline' color */#define XTerm_logfile		46	/* not implemented */#define XTerm_font		50/* * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) */#define XTerm_Menu		10	/* set menu item */#define XTerm_Pixmap		20	/* new bg pixmap */#define XTerm_restoreFG		39	/* change default fg color */#define XTerm_restoreBG		49	/* change default bg color */#define XTerm_dumpscreen	55	/* dump scrollback and all of screen *//* Words starting with `Color_' are colours.  Others are counts *//* * The following comment is mostly obsolete since pixcolor_set was expanded: * We're currently upto 29 colours.  Only 3 more available.  The * PixColor and rendition colour usage should probably be decoupled * on the unnecessary items, e.g. Color_pointer, but won't bother * until we need to.  Also, be aware of usage in pixcolor_set */enum colour_list {    Color_fg = 0,    Color_bg,    minCOLOR,			/* 2 */    Color_Black = minCOLOR,    Color_Red3,    Color_Green3,    Color_Yellow3,    Color_Blue3,    Color_Magenta3,    Color_Cyan3,    maxCOLOR,			/* minCOLOR + 7 */#ifndef NO_BRIGHTCOLOR    Color_AntiqueWhite = maxCOLOR,    minBrightCOLOR,		/* maxCOLOR + 1 */    Color_Grey25 = minBrightCOLOR,    Color_Red,    Color_Green,    Color_Yellow,    Color_Blue,    Color_Magenta,    Color_Cyan,    maxBrightCOLOR,		/* minBrightCOLOR + 7 */    Color_White = maxBrightCOLOR,#else    Color_White = maxCOLOR,#endif#ifdef TTY_256COLOR    min256COLOR = Color_White + 1,    max256COLOR = minCOLOR + 255,#endif#ifndef NO_CURSORCOLOR    Color_cursor,    Color_cursor2,#endif    Color_pointer,    Color_border,#ifndef NO_BOLD_UNDERLINE_REVERSE    Color_BD,    Color_UL,    Color_RV,#endif#ifdef OPTION_HC    Color_HC,#endif#ifdef KEEP_SCROLLCOLOR    Color_scroll,    Color_trough,#endif    NRS_COLORS,			/* */#ifdef KEEP_SCROLLCOLOR    Color_topShadow = NRS_COLORS,    Color_bottomShadow,    TOTAL_COLORS		/* upto 30 */#else    TOTAL_COLORS = NRS_COLORS	/* */#endif};#ifdef TTY_256COLOR# define Color_Bits	9# define NPIXCLR_SETS	9	/* (256 + 14) bits / 32 bits */#else# define Color_Bits	5# define NPIXCLR_SETS	1	/* (16 + 14) bits / 32 bits */#endif#define NPIXCLR_BITS	32#define DEFAULT_RSTYLE		(RS_None | (Color_fg) | (Color_bg<<Color_Bits))/* * Resource list */enum {    Rs_display_name = 0,    Rs_term_name,    Rs_iconName,    Rs_geometry,    Rs_reverseVideo,    Rs_color,    _Rs_color = Rs_color + NRS_COLORS - 1,    Rs_font,    _Rs_font = Rs_font + MAX_NFONTS - 1,#ifdef MULTICHAR_SET    Rs_mfont,    _Rs_mfont = Rs_mfont + MAX_NFONTS - 1,    Rs_multichar_encoding,    Rs_mc_hack,#endif    Rs_name,    Rs_title,#if defined (XPM_BACKGROUND) || (MENUBAR_MAX)    Rs_path,#endif#ifdef XPM_BACKGROUND    Rs_backgroundPixmap,#endif#if (MENUBAR_MAX)    Rs_menu,#endif#ifndef NO_BOLDFONT    Rs_boldFont,#endif#ifdef GREEK_SUPPORT    Rs_greek_keyboard,    Rs_greektoggle_key,#endif    Rs_loginShell,    Rs_jumpScroll,#ifdef HAVE_SCROLLBARS    Rs_scrollBar,    Rs_scrollBar_right,    Rs_scrollBar_floating,    Rs_scrollBar_align,#endif    Rs_scrollstyle,	/* Rs_scrollBar_style */    Rs_scrollTtyOutput,    Rs_scrollTtyKeypress,    Rs_scrollWithBuffer,    Rs_saveLines,    Rs_utmpInhibit,    Rs_visualBell,#if ! defined(NO_MAPALERT) && defined(MAPALERT_OPTION)    Rs_mapAlert,#endif#ifdef META8_OPTION    Rs_meta8,#endif#ifdef MOUSE_WHEEL    Rs_mouseWheelScrollPage,#endif#ifndef NO_BACKSPACE_KEY    Rs_backspace_key,#endif#ifndef NO_DELETE_KEY    Rs_delete_key,#endif    Rs_selectstyle,#ifdef PRINTPIPE    Rs_print_pipe,#endif#ifdef USE_XIM    Rs_preeditType,    Rs_inputMethod,#endif#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)    Rs_bigfont_key,    Rs_smallfont_key,#endif#ifdef TRANSPARENT    Rs_transparent,    Rs_transparent_all,#endif#ifndef NO_FRILLS    Rs_ext_bwidth,    Rs_int_bwidth,#endif    Rs_scrollBar_thickness,#ifndef NO_LINESPACE    Rs_lineSpace,#endif    Rs_cutchars,    Rs_modifier,    Rs_answerbackstring,    Rs_tripleclickwords,    NUM_RESOURCES} ;enum {    TIMEOUT_INCR = 0,    NUM_TIMEOUTS} ;enum {    XA_COMPOUND_TEXT = 0,    XA_MULTIPLE,    XA_TARGETS,    XA_TEXT,    XA_TIMESTAMP,    XA_VT_SELECTION,    XA_INCR,    XA_WMDELETEWINDOW,#ifdef TRANSPARENT    XA_XROOTPMAPID,#endif#ifdef OFFIX_DND		/* OffiX Dnd (drag 'n' drop) support */    XA_DNDPROTOCOL,    XA_DNDSELECTION,#endif				/* OFFIX_DND */    XA_CLIPBOARD,    NUM_XA} ;/* * number of graphics points * divisible by 2 (num lines) * divisible by 4 (num rect) */#define	NGRX_PTS	1000/* DEC private modes */#define PrivMode_132		(1LU<<0)#define PrivMode_132OK		(1LU<<1)#define PrivMode_rVideo		(1LU<<2)#define PrivMode_relOrigin	(1LU<<3)#define PrivMode_Screen		(1LU<<4)#define PrivMode_Autowrap	(1LU<<5)#define PrivMode_aplCUR		(1LU<<6)#define PrivMode_aplKP		(1LU<<7)#define PrivMode_HaveBackSpace	(1LU<<8)#define PrivMode_BackSpace	(1LU<<9)#define PrivMode_ShiftKeys	(1LU<<10)#define PrivMode_VisibleCursor	(1LU<<11)#define PrivMode_MouseX10	(1LU<<12)#define PrivMode_MouseX11	(1LU<<13)#define PrivMode_scrollBar	(1LU<<14)#define PrivMode_menuBar	(1LU<<15)#define PrivMode_TtyOutputInh	(1LU<<16)#define PrivMode_Keypress	(1LU<<17)#define PrivMode_smoothScroll	(1LU<<18)#define PrivMode_vt52		(1LU<<19)/* too annoying to implement X11 highlight tracking *//* #define PrivMode_MouseX11Track       (1LU<<18) */#define PrivMode_mouse_report	(PrivMode_MouseX10|PrivMode_MouseX11)#define PrivMode(test,bit)		\    if (test)				\	r->h->PrivateModes |= (bit);	\    else				\	r->h->PrivateModes &= ~(bit)#ifdef ALLOW_132_MODE# define PrivMode_Default						 \(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)#else# define PrivMode_Default						 \(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor)#endif#ifdef PREFER_24BIT# define XDEPTH			r->Xdepth# define XCMAP			r->Xcmap# define XVISUAL		r->h->Xvisual#else# ifdef DEBUG_DEPTH#  define XDEPTH		DEBUG_DEPTH# else#  define XDEPTH		DefaultDepth(r->Xdisplay,Xscreen)#  define XCMAP			DefaultColormap(r->Xdisplay,Xscreen)#  define XVISUAL		DefaultVisual(r->Xdisplay,Xscreen)# endif#endif#define IMBUFSIZ		128	/* input modifier buffer sizes */#ifndef BUFSIZ# define BUFSIZ			4096#endif#define KBUFSZ			512	/* size of keyboard mapping buffer *//* ***************************************************************************** * MACRO DEFINES ***************************************************************************** */#define MEMSET(x, y, z)		memset((x), (y), (size_t)(z))#define MEMCPY(x, y, z)		memcpy((void *)(x), (const void *)(y), (z))#define MEMMOVE(x, y, z)	memmove((void *)(x), (const void *)(y), (z))#define STRCASECMP(x, y)	strcasecmp((x), (y))#define STRNCASECMP(x, y, z)	strncasecmp((x), (y), (z))#define STRCPY(x, y)		strcpy((char *)(x), (const char *)(y))#define STRNCPY(x, y, z)	strncpy((char *)(x), (const char *)(y), (z))#define STRCMP(x, y)		strcmp((const char *)(x), (const char *)(y))#define STRNCMP(x, y, z)	strncmp((const char *)(x), (const char *)(y), (z))#define STRCAT(x, y)		strcat((char *)(x), (const char *)(y))#define STRNCAT(x, y, z)	strncat((char *)(x), (const char *)(y), (z))#define STRDUP(x)		strdup((const char *)(x))#define STRLEN(x)		strlen((const char *)(x))#define STRCHR(x, y)		strchr((const char *)(x), (int)(y))#define STRRCHR(x, y)		strrchr((const char *)(x), (int)(y))/* convert pixel dimensions to row/column values.  Everything as int32_t */#define Pixel2Col(x)		Pixel2Width((int32_t)(x) - (int32_t)r->TermWin.int_bwidth)#define Pixel2Row(y)		Pixel2Height((int32_t)(y) - (int32_t)r->TermWin.int_bwidth)#define Pixel2Width(x)		((int32_t)(x) / (int32_t)r->TermWin.fwidth)#define Pixel2Height(y)		((int32_t)(y) / (int32_t)r->TermWin.fheight)#define Col2Pixel(col)		((int32_t)Width2Pixel(col) + (int32_t)r->TermWin.int_bwidth)#define Row2Pixel(row)		((int32_t)Height2Pixel(row) + (int32_t)r->TermWin.int_bwidth)#define Width2Pixel(n)		((int32_t)(n) * (int32_t)r->TermWin.fwidth)#define Height2Pixel(n)		((int32_t)(n) * (int32_t)r->TermWin.fheight)#define TermWin_TotalWidth()	((int32_t)r->TermWin.width  + 2 * (int32_t)r->TermWin.int_bwidth)#define TermWin_TotalHeight()	((int32_t)r->TermWin.height + 2 * (int32_t)r->TermWin.int_bwidth)#define Xscreen			DefaultScreen(r->Xdisplay)#define Xroot			DefaultRootWindow(r->Xdisplay)/* how to build & extract colors and attributes */#define GET_BASEFG(x)		(((x) & RS_fgMask))#define GET_BASEBG(x)		(((x) & RS_bgMask)>>Color_Bits)#ifndef NO_BRIGHTCOLOR# define GET_FGCOLOR(x)						\    ((((x) & RS_Bold) == 0					\      || GET_BASEFG(x) < minCOLOR				\      || GET_BASEFG(x) >= minBrightCOLOR)			\     ? GET_BASEFG(x)						\     : (GET_BASEFG(x) + (minBrightCOLOR - minCOLOR)))# define GET_BGCOLOR(x)						\    ((((x) & RS_Blink) == 0					\      || GET_BASEBG(x) < minCOLOR				\      || GET_BASEBG(x) >= minBrightCOLOR)			\     ? GET_BASEBG(x)						\     : (GET_BASEBG(x) + (minBrightCOLOR - minCOLOR)))#else# define GET_FGCOLOR(x)		GET_BASEFG(x)# define GET_BGCOLOR(x)		GET_BASEBG(x)#endif#define GET_ATTR(x)		(((x) & RS_attrMask))#define GET_BGATTR(x)							\    (((x) & RS_RVid) ? (((x) & (RS_attrMask & ~RS_RVid))		\			| (((x) & RS_fgMask)<<Color_Bits))		\		     : ((x) & (RS_attrMask | RS_bgMask)))#define SET_FGCOLOR(x,fg)	(((x) & ~RS_fgMask)  | (fg))#define SET_BGCOLOR(x,bg)	(((x) & ~RS_bgMask)  | ((bg)<<Color_Bits))#define SET_ATTR(x,a)		(((x) & ~RS_attrMask)| (a))#define SET_PIXCOLOR(h, x)	((h)->pixcolor_set[(x) / NPIXCLR_BITS] |= (1 << ((x) % NPIXCLR_BITS)))#define ISSET_PIXCOLOR(h, x)	((h)->pixcolor_set[(x) / NPIXCLR_BITS] & (1 << ((x) % NPIXCLR_BITS)))#ifdef HAVE_SCROLLBARS# define scrollbar_TotalWidth()	(r->scrollBar.width + r->sb_shadow * 2)#else# define scrollbar_TotalWidth()	(0)#endif#define scrollbar_isMotion()	(r->scrollBar.state == 'm')#define scrollbar_isUp()	(r->scrollBar.state == 'U')#define scrollbar_isDn()	(r->scrollBar.state == 'D')#define scrollbar_isUpDn()	isupper (r->scrollBar.state)#define isScrollbarWindow(w)	(r->scrollBar.state && (w) == r->scrollBar.win)#define scrollbar_setIdle()	r->scrollBar.state = 1#define scrollbar_setMotion()	r->scrollBar.state = 'm'#define scrollbar_setUp()	r->scrollBar.state = 'U'#define scrollbar_setDn()	r->scrollBar.state = 'D'#define scrollbarnext_dnval()	(r->scrollBar.end + (r->scrollBar.width + 1))#define scrollbarnext_upButton(y)	((y) > r->scrollBar.end \					 && (y) <= scrollbarnext_dnval())#define scrollbarnext_dnButton(y)	((y) > scrollbarnext_dnval())#define SCROLLNEXT_MINHEIGHT	SB_THUMB_MIN_HEIGHT#define scrollbarrxvt_upButton(y)	((y) < r->scrollBar.beg)#define scrollbarrxvt_dnButton(y)	((y) > r->scrollBar.end)#define SCROLLRXVT_MINHEIGHT	10#define SCROLLXTERM_MINHEIGHT	10#define scrollbar_minheight()	(r->scrollBar.style == R_SB_NEXT	\				 ? SCROLLNEXT_MINHEIGHT			\				 : SCROLLRXVT_MINHEIGHT)#define scrollbar_above_slider(y)	((y) < r->scrollBar.top)#define scrollbar_below_slider(y)	((y) > r->scrollBar.bot)#define scrollbar_position(y)		((y) - r->scrollBar.beg)#define scrollbar_size()		(r->scrollBar.end - r->scrollBar.beg \					 - scrollbar_minheight())#if (MENUBAR_MAX > 1)/* rendition style flags */# define menuBar_height()	(r->TermWin.fheight + SHADOW)# define menuBar_TotalHeight()	(menuBar_height() + SHADOW + menuBar_margin)# define isMenuBarWindow(w)	((w) == r->menuBar.win)

⌨️ 快捷键说明

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