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

📄 asix_kb.h

📁 一个操作系统源代码 用于嵌入式设备 在Vc++环境下仿真 成功移植到多款处理器上
💻 H
字号:
/*************************************************************************
*
* Copyright  2000 National ASIC Center, All right Reserved
*
* FILE NAME:			asix_kb.h
* PROGRAMMER:			Lingming
* Date of Creation:		2001/02/07
* 
* DESCRIPTION: 			The asix keyboard control implementation. this 
*						file defines the control related infomation. 
*
* NOTE:			 		The application C file MUST include this file if 
*						this application will use ASIX Windows GUI API 
*
* FUNCTIONS LIST:
* fun1(arg1,arg2)		description of func1
* fun2(arg1,arg2,arg3)	description of func2
*
* GLOBAL VARS LIST:
* 
*
**************************************************************************
* MODIFICATION HISTORY
*
* 2001/02/07	by Lingming		Creation of this file
*								
*							
*************************************************************************/

#ifndef _ASIX_KB_H
#define _ASIX_KB_H

#include <asixwin.h>
//#include <const.h>

/* The keyboard bitmap ,defined in kb_data.c*/
extern const U8 ukb_bitmap[];
extern const U8 lkb_bitmap[];
extern const U8 fkb_bitmap[];
extern const U8 nkb_bitmap[];
extern const U8 hkb_bitmap[];

/*The Control icon bitmap,defined in kb_data.c*/
extern const U8 sx_bitmap[];
extern const U8 fh_bitmap[];
extern const U8 sz_bitmap[];
extern const U8 py_bitmap[];
extern const U8 da_bitmap[];
extern const U8 xiao_bitmap[];

extern const U8 num_0[];
extern const U8 num_1[];
extern const U8 num_2[];
extern const U8 num_3[];
extern const U8 num_4[];
extern const U8 num_5[];
extern const U8 num_6[];
extern const U8 num_7[];
extern const U8 num_8[];
extern const U8 num_9[];
extern const U8 num_as[]; // *
extern const U8 num_pd[]; // #
//extern const U8 num_ok[];
//extern const U8 num_no[];
//extern const U8 num_bk[];
//extern const U8 num_fd[];


/* for the pull list control,defined in kb_data.c */
extern const U8 close_mark[];

#ifdef SANBAO
extern const U8 sx_number[];
#endif

/* The key return value of keyboard,defined in kb_data.c*/ 
extern const U16 u_keyboard[];
extern const U16 l_keyboard[];
extern const U16 f_keyboard[];
extern const U16 n_keyboard[];
extern const U16 h_keyboard[];


struct data_icon {
	U32	icon_id;
	U16	icon_data;
};

struct py_control_block {
	
#define PY_REFRESH		0x01
#define PY_QUERY		0x02
#define PY_MAX_NUM		0x32
	U8		PY_Status;
	char		PY_Buffer[14];
	char 		PY_Buf_Offset;
	U16		hz_buf[8];
//	U16 	candidate[110]; 
	WORD	candidate[PY_MAX_NUM];
	U8		ClearFlag;
	char	win_offset;
	U8		candidatesize;
};

struct ctrl_icon {
	U32		icon_id;
	U8		icon_name;
};

typedef struct kbd_ctrl {

	U32					classid;
	U32					wndid;
	U32					areaId;				//add by dsa 2002/04/17
	U32					areaId1;			//used by inputpad add by dsa 2002/04/26
	struct data_icon	*HW_Icon1;			//handwriting first candidate line 
	struct data_icon	*HW_Icon2;			//second line
#ifdef SANBAO
	struct data_icon	*HW_Number;			//for the number line
#endif
	U16					inputpad_x;
	U16					inputpad_y;

	struct data_icon	*PY_Icon;			//Pingying candidate line
	U32					PY_LeftButtonId;	//left arrow
	U32					PY_RightButtonId;	//right arrow
	struct py_control_block	*Pycb;			//Pingying control block

	U32					*BoHaoIcon;			//DialPad keys area Id

#define BEENSELECTED	0x5a
#define UNSELECTED		0x0	
	U8					icon_select_map[6];
	struct ctrl_icon	CtrlIcon[5];		//switch icon 

	U8					cur_mode;
	U16					cur_y;
	U16					cur_x;
	U8					allowed_btm;	
	
	U16					char_data;			//current input char
	U8					char_flag;			//from where, defined in asixwin.h
	
#define CONTROL_ICON	0x0001				//which group of Icons has been touched
#define HWR_ICON1		0x0002
#define HWR_ICON2		0x0004
#define HWR_NUMBER		0x0008
#define PY_ICON			0x0010
#define PY_RIGHT		0x0020
#define PY_LEFT			0x0040
#define BH_ICON			0x0080	
	U16					CtrlIconSelect;
	U8					icon_index;
	U32					icon_areaid;

	U32					pGC;				//add by dsa 2002/04/17
	
	
}kbd_ctrl;

#define CHAR_WIDTH				12 //chinese char


STATUS kbd_create(char *caption, U32 style, U16 x, U16 y, U16 width, U16 hight,
				 U32 parent, U32 menu, void **ctrl_str, void *exdata);
STATUS kbd_destroy(void *ctrl_str);
STATUS kbd_msgproc(U32 win_id, U16 asix_msg, U32 lparam, void *data, U16 wparam, void *reserved);
STATUS kbd_msgtrans(void *ctrl_str, U16 msg_type, U32 areaId, P_U16 data, U32 size, PMSG trans_msg);
				 
STATUS kbd_repaint( void *ctrl_str, U32 lparam);				 

#include <asixwin\asixdbg.h>

#if ENABLE_ASIX_KEYBOARD_DEBUG_OUT

#define asix_kbprintf(str)	dbgprintf( str )
#define asix_kboutput(str, var)	dbgoutput(str, var)
#define _asix_kbdbgout(str)	_dbgout(#str)
#define asix_kbassert(p)	((p) ? 	(void)0 : \
								(void) _asix_kbdbgout(Assertion failed:  ##p##, file ##__FILE__## , line  ##__LINE__## \n ))

// mem debug			
#define asix_kb_memdbgprintf(str)	dbgprintf( str )
#define asix_kb_memdbgoutput(str, var)	dbgoutput(str, var)

#else // disable asix button control debug

#define asix_kbprintf(str)
#define asix_kboutput(str, var)
#define asix_kbassert(p)

#define asix_kb_memdbgprintf(str)	
#define asix_kb_memdbgoutput(str, var)	

#endif

#endif 	//_ASIX_KB_H

⌨️ 快捷键说明

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