#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_MAIL_SEL, //1.3:文本消息菜单 UIS_MENU_SYS_SEL, //1.4:系统设置菜单 UIS_MENU_LOCATION_SEL, //1.5:定位设置菜单 UIS_MENU_INFO_SEL, //1.6:终端信息菜单 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_SERVER, //1.4.5.1:服务器设置 UIS_MENU_SYS_PLAT, //1.4 BND新旧平台切换 UIS_MENU_SHUT_PWR, UIS_MENU_SYS_WEATHER, UIS_MENU_LBS_MAP, }UIS_ENUM; #pragma pack(push) #pragma pack(1) typedef struct{ unsigned char sta[4]; unsigned char ok_back; short top; unsigned char FastUiChange; }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 13 //对讲标语显示栏高度及所在行 #define UI_STATUS_ITEM_Y UI_STATUS_BAR_HEIGH #define UI_STATUS_ITEM_HEIGH 14 //底部按键栏高度及所在行 #define UI_BOTTOM_BUTTON_HEIGH 14 #define UI_BOTTOM_SHOW_Y (GLCD_HEIGHT-UI_BOTTOM_BUTTON_HEIGH) //对讲状态显示区高度及所在行 #define UI_CONTENT_SHOW_Y (UI_STATUS_ITEM_Y+UI_STATUS_ITEM_HEIGH) #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) //群组信息显示所在的 #define UI_GROUP_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+5) //成员信息显示所在的 #define UI_USER_SHOW_Y (UI_GROUP_SHOW_Y+2+16) //话权信息显示所在的 #define UI_VOICE_SHOW_Y (UI_USER_SHOW_Y+2+16) //菜单中在最下面显示状态信息前显示 #define UI_BOTTOM_LINE_Y UI_BOTTOM_SHOW_Y //菜单中在最下面显示状态信息所在的 #define UI_NOTE_LOCATION_Y (UI_BOTTOM_LINE_Y+1) 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