欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

pcvt_ioctl.h

基于组件方式开发操作系统的OSKIT源代码
H
第 1 页 / 共 2 页
字号:
#define FNT_8x8		3	/* 8x8  Pixel Font, EGA/VGA  *//* Definitions of Character Set (Font) Numbers */#define CH_SET0		0	/* Character Set (Font) 0, EGA/VGA */#define CH_SET1		1	/* Character Set (Font) 1, EGA/VGA */#define CH_SET2		2	/* Character Set (Font) 2, EGA/VGA */#define CH_SET3		3	/* Character Set (Font) 3, EGA/VGA */#define CH_SETMAX_EGA	3	/* EGA has 4 Character Sets / Fonts */#define CH_SET4		4	/* Character Set (Font) 4, VGA */#define CH_SET5		5	/* Character Set (Font) 5, VGA */#define CH_SET6		6	/* Character Set (Font) 6, VGA */#define CH_SET7		7	/* Character Set (Font) 7, VGA */#define CH_SETMAX_VGA	7	/* VGA has 8 Character Sets / Fonts *//* Definitions of Terminal Emulation Modes */#define M_HPVT		0	/* VTxxx and HP Mode, Labels & Status Line on */#define M_PUREVT	1	/* only VTxxx Sequences recognized, no Labels *//*---*/#define VGACURSOR	_IOW('V',100, struct cursorshape) /* set cursor shape */struct cursorshape {	int screen_no;	   /* screen number for which to set,		    */			   /*  or -1 to set on current active screen        */	int start;	   /* top scanline, range 0... Character Height - 1 */	int end;	   /* end scanline, range 0... Character Height - 1 */};#define VGALOADCHAR	_IOW('V',101, struct vgaloadchar) /* load vga char */struct vgaloadchar {	int character_set;	    /* VGA character set to load into */	int character;		    /* Character to load */	int character_scanlines;    /* Scanlines per character */	u_char char_table[32];	    /* VGA character shape table */};#define VGASETFONTATTR	_IOW('V',102, struct vgafontattr) /* set font attr */#define VGAGETFONTATTR	_IOWR('V',103, struct vgafontattr) /* get font attr */struct vgafontattr {	int character_set;	    /* VGA character set */	int font_loaded;	    /* Mark font loaded or unloaded */	int screen_size;	    /* Character rows per screen */	int character_scanlines;    /* Scanlines per character - 1 */	int screen_scanlines;       /* Scanlines per screen - 1 byte */};#define VGASETSCREEN	_IOW('V',104, struct screeninfo) /* set screen info */#define VGAGETSCREEN	_IOWR('V',105, struct screeninfo) /* get screen info */struct screeninfo {	int adaptor_type;	/* type of video adaptor installed	*/				/* read only, ignored on write		*/	int monitor_type;	/* type of monitor (mono/color)installed*/				/* read only, ignored on write		*/	int totalfonts;		/* no of downloadable fonts		*/				/* read only, ignored on write		*/	int totalscreens;	/* no of virtual screens		*/				/* read only, ignored on write		*/	int screen_no;		/* screen number, this was got from	*/				/* on write, if -1, apply pure_vt_mode	*/				/* and/or screen_size to current screen */				/* else to screen_no supplied		*/	int current_screen;	/* screen number, which is displayed.	*/				/* on write, if -1, make this screen	*/				/* the current screen, else set current	*/				/* displayed screen to parameter	*/	int pure_vt_mode;	/* flag, pure VT mode or HP/VT mode	*/				/* on write, if -1, no change		*/	int screen_size;	/* screen size 				*/				/* on write, if -1, no change		*/	int force_24lines;	/* force 24 lines if 25 lines VT mode	*/				/* or 28 lines HP mode to get pure	*/				/* VT220 screen size			*/				/* on write, if -1, no change		*/	int vga_family;		/* if adaptor_type = VGA, this reflects */				/* the chipset family after a read	*/				/* nothing happens on write ...        */	int vga_type;		/* if adaptor_type = VGA, this reflects */				/* the chipset after a read		*/				/* nothing happens on write ...        */	int vga_132;		/* set to 1 if driver has support for	*/				/* 132 column operation for chipset	*/				/* currently ignored on write		*/};#define VGAREADPEL	_IOWR('V', 110, struct vgapel) /*r VGA palette entry */#define VGAWRITEPEL	_IOW('V', 111, struct vgapel)  /*w VGA palette entry */struct vgapel {	unsigned idx;		/* index into palette, 0 .. 255 valid	*/	unsigned r, g, b;	/* RGB values, masked by VGA_PMASK (63) */};/* NOTE: The next ioctl is only valid if option PCVT_SCREENSAVER is configured*//* this is *not* restricted to VGA's, but won't introduce new garbage...      */#define VGASCREENSAVER	_IOW('V', 112, int)	/* set timeout for screen     */						/* saver in seconds; 0 turns  */						/* it off                     */#define VGAPCVTID	_IOWR('V',113, struct pcvtid)	/* get driver id */struct pcvtid {				/* THIS STRUCTURE IS NOW FROZEN !!! */#define PCVTIDNAMELN  16		/* driver id - string length	*/	char name[PCVTIDNAMELN];	/* driver name, == PCVTIDSTR	*/	int rmajor;			/* revision number, major	*/	int rminor;			/* revision number, minor	*/};					/* END OF COLD PART ...		*/#define VGAPCVTINFO	_IOWR('V',114, struct pcvtinfo)	/* get driver info */struct pcvtinfo {			/* compile time option values */	u_int opsys;			/* PCVT_xxx(x)BSD */#define CONF_UNKNOWNOPSYS	0#define CONF_386BSD		1	/* unsupported */#define CONF_NETBSD		2#define CONF_FREEBSD		3	u_int opsysrel;			/* Release */	u_int nscreens;			/* PCVT_NSCREENS */	u_int scanset;			/* PCVT_SCANSET */	u_int updatefast;		/* PCVT_UPDATEFAST */	u_int updateslow;		/* PCVT_UPDATESLOW */	u_int sysbeepf;			/* PCVT_SYSBEEPF */	u_int pcburst;			/* PCVT_PCBURST */	u_int kbd_fifo_sz;		/* PCVT_KBD_FIFO_SZ *//* config booleans */	u_long compile_opts;		/* PCVT_xxxxxxxxxxxxxxx */#define CONF_VT220KEYB		0x00000001#define CONF_SCREENSAVER	0x00000002#define CONF_PRETTYSCRNS	0x00000004#define CONF_CTRL_ALT_DEL	0x00000008#define CONF_USEKBDSEC		0x00000010#define CONF_24LINESDEF		0x00000020#define CONF_EMU_MOUSE		0x00000040#define CONF_SHOWKEYS		0x00000080#define CONF_KEYBDID		0x00000100#define CONF_SIGWINCH		0x00000200#define CONF_NULLCHARS		0x00000400#define CONF_BACKUP_FONTS	0x00000800#define CONF_SW0CNOUTP		0x00001000	/* was FORCE8BIT */				                /* 0x00002000 was NEEDPG */#define CONF_SETCOLOR		0x00004000#define CONF_132GENERIC		0x00008000#define CONF_PALFLICKER		0x00010000#define CONF_WAITRETRACE	0x00020000#define CONF_XSERVER		0x00040000#define CONF_USL_VT_COMPAT	0x00080000#define CONF_PORTIO_DELAY	0x00100000 	/* was FAKE_SYSCONS10 */#define CONF_INHIBIT_NUMLOCK	0x00200000#define CONF_META_ESC		0x00400000#define CONF_NOFASTSCROLL	0x00800000#define CONF_SLOW_INTERRUPT	0x01000000#define CONF_KBD_FIFO		0x02000000#define CONF_NO_LED_UPDATE	0x04000000};#define VGASETCOLMS	_IOW('V', 115, int) /* set number of columns (80/132)*//* * only useful if compiled with ``XSERVER'' defined, but always here: * WARNING: DO NOT CHANGE THESE DEFINITIONS, the X server relies on * it since it's defining its own values and doesn't know nothing about * this header file. */#define CONSOLE_X_MODE_ON   _IO('t', 121) /* turn off pcvt, grant IOPL for X */#define CONSOLE_X_MODE_OFF  _IO('t', 122) /* back to pcvt */#define CONSOLE_X_BELL      _IOW('t', 123, int[2]) /* set bell behaviour *//* * start of USL VT compatibility stuff * these definitions must match those ones used by syscons * * Note that some of the ioctl command definitions below break the Berkeley * style. They accept a parameter of type "int" (instead of Berkeley style * "int *") in order to pass a single integer to the ioctl. These macros * below are marked with a dummy "int" comment. Dont blame anyone else * than USL for that braindeadness. It is done here to be a bit source- * level compatible to SysV. (N.B., within the ioctl, the argument is * dereferenced by "int *" anyway. The translation is done by the upper- * level ioctl stuff.) *//* * NB: Some of the definitions below apparently override the definitions * in the KBD section above. But, due to BSDs encoding of the IO direction * and transfer size, the resulting ioctl cmds differ, so we can take them * here. The only real conflict would appear if we implemented KDGKBMODE, * which would be identical to KBDGLEDS above. Since this command is not * necessary for XFree86 2.0, we omit it. *//* #define KDGKBMODE 	_IOR('K', 6, int) */ /* not yet implemented */#define KDSKBMODE 	_IO('K', 7 /*, int */)#define K_RAW		0		/* keyboard returns scancodes	*/#define K_XLATE		1		/* keyboard returns ascii 	*/#define KDMKTONE	_IO('K', 8 /*, int */)/* #define KDGETMODE	_IOR('K', 9, int) */ /* not yet implemented */#define KDSETMODE	_IO('K', 10 /*, int */)#define KD_TEXT		0		/* set text mode restore fonts  */#define KD_GRAPHICS	1		/* set graphics mode 		*//* we cannot see any sense to support KD_TEXT0 or KD_TEXT1 */#define KDENABIO	_IO('K', 60) /* only allowed if euid == 0 */#define KDDISABIO	_IO('K', 61)#define KDGETLED	_IOR('K', 65, int)#define KDSETLED	_IO('K', 66 /*, int */)#define LED_CAP		1#define LED_NUM		2#define LED_SCR		4#define KDSETRAD	_IO('K', 67 /*, int */)/* * Note that since our idea of key mapping is much different from the * SysV style, we _only_ support mapping layers base (0), shifted (1), * alt (4), and alt-shift (5), and only for the basic keys (without * any function keys). This is what XFree86 2.0+ needs to establish * the default X keysym mapping. */#define GIO_KEYMAP 	_IOR('k', 6, keymap_t)#define VT_OPENQRY	_IOR('v', 1, int)#define VT_SETMODE	_IOW('v', 2, vtmode_t)#define VT_GETMODE	_IOR('v', 3, vtmode_t)#define VT_RELDISP	_IO('v', 4 /*, int */)/* acceptable values for the VT_RELDISP command */#define VT_FALSE	0		/* release of VT refused */#define VT_TRUE		1		/* VT released */#define VT_ACKACQ	2		/* acknowledging VT acquisition */#define VT_ACTIVATE	_IO('v', 5 /*, int */)#define VT_WAITACTIVE	_IO('v', 6 /*, int */)#define VT_GETACTIVE	_IOR('v', 7, int)#ifndef _VT_MODE_DECLARED#define	_VT_MODE_DECLAREDstruct vt_mode {	char	mode;#define VT_AUTO		0		/* switching controlled by drvr	*/#define VT_PROCESS	1		/* switching controlled by prog */	char	waitv;			/* not implemented yet 	SOS	*/	short	relsig;	short	acqsig;	short	frsig;			/* not implemented yet	SOS	*/};typedef struct vt_mode vtmode_t;#endif /* !_VT_MODE_DECLARED */#define NUM_KEYS	256#define NUM_STATES	8#ifndef _KEYMAP_DECLARED#define	_KEYMAP_DECLAREDstruct key_t {	u_char map[NUM_STATES];	u_char spcl;	u_char flgs;};struct keymap {	u_short	n_keys;	struct key_t key[NUM_KEYS];};typedef struct keymap keymap_t;#endif /* !_KEYMAP_DECLARED *//* end of USL VT compatibility stuff */#endif /* !_MACHINE_PCVT_IOCTL_H_ */

⌨️ 快捷键说明

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