uiEntry.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef __UI__H_
  2. #define __UI__H_
  3. #include "gui.h"
  4. typedef enum{
  5. UIS_NULL,
  6. UIS_STANDBY, //0:待机界面
  7. UIS_MENU_MAIN, //1:主菜单
  8. UIS_MENU_GROUP_SEL, //1.1:群组选择菜单
  9. UIS_MENU_USER_SEL, //1.2:成员选择菜单
  10. UIS_MENU_MAIL_SEL, //1.3:文本消息菜单
  11. UIS_MENU_SYS_SEL, //1.4:系统设置菜单
  12. UIS_MENU_LOCATION_SEL, //1.5:定位设置菜单
  13. UIS_MENU_INFO_SEL, //1.6:终端信息菜单
  14. UIS_MENU_MAIL_READ, //1.3.1:文本消息读
  15. UIS_MENU_MAIL_OPTION, //1.3.2:文本消息选项
  16. UIS_MENU_MAIL_DEL, //1.3.3:文本删除
  17. UIS_MENU_MAIL_FORMAT, //1.3.4:文本格式化
  18. UIS_MENU_SYS_LCD, //1.4.1:系统设置LCD
  19. UIS_MENU_SYS_NET, //1.4.2:系统设置网络
  20. UIS_MENU_SYS_SIM, //1.4.3:系统设置SIM
  21. UIS_MENU_SYS_PWR, //1.4.4:系统设置功耗
  22. UIS_MENU_SYS_SERVERPASS,//1.4.5:系统设置服务器(先输入密码)
  23. UIS_MENU_SYS_VERSION, //1.4.6:系统设置版本
  24. UIS_MENU_SYS_NOTE, //1.4.7:系统设置提示音
  25. UIS_MENU_SYS_SERVER, //1.4.5.1:服务器设置
  26. UIS_MENU_SYS_PLAT, //1.4 BND新旧平台切换
  27. UIS_MENU_SHUT_PWR,
  28. UIS_MENU_SYS_WEATHER,
  29. UIS_MENU_LBS_MAP,
  30. }UIS_ENUM;
  31. #pragma pack(push)
  32. #pragma pack(1)
  33. typedef struct{
  34. unsigned char sta[4];
  35. unsigned char ok_back;
  36. short top;
  37. unsigned char FastUiChange;
  38. }UI_STACKDEF;
  39. typedef struct{
  40. unsigned char Status;
  41. unsigned char LastStatus;
  42. unsigned char NextStatus;
  43. unsigned char ItemRefresh;
  44. }UI_STATUSDEF;
  45. #pragma pack(pop)
  46. extern UI_STATUSDEF sutUIstatus;
  47. extern UI_STACKDEF uiStack;
  48. //状态栏高度及所在行
  49. #define UI_STATUS_BAR_Y 0
  50. #define UI_STATUS_BAR_HEIGH 13
  51. //对讲标语显示栏高度及所在行
  52. #define UI_STATUS_ITEM_Y UI_STATUS_BAR_HEIGH
  53. #define UI_STATUS_ITEM_HEIGH 14
  54. //底部按键栏高度及所在行
  55. #define UI_BOTTOM_BUTTON_HEIGH 14
  56. #define UI_BOTTOM_SHOW_Y (GLCD_HEIGHT-UI_BOTTOM_BUTTON_HEIGH)
  57. //对讲状态显示区高度及所在行
  58. #define UI_CONTENT_SHOW_Y (UI_STATUS_ITEM_Y+UI_STATUS_ITEM_HEIGH)
  59. #define UI_CONTENT_HEIGHT (GLCD_HEIGHT-UI_STATUS_BAR_HEIGH-UI_STATUS_ITEM_HEIGH-UI_BOTTOM_BUTTON_HEIGH)
  60. //正在登录信息显示所在的
  61. #define UI_LOGIN_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+2)
  62. //群组信息显示所在的
  63. #define UI_GROUP_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+5)
  64. //成员信息显示所在的
  65. #define UI_USER_SHOW_Y (UI_GROUP_SHOW_Y+2+16)
  66. //话权信息显示所在的
  67. #define UI_VOICE_SHOW_Y (UI_USER_SHOW_Y+2+16)
  68. //菜单中在最下面显示状态信息前显示
  69. #define UI_BOTTOM_LINE_Y UI_BOTTOM_SHOW_Y
  70. //菜单中在最下面显示状态信息所在的
  71. #define UI_NOTE_LOCATION_Y (UI_BOTTOM_LINE_Y+1)
  72. UI_STACKDEF *getStackStruct(void);
  73. void uiLoop(unsigned int exeInterval);
  74. void uiResponse(unsigned int exeInterval);
  75. void uISetNextStatus(unsigned char status);
  76. void uiDataInit(void);
  77. short uiPushStack(unsigned char data);
  78. short uiPullStack(void);
  79. void uiMenuShowBottomLine(void);
  80. void uiMenuShowBottomIndacitor(const char *infoLF, const char *infoRI);
  81. void uiTimeOutToStandby(char status, unsigned int timeinterval);
  82. #endif