uiEntry.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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_FRIEND_SEL,
  11. UIS_MENU_MAIL_SEL, //1.3:文本消息菜单
  12. UIS_MENU_SYS_SEL, //1.4:系统设置菜单
  13. UIS_MENU_LOCATION_SEL, //1.5:定位设置菜单
  14. UIS_MENU_INFO_SEL, //1.6:终端信息菜单
  15. //UIS_MENU_QUICKUI_SET,
  16. //UIS_MENU_LEADFUNC_SET,
  17. UIS_MENU_ALARM_SET,
  18. UIS_MENU_MAIL_READ, //1.3.1:文本消息读
  19. UIS_MENU_MAIL_OPTION, //1.3.2:文本消息选项
  20. UIS_MENU_MAIL_DEL, //1.3.3:文本删除
  21. UIS_MENU_MAIL_FORMAT, //1.3.4:文本格式化
  22. UIS_MENU_SYS_LCD, //1.4.1:系统设置LCD
  23. UIS_MENU_SYS_NET, //1.4.2:系统设置网络
  24. UIS_MENU_SYS_SIM, //1.4.3:系统设置SIM
  25. UIS_MENU_SYS_PWR, //1.4.4:系统设置功耗
  26. UIS_MENU_SYS_SERVERPASS,//1.4.5:系统设置服务器(先输入密码)
  27. UIS_MENU_SYS_VERSION, //1.4.6:系统设置版本
  28. UIS_MENU_SYS_NOTE, //1.4.7:系统设置提示音
  29. UIS_MENU_SYS_CSQ,
  30. UIS_MENU_SYS_MIC,
  31. UIS_MENU_SYS_SPK,
  32. UIS_MENU_SYS_FONT,
  33. UIS_MENU_SYS_LOCK,
  34. UIS_MENU_SYS_TTSON, //语音播报
  35. UIS_MENU_SYS_SHAKE, //震动
  36. UIS_MENU_SYS_SOUNDSEL,//音质
  37. UIS_MENU_SYS_SERVER, //1.4.5.1:服务器设置
  38. UIS_MENU_SYS_FACTORY,
  39. UIS_MENU_SHUT_PWR,
  40. UIS_MENU_BLE_MAIN,
  41. /*
  42. "1.蓝牙开关",
  43. "2.蓝牙配对",
  44. "3.指环配对",
  45. "4.喇叭音量",
  46. "5.话筒音量",
  47. "6.蓝牙初始化",
  48. "7.指环初始化",
  49. */
  50. UIS_MENU_BLE_ENABLE,
  51. UIS_MENU_BLE_MATCH,
  52. UIS_MENU_RING_MATCH,
  53. UIS_MENU_BLESPK_SEL,
  54. UIS_MENU_BLEMIC_SEL,
  55. UIS_MENU_BLE_REBOOT,//蓝牙清除列表
  56. UIS_MENU_RING_REBOOT,
  57. /*
  58. "1.gps开关",
  59. "2.站点设置",
  60. "3.信标详情",
  61. "4.实时信标",
  62. "5.信标发送模式",
  63. "6.定时时间",
  64. "7.上传网关",
  65. "8.清除列表"
  66. */
  67. UIS_MENU_XINBIAO_MAIN,
  68. UIS_MENU_GPS_ENABLE,
  69. UIS_MENU_GPS_STATION,//GPS 站点
  70. UIS_MENU_XINBIAO_INFO,
  71. UIS_MENU_XINBIAO_LIVE,
  72. UIS_MENU_XINBIAO_SENDMODE,
  73. UIS_MENU_XINBIAO_TIME,
  74. UIS_MENU_XINBIAO_IP,
  75. UIS_MENU_XINBIAO_LISTCLEAR,
  76. /*
  77. 侧键定义
  78. */
  79. UIS_MENU_CJ_MIAN,
  80. UIS_MENU_CFUN_1_SEL,
  81. UIS_MENU_CFUN_2_SEL,
  82. /*
  83. 首长功能
  84. */
  85. UIS_MENU_SZ_MIAN,
  86. UIS_MENU_SZ_YAOYUN,
  87. UIS_MENU_SZ_YAOYBI,
  88. UIS_MENU_SZ_FORCEGPS,
  89. #ifdef ENABLE_DEBUG
  90. UIS_DEBUG
  91. #endif
  92. }UIS_ENUM;
  93. #pragma pack(push)
  94. #pragma pack(1)
  95. typedef struct{
  96. unsigned char sta[4];
  97. unsigned char ok_back;
  98. short top;
  99. unsigned char FastUiChange;
  100. unsigned char esc;//记录ESC键是否按下
  101. }UI_STACKDEF;
  102. typedef struct{
  103. unsigned char Status;
  104. unsigned char LastStatus;
  105. unsigned char NextStatus;
  106. unsigned char ItemRefresh;
  107. }UI_STATUSDEF;
  108. #pragma pack(pop)
  109. extern UI_STATUSDEF sutUIstatus;
  110. extern UI_STACKDEF uiStack;
  111. //状态栏高度及所在行
  112. #define UI_STATUS_BAR_Y 0
  113. #define UI_STATUS_BAR_HEIGH 25//
  114. //对讲标语显示栏高度及所在行
  115. #define UI_STATUS_ITEM_Y UI_STATUS_BAR_HEIGH //24
  116. #define UI_STATUS_ITEM_HEIGH 25 //
  117. //底部信标
  118. #define UI_LOCATION_HEIGH 24//
  119. #define UI_LOCATION_SHOW_Y (GLCD_HEIGHT-UI_LOCATION_HEIGH)//214
  120. //底部按键栏高度及所在行
  121. #define UI_BOTTOM_BUTTON_HEIGH 24//
  122. #define UI_BOTTOM_SHOW_Y (UI_LOCATION_SHOW_Y-UI_LOCATION_HEIGH)//214
  123. //对讲状态显示区高度及所在行
  124. #define UI_CONTENT_SHOW_Y (UI_STATUS_ITEM_Y+UI_STATUS_ITEM_HEIGH) //49
  125. #define UI_CONTENT_HEIGHT (GLCD_HEIGHT-UI_STATUS_BAR_HEIGH-UI_STATUS_ITEM_HEIGH-UI_BOTTOM_BUTTON_HEIGH)
  126. //正在登录信息显示所在的
  127. #define UI_LOGIN_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+2) //51
  128. //群组信息显示所在的
  129. #define UI_LEARN_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+5) //54
  130. //学习组信息显示所在
  131. #define UI_GROUP_SHOW_Y (UI_LOGIN_SHOW_Y+4)//(UI_LEARN_SHOW_Y+2+16) //55
  132. //成员信息显示所在的
  133. #define UI_USER_SHOW_Y (UI_GROUP_SHOW_Y+4+24) //79
  134. //话权信息显示所在的
  135. #define UI_VOICE_SHOW_Y (UI_USER_SHOW_Y+4+24) //107
  136. //菜单中在最下面显示状态信息前显示
  137. #define UI_BOTTOM_LINE_Y UI_BOTTOM_SHOW_Y
  138. //菜单中在最下面显示状态信息所在的
  139. #define UI_NOTE_LOCATION_Y (UI_BOTTOM_LINE_Y)
  140. UI_STACKDEF *getStackStruct(void);
  141. void uiLoop(unsigned int exeInterval);
  142. void uiResponse(unsigned int exeInterval);
  143. void uISetNextStatus(unsigned char status);
  144. void uiDataInit(void);
  145. short uiPushStack(unsigned char data);
  146. short uiPullStack(void);
  147. void uiMenuShowBottomLine(void);
  148. void uiMenuShowBottomIndacitor(const char *infoLF, const char *infoRI);
  149. void uiTimeOutToStandby(char status, unsigned int timeinterval);
  150. #endif