mcu_hi3321_watch/tjd/ui/watch_face/TjdUiWatchFaceCtrl.h
2025-05-26 20:15:20 +08:00

73 lines
2.6 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*----------------------------------------------------------------------------
* Copyright (c) TJD Technologies Co., Ltd. 2024. All rights reserved.
*
* Description: TjdUiWatchFaceCtrl.h
*
* Author: liuguanwu
*
* Create: 2024-10
*--------------------------------------------------------------------------*/
#ifndef TJD_UI_WATCH_FACE_CTRL_H
#define TJD_UI_WATCH_FACE_CTRL_H
#include <string>
#include <list>
#include "View.h"
#include "ui_card_page.h"
namespace TJD {
//空间函数接口
#define WF_FORMAT_NATIVE_MAX_ID (63)
#define WF_FORMAT_JS_MIN_ID (64)
#define WF_FORMAT_JS_MAX_ID (127)
#define WF_FORMAT_CLOUD_MIN_ID (128)
enum EnumWfFormat {
WF_FORMAT_NATIVE = 0, //本地表盘
WF_FORMAT_JS , //JS表盘
WF_FORMAT_CLOUD , //云表盘
WF_FORMAT_UNKNOWN
};
struct WfSelectInfo
{
std::string name; //滚筒名字标识
std::string PreviewImgFullPath; //全路径
int PreviewImgFileOffset; //
uint32_t PreviewImgId; //
uint32_t wfId;
};
OHOS::UICardPage *TjdUiWfCtrlInit(void);
void TjdUiWfSetCurID(uint32_t id);
uint32_t TjdUiWfGetCurID(void);
EnumWfFormat TjdUiWfGeTypebyID(uint32_t id); //表盘格式通过ID
void TjdUiWfGetNamebyID(uint32_t id, std::string* StrName); //获取表盘文件名通过ID
bool TjdUiWfGetIDbyName(std::string* StrName, uint32_t *id); //获取表盘ID通过文件名
void TjdUiWfGetFullPathbyID(uint32_t id, std::string* StrPath); //获取表盘路径,仅云表盘使用
bool TjdUiWfGetSelectInfobyID(uint32_t id, WfSelectInfo* info); //获取表盘选择信息
void TjdUiWfRecovery(void); //本地表盘恢复
#ifdef __cplusplus
extern "C" {
#endif
uint32_t TjdUiWfGetNumberMax(void); //获取表盘最大数量
uint32_t* TjdUiWfGetIDList(uint32_t* len); //获取表盘ID列表,列表长度
bool TjdUiWfGeUninstallbyID(uint32_t id); //表盘可卸载查询。=true可卸载;=false,不可卸载。
bool TjdUiWfDeletebyID(uint32_t id); //表盘删除通过ID
bool TjdUiWfInstallBeforNotify(uint32_t id); //表盘安装前通知
bool TjdUiWfInstallAfterNotify(uint32_t id); //表盘安装后通知
bool TjdUiWfUninstallBeforNotify(uint32_t id); //表盘卸载前通知
bool TjdUiWfUninstallAfterNotify(uint32_t id); //表盘卸载后通知
bool TjdUiWfIsLocalID(uint32_t id); //本地表盘判断
#ifdef __cplusplus
}
#endif
} // namespace TJD
#endif // TJD_UI_WATCH_FACE_CTRL_H