gui.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef __GUI_H__
  2. #define __GUI_H__
  3. #define GLCD_WIDTH 160
  4. #define GLCD_HEIGHT 128
  5. //定义一�56颜色�RGB)
  6. #define COLOR_BLACK 0x000000
  7. #define COLOR_WHITE 0xFFFFFF
  8. #define COLOR_RED 0xFF0000
  9. #define COLOR_GREEN 0x00FF00
  10. #define COLOR_BLUE 0x0000FF
  11. #define COLOR_YELLOW 0x00FFFF
  12. #define COLOR_PURPLE 0x800080
  13. #define COLOR_STATUS_BAR 0x8B0000
  14. typedef enum{
  15. ARROW_LEFT,
  16. ARROW_RIGHT,
  17. ARROW_UP,
  18. ARROW_DOWN
  19. }ARROW_ENUM;
  20. typedef enum{
  21. FONT_MODE_12X12,
  22. FONT_MODE_16X16
  23. }FONT_MODEENUM;
  24. typedef enum{
  25. REVERSED_NO,
  26. REVERSED_YES
  27. }REV_ENUM;
  28. void guiInit(void);
  29. void guiClearAll(unsigned int colorID);
  30. void guiShowStr(unsigned short x, unsigned short y,const char *string, FONT_MODEENUM fontMode, REV_ENUM rev,unsigned int frontColorID,unsigned int backColorID);
  31. void guiShowButton(unsigned short x, unsigned short y,const char *str, FONT_MODEENUM fontMode,unsigned int buttonColorID, unsigned int strColorID);
  32. void guiFillRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned int colorData);
  33. void guiDrawHLine(unsigned short x1, unsigned short x2, unsigned short y, unsigned short ysize, unsigned int colorID);
  34. void guiDrawVLine(unsigned short y1, unsigned short y2, unsigned short x, unsigned short xsize, unsigned int colorID);
  35. void guiDrawRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned char width, unsigned int colorID);
  36. void guiDrawArrow(unsigned short x, unsigned short y,unsigned short len, ARROW_ENUM direction, unsigned int colorID);
  37. void guiShowCaption(unsigned short xType ,const char *str, unsigned short y, unsigned int frontColorID, unsigned int backColorID, FONT_MODEENUM fontMode);
  38. void guiShowBmp(unsigned short x, unsigned short y, char *bmp);
  39. void guiClearArea(unsigned short x, unsigned short y, unsigned short width, unsigned short height,unsigned int colorID);
  40. unsigned int guiGetBackColor(void);
  41. unsigned int guiGetForeColor(void);
  42. short guiGetStrXLen(char *str, FONT_MODEENUM fontMode);
  43. void guiClearRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2, unsigned int colorData);
  44. void guiShowMessageBox(char *msg);
  45. void guiTest(void);
  46. #endif