44 lines
1.4 KiB
C++
44 lines
1.4 KiB
C++
#ifndef TJD_UI_APP_LOCKSCREEN_PRESENTER_H
|
|
#define TJD_UI_APP_LOCKSCREEN_PRESENTER_H
|
|
|
|
#include "NativeAbility.h"
|
|
#include "TjdUiAppIds.h"
|
|
#include "components/root_view.h"
|
|
#include "components/ui_view.h"
|
|
#include "graphic_timer.h"
|
|
#include <string>
|
|
|
|
namespace TJD {
|
|
#define LOCKSCREEN_ID "Lockscreen_"
|
|
#define UNLOCKSCREEN_ID "Unlockscreen_"
|
|
#define UNLOCKDONE_ID "Unlockscreendone_"
|
|
#define BTN_CIRCLEPROCESS_ID "Circleprocess"
|
|
|
|
class TjdUiAppLockScreenPresenter : public OHOS::RootView::OnKeyActListener,
|
|
public OHOS::UIView::OnDragListener
|
|
{
|
|
public:
|
|
TjdUiAppLockScreenPresenter();
|
|
~TjdUiAppLockScreenPresenter();
|
|
static TjdUiAppLockScreenPresenter *GetInstance(void);
|
|
bool OnKeyAct(OHOS::UIView &view, const OHOS::KeyEvent &event) override;
|
|
// bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event) override;
|
|
bool OnDragStart(OHOS::UIView &view, const OHOS::DragEvent &event) override;
|
|
bool OnDrag(OHOS::UIView &view, const OHOS::DragEvent &event) override;
|
|
bool OnDragEnd(OHOS::UIView &view, const OHOS::DragEvent &event) override;
|
|
|
|
private:
|
|
int16_t dragStartX_{0};
|
|
int16_t dragCurrentX_{0};
|
|
int32_t dragDistance_{0};
|
|
bool isExit_{true};
|
|
};
|
|
|
|
void SetLockScreenEnable(bool enable);
|
|
bool IsLockScreenEnable(void);
|
|
bool IsShowLockScreenView();
|
|
void ShowLockScreenView();
|
|
void HideLockScreenView();
|
|
|
|
} // namespace TJD
|
|
#endif |