// INTERNAL INCLUDES
#include <dali/integration-api/adaptor.h>
+#include <dali/integration-api/scene.h>
#include <dali/public-api/adaptor-framework/tts-player.h>
#include <dali/devel-api/adaptor-framework/clipboard.h>
#include <dali/internal/system/common/core-event-interface.h>
#include <dali/internal/input/common/drag-and-drop-detector-impl.h>
#include <dali/internal/window-system/common/damage-observer.h>
+#include <dali/internal/window-system/common/window-impl.h>
#include <dali/internal/window-system/common/window-visibility-observer.h>
#include <dali/internal/system/common/kernel-trace.h>
#include <dali/internal/system/common/system-trace.h>
namespace Dali
{
-class RenderSurface;
+class RenderSurfaceInterface;
class Window;
namespace Integration
{
class Core;
class GlAbstraction;
+class Processor;
}
namespace Internal
{
class DisplayConnection;
class GraphicsFactory;
-class EventHandler;
class GestureManager;
class GlImplementation;
class GlSyncImplementation;
class CallbackManager;
class FeedbackPluginProxy;
class FeedbackController;
-class RotationObserver;
class VSyncMonitor;
class PerformanceInterface;
class LifeCycleObserver;
/**
* Creates a New Adaptor
- * @param[in] nativeWindow Native window handle
+ * @param[in] window The window handle
* @param[in] surface A render surface can be one of the following
* - Pixmap, adaptor will use existing Pixmap to draw on to
* - Window, adaptor will use existing Window to draw on to
* @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
- static Dali::Adaptor* New( Any nativeWindow,
- RenderSurface* surface,
+ static Dali::Adaptor* New( Dali::Window window,
+ Dali::RenderSurfaceInterface* surface,
Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* Creates a New Adaptor
- * @param[in] nativeWindow native window handle
+ * @param[in] window The window handle
* @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
/**
* Creates a New Adaptor
* @param[in] graphicsFactory A factory that creates the graphics interface
- * @param[in] nativeWindow Native window handle
+ * @param[in] window The window handle
* @param[in] surface A render surface can be one of the following
* - Pixmap, adaptor will use existing Pixmap to draw on to
* - Window, adaptor will use existing Window to draw on to
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
- Any nativeWindow,
- RenderSurface* surface,
+ Dali::Window window,
+ Dali::RenderSurfaceInterface* surface,
Dali::Configuration::ContextLoss configuration,
EnvironmentOptions* environmentOptions );
/**
* Creates a New Adaptor
* @param[in] graphicsFactory A factory that creates the graphics interface
- * @param[in] nativeWindow native window handle
+ * @param[in] window The window handle
* @param[in] configuration The context loss configuration ( to choose resource discard policy )
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
/**
* @copydoc AdaptorInterface::ReplaceSurface()
*/
- virtual void ReplaceSurface( Any nativeWindow, RenderSurface& surface );
+ virtual void ReplaceSurface( Dali::Window window, Dali::RenderSurfaceInterface& surface );
/**
* @copydoc Dali::Adaptor::GetSurface()
*/
- virtual RenderSurface& GetSurface() const;
+ virtual Dali::RenderSurfaceInterface& GetSurface() const;
/**
* @copydoc Dali::Adaptor::ReleaseSurfaceLock()
*/
void SetPreRenderCallback( CallbackBase* callback );
+ /**
+ * Removes an existing Window instance from the Adaptor
+ * @param[in] childWindow The Window instance
+ */
+ bool RemoveWindow( Dali::Internal::Adaptor::Window* childWindow );
+
public:
/**
void SetDragAndDropDetector( DragAndDropDetectorPtr detector );
/**
- * Sets a rotation observer, or set to NULL to remove.
- * @pre Adaptor::Start() has been called ( to create EventHandler )
- * @param[in] observer The observer to listen for window rotation events
- */
- void SetRotationObserver( RotationObserver* observer );
-
- /**
* Destroy the TtsPlayer of specific mode.
* @param[in] mode The mode of TtsPlayer to destroy
*/
void RequestUpdateOnce();
/**
- * Request adaptor to update indicator's height
- */
- void IndicatorSizeChanged(int height);
-
- /**
* @copydoc Dali::Adaptor::NotifySceneCreated()
*/
void NotifySceneCreated();
/**
* Informs core the surface size has changed
*/
- void SurfaceResizePrepare( SurfaceSize surfaceSize );
+ void SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize );
/**
* Informs ThreadController the surface size has changed
*/
- void SurfaceResizeComplete( SurfaceSize surfaceSize );
+ void SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize );
/**
* Sets layout direction of root by system language
*/
const LogFactoryInterface& GetLogFactory();
+ /**
+ * @copydoc Dali::Adaptor::RegisterProcessor
+ */
+ void RegisterProcessor( Integration::Processor& processor );
+
+ /**
+ * @coydoc Dali::Adaptor::UnregisterProcessor
+ */
+ void UnregisterProcessor( Integration::Processor& processor );
+
public: //AdaptorInternalServices
/**
/**
* @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetRenderSurfaceInterface()
*/
- virtual RenderSurface* GetRenderSurfaceInterface();
+ virtual Dali::RenderSurfaceInterface* GetRenderSurfaceInterface();
/**
* @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetVSyncMonitorInterface()
return mLanguageChangedSignal;
}
+ /**
+ * Gets the gesture manager.
+ * @return The GestureManager
+ */
+ GestureManager* GetGestureManager() const
+ {
+ return mGestureManager;
+ }
+
private: // From Dali::Internal::Adaptor::CoreEventInterface
/**
* Assigns the render surface to the adaptor
*
*/
- void SetSurface(RenderSurface *surface);
+ void SetSurface(Dali::RenderSurfaceInterface *surface);
/**
* called after surface is created
/**
* Constructor
- * @param[in] nativeWindow native window handle
+ * @param[in] window window handle
* @param[in] adaptor The public adaptor
* @param[in] surface A render surface can be one of the following
* - Pixmap, adaptor will use existing Pixmap to draw on to
* - Window, adaptor will use existing Window to draw on to
* @param[in] environmentOptions A pointer to the environment options. If NULL then one is created.
*/
- Adaptor( Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surface, EnvironmentOptions* environmentOptions );
+ Adaptor( Dali::Window window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions );
private: // Types
STOPPED, ///< Adaptor has been stopped.
};
- // A structure to encapsulate each Window instance for the Adaptor to track them
- typedef struct WindowPane
- {
- Dali::Window* instance; ///< Window object
- std::string window_name; ///< Name (title)_of the window
- std::string class_name; ///< Class name that the window belongs to
- bool window_mode; ///< Display mode of the window
- Any nativeWindow; ///< window identifier
- RenderSurface* surface; ///< The surface the Window is bound to
- } WindowPane;
-
- typedef std::vector<WindowPane> WindowFrames;
-
- typedef std::vector<LifeCycleObserver*> ObserverContainer;
+ using WindowPtr = IntrusivePtr< Window >;
+ using WindowContainer = std::vector<WindowPtr>;
+ using ObserverContainer = std::vector<LifeCycleObserver*>;
private: // Data
GraphicsInterface* mGraphics; ///< Graphics interface
Dali::DisplayConnection* mDisplayConnection; ///< Display connection
- WindowFrames mWindowFrame; ///< A container of all the Windows that are currently created
+ WindowContainer mWindows; ///< A container of all the Windows that are currently created
TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction; ///< Platform abstraction
- EventHandler* mEventHandler; ///< event handler
CallbackManager* mCallbackManager; ///< Used to install callbacks
bool mNotificationOnIdleInstalled; ///< whether the idle handler is installed to send an notification event
TriggerEventInterface* mNotificationTrigger; ///< Notification event trigger
Dali::TtsPlayer mTtsPlayers[Dali::TtsPlayer::MODE_NUM]; ///< Provides TTS support
ObserverContainer mObservers; ///< A list of adaptor observer pointers
DragAndDropDetectorPtr mDragAndDropDetector; ///< The Drag & Drop detector
- RotationObserver* mDeferredRotationObserver; ///< deferred Rotation observer needs event handler
EnvironmentOptions* mEnvironmentOptions; ///< environment options
PerformanceInterface* mPerformanceInterface; ///< Performance interface
KernelTrace mKernelTracer; ///< Kernel tracer