uiEntry.h 3.1 KB

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