#ifndef __UI__H_ #define __UI__H_ #include "gui.h" typedef enum{ UIS_NULL, UIS_STANDBY, //0:待机界面 UIS_MENU_MAIN, //1:主菜单 UIS_MENU_TASK_SEL, //1.1:学习任务菜单 UIS_MENU_RANK_SEL, //1.2:学习排名菜单 UIS_MENU_CLASS_SEL, //1.3:班级选择菜单 UIS_MENU_STUDENT_SEL, //1.4:同学选择菜单 UIS_MENU_LOCATION_SEL, //1.5:定位设置菜单 UIS_MENU_SYS_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_INFO, //1.4.8:终端信息菜单 UIS_MENU_SYS_SD, //1.4.9:终端设置SD卡检测 UIS_MENU_SYS_VOICE, //1.4.10:留音记录菜单 UIS_MENU_TASK_QUERY, //1.1.1:(学习任务)查看任务内容 UIS_MENU_RANK_DETAIL, //1.2.1:(学习排名)查看月/周度排名 UIS_MENU_SYS_SERVER, //1.4.5.1:服务器设置 UIS_MENU_MAIL_SEL, UIS_MENU_LOCATION_CLASS,//课程表 UIS_MENU_LOCATION_NOTICE,//消息通知 UIS_MENU_LOCATION_NOTICE_DETAIL,//通知详情 }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_LEARN_SHOW_Y (UI_STATUS_BAR_HEIGH+UI_STATUS_ITEM_HEIGH+5) //学习组信息显示所在 #define UI_GROUP_SHOW_Y (UI_LEARN_SHOW_Y+2+16) //成员信息显示所在的 #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); #endif