123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- #ifndef __UI__H_
- #define __UI__H_
- #include "gui.h"
- typedef enum{
- UIS_NULL,
- UIS_STANDBY, //0:待机界面
- UIS_MENU_MAIN, //1:主菜单
- UIS_MENU_GROUP_SEL, //1.1:群组选择菜单
- UIS_MENU_USER_SEL, //1.2:成员选择菜单
- UIS_MENU_FRIEND_SEL,
- UIS_MENU_MAIL_SEL, //1.3:文本消息菜单
- UIS_MENU_SYS_SEL, //1.4:系统设置菜单
- UIS_MENU_LOCATION_SEL, //1.5:定位设置菜单
- UIS_MENU_INFO_SEL, //1.6:终端信息菜单
- //UIS_MENU_QUICKUI_SET,
- //UIS_MENU_LEADFUNC_SET,
- UIS_MENU_ALARM_SET,
-
- UIS_MENU_MAIL_READ, //1.3.1:文本消息读
- UIS_MENU_MAIL_OPTION, //1.3.2:文本消息选项
- UIS_MENU_MAIL_DEL, //1.3.3:文本删除
- UIS_MENU_MAIL_FORMAT, //1.3.4:文本格式化
-
- UIS_MENU_SYS_LCD, //1.4.1:系统设置LCD
- UIS_MENU_SYS_NET, //1.4.2:系统设置网络
- UIS_MENU_SYS_SIM, //1.4.3:系统设置SIM
- UIS_MENU_SYS_PWR, //1.4.4:系统设置功耗
- UIS_MENU_SYS_SERVERPASS,//1.4.5:系统设置服务器(先输入密码)
- UIS_MENU_SYS_VERSION, //1.4.6:系统设置版本
- UIS_MENU_SYS_NOTE, //1.4.7:系统设置提示音
- UIS_MENU_SYS_CSQ,
- UIS_MENU_SYS_MIC,
- UIS_MENU_SYS_SPK,
- UIS_MENU_SYS_FONT,
- UIS_MENU_SYS_LOCK,
-
- UIS_MENU_SYS_TTSON, //语音播报
- UIS_MENU_SYS_SHAKE, //震动
- UIS_MENU_SYS_SOUNDSEL,//音质
-
- UIS_MENU_SYS_SERVER, //1.4.5.1:服务器设置
- UIS_MENU_SYS_FACTORY,
- UIS_MENU_SHUT_PWR,
-
- UIS_MENU_BLE_MAIN,
- /*
- "1.蓝牙开关",
- "2.蓝牙配对",
- "3.指环配对",
- "4.喇叭音量",
- "5.话筒音量",
- "6.蓝牙初始化",
- "7.指环初始化",
- */
-
- UIS_MENU_BLE_ENABLE,
- UIS_MENU_BLE_MATCH,
- UIS_MENU_RING_MATCH,
- UIS_MENU_BLESPK_SEL,
- UIS_MENU_BLEMIC_SEL,
- UIS_MENU_BLE_REBOOT,//蓝牙清除列表
- UIS_MENU_RING_REBOOT,
- /*
- "1.gps开关",
- "2.站点设置",
- "3.信标详情",
- "4.实时信标",
- "5.信标发送模式",
- "6.定时时间",
- "7.上传网关",
- "8.清除列表"
- */
- UIS_MENU_XINBIAO_MAIN,
- UIS_MENU_GPS_ENABLE,
- UIS_MENU_GPS_STATION,//GPS 站点
- UIS_MENU_XINBIAO_INFO,
- UIS_MENU_XINBIAO_LIVE,
- UIS_MENU_XINBIAO_SENDMODE,
- UIS_MENU_XINBIAO_TIME,
- UIS_MENU_XINBIAO_IP,
- UIS_MENU_XINBIAO_LISTCLEAR,
- /*
- 侧键定义
- */
- UIS_MENU_CJ_MIAN,
- UIS_MENU_CFUN_1_SEL,
- UIS_MENU_CFUN_2_SEL,
- /*
- 首长功能
- */
- UIS_MENU_SZ_MIAN,
- UIS_MENU_SZ_YAOYUN,
- UIS_MENU_SZ_YAOYBI,
- UIS_MENU_SZ_FORCEGPS,
-
- #ifdef ENABLE_DEBUG
- UIS_DEBUG
- #endif
- }UIS_ENUM;
- #pragma pack(push)
- #pragma pack(1)
- typedef struct{
- unsigned char sta[4];
- unsigned char ok_back;
- short top;
- unsigned char FastUiChange;
- unsigned char esc;//记录ESC键是否按下
- }UI_STACKDEF;
- typedef struct{
- unsigned char Status;
- unsigned char LastStatus;
- unsigned char NextStatus;
- unsigned char ItemRefresh;
- }UI_STATUSDEF;
- #pragma pack(pop)
- extern UI_STATUSDEF sutUIstatus;
- extern UI_STACKDEF uiStack;
- //状态栏高度及所在行
- #define UI_STATUS_BAR_Y 0
- #define UI_STATUS_BAR_HEIGH 25//
- //对讲标语显示栏高度及所在行
- #define UI_STATUS_ITEM_Y UI_STATUS_BAR_HEIGH //24
- #define UI_STATUS_ITEM_HEIGH 25 //
- //底部信标
- #define UI_LOCATION_HEIGH 24//
- #define UI_LOCATION_SHOW_Y (GLCD_HEIGHT-UI_LOCATION_HEIGH)//214
- //底部按键栏高度及所在行
- #define UI_BOTTOM_BUTTON_HEIGH 24//
- #define UI_BOTTOM_SHOW_Y (UI_LOCATION_SHOW_Y-UI_LOCATION_HEIGH)//214
- //对讲状态显示区高度及所在行
- #define UI_CONTENT_SHOW_Y (UI_STATUS_ITEM_Y+UI_STATUS_ITEM_HEIGH) //49
- #define UI_CONTENT_HEIGHT (GLCD_HEIGHT-UI_STATUS_BAR_HEIGH-UI_STATUS_ITEM_HEIGH-UI_BOTTOM_BUTTON_HEIGH)
- //正在登录信息显示所在的
- #define UI_LOGIN_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+2) //51
- //群组信息显示所在的
- #define UI_LEARN_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+5) //54
- //学习组信息显示所在
- #define UI_GROUP_SHOW_Y (UI_LOGIN_SHOW_Y+4)//(UI_LEARN_SHOW_Y+2+16) //55
- //成员信息显示所在的
- #define UI_USER_SHOW_Y (UI_GROUP_SHOW_Y+4+24) //79
- //话权信息显示所在的
- #define UI_VOICE_SHOW_Y (UI_USER_SHOW_Y+4+24) //107
- //菜单中在最下面显示状态信息前显示
- #define UI_BOTTOM_LINE_Y UI_BOTTOM_SHOW_Y
- //菜单中在最下面显示状态信息所在的
- #define UI_NOTE_LOCATION_Y (UI_BOTTOM_LINE_Y)
- UI_STACKDEF *getStackStruct(void);
- void uiLoop(unsigned int exeInterval);
- void uiResponse(unsigned int exeInterval);
- void uISetNextStatus(unsigned char status);
- void uiDataInit(void);
- short uiPushStack(unsigned char data);
- short uiPullStack(void);
- void uiMenuShowBottomLine(void);
- void uiMenuShowBottomIndacitor(const char *infoLF, const char *infoRI);
- void uiTimeOutToStandby(char status, unsigned int timeinterval);
- #endif
|