/*---------------------------------------------------------------------------- * Copyright (c) TJD Technologies Co., Ltd. 2025. All rights reserved. * * Description: TjdUiAppShutdownPresenter.h * * Author: luziquan@ss-tjd.com * * Create: 2024-06-13 *--------------------------------------------------------------------------*/ #ifndef TJD_UI_APP_SHUTDOWN_PRESENTER_H #define TJD_UI_APP_SHUTDOWN_PRESENTER_H #include "Presenter.h" #include "TjdUiScreenDrag.h" #include "components/root_view.h" #include "components/ui_view.h" #include namespace TJD { #define BTN_RESTART_VIEW_ID "btnRestart" #define BTN_SHUTDOWN_VIEW_ID "btnShutdown" #define BTN_RESTART_ENTER_VIEW_ID "btnRestartEnter" #define BTN_SHUTDOWN_ENTER_VIEW_ID "btnShutdownEnter" class TjdUiAppShutdownView; class TjdUiAppShutdownPresenter : public OHOS::UIView::OnClickListener, public TjdUiScreenDragListener, public OHOS::RootView::OnKeyActListener { public: TjdUiAppShutdownPresenter(); virtual ~TjdUiAppShutdownPresenter(); static TjdUiAppShutdownPresenter *GetInstance(void); bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event) override; void ScreenDragEventCallback(OHOS::UIView &view, const OHOS::DragEvent &event) override { ViewExitEvent(true); } bool OnKeyAct(OHOS::UIView &view, const OHOS::KeyEvent &event) override; private: void ViewExitEvent(bool isSwipe); }; } // namespace TJD #endif