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

📄 ptyx.h

📁 源码,标准c++用力
💻 H
📖 第 1 页 / 共 2 页
字号:
	int		cur_col;	/* current cursor column	*/	int		cur_row;	/* current cursor row		*/	int		max_col;	/* rightmost column		*/	int		max_row;	/* bottom row			*/	int		top_marg;	/* top line of scrolling region */	int		bot_marg;	/* bottom line of  "	    "	*/	Widget		scrollWidget;	/* pointer to scrollbar struct	*/	int		scrollbar;	/* if > 0, width of scrollbar, and						scrollbar is showing	*/	int		topline;	/* line number of top, <= 0	*/	int		savedlines;     /* number of lines that've been saved */	int		savelines;	/* number of lines off top to save */	int		scrolllines;	/* number of lines to button scroll */	Boolean		scrollttyoutput; /* scroll to bottom on tty output */	Boolean		scrollkey;	/* scroll to bottom on key	*/		ScrnBuf		buf;		/* ptr to visible screen buf (main) */	ScrnBuf		allbuf;		/* screen buffer (may include					   lines scrolled off top)	*/	char		*sbuf_address;	/* main screen memory address   */	ScrnBuf		altbuf;		/* alternate screen buffer	*/	char		*abuf_address;	/* alternate screen memory address */	Boolean		alternate;	/* true if using alternate buf	*/	unsigned short	do_wrap;	/* true if cursor in last column					    and character just output    */	int		incopy;		/* 0 idle; 1 XCopyArea issued;					    -1 first GraphicsExpose seen,					    but last not seen		*/	int		copy_src_x;	/* params from last XCopyArea ... */	int		copy_src_y;	unsigned int	copy_width;	unsigned int	copy_height;	int		copy_dest_x;	int		copy_dest_y;	Boolean		c132;		/* allow change to 132 columns	*/	Boolean		curses;		/* cludge-ups for more and vi	*/	Boolean		marginbell;	/* true if margin bell on	*/	int		nmarginbell;	/* columns from right margin	*/	int		bellarmed;	/* cursor below bell margin	*/	Boolean 	multiscroll;	/* true if multi-scroll		*/	int		scrolls;	/* outstanding scroll count,					    used only with multiscroll	*/	SavedCursor	sc;		/* data for restore cursor	*/	int		save_modes[19];	/* save dec private modes	*/	/* Improved VT100 emulation stuff.				*/	char		gsets[4];	/* G0 through G3.		*/	char		curgl;		/* Current GL setting.		*/	char		curss;		/* Current single shift.	*/	int		scroll_amt;	/* amount to scroll		*/	int		refresh_amt;	/* amount to refresh		*/	Boolean		jumpscroll;	/* whether we should jumpscroll */	Boolean         always_highlight; /* whether to highlight cursor *//* Tektronix window parameters */	GC		TnormalGC;	/* normal painting		*/	GC		TcursorGC;	/* normal cursor painting	*/	Pixel		Tforeground;	/* foreground color		*/	Pixel		Tbackground;	/* Background color		*/	Pixel		Tcursorcolor;	/* Cursor color			*/	int		Tcolor;		/* colors used			*/	Boolean		Vshow;		/* VT window showing		*/	Boolean		Tshow;		/* Tek window showing		*/	Boolean		waitrefresh;	/* postpone refresh		*/	struct {		Window	window;		/* X window id			*/		int	width;		/* width of columns		*/		int	height;		/* height of rows		*/		int	fullwidth;	/* full width of window		*/		int	fullheight;	/* full height of window	*/		double	tekscale;	/* scale factor Tek -> vs100	*/	} fullTwin;	int		xorplane;	/* z plane for inverts		*/	GC		linepat[TEKNUMLINES]; /* line patterns		*/	Boolean		TekEmu;		/* true if Tektronix emulation	*/	int		cur_X;		/* current x			*/	int		cur_Y;		/* current y			*/	Tmodes		cur;		/* current tek modes		*/	Tmodes		page;		/* starting tek modes on page	*/	int		margin;		/* 0 -> margin 1, 1 -> margin 2	*/	int		pen;		/* current Tektronix pen 0=up, 1=dn */	char		*TekGIN;	/* nonzero if Tektronix GIN mode*/	int		gin_terminator; /* Tek strap option */	int		multiClickTime;	 /* time between multiclick selects */	int		bellSuppressTime; /* msecs after Bell before another allowed */	Boolean		bellInProgress; /* still ringing/flashing prev bell? */	char		*charClass;	/* for overriding word selection */	Boolean		cutNewline;	/* whether or not line cut has \n */	Boolean		cutToBeginningOfLine;  /* line cuts to BOL? */	char		*selection;	/* the current selection */	int		selection_size; /* size of allocated buffer */	int		selection_length; /* number of significant bytes */	int		selection_time;	/* latest event timestamp */	int		startHRow, startHCol, /* highlighted text */			endHRow, endHCol,			startHCoord, endHCoord;	Atom*		selection_atoms; /* which selections we own */	Cardinal	sel_atoms_size;	/*  how many atoms allocated */	Cardinal	selection_count; /* how many atoms in use */	Boolean		input_eight_bits;/* use 8th bit instead of ESC prefix */	Boolean		output_eight_bits; /* honor all bits or strip */	Pixmap		menu_item_bitmap;	/* mask for checking items */	Widget		mainMenu, vtMenu, tekMenu, fontMenu;	char*		menu_font_names[NMENUFONTS];	int		menu_font_number;} TScreen;typedef struct _TekPart {    XFontStruct *Tfont[TEKNUMFONTS];    int		tobaseline[TEKNUMFONTS]; /* top to baseline for each font */    char	*initial_font;		/* large, 2, 3, small */    char	*gin_terminator_str;	/* ginTerminator resource */} TekPart;/* meaning of bits in screen.select flag */#define	INWINDOW	01	/* the mouse is in one of the windows */#define	FOCUS		02	/* one of the windows is the focus window */#define MULTICLICKTIME 250	/* milliseconds */typedef struct{	unsigned	flags;} TKeyboard;typedef struct _Misc {    char *geo_metry;    char *T_geometry;    char *f_n;    char *f_b;#ifdef ALLOWLOGGING    Boolean log_on;#endif    Boolean login_shell;    Boolean re_verse;    int resizeGravity;    Boolean reverseWrap;    Boolean autoWrap;    Boolean logInhibit;    Boolean signalInhibit;    Boolean tekInhibit;    Boolean scrollbar;    Boolean titeInhibit;    Boolean tekSmall;	/* start tek window in small size */    Boolean appcursorDefault;    Boolean appkeypadDefault;	Boolean dynamicColors;	char* cb_translation;} Misc;typedef struct {int foo;} XtermClassPart, TekClassPart;typedef struct _XtermClassRec {    CoreClassPart  core_class;    XtermClassPart xterm_class;} XtermClassRec;typedef struct _TekClassRec {    CoreClassPart core_class;    TekClassPart tek_class;} TekClassRec;/* define masks for flags */#define CAPS_LOCK	0x01#define KYPD_APL	0x02#define CURSOR_APL	0x04#define N_MARGINBELL	10#define MAX_TABS	320#define TAB_ARRAY_SIZE	10	/* number of ints to provide MAX_TABS bits */typedef unsigned Tabs [TAB_ARRAY_SIZE];typedef struct _XtermWidgetRec {    CorePart	core;    TKeyboard	keyboard;	/* terminal keyboard		*/    TScreen	screen;		/* terminal screen		*/    unsigned	flags;		/* mode flags			*/	unsigned 	cur_foreground;		/* current foreground color */	unsigned 	cur_background;		/* current background color */    unsigned	initflags;	/* initial mode flags		*/    Tabs	tabs;		/* tabstops of the terminal	*/    Misc	misc;		/* miscellaneous parameters	*/} XtermWidgetRec, *XtermWidget;typedef struct _TekWidgetRec {    CorePart core;    TekPart tek;} TekWidgetRec, *TekWidget;#define BUF_SIZE 4096/* * terminal flags * There are actually two namespaces mixed together here. * One is the set of flags that can go in screen->buf attributes * and which must fit in a char. * The other is the global setting stored in * term->flags and screen->save_modes.  This need only fit in an unsigned. */#define	ATTRIBUTES	0x67	/* mask: user-visible attributes *//* global flags and character flags (visible character attributes) */#define INVERSE		0x01	/* invert the characters to be output */#define UNDERLINE	0x02	/* true if underlining */#define BOLD		0x04/* character flags (internal attributes) */#define LINEWRAPPED	0x08	/* used on the first character in a				 * line to indicate that it wraps onto				 * the next line so we can tell the				 * difference between lines that have				 * wrapped around and lines that have				 * ended naturally with a CR at column				 * max_col.				 */#define CHARDRAWN	0x10    /* a character has been drawn here on the				   screen.  Used to distinguish blanks from				   empty parts of the screen when selecting *//* global flags */#define BG_COLOR	0x20	/* true if background set */#define FG_COLOR	0x40	/* true if foreground set */#define BLINK		0x80	/* true if blinking (appears as bold) */#define SHOWBOLD	0x84	/* if shows as boldface */#define WRAPAROUND	0x400	/* true if auto wraparound mode */#define	REVERSEWRAP	0x800	/* true if reverse wraparound mode */#define REVERSE_VIDEO	0x1000	/* true if screen white on black */#define LINEFEED	0x2000	/* true if in auto linefeed mode */#define ORIGIN		0x4000	/* true if in origin mode */#define INSERT		0x8000	/* true if in insert mode */#define SMOOTHSCROLL	0x10000	/* true if in smooth scroll mode */#define IN132COLUMNS	0x20000	/* true if in 132 column mode */#define VWindow(screen)		(screen->fullVwin.window)#define VShellWindow		term->core.parent->core.window#define TextWindow(screen)      (screen->fullVwin.window)#define TWindow(screen)		(screen->fullTwin.window)#define TShellWindow		tekWidget->core.parent->core.window#define Width(screen)		(screen->fullVwin.width)#define Height(screen)		(screen->fullVwin.height)#define FullWidth(screen)	(screen->fullVwin.fullwidth)#define FullHeight(screen)	(screen->fullVwin.fullheight)#define FontWidth(screen)	(screen->fullVwin.f_width)#define FontHeight(screen)	(screen->fullVwin.f_height)#define TWidth(screen)		(screen->fullTwin.width)#define THeight(screen)		(screen->fullTwin.height)#define TFullWidth(screen)	(screen->fullTwin.fullwidth)#define TFullHeight(screen)	(screen->fullTwin.fullheight)#define TekScale(screen)	(screen->fullTwin.tekscale)#define CursorX(screen,col) ((col) * FontWidth(screen) + screen->border \			+ screen->scrollbar)#define CursorY(screen,row) ((((row) - screen->topline) * FontHeight(screen)) \			+ screen->border)#define	TWINDOWEVENTS	(KeyPressMask | ExposureMask | ButtonPressMask |\			 ButtonReleaseMask | StructureNotifyMask |\			 EnterWindowMask | LeaveWindowMask | FocusChangeMask)#define	WINDOWEVENTS	(TWINDOWEVENTS | PointerMotionMask)#define TEK_LINK_BLOCK_SIZE 1024typedef struct Tek_Link{	struct Tek_Link	*next;	/* pointer to next TekLink in list				   NULL <=> this is last TekLink */	short fontsize;		/* character size, 0-3 */	short count;		/* number of chars in data */	char *ptr;		/* current pointer into data */	char data [TEK_LINK_BLOCK_SIZE];} TekLink;/* flags for cursors */#define	OFF		0#define	ON		1#define	CLEAR		0#define	TOGGLE		1/* flags for inhibit */#ifdef ALLOWLOGGING#define	I_LOG		0x01#endif#define	I_SIGNAL	0x02#define	I_TEK		0x04extern Cursor make_colored_cursor();extern int GetBytesAvailable();extern void first_map_occurred();extern int kill_process_group();

⌨️ 快捷键说明

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