ListBox.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /********************************************************************************
  2. * File Name: ListBox.h
  3. * Function Describe: ListBox.c declare module
  4. * Relate Module: GUI.c
  5. * Writer: Shliangwen
  6. * Date: 2016-2-1
  7. *******************************************************************************/
  8. #ifndef __LIST_BOX_H
  9. #define __LIST_BOX_H
  10. /*****************************Begin of Module*********************************************/
  11. #include "ListBoxSMS.h"
  12. #define LIST_TOPX 0
  13. #define LIST_TOPY 29//
  14. #define LIST_ROW 5
  15. #define LIST_BAR_LEN 126
  16. #define LIST_ITEM_NUM_MAX 200
  17. #define LIST_ITEM_TEXT_LEN_MAX 17 //每项(行)显示字符串最大长度,单位字节, 对于中文一个汉子占2个字节,应调合适值避免显示越界
  18. #define N 100
  19. typedef struct SUT_LIST_BOX
  20. {
  21. char **item;
  22. unsigned short itemnum; //item number
  23. unsigned short handle; //current item
  24. unsigned short page; //menu page(first item of page)
  25. unsigned short pgaenum;
  26. char unicode;//*item 指向的字符串编码方式 0--非unicode编码 1--unicode编码
  27. char features[LIST_ITEM_NUM_MAX];//特性 可以用来存储图标特性等,比如在线,离线等信息
  28. //char *item[LIST_ITEM_NUM_MAX];
  29. const char **icon;//图标列表
  30. unsigned short iconnum;//图标个数
  31. /////////////SMS add/////////////////
  32. struct SUT_LIST_BOX_SMS_INFO boxinfo[LIST_ROW];
  33. unsigned char up_down_flag;
  34. unsigned short totalnum;
  35. unsigned short notehandle;
  36. unsigned char pageChange;
  37. }SUT_LIST_BOX;
  38. extern SUT_LIST_BOX sutListBox;
  39. void ListBoxInitSMS(SUT_LIST_BOX *p,unsigned short totalnum,const char **iconlist,char unicode);
  40. void ListBoxShowSMS(SUT_LIST_BOX *p);
  41. void ListBoxInit(struct SUT_LIST_BOX *p,char **itemlist,char unicode,const char **iconlist,char *features);
  42. unsigned long ListBoxResponse(struct SUT_LIST_BOX *p);
  43. void StrIntercept(char *des,char *src,unsigned short len);
  44. unsigned long ListBoxResponseSMS(SUT_LIST_BOX *p);
  45. /*******************************End of Module********************************************/
  46. #endif