gui.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef __GUI_H__
  2. #define __GUI_H__
  3. //#define USE_12X12_FONT_ONLY
  4. #define GLCD_WIDTH 240
  5. #define GLCD_HEIGHT 320
  6. #define BAR_HIGHT 32
  7. //定义一�56颜色�RGB)
  8. #define COLOR_BLACK 0x000000
  9. #define COLOR_WHITE 0xFFFFFF
  10. #define COLOR_RED 0xFF0000
  11. #define COLOR_GREEN 0x22B14C//0x00FF00
  12. #define COLOR_BLUE 0x0000FF
  13. #define COLOR_YELLOW 0x00FFFF
  14. #define COLOR_PURPLE 0x800080
  15. #define COLOR_GRAY 0xa4a4a4
  16. #define COLOR_DEEP_GREEN 0x008040
  17. #define COLOR_STATUS_BAR 0x0000FF//0x000000//0x8B0000
  18. #define COLOR_SEL_BAR 0x40C0FF
  19. #define HZK_16_NEW_FILE "HZK16_Ext.bin"
  20. #define HZK_12_NEW_FILE "HZK12_Ext.bin"
  21. typedef enum{
  22. ARROW_LEFT,
  23. ARROW_RIGHT,
  24. ARROW_UP,
  25. ARROW_DOWN
  26. }ARROW_ENUM;
  27. typedef enum{
  28. FONT_MODE_16X16,
  29. FONT_MODE_24X24,
  30. FONT_MODE_32X32,
  31. FONT_MODE_72X72
  32. }FONT_MODEENUM;
  33. typedef enum{
  34. REVERSED_NO,
  35. REVERSED_YES
  36. }REV_ENUM;
  37. void guiInit(void);
  38. void guiClearAll(unsigned int colorID);
  39. void guiShowStr(unsigned short x, unsigned short y,const char *string, FONT_MODEENUM fontMode, REV_ENUM rev,unsigned int frontColorID,unsigned int backColorID);
  40. void guiShowButton(unsigned short x, unsigned short y,const char *str, FONT_MODEENUM fontMode,unsigned int buttonColorID, unsigned int strColorID);
  41. void guiFillRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned int colorData);
  42. void guiDrawHLine(unsigned short x1, unsigned short x2, unsigned short y, unsigned short ysize, unsigned int colorID);
  43. void guiDrawVLine(unsigned short y1, unsigned short y2, unsigned short x, unsigned short xsize, unsigned int colorID);
  44. void guiDrawRect(unsigned short x1, unsigned short y1, unsigned short x2, unsigned short y2,unsigned char width, unsigned int colorID);
  45. void guiDrawArrow(unsigned short x, unsigned short y,unsigned short len, ARROW_ENUM direction, unsigned int colorID);
  46. void guiShowCaption(unsigned short xType ,const char *str, unsigned short y, unsigned int frontColorID, unsigned int backColorID, FONT_MODEENUM fontMode);
  47. void guiShowLefCaption(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 guiShowLocationPoint(short x1,short y1,short zerox2,short zeroy2,short angle, unsigned int colorID);
  56. void guiTest(void);
  57. #endif