Files
player/Project/Src/MyWin/Window/mywin_button.h

60 lines
805 B
C
Raw Normal View History

2025-06-27 00:32:57 +08:00
#ifndef MYWIN_BUTTON_H__
#define MYWIN_BUTTON_H__
2025-07-05 19:47:28 +08:00
//<2F><><EFBFBD><EFBFBD><E5B0B4><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD><C2B5><EFBFBD>Ϣ
2025-06-27 00:32:57 +08:00
#define BUTTON_PRESSED 0x00000001
2025-07-05 19:47:28 +08:00
//<2F><>ť<EFBFBD><C5A5><EFBFBD>̳<EFBFBD><CCB3><EFBFBD>MYWIN<49><4E><EFBFBD><EFBFBD>
2025-06-27 00:32:57 +08:00
typedef struct
{
WIN_WindowStruct win;
2025-07-05 19:47:28 +08:00
int press; //<2F><>ť״̬
char *key; //<2F><>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>ʾ
void (*pressShortFun)(void *ptr);//<2F><>ť<EFBFBD>̰<EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void *shortFunPtr;//<2F>̰<EFBFBD><CCB0><EFBFBD><EFBFBD>ú<EFBFBD><C3BA><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
2025-06-27 00:32:57 +08:00
}WIN_ButtonStruct;
2025-07-05 19:47:28 +08:00
//<2F>ڶ<EFBFBD><DAB6>д<EFBFBD><D0B4><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ť
2025-06-27 00:32:57 +08:00
WIN_ButtonStruct *WIN_CreatButton (WIN_WindowStruct *base,
void (*msgLoop)(struct _WIN_WindowStruct *win,WIN_MsgStruct *msg),
int x,int y,int x_size,int y_size);
2025-07-05 19:47:28 +08:00
//<2F><><EFBFBD>ð<EFBFBD><C3B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>
2025-06-27 00:32:57 +08:00
void BUTTON_SetKeyString (WIN_ButtonStruct *button,char *key);
2025-07-05 19:47:28 +08:00
//Ĭ<>ϻ<EFBFBD><CFBB>ƺ<EFBFBD><C6BA><EFBFBD>
2025-06-27 00:32:57 +08:00
void BUTTON_DefaultPaint (WIN_ButtonStruct *button);
2025-07-05 19:47:28 +08:00
//Ĭ<><C4AC><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2025-06-27 00:32:57 +08:00
void BUTTON_DefaultMsgLoop (WIN_ButtonStruct *button,WIN_MsgStruct *msg);
#endif