-#ifndef __DALI_INTERNAL_GESTURE_PROCESSOR_H__
-#define __DALI_INTERNAL_GESTURE_PROCESSOR_H__
+#ifndef DALI_INTERNAL_GESTURE_PROCESSOR_H
+#define DALI_INTERNAL_GESTURE_PROCESSOR_H
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali/internal/event/events/gesture-detector-impl.h>
#include <dali/internal/event/events/hit-test-algorithm-impl.h>
+#include <dali/internal/event/events/gesture-recognizer.h>
#include <dali/internal/event/common/object-impl.h>
namespace Dali
*/
class GestureProcessor : public Object::Observer
{
+public:
+
+ /**
+ * Process the touch event in the attached recognizer
+ * @param[in] scene Scene.
+ * @param[in] event Touch event to process
+ */
+ void ProcessTouch( Scene& scene, const Integration::TouchEvent& event );
+
+ /**
+ * Returns whether any GestureDetector requires a Core::Update
+ * @return true if update required
+ */
+ inline bool NeedsUpdate()
+ {
+ bool updateRequired = mNeedsUpdate;
+ mNeedsUpdate = false;
+ return updateRequired;
+ }
+
protected:
// Construction & Destruction
/**
* Hit test the screen coordinates, and place the results in hitTestResults.
- * @param[in] stage Stage.
+ * @param[in] scene Scene.
* @param[in] screenCoordinates The screen coordinates to test.
* @param[out] hitTestResults Structure to write results into.
* @return false if the system overlay was hit or no actor was hit.
*/
- virtual bool HitTest(Stage& stage, Vector2 screenCoordinates, HitTestAlgorithm::Results& hitTestResults);
+ virtual bool HitTest( Scene& scene, Vector2 screenCoordinates, HitTestAlgorithm::Results& hitTestResults);
/**
* Sets the mCurrentGesturedActor and connects to the required signals.
*/
virtual void ObjectDestroyed(Object& object);
+
+protected: //Data
+
+ GestureRecognizerPtr mGestureRecognizer; ///< The gesture recognizer
+ bool mNeedsUpdate; ///< Indicates if any GestureDetector requires a Core::Update
+
private: // Data
Gesture::Type mType; ///< Type of GestureProcessor
} // namespace Dali
-#endif // __DALI_INTERNAL_GESTURE_PROCESSOR_H__
+#endif // DALI_INTERNAL_GESTURE_PROCESSOR_H