42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
#ifndef TJD_UI_APP_DRAIN_PRESENTER_H
|
|
#define TJD_UI_APP_DRAIN_PRESENTER_H
|
|
#include "NativeAbility.h"
|
|
#include "Presenter.h"
|
|
#include "TjdUiAppIds.h"
|
|
#include "TjdUiScreenDrag.h"
|
|
#include "components/root_view.h"
|
|
#include "components/ui_slider.h"
|
|
#include "components/ui_view.h"
|
|
#include "graphic_timer.h"
|
|
#include <string>
|
|
|
|
namespace TJD {
|
|
|
|
class TjdUiAppDrainView;
|
|
class TjdUiAppDrainPresenter : public OHOS::Presenter<TjdUiAppDrainView>,
|
|
public OHOS::UIView::OnClickListener,
|
|
public TjdUiScreenDragListener,
|
|
public OHOS::RootView::OnKeyActListener
|
|
{
|
|
public:
|
|
TjdUiAppDrainPresenter();
|
|
virtual ~TjdUiAppDrainPresenter();
|
|
static TjdUiAppDrainPresenter *GetInstance(void);
|
|
void OnStart() override;
|
|
void OnPause() override;
|
|
void OnResume() override;
|
|
void OnStop() override;
|
|
void ViewExitEvent(OHOS::UIView &view, const OHOS::DragEvent &event);
|
|
bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event);
|
|
bool OnKeyAct(OHOS::UIView &view, const OHOS::KeyEvent &event);
|
|
void ScreenDragEventCallback(OHOS::UIView &view, const OHOS::DragEvent &event) override { ViewExitEvent(view, event); }
|
|
int LoopPlayerStart();
|
|
int PlayerStart();
|
|
int PlayerStop();
|
|
|
|
private:
|
|
bool isExit_{true};
|
|
};
|
|
|
|
} // namespace TJD
|
|
#endif |