X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fcommon%2Fscene-impl.h;h=7c856ab3d16e1810ae77e914c3f45618ebb71a05;hb=be8334126dd5ff7c19ee33b25819c83364b7f281;hp=01e4b470d296641e3a6d5cd2823a7d7dca6bd16a;hpb=77b488c3d1c388a9a472a5bd00a0d04797120c68;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/common/scene-impl.h b/dali/internal/event/common/scene-impl.h index 01e4b47..7c856ab 100644 --- a/dali/internal/event/common/scene-impl.h +++ b/dali/internal/event/common/scene-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_SCENE_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,63 +38,9 @@ struct Event; namespace Internal { -//@todo Break this dependence somehow. -namespace Render -{ -class Renderer; -} - namespace SceneGraph { class Scene; - -struct DirtyRect -{ - DirtyRect(Node* node, Render::Renderer* renderer, int frame, Rect& rect) - : node(node), - renderer(renderer), - frame(frame), - rect(rect), - visited(true) - { - } - - DirtyRect() - : node(nullptr), - renderer(nullptr), - frame(0), - rect(), - visited(true) - { - } - - bool operator<(const DirtyRect& rhs) const - { - if(node == rhs.node) - { - if(renderer == rhs.renderer) - { - return frame > rhs.frame; // Most recent rects come first - } - else - { - return renderer < rhs.renderer; - } - } - else - { - return node < rhs.node; - } - } - - Node* node; - Render::Renderer* renderer; - int frame; - - Rect rect; - bool visited; -}; - } // namespace SceneGraph class EventProcessor; @@ -116,7 +62,7 @@ public: /** * @copydoc Dali::Integration::Scene::New */ - static ScenePtr New(Size size, int orientation = 0); + static ScenePtr New(Size size, int32_t orientation = 0); /** * virtual destructor @@ -242,14 +188,37 @@ public: * @param[in] height The height of rotated surface * @param[in] orientation The orientation of rotated surface */ - void SurfaceRotated(float width, float height, int orientation); + void SurfaceRotated(float width, float height, int32_t orientation); /** - * @brief Get surface's current orientation - * - * @return surface orientation + * @copydoc Dali::Integration::Scene::SetRotationCompletedAcknowledgement */ - int GetSurfaceOrientation(); + void SetRotationCompletedAcknowledgement(); + + /** + * @copydoc Dali::Integration::Scene::IsRotationCompletedAcknowledgementSet + */ + bool IsRotationCompletedAcknowledgementSet() const; + + /** + * @copydoc Dali::Integration::Scene::GetCurrentSurfaceOrientation + */ + int32_t GetCurrentSurfaceOrientation() const; + + /** + * @copydoc Dali::Integration::Scene::GetCurrentSurfaceRect + */ + const Rect& GetCurrentSurfaceRect() const; + + /** + * @copydoc Dali::Integration::Scene::IsSurfaceRectChanged + */ + bool IsSurfaceRectChanged() const; + + /** + * @copydoc Dali::Integration::Scene::SetSurfaceRenderTarget + */ + void SetSurfaceRenderTarget(const Graphics::RenderTargetCreateInfo& renderTargetCreateInfo); /** * Used by the EventProcessor to emit key event signals. @@ -284,6 +253,13 @@ public: void EmitWheelEventSignal(const Dali::WheelEvent& event); /** + * Used by the WheelEventProcessor to emit WheelEventGenerated signals. + * @param[in] event The wheel event. + * @return The return is true if WheelEvent is consumed, otherwise false. + */ + bool EmitWheelEventGeneratedSignal(const Dali::WheelEvent& event); + + /** * @copydoc Dali::Integration::Scene::AddFrameRenderedCallback */ void AddFrameRenderedCallback(std::unique_ptr callback, int32_t frameId); @@ -329,11 +305,9 @@ public: Integration::Scene::WheelEventSignalType& WheelEventSignal(); /** - * @brief Get ItemsDirtyRects - * - * @return the ItemsDirtyRects + * @copydoc Integration::Scene::WheelEventGeneratedSignal() */ - std::vector& GetItemsDirtyRects(); + Integration::Scene::WheelEventGeneratedSignalType& WheelEventGeneratedSignal(); public: /** @@ -346,7 +320,7 @@ public: * From RenderTaskDefaults; retrieve the default camera actor. * @return The default camera actor. */ - CameraActor& GetDefaultCameraActor() override; + CameraActor& GetDefaultCameraActor() const override; private: // Constructor @@ -358,7 +332,7 @@ private: * @param[in] size The size of the set surface * @param[in] orientation The orientation of the set surface for this scene */ - void Initialize(Size size, int orientation); + void Initialize(Size size, int32_t orientation); // Undefined Scene(const Scene&) = delete; @@ -373,7 +347,7 @@ private: * @param[in] height The height of rotated surface * @param[in] orientation The orientation of rotated surface */ - void ChangedSurface(float width, float height, int orientation); + void ChangedSurface(float width, float height, int32_t orientation); private: Internal::SceneGraph::Scene* mSceneObject; @@ -399,7 +373,7 @@ private: EventProcessor mEventProcessor; // The Surface's orientation - int mSurfaceOrientation; + int32_t mSurfaceOrientation; // The key event signal Integration::Scene::KeyEventSignalType mKeyEventSignal; @@ -412,9 +386,8 @@ private: Integration::Scene::TouchEventSignalType mTouchedSignal; // The wheel event signal - Integration::Scene::WheelEventSignalType mWheelEventSignal; - - std::vector mItemsDirtyRects; + Integration::Scene::WheelEventSignalType mWheelEventSignal; + Integration::Scene::WheelEventGeneratedSignalType mWheelEventGeneratedSignal; }; } // namespace Internal