#endif
// INTERNAL INCLUDES
+#include <dali/internal/adaptor/common/adaptor-impl.h>
#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;
typedef Dali::Window::FocusSignalType FocusSignalType;
typedef Dali::Window::ResizedSignalType ResizedSignalType;
+ typedef Dali::Window::FocusChangeSignalType FocusChangeSignalType;
+ typedef Dali::Window::ResizeSignalType ResizeSignalType;
+ typedef Dali::DevelWindow::TransitionEffectEventSignalType TransitionEffectEventSignalType;
typedef Signal< void () > SignalType;
/**
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
+ * @copydoc Dali::DevelWindow::Get()
+ */
+ static Dali::Window Get( Dali::Actor actor );
+
+ /**
+ * @copydoc Dali::DevelWindow::SetParent()
*/
- void RotationDone( int orientation, int width, int height );
+ void SetParent( Dali::Window& parent );
/**
- * 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
+ * @copydoc Dali::DevelWindow::Unparent()
*/
- bool SetRotationObserver( RotationObserver* observer );
+ void Unparent();
+
+ /**
+ * @copydoc Dali::DevelWindow::GetParent()
+ */
+ Dali::Window GetParent();
public: // Dali::Internal::Adaptor::SceneHolder
*/
void OnDeleteRequest();
-private: // Dali::Internal::Adaptor::SceneHolder
-
/**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::FeedTouchPoint
+ * Called when the window receives a Transition effect-start/end event.
*/
- void FeedTouchPoint( TouchPoint& point, int timeStamp ) override;
+ void OnTransitionEffectEvent( DevelWindow::EffectState state, DevelWindow::EffectType type );
- /**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::FeedWheelEvent
- */
- void FeedWheelEvent( WheelEvent& wheelEvent ) override;
-
- /**
- * @copydoc Dali::Internal::Adaptor::SceneHolder::FeedKeyEvent
- */
- void FeedKeyEvent( KeyEvent& keyEvent ) override;
+private: // Dali::Internal::Adaptor::SceneHolder
/**
* @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
*/
void OnResume() override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculateTouchPosition
+ */
+ void RecalculateTouchPosition( Integration::Point& point ) override;
+
+private: // Dali::Internal::Adaptor::EventHandler::Observer
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnTouchPoint
+ */
+ void OnTouchPoint( Dali::Integration::Point& point, int timeStamp ) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
+ */
+ 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
/**
FocusSignalType& FocusChangedSignal() { return mFocusChangedSignal; }
/**
+ * @copydoc Dali::Window::WindowFocusChangedSignal()
+ */
+ FocusChangeSignalType& FocusChangeSignal() { return mFocusChangeSignal; }
+ /**
* @copydoc Dali::Window::ResizedSignal()
*/
ResizedSignalType& ResizedSignal() { return mResizedSignal; }
+ /**
+ * @copydoc Dali::Window::ResizedSignal()
+ */
+ ResizeSignalType& ResizeSignal() { return mResizeSignal; }
/**
* This signal is emitted when the window is requesting to be deleted
/**
* @copydoc Dali::Window::SignalEventProcessingFinished()
*/
- Dali::DevelWindow::EventProcessingFinishedSignalType& EventProcessingFinishedSignal() { return mScene.EventProcessingFinishedSignal(); };
+ Dali::DevelWindow::EventProcessingFinishedSignalType& EventProcessingFinishedSignal() { return mScene.EventProcessingFinishedSignal(); }
/**
- * @copydoc Dali::Window::KeyEventSignal()
+ * @copydoc Dali::DevelWindow::TransitionEffectEventSignal()
*/
- Dali::DevelWindow::KeyEventSignalType& KeyEventSignal() { return mScene.KeyEventSignal(); };
-
- /**
- * @copydoc Dali::Window::TouchSignal()
- */
- Dali::DevelWindow::TouchSignalType& TouchSignal() { return mScene.TouchSignal(); };
-
- /**
- * @copydoc Dali::Window::WheelEventSignal()
- */
- Dali::DevelWindow::WheelEventSignalType& WheelEventSignal() { return mScene.WheelEventSignal(); };
+ TransitionEffectEventSignalType& TransitionEffectEventSignal() { return mTransitionEffectEventSignal; }
private:
bool mOpaqueState:1;
bool mResizeEnabled:1;
Dali::Window::Type mType;
+ Dali::Window mParentWindow;
OrientationPtr mOrientation;
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
FocusSignalType mFocusChangedSignal;
ResizedSignalType mResizedSignal;
SignalType mDeleteRequestSignal;
-
-
+ FocusChangeSignalType mFocusChangeSignal;
+ ResizeSignalType mResizeSignal;
+ TransitionEffectEventSignalType mTransitionEffectEventSignal;
};
} // namespace Adaptor