67 lines
1.3 KiB
C
67 lines
1.3 KiB
C
#ifndef MYWIN_CFG_H__
|
|
#define MYWIN_CFG_H__
|
|
#include "base.h"
|
|
#include "mymem.h"
|
|
#include "rtthread.h"
|
|
|
|
// 定义一个窗口可以拥有多少个子窗口
|
|
#define WIN_CHIDWIN_MAXNUM 20
|
|
|
|
// 定义窗口名称的字符长度
|
|
#define WIN_WINTITLE_MAXLEN 20
|
|
|
|
// 定义文件路径最大长度
|
|
#define WIN_FILE_PATH_MAXLEN 200
|
|
|
|
// 定义最多可以有多少个阻塞窗口嵌套
|
|
#define WIN_BLOCK_MAXNUM 10
|
|
|
|
// 定义最多可以有多少个置顶窗口
|
|
#define WIN_TOP_MAXNUM 10
|
|
|
|
// 定义长按检测周期
|
|
#define WIN_LONGTOUCH_CHECK 30
|
|
|
|
// 定义图标的最大单边大小
|
|
#define WIN_IMAGE_MAXSIZE 400
|
|
|
|
// 定义软件定时器的最大个数
|
|
#define WIN_SOFTTIMER_MAXNUM 50
|
|
|
|
#ifndef u8
|
|
#define u8 uint8_t
|
|
#endif
|
|
#ifndef u16
|
|
#define u16 uint16_t
|
|
#endif
|
|
#ifndef u32
|
|
#define u32 uint32_t
|
|
#endif
|
|
#ifndef s8
|
|
#define s8 int8_t
|
|
#endif
|
|
#ifndef s16
|
|
#define s16 int16_t
|
|
#endif
|
|
#ifndef s32
|
|
#define s32 int32_t
|
|
#endif
|
|
|
|
#define sprintf rt_sprintf
|
|
|
|
typedef struct {
|
|
rt_uint8_t *tack; // 栈指针
|
|
int tackSize; // 栈大小,字节大小
|
|
struct rt_thread thread; // RT-thread 的线程结构体
|
|
} WIN_ThreadHandle;
|
|
|
|
typedef struct {
|
|
int (*fun)(void *); // 工作函数指针
|
|
void *ptr; // 传输给工作指函数的参数
|
|
int *ret; // 保存工作函数的返回值
|
|
int done; // 工作线程运行结束
|
|
WIN_ThreadHandle *handle; // 用于删除线程自身的句柄
|
|
} WIN_WorkFunStruct;
|
|
|
|
#endif
|