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

📄 mygui.h

📁 arm9.rar
💻 H
字号:
#ifndef MY_GUI_H
#define	MY_GUI_H

#define	COLOR_BLACK		0
#define	COLOR_RED		1
#define	COLOR_GREEN		2
#define	COLOR_BLUE		3
#define	COLOR_YELLOW	4
#define	COLOR_PINK		5
#define	COLOR_CYAN		6
#define	COLOR_GRAY		7
#define	COLOR_GRAY1		8
#define	COLOR_GRAY2		9
#define	COLOR_GRAY3		10
#define	COLOR_GRAY4		11
#define	COLOR_GRAY5		12
#define	COLOR_GRAY6		13
#define	COLOR_GRAY7		14
#define	COLOR_WHITE		15

typedef struct {
	U16 x1;
	U16 y1;
	U16 x2;
	U16 y2;
	int (*handler)(U16 x, U16 y, U32 tm);
} SCR_AREA_HANDLER;

typedef struct {
	U16 xl;
	U16 yt;
	U16 xr;
	U16 yb;
} RECT_T;

typedef struct {
	U16 x;
	U16 y;
	U16 w;
	U16 h;
	U16 bk_color;
	U16 status;
	char *text;
	int (*handler)(U16 x, U16 y, U32 tm);
} BUTTON_T;

void SetHZFontReso(U8 reso);
int  GetHZFontReso(void);
void SetFontXi(U8 xi);
void SetFontYi(U8 yi);
U8 GetFontXi(void);
U8 GetFontYi(void);
void SetFontColor(U32 color);
U32 GetFontColor(void);

void DrawText(int x1, int y1, int x2, int y2, char *str);
void DrawTextColor(int x1, int y1, int x2, int y2, char *str, U16 bg_color, U16 fg_color);
int  OutTextWindow(RECT_T *wnd, U16 *x, U16 *y, char *str);

void DrawButton(BUTTON_T *button);
void DrawFrame(int xl, int yt, int xr, int yb);
int  RegisterArea(U16 x1, U16 y1, U16 x2, U16 y2, int (*handler)(U16 x, U16 y, U32 tm));

void DrawPixel(int x, int y, U8 c);
void DrawLine(int x1, int y1, int x2, int y2, U8 c);
void DrawRect(int x1, int y1, int x2, int y2, U8 c);
void FillScreen(U8 c);
int  SaveScreen(int x1, int y1, int w, int h, U16 *mem);
int  RestoreScreen(int x1, int y1, int w, int h, U16 *mem);
void DrawFilledRect(int x1, int y1, int x2, int y2, U8 c);

int MainBoxHandler(U16 x, U16 y, U32 tm);

void InitAllBox(void);

void ShowTipBox(char *tip);
void OutInfoToLCD(char *info);
void SetLcdInfoCursor(U16 x, U16 y);
void CtrlLcdInfo(U32 en);

#define	LcdInfoOn()		CtrlLcdInfo(1)
#define	LcdInfoOff()	CtrlLcdInfo(0)

#endif

⌨️ 快捷键说明

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