#ifndef TJDUI_APP_CAMERA_H #define TJDUI_APP_CAMERA_H #include "TjdUiAppCameraPresenter.h" #include "View.h" #include "components/ui_image_view.h" #include "components/ui_label.h" #include "components/ui_list.h" #include "components/ui_scroll_view.h" #include "graphic_timer.h" #include "ui_label_ext.h" // extern "C" { // void tjd_into_photo(void); // } using namespace OHOS; namespace TJD { typedef bool (TjdUiAppCameraView::*CameraChangeView)(CameraView hideView); class TjdUiAppCameraPresenter; class TjdUiAppCameraView : public OHOS::View // public OHOS::UIViewGroup { public: TjdUiAppCameraView(); virtual ~TjdUiAppCameraView(); static TjdUiAppCameraView *GetInstance(void); virtual void OnStart() override; virtual void OnStop() override; void ChangedView(CameraView view, CameraView hideView); void TimerToReturn(); OHOS::UIImageView *GetImgCamera(void); OHOS::UIScrollView *InitTipView(); OHOS::UIScrollView *InitLinkBleView(); OHOS::UIScrollView *InitCameraView(); private: OHOS::UIScrollView *container_{nullptr}; OHOS::UIViewGroup *groupList_[CameraView::CAMERA_MAXTHVIEW]{nullptr}; OHOS::UIScrollView *linkBleView_{nullptr}; OHOS::UIScrollView *tipView_{nullptr}; OHOS::UIScrollView *cameraView_{nullptr}; OHOS::UILabelExt *lblTitle_tipView{nullptr}; OHOS::UILabelExt *lblTitle_cameraView{nullptr}; OHOS::UILabelExt *lblTip_tipView{nullptr}; OHOS::UILabelExt *lblTip_linkBleView{nullptr}; OHOS::UIImageView *imgCamera_tipView{nullptr}; OHOS::UIImageView *imgCamera_cameraView{nullptr}; OHOS::UIImageView *imgCamera_linkBleView{nullptr}; OHOS::ImageInfo *imgInfo{nullptr}; // UIView::OnClickListener *onClickListener_{nullptr}; // UIView::OnDragListener *OnDragListener_{nullptr}; OHOS::GraphicTimer *timerToReturn_{nullptr}; bool ShowTipView(CameraView hideView); bool ShowLinkBleView(CameraView hideView); bool ShowCameraView(CameraView hideView); CameraChangeView viewMapper_[CAMERA_MAXTHVIEW] = { &TjdUiAppCameraView::ShowTipView, &TjdUiAppCameraView::ShowLinkBleView, &TjdUiAppCameraView::ShowCameraView, }; }; void CameraViewExitEvent(); class CameraPopupWindow : public TjdUiScreenDragListener, public OHOS::RootView::OnKeyActListener, public OHOS::UIScrollView { public: CameraPopupWindow(); virtual ~CameraPopupWindow(); bool OnKeyAct(UIView& view, const KeyEvent& event); void ScreenDragEventCallback(OHOS::UIView &view, const OHOS::DragEvent &event); private: OHOS::UILabel lblTitle_; OHOS::UIImageView imgCamera_; }; } // namespace TJD #endif