* @param[in] window The window instance
* @return A valid handle to a RenderTaskList
*/
-Dali::RenderTaskList GetRenderTaskList( Window window );
+DALI_ADAPTOR_API Dali::RenderTaskList GetRenderTaskList( Window window );
/**
* @brief Retrieve the window that the given actor is added to.
class RenderSurfaceInterface;
+using WindowContainer = std::vector<Window>;
+
namespace Integration
{
class SceneHolder;
public:
typedef Signal< void (Adaptor&) > AdaptorSignalType; ///< Generic Type for adaptor signals
+ typedef Signal< void (Window&) > WindowCreatedSignalType; ///< Window created signal type
public:
/**
*/
void UnregisterProcessor( Integration::Processor& processor );
+ /**
+ * @brief Get the list of windows created.
+ * @return The list of windows
+ */
+ Dali::WindowContainer GetWindows() const;
+
public: // Signals
/**
*/
AdaptorSignalType& LanguageChangedSignal();
+ /**
+ * @brief This signal is emitted when a new window is created
+ *
+ * @return The signal to connect to
+ */
+ WindowCreatedSignalType& WindowCreatedSignal();
+
private:
// Undefined
defaultWindow->SetAdaptor( Get() );
+ Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( ( &defaultWindow )->Get() ) );
+ if ( window )
+ {
+ mWindowCreatedSignal.Emit( window );
+ }
+
const unsigned int timeInterval = mEnvironmentOptions->GetObjectProfilerInterval();
if( 0u < timeInterval )
{
// Add the new Window to the container - the order is not important
mWindows.push_back( SceneHolderPtr( &windowImpl ) );
+
+ Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( &windowImpl ) );
+ if ( window )
+ {
+ mWindowCreatedSignal.Emit( window );
+ }
+
return true;
}
return nullptr;
}
+Dali::WindowContainer Adaptor::GetWindows() const
+{
+ Dali::WindowContainer windows;
+
+ for ( auto iter = mWindows.begin(); iter != mWindows.end(); ++iter )
+ {
+ // Downcast to Dali::Window
+ Dali::Window window( dynamic_cast<Dali::Internal::Adaptor::Window*>( iter->Get() ) );
+ if ( window )
+ {
+ windows.push_back( window );
+ }
+ }
+
+ return windows;
+}
+
Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions)
: mResizedSignal(),
mLanguageChangedSignal(),
+ mWindowCreatedSignal(),
mAdaptor( adaptor ),
mState( READY ),
mCore( nullptr ),
{
public:
- typedef Dali::Adaptor::AdaptorSignalType AdaptorSignalType;
+ using AdaptorSignalType = Dali::Adaptor::AdaptorSignalType;
+ using WindowCreatedSignalType = Dali::Adaptor::WindowCreatedSignalType;
- typedef Uint16Pair SurfaceSize; ///< Surface size type
+ using SurfaceSize = Uint16Pair; ///< Surface size type
/**
* Creates a New Adaptor
*/
Dali::Internal::Adaptor::SceneHolder* GetWindow( Dali::Actor& actor );
+ /**
+ * @copydoc Dali::Adaptor::GetWindows()
+ */
+ Dali::WindowContainer GetWindows() const;
+
public:
/**
return mLanguageChangedSignal;
}
+ /**
+ * @copydoc Dali::Adaptor::WindowCreatedSignal
+ */
+ WindowCreatedSignalType& WindowCreatedSignal()
+ {
+ return mWindowCreatedSignal;
+ }
+
public: // From Dali::Internal::Adaptor::CoreEventInterface
/**
AdaptorSignalType mResizedSignal; ///< Resized signal.
AdaptorSignalType mLanguageChangedSignal; ///< Language changed signal.
+ WindowCreatedSignalType mWindowCreatedSignal; ///< Window created signal.
Dali::Adaptor& mAdaptor; ///< Reference to public adaptor instance.
State mState; ///< Current state of the adaptor
return mImpl->LanguageChangedSignal();
}
+Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal()
+{
+ return mImpl->WindowCreatedSignal();
+}
+
Dali::RenderSurfaceInterface& Adaptor::GetSurface()
{
return mImpl->GetSurface();
mImpl->UnregisterProcessor( processor );
}
+Dali::WindowContainer Adaptor::GetWindows() const
+{
+ return mImpl->GetWindows();
+}
+
Adaptor::Adaptor()
: mImpl( NULL )
{