X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fcommon%2Fstage.cpp;h=cf5c03ab533613d5d93118520b55d2a2c18d5f4e;hb=646f736e77b085c86e982c0d1d4b895c2a431330;hp=5e2b0f904acd198f641869f06c2343d4c9c17cbb;hpb=f47a49768010de60f06c22065ad3f293f019046a;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/common/stage.cpp b/dali/public-api/common/stage.cpp index 5e2b0f9..cf5c03a 100644 --- a/dali/public-api/common/stage.cpp +++ b/dali/public-api/common/stage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -26,15 +26,6 @@ #include #include -#include -#include - -#ifdef DYNAMICS_SUPPORT -#include -#include -#include -#endif - namespace Dali { @@ -43,10 +34,6 @@ using Internal::Core; const Vector4 Stage::DEFAULT_BACKGROUND_COLOR(0.0f, 0.0f, 0.0f, 1.0f); const Vector4 Stage::DEBUG_BACKGROUND_COLOR(0.2f, 0.5f, 0.2f, 1.0f); -const char* const Stage::SIGNAL_KEY_EVENT = "key-event"; -const char* const Stage::SIGNAL_EVENT_PROCESSING_FINISHED = "event-processing-finished"; -const char* const Stage::SIGNAL_TOUCHED = "touched"; - Stage::Stage() { } @@ -103,12 +90,12 @@ Vector2 Stage::GetSize() const return GetImplementation(*this).GetSize(); } -unsigned int Stage::GetLayerCount() const +uint32_t Stage::GetLayerCount() const { return GetImplementation(*this).GetLayerCount(); } -Layer Stage::GetLayer(unsigned int depth) const +Layer Stage::GetLayer(uint32_t depth) const { return GetImplementation(*this).GetLayer(depth); } @@ -135,38 +122,13 @@ Vector2 Stage::GetDpi() const ObjectRegistry Stage::GetObjectRegistry() const { - Internal::ObjectRegistry& internal = Internal::Stage::GetCurrent()->GetObjectRegistry(); + Internal::Stage* stage = Internal::Stage::GetCurrent(); + DALI_ASSERT_ALWAYS( stage && "GetObjectRegistry() : Stage is null" ); + Internal::ObjectRegistry& internal = stage->GetObjectRegistry(); return ObjectRegistry(&internal); } -DynamicsWorld Stage::InitializeDynamics(DynamicsWorldConfig config) -{ -#ifdef DYNAMICS_SUPPORT - Internal::DynamicsWorldConfigPtr configImpl( &(GetImplementation(config)) ); - - return DynamicsWorld( GetImplementation(*this).InitializeDynamics(configImpl).Get() ); -#else - return DynamicsWorld(); -#endif -} - -DynamicsWorld Stage::GetDynamicsWorld() -{ -#ifdef DYNAMICS_SUPPORT - return DynamicsWorld( GetImplementation(*this).GetDynamicsWorld().Get() ); -#else - return DynamicsWorld(); -#endif -} - -void Stage::TerminateDynamics() -{ -#ifdef DYNAMICS_SUPPORT - GetImplementation(*this).TerminateDynamics(); -#endif -} - void Stage::KeepRendering( float durationSeconds ) { GetImplementation(*this).KeepRendering( durationSeconds ); @@ -184,9 +146,21 @@ Stage::EventProcessingFinishedSignalType& Stage::EventProcessingFinishedSignal() Stage::TouchedSignalType& Stage::TouchedSignal() { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: TouchedSignal() is deprecated and will be removed from next release. Use TouchSignal() instead.\n" ); + return GetImplementation(*this).TouchedSignal(); } +Stage::TouchSignalType& Stage::TouchSignal() +{ + return GetImplementation( *this ).TouchSignal(); +} + +Stage::WheelEventSignalType& Stage::WheelEventSignal() +{ + return GetImplementation(*this).WheelEventSignal(); +} + Stage::ContextStatusSignal& Stage::ContextLostSignal() { return GetImplementation(*this).ContextLostSignal();