123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- #ifndef __UI__H_
- #define __UI__H_
- #include "gui.h"
- typedef enum{
- UIS_NULL,
- UIS_STANDBY,
- UIS_MENU_MAIN,
-
- UIS_MENU_TASK_SEL,
- UIS_MENU_RANK_SEL,
- UIS_MENU_CLASS_SEL,
- UIS_MENU_STUDENT_SEL,
- UIS_MENU_LOCATION_SEL,
- UIS_MENU_SYS_SEL,
-
- UIS_MENU_MAIL_READ,
- UIS_MENU_MAIL_OPTION,
- UIS_MENU_MAIL_DEL,
- UIS_MENU_MAIL_FORMAT,
-
- UIS_MENU_SYS_LCD,
- UIS_MENU_SYS_NET,
- UIS_MENU_SYS_SIM,
- UIS_MENU_SYS_PWR,
- UIS_MENU_SYS_SERVERPASS,
- UIS_MENU_SYS_VERSION,
- UIS_MENU_SYS_NOTE,
- UIS_MENU_SYS_INFO,
- UIS_MENU_SYS_SD,
- UIS_MENU_SYS_VOICE,
- UIS_MENU_SYS_ANT,
- UIS_MENU_SYS_PASS,
-
- UIS_MENU_TASK_QUERY,
-
- UIS_MENU_RANK_DETAIL,
-
- UIS_MENU_SYS_SERVER,
-
-
- UIS_MENU_MAIL_SEL,
-
- UIS_MENU_LOCATION_CLASS,
- UIS_MENU_LOCATION_NOTICE,
- UIS_MENU_LOCATION_NOTICE_DETAIL,
-
- UIS_MENU_SHUT_UI,
- #ifdef MENU_TEST
- UIS_MENU_SYS_TEST
- #endif
- }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
|