UI.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /********************************************************************************
  2. * File Name: UI.h
  3. * Function Describe: UI.c declare module
  4. * Relate Module:
  5. * Explain: 用户界面,注意,为避免操作系统中多任务调用而导致资源访问冲突,只允许在同一个任务中调用。目前设定在MainTask任务中调用!
  6. * Writer: ShiLiangWen
  7. * Date: 2016.1.28
  8. *******************************************************************************/
  9. #ifndef __UI_H
  10. #define __UI_H
  11. //===========================begin============================================
  12. enum {
  13. UIS_NULL=0,
  14. UIS_STANDBY, //主界面
  15. UIS_MENU_MAIN, //主菜单
  16. UIS_MENU_USER_SEL, //成员选择
  17. UIS_MENU_GROUP_SEL, //群组选择
  18. UIS_MAIL_BOX, //信箱查阅
  19. UIS_MENU_SYS_SET, //系统设置
  20. UIS_MENU_INFO, //终端信息
  21. UIS_CALL_PHONE,
  22. UIS_CALL_PHONE_OPTION,
  23. UIS_CALL_PHONE_INPUT,
  24. UIS_CALL_PHONE_MODIFY,//此界面处理号码
  25. UIS_CALL_PHONE_DELETE,
  26. UIS_MESSAGE_OPTION,
  27. UIS_MESSAGE_READ,
  28. UIS_MESSAGE_DELE,
  29. UIS_MESSAGE_FORMAT,
  30. UIS_CALL_TO_PHONE,
  31. UIS_SET_APN,
  32. UIS_APN_DETAIL,
  33. UIS_SET_GPS,
  34. UIS_SET_LCD,
  35. UIS_SET_NET,
  36. UIS_SET_TIME,
  37. UIS_UP_APPRICATION_VER,
  38. UIS_UP_APP_PENDING,
  39. UIS_UP_INTERCOM_VER,
  40. UIS_MENU_APN_DETAIL,
  41. UIS_UPDATA_SHOW,
  42. UIS_SET_LANGUAGE,
  43. UIS_Voice_Record,
  44. UIS_SET_KEYSound,
  45. UIS_START_INFOSET,
  46. //FastInterfaceMode
  47. UIS_FASTINTERFACE,
  48. UIS_AWMODESET,
  49. UIS_LOW_CONSUMPTION,//consumption
  50. UIS_FACTORY_MENU,
  51. UIS_FACTORY_LCD,
  52. UIS_WAIT_ONECALL,
  53. UIS_FACTORY_KEY,
  54. UIS_FACTORY_LED,
  55. UIS_FACTORY_VBAT,
  56. UIS_SET_PTTTONE,
  57. UIS_SET_ADB,
  58. UIS_SET_BOOT,
  59. UIS_POWEROFF,
  60. UIS_BOOTUPATE_SHOW,
  61. };
  62. typedef struct SUT_UI_STATUS
  63. {
  64. unsigned char Status;//当前状态
  65. unsigned char LastStatus;//上一次状态 当前状态发生变化后,存储了上一次的状态值
  66. unsigned char NextStatus;//下一个状态 当前状态不等与下一个状态,则发生转换
  67. unsigned char LastHandle;
  68. unsigned char LastPage;
  69. unsigned char ShortCut; //快捷方式进入
  70. }SUT_UI_STATUS;
  71. typedef struct UI_STACK{
  72. int sta[4];
  73. int top;
  74. }UI_STACK;
  75. extern UI_STACK UI_Stack;
  76. extern SUT_UI_STATUS sutUIstatus;
  77. extern unsigned char lastOption;
  78. extern signed char ChangeIng;
  79. extern char ChangeIngCt;
  80. void UI_Init(void);
  81. void UI_Loop(void);
  82. void UI_Key(void);
  83. void ShowBootAnimation(void);//显示开机动画
  84. void ShowMessageBox(char *msg);
  85. void UISetNextStatus(unsigned char status);
  86. void ShowNumBox(unsigned short msg);
  87. void ShowButton(u16 x,u16 y,const char *str);//显示一个按钮
  88. void ShowButton2(u16 x,u16 y,const char *str);
  89. void ReFlashItem(void);
  90. void Show_Net(unsigned int s_netshowvalue);
  91. void ReFlashItem2(void);
  92. void UIShowMainInterface(int StatusUpdate);
  93. void Init_stack(struct UI_STACK* s);
  94. int PushUiStack(struct UI_STACK *s,int data);
  95. int PullUiStack(struct UI_STACK *s);
  96. void ShowCallUserName(u16 x,u16 y);
  97. //===========================end==============================================
  98. #endif
  99. /******************************************************************************/