63 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
		
		
			
		
	
	
			63 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
|  | #ifndef MYWIN_USER_BLUETOOTH_H__
 | ||
|  | #define MYWIN_USER_BLUETOOTH_H__
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | //定义每个条目的最长字符数
 | ||
|  | #define BLUETOOTH_CHARNUM_MAX 30
 | ||
|  | //定义最大条目数
 | ||
|  | #define BLUETOOTH_ITEMNUM_MAX 20
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | typedef struct | ||
|  | { | ||
|  | 	WIN_TouchWinStruct win; | ||
|  | 	int power;					//蓝牙开关
 | ||
|  | 	int index;					//索引
 | ||
|  | 	int selectItem;			//选择的条目
 | ||
|  | 	int startItem;			//开始的条目
 | ||
|  | 	int itemNum;				//条目数
 | ||
|  | 	char *title; | ||
|  | 	char item[BLUETOOTH_ITEMNUM_MAX][BLUETOOTH_CHARNUM_MAX]; | ||
|  | 	u32 selectTxtColor; | ||
|  | 	u32 txtColor; | ||
|  | 	u32 selectRectColor; | ||
|  | 	u32 rectColor; | ||
|  | 	int press; | ||
|  | }WIN_BlueToothStruct; | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | WIN_BlueToothStruct *WIN_CreatBlueTooth (WIN_WindowStruct *base, | ||
|  | 			void (*msgLoop)(struct _WIN_WindowStruct *win,WIN_MsgStruct *msg), | ||
|  | 			int x,int y,int x_size,int y_size); | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | //添加条目
 | ||
|  | void BLUETOOTH_AddItem (WIN_BlueToothStruct *bluetooth,char *txt); | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | //消息框的绘制函数
 | ||
|  | void BLUETOOTH_DefaultPaint (WIN_BlueToothStruct *bluetooth); | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | //消息框的消息处理函数
 | ||
|  | void BLUETOOTH_defaultMsgLoop (WIN_BlueToothStruct *bluetooth,WIN_MsgStruct *msg); | ||
|  | 
 | ||
|  | 
 | ||
|  | //蓝牙设置
 | ||
|  | int BLUETOOTH_BlueToothSet (WIN_WindowStruct *base); | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | #endif
 | ||
|  | 
 |