/******************************************************************************** * File Name: ListBox.h * Function Describe: ListBox.c declare module * Relate Module: GUI.c * Writer: Shliangwen * Date: 2016-2-1 *******************************************************************************/ #ifndef __LIST_BOX_H #define __LIST_BOX_H /*****************************Begin of Module*********************************************/ #include "ListBoxSMS.h" #define LIST_TOPX 0 #define LIST_TOPY 24 #define LIST_ROW 5 #define LIST_BAR_LEN 126 #define LIST_ITEM_NUM_MAX 200 #define LIST_ITEM_TEXT_LEN_MAX 17 //每项(行)显示字符串最大长度,单位字节, 对于中文一个汉子占2个字节,应调合适值避免显示越界 #define N 100 typedef struct SUT_LIST_BOX { char **item; unsigned short itemnum; //item number unsigned short handle; //current item unsigned short page; //menu page(first item of page) unsigned short pgaenum; char unicode;//*item 指向的字符串编码方式 0--非unicode编码 1--unicode编码 char features[LIST_ITEM_NUM_MAX];//特性 可以用来存储图标特性等,比如在线,离线等信息 //char *item[LIST_ITEM_NUM_MAX]; const char **icon;//图标列表 unsigned short iconnum;//图标个数 /////////////SMS add///////////////// struct SUT_LIST_BOX_SMS_INFO boxinfo[LIST_ROW]; unsigned char up_down_flag; unsigned short totalnum; unsigned short notehandle; unsigned char pageChange; unsigned char time[LIST_ITEM_NUM_MAX]; //用于记录录音时间 }SUT_LIST_BOX; extern SUT_LIST_BOX sutListBox; void ListBoxInitSMS(SUT_LIST_BOX *p,unsigned short totalnum,const char **iconlist,char unicode); void ListBoxShowSMS(SUT_LIST_BOX *p); void ListBoxShowM20(struct SUT_LIST_BOX *p); void ListBoxInit(struct SUT_LIST_BOX *p,char **itemlist,char unicode,const char **iconlist,char *features); void ListBoxInitM20(struct SUT_LIST_BOX *p,char **itemlist,char unicode,const char **iconlist,char *features,char *time); unsigned long ListBoxResponse(struct SUT_LIST_BOX *p); void StrIntercept(char *des,char *src,unsigned short len); unsigned long ListBoxResponseSMS(SUT_LIST_BOX *p); unsigned long ListBoxResponseM20(struct SUT_LIST_BOX *p); /*******************************End of Module********************************************/ #endif