1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifndef __GUI_H__
- #define __GUI_H__
- #define GLCD_WIDTH 160
- #define GLCD_HEIGHT 128
- //定义一�56颜色�RGB)
- #define COLOR_BLACK 0x000000
- #define COLOR_WHITE 0xFFFFFF
- #define COLOR_RED 0xFF0000
- #define COLOR_GREEN 0x00FF00
- #define COLOR_BLUE 0x0000FF
- #define COLOR_YELLOW 0x00FFFF
- #define COLOR_PURPLE 0x800080
- #define COLOR_GRAY 0xa4a4a4
- #define COLOR_STATUS_BAR 0x8B0000
- #define COLOR_DEEP_GREEN 0x008040
- typedef enum{
- ARROW_LEFT,
- ARROW_RIGHT,
- ARROW_UP,
- ARROW_DOWN
- }ARROW_ENUM;
- typedef enum{
- FONT_MODE_12X12,
- FONT_MODE_16X16
- }FONT_MODEENUM;
- typedef enum{
- REVERSED_NO,
- REVERSED_YES
- }REV_ENUM;
- void guiInit(void);
- void guiClearAll(unsigned int colorID);
- void guiShowStr(unsigned short x, unsigned short y,const char *string, FONT_MODEENUM fontMode, REV_ENUM rev,unsigned int frontColorID,unsigned int backColorID);
- void guiShowButton(unsigned short x, unsigned short y,const char *str, FONT_MODEENUM fontMode,unsigned int buttonColorID, unsigned int strColorID);
- void guiFillRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned int colorData);
- void guiDrawHLine(unsigned short x1, unsigned short x2, unsigned short y, unsigned short ysize, unsigned int colorID);
- void guiDrawVLine(unsigned short y1, unsigned short y2, unsigned short x, unsigned short xsize, unsigned int colorID);
- void guiDrawRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned char width, unsigned int colorID);
- void guiDrawArrow(unsigned short x, unsigned short y,unsigned short len, ARROW_ENUM direction, unsigned int colorID);
- void guiShowCaption(unsigned short xType ,const char *str, unsigned short y, unsigned int frontColorID, unsigned int backColorID, FONT_MODEENUM fontMode);
- void guiShowBmp(unsigned short x, unsigned short y, char *bmp);
- void guiClearArea(unsigned short x, unsigned short y, unsigned short width, unsigned short height,unsigned int colorID);
- unsigned int guiGetBackColor(void);
- unsigned int guiGetForeColor(void);
- short guiGetStrXLen(char *str, FONT_MODEENUM fontMode);
- void guiClearRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2, unsigned int colorData);
- void guiShowMessageBox(char *msg);
- void guiShowTwoMessage(char *msg1, char *msg2);
- void guiTest(void);
- #endif
|