// EXTERNAL INCLUDES
#include <memory>
+#include <vector>
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/common/intrusive-ptr.h>
-
-// INTERNAL INCLUDES
-#include <dali/integration-api/scene-holder.h>
#include <dali/integration-api/scene.h>
+#include <dali/integration-api/events/key-event-integ.h>
+#include <dali/integration-api/events/point.h>
+#include <dali/integration-api/events/touch-event-combiner.h>
+// INTERNAL INCLUDES
#ifdef DALI_ADAPTOR_COMPILATION
#include <dali/integration-api/render-surface-interface.h>
+#include <dali/integration-api/scene-holder.h>
#else
#include <dali/integration-api/adaptors/render-surface-interface.h>
+#include <dali/integration-api/adaptors/scene-holder.h>
#endif
-#include <dali/internal/adaptor/common/adaptor-impl.h>
-
namespace Dali
{
{
class Scene;
+struct Point;
+struct KeyEvent;
+struct WheelEvent;
}
namespace Adaptor
{
+class Adaptor;
class SceneHolder;
using SceneHolderPtr = IntrusivePtr< SceneHolder >;
*/
void Resume();
-public: // The following methods can be overridden if required
-
/**
- * @brief Returns whether the Scene is visible or not.
- * @return True if the Scene is visible, false otherwise.
+ * @copydoc Dali::Integration::SceneHolder::FeedTouchPoint
*/
- virtual bool IsVisible() const;
-
-public: // The following methods must be overridden
+ void FeedTouchPoint( Dali::Integration::Point& point, int timeStamp );
/**
- * @copydoc Dali::Integration::SceneHolder::GetNativeHandle
+ * @copydoc Dali::Integration::SceneHolder::FeedWheelEvent
*/
- virtual Dali::Any GetNativeHandle() const = 0;
+ void FeedWheelEvent( Dali::Integration::WheelEvent& wheelEvent );
/**
- * @copydoc Dali::Integration::SceneHolder::FeedTouchPoint
+ * @copydoc Dali::Integration::SceneHolder::FeedKeyEvent
*/
- virtual void FeedTouchPoint( Dali::TouchPoint& point, int timeStamp ) = 0;
+ void FeedKeyEvent( Dali::Integration::KeyEvent& keyEvent );
+
+public: // The following methods can be overridden if required
/**
- * @copydoc Dali::Integration::SceneHolder::FeedWheelEvent
+ * @brief Returns whether the Scene is visible or not.
+ * @return True if the Scene is visible, false otherwise.
*/
- virtual void FeedWheelEvent( Dali::WheelEvent& wheelEvent ) = 0;
+ virtual bool IsVisible() const;
+
+public: // The following methods must be overridden
/**
- * @copydoc Dali::Integration::SceneHolder::FeedKeyEvent
+ * @copydoc Dali::Integration::SceneHolder::GetNativeHandle
*/
- virtual void FeedKeyEvent( Dali::KeyEvent& keyEvent ) = 0;
+ virtual Dali::Any GetNativeHandle() const = 0;
protected:
*/
virtual void OnResume() {};
+ /**
+ * Recalculate the touch position if required
+ * @param[in,out] point The touch point
+ */
+ virtual void RecalculateTouchPosition( Integration::Point& point ) {};
+
+private:
+
+ /**
+ * Resets the event handling.
+ */
+ void Reset();
+
private:
static uint32_t mSceneHolderCounter; ///< A counter to track the SceneHolder creation
std::unique_ptr< Dali::RenderSurfaceInterface > mSurface; ///< The window rendering surface
Adaptor* mAdaptor; ///< The adaptor
+ Dali::Integration::TouchEventCombiner mCombiner; ///< Combines multi-touch events.
+
bool mAdaptorStarted:1; ///< Whether the adaptor has started or not
bool mVisible:1; ///< Whether the scene is visible or not
};