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

📄 rxvt.h

📁 Mrxvt是一个小巧
💻 H
📖 第 1 页 / 共 4 页
字号:
# define STDOUT_FILENO	1# define STDERR_FILENO	2#endif#if defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT)# if defined(PTYS_ARE_GETPT) || defined(PTYS_ARE_PTMX)#  define NO_SETOWNER_TTYDEV# endif#endif#if defined(OS_CYGWIN) || defined(PTYS_ARE_OPENPTY)# define NO_SETOWNER_TTYDEV#endif/* ***************************************************************************** * STRUCTURES AND TYPEDEFS ***************************************************************************** */struct rxvt_vars;		/* Later REDEFINED and typedef'd to rxvt_t */struct rxvt_hidden;/* Motif window hints, MwmHints.flags */#define MWM_HINTS_FUNCTIONS     (1L << 0)#define MWM_HINTS_DECORATIONS   (1L << 1)#define MWM_HINTS_INPUT_MODE    (1L << 2)#define MWM_HINTS_STATUS        (1L << 3)/* bit definitions for MwmHints.functions */#define MWM_FUNC_ALL            (1L << 0)#define MWM_FUNC_RESIZE         (1L << 1)#define MWM_FUNC_MOVE           (1L << 2)#define MWM_FUNC_MINIMIZE       (1L << 3)#define MWM_FUNC_MAXIMIZE       (1L << 4)#define MWM_FUNC_CLOSE          (1L << 5)/* bit definitions for MwmHints.decorations */#define MWM_DECOR_ALL           (1L << 0)#define MWM_DECOR_BORDER        (1L << 1)#define MWM_DECOR_RESIZEH       (1L << 2)#define MWM_DECOR_TITLE         (1L << 3)#define MWM_DECOR_MENU          (1L << 4)#define MWM_DECOR_MINIMIZE      (1L << 5)#define MWM_DECOR_MAXIMIZE      (1L << 6)/* bit definitions for MwmHints.inputMode */#define MWM_INPUT_MODELESS                  0#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1#define MWM_INPUT_SYSTEM_MODAL              2#define MWM_INPUT_FULL_APPLICATION_MODAL    3#define PROP_MWM_HINTS_ELEMENTS             5/* * If we're using either the rxvt scrollbar or menu bars, keep the * scrollColor resource. */#if defined(RXVT_SCROLLBAR) || defined(PLAIN_SCROLLBAR) || defined(HAVE_MENUBAR)# define KEEP_SCROLLCOLOR 1#else# undef KEEP_SCROLLCOLOR#endif/* * the 'essential' information for reporting Mouse Events * pared down from XButtonEvent */struct mouse_event {    int             clicks;    Time            time;	/* milliseconds */    unsigned int    state;	/* key or button mask */    unsigned int    button;	/* detail */};#ifndef min# define min(a,b)	(((a) < (b)) ? (a) : (b))# define max(a,b)	(((a) > (b)) ? (a) : (b))#endif#define MAX_IT(current, other)	if ((other) > (current)) (current) = (other)#define MIN_IT(current, other)	if ((other) < (current)) (current) = (other)#define SWAP_IT(one, two, typeof)									\    {																\		typeof          swapittmp;									\		(swapittmp) = (one); (one) = (two); (two) = (swapittmp);	\    }#define BOUND_POSITIVE_INT16(val)									\    (RINT16T)( (val) <= 0 ? 0 : min( (val), (((RUINT16T)-1)>>1) )  )/* ***************************************************************************** * NORMAL DEFINES ***************************************************************************** */#if defined (NO_OLD_SELECTION) && defined(NO_NEW_SELECTION)# error if you disable both selection styles, how can you select, silly?#endif#define APL_CLASS		"XTerm"		/* class name */#define APL_SUBCLASS	"Mrxvt"	/* also check resources under this name */#define APL_NAME		"mrxvt"	/* normal name *//* COLORTERM, TERM environment variables */#define COLORTERMENV	"rxvt"#ifdef BACKGROUND_IMAGE# define COLORTERMENVFULL COLORTERMENV "-xpm"#else# define COLORTERMENVFULL COLORTERMENV#endif#ifndef TERMENV# define TERMENV		"xterm"#endif#define TABTITLEENV		"MRXVT_TABTITLE="#if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR)# define NO_MOUSE_REPORT_SCROLLBAR#endif#ifdef NO_RESOURCES# undef USE_XGETDEFAULT#endif/* now look for other badly set stuff */#if !defined (EACCESS) && defined(EAGAIN)# define EACCESS EAGAIN#endif#ifndef EXIT_SUCCESS		/* missing from <stdlib.h> */# define EXIT_SUCCESS		0	/* exit function success */# define EXIT_FAILURE		1	/* exit function failure */#endif#define menuBar_esc			(10)#define scrollBar_esc		(30)#define MENUBAR_MARGIN		(2)	/* margin below text *//* width of scrollBar, menuBar shadow, must be 1 or 2 */#ifdef HALFSHADOW# define SHADOW				(1)#else# define SHADOW				(2)#endif#define R_SB_ALIGN_CENTRE	(0)#define R_SB_ALIGN_TOP		(1)#define R_SB_ALIGN_BOTTOM	(2)#define R_SB_UNKNOWN		(-1)#define R_SB_RXVT			(0)#define R_SB_NEXT			(1)#define R_SB_XTERM			(2)#define R_SB_SGI			(3)#define R_SB_PLAIN			(4)#define SB_WIDTH_PLAIN		(15)#define SB_WIDTH_XTERM		(15)#define SB_WIDTH_RXVT		(10)#define SB_WIDTH_NEXT		(17)#define SB_WIDTH_SGI		(16)#ifdef NEXT_SCROLLBAR/*** NeXT scrollbar definitions*/#define NEXT_SB_WIDTH			(SB_WIDTH_NEXT)#define NEXT_SB_PAD				(1)#define NEXT_SB_BD_WIDTH		(1)#define NEXT_BEVEL_ULEFT_WIDTH	(1)#define NEXT_BEVEL_LRIGHT_WIDTH	(2)#define NEXT_SB_LPAD			(NEXT_SB_PAD + NEXT_SB_BD_WIDTH)#define NEXT_SB_MARGIN			(NEXT_SB_PAD<<1)#define NEXT_SB_BTN_WIDTH		(NEXT_SB_WIDTH - NEXT_SB_MARGIN - NEXT_SB_BD_WIDTH)/* button height */#define NEXT_SB_BTN_HEIGHT		(NEXT_SB_BTN_WIDTH)/* single button height */#define NEXT_SB_SBTN_HEIGHT		(NEXT_SB_BTN_HEIGHT + NEXT_SB_PAD)/* double button height */#define NEXT_SB_DBTN_HEIGHT		(NEXT_SB_SBTN_HEIGHT<<1)/* total button height */#define NEXT_SB_TBTN_HEIGHT		(NEXT_SB_DBTN_HEIGHT + NEXT_SB_PAD)#define NEXT_BEVEL_X			(NEXT_SB_LPAD)#define NEXT_BTN_FACE_X			(NEXT_BEVEL_X + NEXT_BEVEL_ULEFT_WIDTH)#define NEXT_SB_MIN_HEIGHT		(NEXT_SB_BTN_WIDTH - (NEXT_SB_PAD<<1)) /*  *    +-------------+  *    |             | <---< NEXT_SB_PAD  *    | ::::::::::: |  *    | ::::::::::: |  *   '''''''''''''''''  *   ,,,,,,,,,,,,,,,,,  *    | ::::::::::: |  *    | ::::::::::: |  *    |  +---------------< NEXT_BEVEL_ULEFT_WIDTH  *    |  | :::::::: |  *    |  V :::: vv-------< NEXT_BEVEL_LRIGHT_WIDTH  *    | +---------+ |  *    | | ......%%| |  *    | | ......%%| |  *    | | ..()..%%| |  *    | | ......%%| |  *    | | %%%%%%%%| |  *    | +---------+ | <.........................  *    |             | <---< NEXT_SB_PAD         :  *    | +---------+ | <-+..........            :---< NEXT_SB_TBTN_HEIGHT  *    | | ......%%| |   |         :            :  *    | | ../\..%%| |   |---< NEXT_SB_BTN_HEIGHT :  *    | | %%%%%%%%| |   |         :            :  *    | +---------+ | <-+         :            :  *    |             |             :            :  *    | +---------+ | <-+         :---< NEXT_SB_DBTN_HEIGHT  *    | | ......%%| |   |         :            :  *    | | ..\/..%%| |   |         :            :  *    | | %%%%%%%%| |   |---< NEXT_SB_SBTN_HEIGHT  *    | +---------+ |   |         :            :  *    |             |   |         :            :  *    +-------------+ <-+.........:............:  *    ^^|_________| :  *    ||     |      :  *    ||     +---< NEXT_SB_BTN_WIDTH  *    ||            :  *    |+------< NEXT_SB_PAD  *    |:            :  *    +----< NEXT_SB_BD_WIDTH  *     :            :  *     :............:  *           |  *           +---< NEXT_SB_WIDTH  */#endif	/* NEXT_SCROLLBAR */#ifdef SGI_SCROLLBAR/*** SGI IRIX scrollbar definitions*/#define SGI_ARROW_SOURCE_WIDTH	(14)#define SGI_ARROW_SOURCE_HEIGHT	(14)#define SGI_BEVEL_HI_WIDTH		(1)#define SGI_BEVEL_LO_WIDTH		(1)#define SGI_BEVEL_SIZE			(SGI_BEVEL_HI_WIDTH+SGI_BEVEL_LO_WIDTH)#define SGI_ARROW_WIDTH			(SB_WIDTH_SGI-(SGI_BEVEL_SIZE<<1))#define SGI_ARROW_HEIGHT		(SGI_ARROW_SOURCE_HEIGHT)#define SGI_SB_BUTTON_HEIGHT	((SGI_BEVEL_SIZE<<1)+SGI_ARROW_WIDTH)#define SGI_SB_BUTTONS_HEIGHT	(SGI_SB_BUTTON_HEIGHT<<1)#endif/* * Options for r->h->refresh_type. */#define NO_REFRESH			(0)		/* Window not visible at all! */#define FAST_REFRESH		(1<<0)	/* Fully exposed window */#define SLOW_REFRESH		(1<<1)	/* Partially exposed window */#define SMOOTH_REFRESH		(1<<2)	/* Do sync'ing to make it smooth */#define REFRESH_BOUNDS		(1<<3)	/* Refresh window borders */#define CLIPPED_REFRESH		(1<<4)	/* Honor clipping in GC while refreshing *//* * Options for r->h->want_resize */#define FORCE_RESIZE		(1U << 0)#define FORCE_REFRESH		(1U << 1)/* * Continue undocumented mrxvt code */#define IGNORE			0#define SAVE			's'#define RESTORE			'r'/* special (internal) prefix for font commands */#define FONT_CMD		'#'#define FONT_DN			"#-"#define FONT_UP			"#+"/* flags for rxvt_scr_gotorc() */#define C_RELATIVE		1	/* col movement is relative */#define R_RELATIVE		2	/* row movement is relative */#define RELATIVE		(R_RELATIVE|C_RELATIVE)/* modes for rxvt_scr_insdel_chars(), rxvt_scr_insdel_lines() */#define INSERT			-1	/* don't change these values */#define DELETE			+1#define ERASE			+2/* modes for rxvt_scr_page() - scroll page. used by scrollbar window */enum page_dirn {    UP,    DN,    NO_DIR};/* arguments for rxvt_scr_change_screen() */#define PRIMARY		(0)#define SECONDARY	(1)enum {    SBYTE = 0,    WBYTE};#define RS_None			0	/* Normal */#if defined(TTY_256COLOR)/* have at least 32 bits to use */# define RS_fgMask			0x000001FFu	/* 512 colors */# define RS_bgMask			0x0003FE00u	/* 512 colors */# define RS_Bold			0x00040000u	/* bold */# define RS_Blink			0x00080000u	/* blink */# define RS_RVid			0x00100000u	/* reverse video */# define RS_Uline			0x00200000u	/* underline */# define RS_acsFont			0x00400000u	/* ACS graphics char set */# define RS_ukFont			0x00800000u	/* UK character set */#else/* may only have 16 bits to use so squash them in */# define RS_fgMask			0x0000001Fu	/* 32 colors */# define RS_bgMask			0x000003E0u	/* 32 colors */# define RS_Bold			0x00000400u	/* bold */# define RS_Blink			0x00000800u	/* blink */# define RS_RVid			0x00001000u	/* reverse video */# define RS_Uline			0x00002000u	/* underline */# define RS_acsFont			0x00004000u	/* ACS graphics char set */# define RS_ukFont			0x00008000u	/* UK character set */#endif#ifdef MULTICHAR_SET# define RS_multi0			0x10000000u	/* only multibyte characters */# define RS_multi1			0x20000000u	/* multibyte 1st byte *//* multibyte 2nd byte */# define RS_multi2			(RS_multi0|RS_multi1)/* multibyte mask */# define RS_multiMask		(RS_multi0|RS_multi1)# define IS_MULTI1(R)		(((R) & RS_multiMask) == RS_multi1)# define IS_MULTI2(R)		(((R) & RS_multiMask) == RS_multi2)#else# define RS_multiMask		(0)# define IS_MULTI1(r)		(0)# define IS_MULTI2(r)		(0)#endif#define UNICODE_MASK 0x1fffffUL#if UNICODE3# define COMPOSE_LO 0x40000000UL# define COMPOSE_HI 0x400fffffUL# define IS_COMPOSE(n) ((int32_t)(n) >= COMPOSE_LO)#else# define COMPOSE_LO 0xd800UL# define COMPOSE_HI 0xf8ffUL /* dfff should be safer, but... */# define IS_COMPOSE(n) (COMPOSE_LO <= (n) && (n) <= COMPOSE_HI)#endif#define RS_fontMask			(RS_acsFont|RS_ukFont)#define RS_baseattrMask		(RS_Bold|RS_Blink|RS_RVid|RS_Uline)#define RS_attrMask			(RS_baseattrMask|RS_fontMask|RS_multiMask)#define Sel_none			0	/* Not waiting */#define Sel_normal			0x01	/* normal selection */#define Sel_incr			0x02	/* incremental selection */#define Sel_direct			0x00#define Sel_Primary			0x01#define Sel_Secondary		0x02#define Sel_Clipboard		0x03#define Sel_whereMask		0x0f#define Sel_CompoundText	0x10	/* last request was Compound */enum {    C0_NUL = 0x00,            C0_SOH, C0_STX, C0_ETX, C0_EOT, C0_ENQ, C0_ACK, C0_BEL,    C0_BS , C0_HT , C0_LF , C0_VT , C0_FF , C0_CR , C0_SO , C0_SI ,    C0_DLE, C0_DC1, C0_DC2, D0_DC3, C0_DC4, C0_NAK, C0_SYN, C0_ETB,    C0_CAN, C0_EM , C0_SUB, C0_ESC, C0_IS4, C0_IS3, C0_IS2, C0_IS1}; #define CHAR_ST			0x9c	/* 0234 *//*** Xwsh escape sequences: ESC P Ps .y Pt ESC*/#define Xwsh_title				(1)#define Xwsh_iconName			(3)#define Xwsh_textColor			(4)#define Xwsh_pageColor			(5)#define Xwsh_selTextColor		(6)#define Xwsh_selPageColor		(7)#define Xwsh_cursorTextColor	(8)#define Xwsh_cursorPageColor	(9)#define Xwsh_halfIntColor		(10)#define Xwsh_boldIntColor		(11)#define Xwsh_bindStrKeyVal		(101) /* not implemented */#define Xwsh_bindStrKeyFunc		(103) /* not implemented *//*** XTerm Operating System Commands: ESC ] Ps;Pt (ST|BEL)** colour extensions by Christian W. Zuckschwerdt <zany@triq.net>*/#define XTerm_name			(0)#define XTerm_iconName		(1)#define XTerm_title			(2)#define XTerm_Color			(4)  /* change colors */#define XTerm_Color_cursor	(12) /* change actual 'Cursor' color */#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 screen *//* * mrxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) * Example: echo "\e]61;newtitle\a" */#define MRxvt_term			(60) /* Change window title */#define MRxvt_tab			(61) /* change tab title */#define MRxvt_tabterm		(62) /* change tab and terminal title *//* #define MRxvt_newtab		(63) ** DISABLED create a new tab with title *//* #define MRxvt_prevtab	(64) ** DISABLED switch to previous tab *//* #define MRxvt_nexttab	(65) ** DISABLED switch to next tab */#define MRxvt_tint			(66) /* change tinting color */#define MRxvt_shade			(67) /* change shade level */#define MRxvt_encode		(68) /* change encoding *//* #define MRxvt_hide		(69) ** DISABLED hide/show tabbar */#define MRxvt_opacity		(70) /* set opacity level *//* #define MRxvt_tabbtn		(71) ** DISABLED hide/show tabbar buttons */#define MRxvt_tabfg			(72) /* change active tab fg */#define MRxvt_tabbg			(73) /* change tabbar/active tab bg */#define MRxvt_itabfg		(74) /* change inactive tab fg */

⌨️ 快捷键说明

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