46 lines
		
	
	
		
			776 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			776 B
		
	
	
	
		
			C
		
	
	
	
	
	
#ifndef MYWIN_INPUTBOX_H__
 | 
						|
#define MYWIN_INPUTBOX_H__
 | 
						|
 | 
						|
 | 
						|
 | 
						|
//定义输入框的最大字符数
 | 
						|
#define INPUTBOX_MAX_CHAR_NUM 256
 | 
						|
 | 
						|
 | 
						|
typedef struct
 | 
						|
{
 | 
						|
	WIN_WindowStruct win;
 | 
						|
	char inputs[INPUTBOX_MAX_CHAR_NUM];
 | 
						|
	int press;
 | 
						|
	u32 color_light;
 | 
						|
	u32 color_dark;
 | 
						|
}WIN_InputboxStruct;
 | 
						|
 | 
						|
 | 
						|
 | 
						|
WIN_InputboxStruct *WIN_CreatInputbox (WIN_WindowStruct *base,
 | 
						|
			void (*msgLoop)(struct _WIN_WindowStruct *win,WIN_MsgStruct *msg),
 | 
						|
			int x,int y,int x_size,int y_size);
 | 
						|
 | 
						|
 | 
						|
			
 | 
						|
int INPUTBOX_Clear(WIN_InputboxStruct *box);
 | 
						|
			
 | 
						|
			
 | 
						|
int INPUTBOX_SetChars(WIN_InputboxStruct *box,char *str);
 | 
						|
			
 | 
						|
			
 | 
						|
			
 | 
						|
 | 
						|
//默认消息处理函数
 | 
						|
void INPUTBOX_DefaultMsgLoop (WIN_InputboxStruct *box,WIN_MsgStruct *msg);
 | 
						|
 | 
						|
 | 
						|
 | 
						|
WIN_InputboxStruct *INPUTBOX_InputChars (WIN_WindowStruct *base,int x,int y,int x_size,int y_size);
 | 
						|
 | 
						|
 | 
						|
 | 
						|
#endif
 | 
						|
 |