gui(1401).h 2.4 KB

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