2025-04-11 09:40:32 +08:00

70 lines
1.4 KiB
C

/****************************************************************************
*
* Copy right: 2017-, Copyrigths of EigenComm Ltd.
* File name: app.h
* Description: EC718 at command demo entry header file
* History: Rev1.0 2018-07-12
*
****************************************************************************/
#ifndef SUBSYS_APP_H
#define SUBSYS_APP_H
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
APP_TP_MSG = 10,
APP_KEY_MSG = 20,
APP_STAT_MSG = 30,
APP_USER_MSG = 40,
} AppMsgTypeT;
typedef struct __App_Point_t
{
int32_t appActived;
int32_t appStatus;
int32_t initStatus;
} AppPointT;
typedef struct __App_Msg_t
{
uint32_t* wndh;
AppMsgTypeT msgType;
int32_t param1;
int32_t param2;
uint32_t *param3;
int32_t time;
AppPointT pt;
} AppMsgT;
typedef struct __App_Info_t
{
int32_t id;
int32_t appActived;
int32_t appStatus;
int32_t initStatus;
} AppInfoT;
typedef struct __App_t
{
AppInfoT* info;
uint32_t* wndh;
int32_t (*init)(AppInfoT *appInfo, uint32_t reserved1, uint32_t reserved2, uint32_t syscallTable);
int32_t (*preDraw)();
int32_t (*msgProc)(AppInfoT *appInfo,AppMsgT *msg, uint32_t reserved2, uint32_t syscallTable);
int32_t (*afterDraw)();
int32_t (*destory)();
} AppT;
int32_t mountApp(AppT* appPtr,int32_t slot);
int32_t setActiveApp(int32_t slot);
#ifdef __cplusplus
}
#endif
#endif /* SUBSYS_APP_H */