#include <dali/public-api/adaptor-framework/window.h>
#include <dali/public-api/adaptor-framework/key-grab.h>
#include <dali/devel-api/adaptor-framework/window-devel.h>
+#include <dali/internal/window-system/common/event-handler.h>
namespace Dali
{
{
namespace Adaptor
{
-class EventHandler;
class Orientation;
-class RotationObserver;
class WindowRenderSurface;
class WindowBase;
/**
* Window provides a surface to render onto with orientation & indicator properties.
*/
-class Window : public Dali::Internal::Adaptor::SceneHolder, public ConnectionTracker
+class Window : public Dali::Internal::Adaptor::SceneHolder, public EventHandler::Observer, public ConnectionTracker
{
public:
typedef Dali::Window::IndicatorSignalType IndicatorSignalType;
Dali::Layer GetLayer( uint32_t depth ) const;
/**
+ * @copydoc Dali::DevelWindow::GetRenderTaskList()
+ */
+ Dali::RenderTaskList GetRenderTaskList() const;
+
+ /**
* @copydoc Dali::Window::AddAvailableOrientation()
*/
void AddAvailableOrientation(Dali::Window::WindowOrientation orientation);
bool UngrabKeyList( const Dali::Vector< Dali::KEY >& key, Dali::Vector< bool >& result );
/**
- * Called from Orientation after the Change signal has been sent
- */
- void RotationDone( int orientation, int width, int height );
-
- /**
- * Set the rotation observer (note, some adaptors may not have a rotation observer)
- * @param[in] observer The rotation observer
- * @return If the rotation observer is set
- */
- bool SetRotationObserver( RotationObserver* observer );
-
- /**
* @copydoc Dali::DevelWindow::Get()
*/
static Dali::Window Get( Dali::Actor actor );
private: // Dali::Internal::Adaptor::SceneHolder
/**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::FeedTouchPoint
+ * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
*/
- void FeedTouchPoint( TouchPoint& point, int timeStamp ) override;
+ void OnAdaptorSet( Dali::Adaptor& adaptor ) override;
/**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::FeedWheelEvent
+ * @copydoc Dali::Internal::Adaptor::SceneHolder::OnSurfaceSet
*/
- void FeedWheelEvent( WheelEvent& wheelEvent ) override;
+ void OnSurfaceSet( Dali::RenderSurfaceInterface* surface ) override;
/**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::FeedKeyEvent
+ * @copydoc Dali::Internal::Adaptor::SceneHolder::OnPause
*/
- void FeedKeyEvent( KeyEvent& keyEvent ) override;
+ void OnPause() override;
/**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
+ * @copydoc Dali::Internal::Adaptor::SceneHolder::OnResume
*/
- void OnAdaptorSet( Dali::Adaptor& adaptor ) override;
+ void OnResume() override;
/**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::OnSurfaceSet
+ * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculateTouchPosition
*/
- void OnSurfaceSet( Dali::RenderSurfaceInterface* surface ) override;
+ void RecalculateTouchPosition( Integration::Point& point ) override;
+
+private: // Dali::Internal::Adaptor::EventHandler::Observer
/**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::OnPause
+ * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnTouchPoint
*/
- void OnPause() override;
+ void OnTouchPoint( Dali::Integration::Point& point, int timeStamp ) override;
/**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::OnResume
+ * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
*/
- void OnResume() override;
+ void OnWheelEvent( Dali::Integration::WheelEvent& wheelEvent ) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnKeyEvent
+ */
+ void OnKeyEvent( Dali::Integration::KeyEvent& keyEvent ) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnRotation
+ */
+ void OnRotation( const RotationEvent& rotation ) override;
public: // Signals
*/
Dali::DevelWindow::KeyEventSignalType& KeyEventSignal() { return mScene.KeyEventSignal(); };
+ /**
+ * @copydoc Dali::Window::KeyEventGeneratedSignal()
+ */
+ Dali::DevelWindow::KeyEventGeneratedSignalType& KeyEventGeneratedSignal() { return mScene.KeyEventGeneratedSignal(); };
+
/**
* @copydoc Dali::Window::TouchSignal()
*/
std::vector<Dali::Window::WindowOrientation> mAvailableOrientations;
Dali::Window::WindowOrientation mPreferredOrientation;
+ int mRotationAngle; ///< The angle of the rotation
+ int mWindowWidth; ///< The width of the window
+ int mWindowHeight; ///< The height of the window
+
EventHandlerPtr mEventHandler; ///< The window events handler
// Signals