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

📄 rxvt.h

📁 rxvt经典的linux下的终端.小巧实用
💻 H
📖 第 1 页 / 共 3 页
字号:
/* * $Id: rxvt.h,v 1.163 2003/03/07 01:00:32 gcw Exp $ */#ifndef _RXVT_H_		/* include once only */#define _RXVT_H_#include "rxvtlib.h"#include "feature.h"#include <X11/cursorfont.h>#include <X11/keysym.h>#include <X11/keysymdef.h>#include <X11/Xatom.h>/* ***************************************************************************** * SYSTEM HACKS ***************************************************************************** *//* Consistent defines - please report on the necessity * @ Unixware: defines (__svr4__) */#if defined (SVR4) && !defined (__svr4__)# define __svr4__#endif#if defined (sun) && !defined (__sun__)# define __sun__#endif#ifndef HAVE_XPOINTERtypedef char   *XPointer;#endif#ifdef HAVE_TERMIOS_H# include <termios.h>typedef struct termios ttymode_t;#else# include <sgtty.h>typedef struct {    struct sgttyb   sg;    struct tchars   tc;    struct ltchars  lc;    int             line;    int             local;} ttymode_t;#endif#ifdef GREEK_SUPPORT# include "grkelot.h"#endif#ifdef XPM_BACKGROUND# ifdef XPM_INC_X11#  include <X11/xpm.h># else#  include <xpm.h># endif#endif#ifndef STDIN_FILENO# define STDIN_FILENO	0# 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(__CYGWIN32__) || 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;struct grwin_t;/* Sanitize menubar info */#ifndef MENUBAR# undef MENUBAR_MAX#endif#ifndef MENUBAR_MAX# define MENUBAR_MAX	0#endif/* If we're using either the rxvt scrollbar or menu bars, keep the * scrollColor resource. */#if defined(RXVT_SCROLLBAR) || defined(MENUBAR)# define KEEP_SCROLLCOLOR 1#else# undef KEEP_SCROLLCOLOR#endif#ifdef XPM_BACKGROUNDtypedef struct {    short           w, h, x, y;    Pixmap          pixmap;} bgPixmap_t;#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)					\    do {								\	typeof          swapittmp;					\	(swapittmp) = (one); (one) = (two); (two) = (swapittmp);	\    } while (/* CONSTCOND */ 0)#define BOUND_POSITIVE_INT16(val)			\    (int16_t)((val) <= 0				\	      ? 0					\	      : min((val), (((u_int16_t)-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	"Rxvt"	/* also check resources under this name */#define APL_NAME	"rxvt"	/* normal name *//* COLORTERM, TERM environment variables */#define COLORTERMENV	"rxvt"#ifdef XPM_BACKGROUND# define COLORTERMENVFULL COLORTERMENV "-xpm"#else# define COLORTERMENVFULL COLORTERMENV#endif#ifndef TERMENV# define TERMENV	"xterm"#endif#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 */#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR)# define HAVE_SCROLLBARS#endif/* 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_RXVT		0#define R_SB_NEXT		1#define R_SB_XTERM		2#define SB_WIDTH_NEXT		19#define SB_WIDTH_XTERM		15#ifndef SB_WIDTH_RXVT# define SB_WIDTH_RXVT		10#endif/* * NeXT scrollbar defines */#define SB_PADDING		1#define SB_BORDER_WIDTH		1#define SB_BEVEL_WIDTH_UPPER_LEFT	1#define SB_BEVEL_WIDTH_LOWER_RIGHT	2#define SB_LEFT_PADDING		(SB_PADDING + SB_BORDER_WIDTH)#define SB_MARGIN_SPACE		(SB_PADDING * 2)#define SB_BUTTON_WIDTH		(SB_WIDTH_NEXT - SB_MARGIN_SPACE - SB_BORDER_WIDTH)#define SB_BUTTON_HEIGHT	(SB_BUTTON_WIDTH)#define SB_BUTTON_SINGLE_HEIGHT	(SB_BUTTON_HEIGHT + SB_PADDING)#define SB_BUTTON_BOTH_HEIGHT	(SB_BUTTON_SINGLE_HEIGHT * 2)#define SB_BUTTON_TOTAL_HEIGHT	(SB_BUTTON_BOTH_HEIGHT + SB_PADDING)#define SB_BUTTON_BEVEL_X	(SB_LEFT_PADDING)#define SB_BUTTON_FACE_X	(SB_BUTTON_BEVEL_X + SB_BEVEL_WIDTH_UPPER_LEFT)#define SB_THUMB_MIN_HEIGHT	(SB_BUTTON_WIDTH - (SB_PADDING * 2)) /*  *    +-------------+  *    |             | <---< SB_PADDING  *    | ::::::::::: |  *    | ::::::::::: |  *   '''''''''''''''''  *   ,,,,,,,,,,,,,,,,,  *    | ::::::::::: |  *    | ::::::::::: |  *    |  +---------------< SB_BEVEL_WIDTH_UPPER_LEFT  *    |  | :::::::: |  *    |  V :::: vv-------< SB_BEVEL_WIDTH_LOWER_RIGHT  *    | +---------+ |  *    | | ......%%| |  *    | | ......%%| |  *    | | ..()..%%| |  *    | | ......%%| |  *    | | %%%%%%%%| |  *    | +---------+ | <.........................  *    |             | <---< SB_PADDING         :  *    | +---------+ | <-+..........            :---< SB_BUTTON_TOTAL_HEIGHT  *    | | ......%%| |   |         :            :  *    | | ../\..%%| |   |---< SB_BUTTON_HEIGHT :  *    | | %%%%%%%%| |   |         :            :  *    | +---------+ | <-+         :            :  *    |             |             :            :  *    | +---------+ | <-+         :---< SB_BUTTON_BOTH_HEIGHT  *    | | ......%%| |   |         :            :  *    | | ..\/..%%| |   |         :            :  *    | | %%%%%%%%| |   |---< SB_BUTTON_SINGLE_HEIGHT  *    | +---------+ |   |         :            :  *    |             |   |         :            :  *    +-------------+ <-+.........:............:  *    ^^|_________| :  *    ||     |      :  *    ||     +---< SB_BUTTON_WIDTH  *    ||            :  *    |+------< SB_PADDING  *    |:            :  *    +----< SB_BORDER_WIDTH  *     :            :  *     :............:  *           |  *           +---< SB_WIDTH_NEXT  */#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)#ifdef NO_SECONDARY_SCREEN# define NSCREENS		0#else# define NSCREENS		1#endif#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() */enum {    PRIMARY = 0,    SECONDARY};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 */# define RS_multi2		(RS_multi0|RS_multi1)	/* multibyte 2nd byte */# define RS_multiMask		(RS_multi0|RS_multi1)	/* multibyte mask */# 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 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 *//* * 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 */

⌨️ 快捷键说明

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