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

54 lines
1.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:
*
* Author: huangshuyi
*
* Create: 2024-6
*--------------------------------------------------------------------------*/
#ifndef TJDUI_SCREEN_MANAGE_H
#define TJDUI_SCREEN_MANAGE_H
#include "errcode.h"
#include "graphic_service.h"
#include "graphic_service_wrapper.h"
#include "power_display_service.h"
#include "ui_screennotify.h"
#include <cstdint>
namespace TJD {
#define TJDUI_DEFAULT_SCREEN_ON_TIME_MS 5000
#define TJDUI_DEFAULT_GO_MAIN_SLICE_AFTER_SCREEN_OFF_S 5
class TjdUiScreenManage
{
public:
//设置系统屏幕亮屏时长单位ms。
static void SetScreenOnSystime(uint32_t time_ms = TJDUI_DEFAULT_SCREEN_ON_TIME_MS);
//设置屏幕亮屏超时时长单位ms。总时长等于:屏幕默认熄屏时长+屏幕超时时长。
static void SetScreenKeepOnTimeout(uint32_t time_ms = TJDUI_DEFAULT_SCREEN_ON_TIME_MS);
static void ResetScreenKeepOnTimeout(void);
static void SetScreenAlwayOn(void);
static void CloseScreen(void);
/**
* @brief 取消息屏后返回主界面
*/
static void DisableBackHomeInterval(void);
/**
* @brief 恢复息屏后返回主界面
*/
static void ResetBackHomeInterval(void);
private:
TjdUiScreenManage(const TjdUiScreenManage &) = delete;
TjdUiScreenManage &operator=(const TjdUiScreenManage &) = delete;
TjdUiScreenManage() {}
virtual ~TjdUiScreenManage() {}
};
} // namespace TJD
#endif