GetImplementation( window ).SetPositionSize( positionSize );
}
+Window Get( Actor actor )
+{
+ return Internal::Adaptor::Window::Get( actor );
+}
+
EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window )
{
return GetImplementation( window ).EventProcessingFinishedSignal();
DALI_ADAPTOR_API void SetPositionSize( Window window, PositionSize positionSize );
/**
+ * @brief Retrieve the window that the given actor is added to.
+ *
+ * @param[in] actor The actor
+ * @return The window the actor is added to or an empty handle if the actor is not added to any window.
+ */
+DALI_ADAPTOR_API Window Get( Actor actor );
+
+/**
* @brief This signal is emitted just after the event processing is finished.
*
* @param[in] window The window instance
return false;
}
+Dali::Internal::Adaptor::SceneHolder* Adaptor::GetWindow( Dali::Actor& actor )
+{
+ Dali::Integration::Scene scene = Dali::Integration::Scene::Get( actor );
+
+ for( auto window : mWindows )
+ {
+ if ( scene == window->GetScene() )
+ {
+ return window.Get();
+ }
+ }
+
+ return nullptr;
+}
+
Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions)
: mResizedSignal(),
mLanguageChangedSignal(),
*/
bool RemoveWindow( Dali::Internal::Adaptor::SceneHolder* childWindow );
+ /**
+ * @brief Retrieve the window that the given actor is added to.
+ *
+ * @param[in] actor The actor
+ * @return The window the actor is added to or a null pointer if the actor is not added to any widnow.
+ */
+ Dali::Internal::Adaptor::SceneHolder* GetWindow( Dali::Actor& actor );
+
public:
/**
return false;
}
+Dali::Window Window::Get( Dali::Actor actor )
+{
+ Internal::Adaptor::Window* windowImpl = nullptr;
+
+ if ( Internal::Adaptor::Adaptor::IsAvailable() )
+ {
+ Dali::Internal::Adaptor::Adaptor& adaptor = Internal::Adaptor::Adaptor::GetImplementation( Internal::Adaptor::Adaptor::Get() );
+ windowImpl = static_cast<Internal::Adaptor::Window*>( adaptor.GetWindow( actor ) );
+ }
+
+ return Dali::Window( windowImpl );
+}
} // Adaptor
*/
bool SetRotationObserver( RotationObserver* observer );
+ /**
+ * @copydoc Dali::DevelWindow::Get()
+ */
+ static Dali::Window Get( Dali::Actor actor );
+
public: // Dali::Internal::Adaptor::SceneHolder
/**