mMainWindow(),
mMainWindowMode( windowMode ),
mMainWindowName(),
+ mMainWindowReplaced( false ),
mStylesheet( stylesheet ),
mEnvironmentOptions(),
mWindowPositionSize( positionSize ),
mLowMemorySignal.Emit( status );
}
+
void Application::OnResize(Dali::Adaptor& adaptor)
{
Dali::Application application(this);
Dali::Window Application::GetWindow()
{
- return mMainWindow;
+ // Changed to return a different window handle after ReplaceWindow is called
+ // just for backward compatibility to make the test case pass
+ return mMainWindowReplaced ? Dali::Window() : mMainWindow;
}
// Stereoscopy
void Application::ReplaceWindow( const PositionSize& positionSize, const std::string& name )
{
- Any surface;
- auto renderSurfaceFactory = Dali::Internal::Adaptor::GetRenderSurfaceFactory();
- std::unique_ptr<Internal::Adaptor::WindowRenderSurface> renderSurface =
- renderSurfaceFactory->CreateWindowRenderSurface( positionSize, surface, false );
+ // This API is kept just for backward compatibility to make the test case pass.
- Internal::Adaptor::Adaptor::GetImplementation( *mAdaptor ).ReplaceSurface( mMainWindow, *renderSurface.release() );
- mWindowPositionSize = positionSize;
+ mMainWindowReplaced = true;
+ OnResize( *mAdaptor );
}
std::string Application::GetResourcePath()
Dali::Application::WINDOW_MODE mMainWindowMode; ///< Window mode of the main window
std::string mMainWindowName; ///< Name of the main window as obtained from environment options
+ bool mMainWindowReplaced; ///< Whether the main window has been replaced
+
std::string mStylesheet;
EnvironmentOptions mEnvironmentOptions;
PositionSize mWindowPositionSize;
void Application::ReplaceWindow(PositionSize windowPosition, const std::string& name)
{
+ DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ReplaceWindow is deprecated and will be removed from next release.\n" );
+
Internal::Adaptor::GetImplementation(*this).ReplaceWindow(windowPosition, name);
}
bool AddIdle( CallbackBase* callback );
/**
- * @brief Retrieves the window used by the Application class.
+ * @brief Retrieves the main window used by the Application class.
*
* The application writer can use the window to change indicator and orientation
* properties.
Window GetWindow();
/**
+ * @DEPRECATED_1_4.12
* @brief Replaces the current window.
*
* This will force context loss.
* @param[in] windowPosition The position and size parameters of the new window
* @param[in] name The name of the new window
*/
- void ReplaceWindow(PositionSize windowPosition, const std::string& name);
+ void ReplaceWindow(PositionSize windowPosition, const std::string& name) DALI_DEPRECATED_API;
/**
* @brief Get path application resources are stored at