uiEntry.h 3.1 KB

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