X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fscene.cpp;h=5eedf5c15b2b5bded929278c94b1817be99223fc;hb=eacc080fe975c523d722dd17c044652317ddd6e8;hp=c8bc91b6f9887154daa67255845805ed1f1fa120;hpb=ea0b5e20c8be3552da9203124457b225d2dee766;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/scene.cpp b/dali/integration-api/scene.cpp index c8bc91b..5eedf5c 100644 --- a/dali/integration-api/scene.cpp +++ b/dali/integration-api/scene.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 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. @@ -18,60 +18,54 @@ // CLASS HEADER #include -// INTERNAL INCLUDES +// EXTERNAL INCLUDES +#include #include #include + +// INTERNAL INCLUDES #include namespace Dali { - namespace Integration { - -Scene Scene::New( Size size ) +Scene Scene::New(Size size, int32_t windowOrientation, int32_t screenOrientation) { - Internal::ScenePtr internal = Internal::Scene::New( size ); - return Scene( internal.Get() ); + Internal::ScenePtr internal = Internal::Scene::New(size, windowOrientation, screenOrientation); + return Scene(internal.Get()); } -Scene Scene::DownCast( BaseHandle handle ) +Scene Scene::DownCast(BaseHandle handle) { - return Scene( dynamic_cast( handle.GetObjectPtr()) ); + return Scene(dynamic_cast(handle.GetObjectPtr())); } -Scene::Scene() -{ -} +Scene::Scene() = default; -Scene::~Scene() -{ -} +Scene::~Scene() = default; -Scene::Scene( const Scene& handle ) -:BaseHandle(handle) -{ -} +Scene::Scene(const Scene& handle) = default; -Scene::Scene( Internal::Scene* internal ) -: BaseHandle(internal) -{ -} +Scene& Scene::operator=(const Scene& rhs) = default; + +Scene::Scene(Scene&& handle) = default; + +Scene& Scene::operator=(Scene&& rhs) = default; -Scene& Scene::operator=( const Scene& rhs ) +Scene::Scene(Internal::Scene* internal) +: BaseHandle(internal) { - BaseHandle::operator=(rhs); - return *this; } -void Scene::Add( Actor actor ) +void Scene::Add(Actor actor) { - GetImplementation(*this).Add( GetImplementation(actor) ); + GetImplementation(*this).Add(GetImplementation(actor)); } -void Scene::Remove( Actor actor ) +void Scene::Remove(Actor actor) { - GetImplementation(*this).Remove( GetImplementation(actor) ); + GetImplementation(*this).Remove(GetImplementation(actor)); } Size Scene::GetSize() const @@ -79,9 +73,9 @@ Size Scene::GetSize() const return GetImplementation(*this).GetSize(); } -void Scene::SetDpi( Vector2 dpi ) +void Scene::SetDpi(Vector2 dpi) { - GetImplementation(*this).SetDpi( dpi ); + GetImplementation(*this).SetDpi(dpi); } Vector2 Scene::GetDpi() const @@ -89,9 +83,9 @@ Vector2 Scene::GetDpi() const return GetImplementation(*this).GetDpi(); } -void Scene::SetBackgroundColor( const Vector4& color ) +void Scene::SetBackgroundColor(const Vector4& color) { - GetImplementation(*this).SetBackgroundColor( color ); + GetImplementation(*this).SetBackgroundColor(color); } Vector4 Scene::GetBackgroundColor() const @@ -101,7 +95,7 @@ Vector4 Scene::GetBackgroundColor() const RenderTaskList Scene::GetRenderTaskList() const { - return RenderTaskList( &GetImplementation(*this).GetRenderTaskList() ); + return RenderTaskList(&GetImplementation(*this).GetRenderTaskList()); } Layer Scene::GetRootLayer() const @@ -109,24 +103,29 @@ Layer Scene::GetRootLayer() const return GetImplementation(*this).GetRootLayer(); } +Layer Scene::GetOverlayLayer() +{ + return GetImplementation(*this).GetOverlayLayer(); +} + uint32_t Scene::GetLayerCount() const { return GetImplementation(*this).GetLayerCount(); } -Layer Scene::GetLayer( uint32_t depth ) const +Layer Scene::GetLayer(uint32_t depth) const { - return GetImplementation(*this).GetLayer( depth ); + return GetImplementation(*this).GetLayer(depth); } -void Scene::SurfaceResized( float width, float height ) +void Scene::SurfaceResized(float width, float height) { - GetImplementation( *this ).SurfaceResized( width, height ); + GetImplementation(*this).SurfaceResized(width, height); } void Scene::SurfaceReplaced() { - GetImplementation( *this ).SurfaceReplaced(); + GetImplementation(*this).SurfaceReplaced(); } void Scene::Discard() @@ -134,14 +133,19 @@ void Scene::Discard() GetImplementation(*this).Discard(); } -Integration::Scene Scene::Get( Actor actor ) +void Scene::SetSurfaceRenderTarget(const Graphics::RenderTargetCreateInfo& renderTargetCreateInfo) { - return Dali::Integration::Scene( &GetImplementation( actor ).GetScene() ); + GetImplementation(*this).SetSurfaceRenderTarget(renderTargetCreateInfo); } -void Scene::QueueEvent( const Integration::Event& event ) +Integration::Scene Scene::Get(Actor actor) { - GetImplementation(*this).QueueEvent( event ); + return Dali::Integration::Scene(&GetImplementation(actor).GetScene()); +} + +void Scene::QueueEvent(const Integration::Event& event) +{ + GetImplementation(*this).QueueEvent(event); } void Scene::ProcessEvents() @@ -149,6 +153,61 @@ void Scene::ProcessEvents() GetImplementation(*this).ProcessEvents(); } +void Scene::AddFrameRenderedCallback(std::unique_ptr callback, int32_t frameId) +{ + GetImplementation(*this).AddFrameRenderedCallback(std::move(callback), frameId); +} + +void Scene::AddFramePresentedCallback(std::unique_ptr callback, int32_t frameId) +{ + GetImplementation(*this).AddFramePresentedCallback(std::move(callback), frameId); +} + +void Scene::GetFrameRenderedCallback(FrameCallbackContainer& callbacks) +{ + GetImplementation(*this).GetFrameRenderedCallback(callbacks); +} + +void Scene::GetFramePresentedCallback(FrameCallbackContainer& callbacks) +{ + GetImplementation(*this).GetFramePresentedCallback(callbacks); +} + +void Scene::SurfaceRotated(float width, float height, int32_t windowOrientation, int32_t screenOrientation) +{ + GetImplementation(*this).SurfaceRotated(width, height, windowOrientation, screenOrientation); +} + +int32_t Scene::GetCurrentSurfaceOrientation() const +{ + return GetImplementation(*this).GetCurrentSurfaceOrientation(); +} + +int32_t Scene::GetCurrentScreenOrientation() const +{ + return GetImplementation(*this).GetCurrentScreenOrientation(); +} + +const Rect& Scene::GetCurrentSurfaceRect() const +{ + return GetImplementation(*this).GetCurrentSurfaceRect(); +} + +bool Scene::IsSurfaceRectChanged() const +{ + return GetImplementation(*this).IsSurfaceRectChanged(); +} + +void Scene::SetRotationCompletedAcknowledgement() +{ + GetImplementation(*this).SetRotationCompletedAcknowledgement(); +} + +bool Scene::IsRotationCompletedAcknowledgementSet() const +{ + return GetImplementation(*this).IsRotationCompletedAcknowledgementSet(); +} + Scene::EventProcessingFinishedSignalType& Scene::EventProcessingFinishedSignal() { return GetImplementation(*this).EventProcessingFinishedSignal(); @@ -164,9 +223,14 @@ Scene::KeyEventGeneratedSignalType& Scene::KeyEventGeneratedSignal() return GetImplementation(*this).KeyEventGeneratedSignal(); } -Scene::TouchSignalType& Scene::TouchSignal() +Scene::KeyEventGeneratedSignalType& Scene::InterceptKeyEventSignal() +{ + return GetImplementation(*this).InterceptKeyEventSignal(); +} + +Scene::TouchEventSignalType& Scene::TouchedSignal() { - return GetImplementation(*this).TouchSignal(); + return GetImplementation(*this).TouchedSignal(); } Scene::WheelEventSignalType& Scene::WheelEventSignal() @@ -174,6 +238,11 @@ Scene::WheelEventSignalType& Scene::WheelEventSignal() return GetImplementation(*this).WheelEventSignal(); } -} // Integration +Scene::WheelEventGeneratedSignalType& Scene::WheelEventGeneratedSignal() +{ + return GetImplementation(*this).WheelEventGeneratedSignal(); +} + +} // namespace Integration -} // Dali +} // namespace Dali