54 lines
1.2 KiB
C
54 lines
1.2 KiB
C
|
|
|
|
#ifndef MYWIN_USER_SYSFILE_H__
|
|
#define MYWIN_USER_SYSFILE_H__
|
|
|
|
#include "mywin_inc.h"
|
|
|
|
// 定义列表中最大显示文件数
|
|
#define SYSFILE_FILE_MAXNUM 50
|
|
|
|
typedef struct {
|
|
WIN_WindowStruct win;
|
|
FLASH_FileStruct file[SYSFILE_FILE_MAXNUM];
|
|
int index;
|
|
int fileNum; // 条目数
|
|
int titleHight;
|
|
int itemHight;
|
|
int itemIndent;
|
|
int itemNumOnePage; // 每页显示条目数
|
|
int firstItemOnPage; // 显示在页首的条目编号
|
|
|
|
int touch_support; // 支持触屏
|
|
WIN_ButtonStruct *key_up;
|
|
WIN_ButtonStruct *key_down;
|
|
WIN_ButtonStruct *key_enter;
|
|
WIN_ButtonStruct *key_back;
|
|
|
|
} WIN_SysFileStruct;
|
|
|
|
WIN_SysFileStruct *WIN_CreatSysFile(
|
|
WIN_WindowStruct *base,
|
|
void (*msgLoop)(struct _WIN_WindowStruct *win, WIN_MsgStruct *msg), int x,
|
|
int y, int x_size, int y_size);
|
|
|
|
// 添加一个文件条目
|
|
void SYSFILE_AddItem(WIN_SysFileStruct *filder, FLASH_FileStruct *file);
|
|
|
|
// 清空条目
|
|
void SYSFILE_ClearItem(WIN_SysFileStruct *filder);
|
|
|
|
// 扫描文件
|
|
void SYSFILE_ScanFile(WIN_SysFileStruct *sysfile);
|
|
|
|
// 消息框的绘制函数
|
|
void SYSFILE_DefaultPaint(WIN_SysFileStruct *sysfile);
|
|
|
|
// 消息框的消息处理函数
|
|
void SYSFILE_defaultMsgLoop(WIN_SysFileStruct *sysfile, WIN_MsgStruct *msg);
|
|
|
|
// 选则文件
|
|
int SYSFILE_ChooseFile(WIN_WindowStruct *win);
|
|
|
|
#endif
|