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

📄 tksedev.h

📁 T-kernel 的extension源代码
💻 H
字号:
/* *---------------------------------------------------------------------- *    T-Kernel / Standard Extension * *    Copyright (C) 2006 by Ken Sakamura. All rights reserved. *    T-Kernel / Standard Extension is distributed  *      under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* *	tksedev.h * *	TK/SE device definitions */#ifndef	__SYS_TKSEDEV_H__#define	__SYS_TKSEDEV_H__/* KBPD attribute data number */typedef	enum {	DN_KPEVENT	= TDN_EVENT,	/* Message buffer for event notification						data: ID		RW */	DN_KPINPUT	= (-100),		/* Input mailbox						data: ID		R  */	DN_KPSTAT	= (-101),		/* KB/PD state						data: KPstat		RW */	DN_KEYMAP	= (-102),		/* Key map						data: KeyMap		R  */	DN_KEYTAB	= (-103),		/* Key table						data: KeyTab		RW */	DN_KEYMODE	= (-104),		/* Key operation mode						data: KeyMode		RW */	DN_PDMODE	= (-105),		/* PD operation mode						data: PdMode		RW */	DN_PDRANGE	= (-106),		/* PD range						data: PdRange		RW */	DN_PDSIM	= (-107),		/* PD simulation						data: W			RW */	DN_PDSIMINH	= (-108),		/* Temporary prohibition of PD simulation						data: BOOL		RW */	DN_KEYID	= (-109),		/* Keyboard ID						data: UW		RW */	DN_KPMETABUT	= (-110),		/* Metakey/button state						data: MetaBut[2]	 W */	DN_KEYDEF_S	= (-200),		/* Keyboard definition 1 (-200 to -327)    */	DN_KEYDEF_E	= (-327),		/*	data: KeyDef		RW */	DN_KEYDEF2_S	= (-400),		/* Keyboard definition 2 (-400 to -527)    */	DN_KEYDEF2_E	= (-527)		/*	data: KeyDef		RW */} KPDataNo;typedef struct {#if BIGENDIAN	unsigned int	rsv1:8;		/* Reserved (0)		*/	unsigned int	pdsim:2;	/* PD simulation (PdSimMode) */	unsigned int	nodsp:1;	/* Not display pointer	*/	unsigned int	rsv2:3;		/* Reserved (0)		*/	unsigned int	kbsel:1;	/* Keyboard selection	*/	unsigned int	han:1;		/* Single-width mode		*/	unsigned int	tcmd:1;		/* Instruction temporary shift	*/	unsigned int	text:1;		/* Extension temporary shift	*/	unsigned int	trsh:1;		/* Right shift temporary shift	*/	unsigned int	tlsh:1;		/* Left shift temporary shift	*/	unsigned int	lcmd:1;		/* Instruction simple lock	*/	unsigned int	lext:1;		/* Extended simple lock	*/	unsigned int	lrsh:1;		/* Right shift simple lock	*/	unsigned int	llsh:1;		/* Left shift simple lock	*/	unsigned int	cmd:1;		/* Instruction shift		*/	unsigned int	ext:1;		/* Extended shift		*/	unsigned int	rsh:1;		/* Right shift		*/	unsigned int	lsh:1;		/* Left shift		*/	unsigned int	mode:2;		/* Key input mode (InputMode) */	unsigned int	sub:1;		/* Sub-button		*/	unsigned int	main:1;		/* Main button		*/#else	unsigned int	main:1;		/* Main button		*/	unsigned int	sub:1;		/* Sub-button		*/	unsigned int	mode:2;		/* Key input mode (InputMode) */	unsigned int	lsh:1;		/* Left shift		*/	unsigned int	rsh:1;		/* Right shift		*/	unsigned int	ext:1;		/* Extended shift		*/	unsigned int	cmd:1;		/* Instruction shift		*/	unsigned int	llsh:1;		/* Left shift simple lock	*/	unsigned int	lrsh:1;		/* Right shift simple lock	*/	unsigned int	lext:1;		/* Extended simple lock	*/	unsigned int	lcmd:1;		/* Instruction simple lock	*/	unsigned int	tlsh:1;		/* Left shift temporary shift	*/	unsigned int	trsh:1;		/* Right shift temporary shift	*/	unsigned int	text:1;		/* Extension temporary shift	*/	unsigned int	tcmd:1;		/* Instruction temporary shift	*/	unsigned int	han:1;		/* Single-width mode		*/	unsigned int	kbsel:1;	/* Keyboard selection	*/	unsigned int	rsv2:3;		/* Reserved (0)		*/	unsigned int	nodsp:1;	/* Not display pointer	*/	unsigned int	pdsim:2;	/* PD simulation(PdSimMode) */	unsigned int	rsv1:8;		/* Reserved (0)		*/#endif} MetaBut;typedef struct {	H		xpos;		/* X coordinate position		*/	H		ypos;		/* Y coordinate position		*/	MetaBut		stat;		/* Metakey/button state	*/} KPStat;/* DN_PDMODE:	PD operation mode (RW) */typedef struct {#if BIGENDIAN	unsigned int	rsv1:17;	/* Reserved (0)		*/	unsigned int	wheel:1;	/* Wheel		*/	unsigned int	qpress:1;	/* Quick press	*/	unsigned int	reverse:1;	/* Flip horizontally		*/	unsigned int	accel:3;	/* Acceleration		*/	unsigned int	absolute:1;	/* Absolute/relative		*/	unsigned int	rate:4;		/* Scanning speed		*/	unsigned int	sense:4;	/* Sensitivity			*/#else	unsigned int	sense:4;	/* Sensitivity			*/	unsigned int	rate:4;		/* Scanning speed		*/	unsigned int	absolute:1;	/* Absolute/relative		*/	unsigned int	accel:3;	/* Acceleration		*/	unsigned int	reverse:1;	/* Flip horizontally		*/	unsigned int	qpress:1;	/* Quick press	*/	unsigned int	wheel:1;	/* Wheel		*/	unsigned int	rsv1:17;	/* Reserved (0)		*/#endif} PdAttr;typedef struct {	MSEC		ontime;		/* ON valid time		*/	MSEC		offtime;	/* OFF valid time	*/	MSEC		invtime;	/* Invalid time		*/	MSEC		timeout;	/* Timeout period	*/	PdAttr		attr;		/* PD attribute		*/} PdMode;/* DN_PDRANGE:	PD range (RW) */typedef struct {	H		xmax;		/* Maximum X coordinate value 	*/	H		ymax;		/* Maximum Y coordinate value 	*/} PdRange;/* Event notification */typedef struct {	T_DEVEVT	h;		/* Standard header		*/	UH		keytop;		/* Key top code	*/	UH		code;		/* Character code		*/	MetaBut		stat;		/* Metakey state		*/} KeyEvt;typedef struct {	T_DEVEVT	h;		/* Standard header		*/	KPStat		stat;		/* PD position/button state	*/} PdEvt;typedef struct {	T_DEVEVT	h;		/* Standard header		*/	H		wheel;		/* Amount of wheel rotation	*/	H		rsv[3];		/* Reserved (0)		*/} PdEvt2;typedef struct t_devevt_ex {		/* There is a possibility of moving. */	TDEvtTyp	evttyp;		/* Event type		*/		ID		devid;		/* Device ID		*/	UB		exdat[16];	/* Extended data	*/} T_DEVEVT_EX;typedef struct {	T_DEVEVT_EX	h;		/* Extended header */} ExDevEvt;/* Key code for PD simulation */#define KC_SS_U 	0x0108U		/* Scroll key  ^	*/#define KC_SS_D 	0x0109U		/* Scroll key  v	*/#define KC_SS_R 	0x010aU		/* Scroll key  >	*/#define KC_SS_L 	0x010bU		/* Scroll key  <	*/#endif /* __SYS_TKSEDEV_H__ */

⌨️ 快捷键说明

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