uiEntry.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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_TASK_SEL, //1.1:学习任务菜单
  9. UIS_MENU_RANK_SEL, //1.2:学习排名菜单
  10. UIS_MENU_CLASS_SEL, //1.3:班级选择菜单
  11. UIS_MENU_STUDENT_SEL, //1.4:同学选择菜单
  12. UIS_MENU_LOCATION_SEL, //1.5:定位设置菜单
  13. UIS_MENU_SYS_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_INFO, //1.4.8:终端信息菜单
  26. UIS_MENU_SYS_SD, //1.4.9:终端设置SD卡检测
  27. UIS_MENU_SYS_VOICE, //1.4.10:留音记录菜单
  28. UIS_MENU_SYS_ANT,
  29. UIS_MENU_SYS_PA,
  30. UIS_MENU_SYS_PASS,
  31. UIS_MENU_TASK_QUERY, //1.1.1:(学习任务)查看任务内容
  32. UIS_MENU_RANK_DETAIL, //1.2.1:(学习排名)查看月/周度排名
  33. UIS_MENU_SYS_SERVER, //1.4.5.1:服务器设置
  34. UIS_MENU_MAIL_SEL,
  35. UIS_MENU_LOCATION_CLASS,//课程表
  36. UIS_MENU_LOCATION_NOTICE,//消息通知
  37. UIS_MENU_LOCATION_NOTICE_DETAIL,//通知详情
  38. UIS_MENU_SHUT_UI,
  39. #ifdef MENU_TEST
  40. UIS_MENU_SYS_TEST
  41. #endif
  42. }UIS_ENUM;
  43. #pragma pack(push)
  44. #pragma pack(1)
  45. typedef struct{
  46. unsigned char sta[4];
  47. unsigned char ok_back;
  48. short top;
  49. unsigned char FastUiChange;
  50. }UI_STACKDEF;
  51. typedef struct{
  52. unsigned char Status;
  53. unsigned char LastStatus;
  54. unsigned char NextStatus;
  55. unsigned char ItemRefresh;
  56. }UI_STATUSDEF;
  57. #pragma pack(pop)
  58. extern UI_STATUSDEF sutUIstatus;
  59. extern UI_STACKDEF uiStack;
  60. //状态栏高度及所在行
  61. #define UI_STATUS_BAR_Y 0
  62. #define UI_STATUS_BAR_HEIGH 13
  63. //对讲标语显示栏高度及所在行
  64. #define UI_STATUS_ITEM_Y UI_STATUS_BAR_HEIGH
  65. #define UI_STATUS_ITEM_HEIGH 14
  66. //底部按键栏高度及所在行
  67. #define UI_BOTTOM_BUTTON_HEIGH 14
  68. #define UI_BOTTOM_SHOW_Y (GLCD_HEIGHT-UI_BOTTOM_BUTTON_HEIGH)
  69. //对讲状态显示区高度及所在行
  70. #define UI_CONTENT_SHOW_Y (UI_STATUS_ITEM_Y+UI_STATUS_ITEM_HEIGH)
  71. #define UI_CONTENT_HEIGHT (GLCD_HEIGHT-UI_STATUS_BAR_HEIGH-UI_STATUS_ITEM_HEIGH-UI_BOTTOM_BUTTON_HEIGH)
  72. //正在登录信息显示所在的
  73. #define UI_LOGIN_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+2)
  74. //群组信息显示所在的
  75. #define UI_LEARN_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+5)
  76. //学习组信息显示所在
  77. #define UI_GROUP_SHOW_Y (UI_LEARN_SHOW_Y+2+16)
  78. //成员信息显示所在的
  79. #define UI_USER_SHOW_Y (UI_GROUP_SHOW_Y+2+16)
  80. //话权信息显示所在的
  81. #define UI_VOICE_SHOW_Y (UI_USER_SHOW_Y+2+16)
  82. //菜单中在最下面显示状态信息前显示
  83. #define UI_BOTTOM_LINE_Y UI_BOTTOM_SHOW_Y
  84. //菜单中在最下面显示状态信息所在的
  85. #define UI_NOTE_LOCATION_Y (UI_BOTTOM_LINE_Y+1)
  86. UI_STACKDEF *getStackStruct(void);
  87. void uiLoop(unsigned int exeInterval);
  88. void uiResponse(unsigned int exeInterval);
  89. void uISetNextStatus(unsigned char status);
  90. void uiDataInit(void);
  91. short uiPushStack(unsigned char data);
  92. short uiPullStack(void);
  93. void uiMenuShowBottomLine(void);
  94. void uiMenuShowBottomIndacitor(const char *infoLF, const char *infoRI);
  95. #endif