X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fevents%2Fgesture-processor.h;h=ed430df67c06796835c9cb066b327efd45e02280;hb=f5888522257fb87367edaa0d8a08fc9a5fa42cce;hp=8b661b30633e728d9e5c4fab441594332e2ab44b;hpb=f8a75318dd2950c20fb8c6c9a6523fdb0e106030;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/events/gesture-processor.h b/dali/internal/event/events/gesture-processor.h index 8b661b3..ed430df 100644 --- a/dali/internal/event/events/gesture-processor.h +++ b/dali/internal/event/events/gesture-processor.h @@ -1,8 +1,8 @@ -#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. @@ -19,8 +19,10 @@ */ // INTERNAL INCLUDES +#include #include #include +#include #include namespace Dali @@ -36,6 +38,26 @@ namespace Internal */ 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 @@ -43,6 +65,11 @@ protected: /** * Protected constructor. Cannot create an instance of GestureProcessor */ + GestureProcessor( DevelGesture::Type type ); + + /** + * Protected constructor. Cannot create an instance of GestureProcessor + */ GestureProcessor( Gesture::Type type ); /** @@ -76,12 +103,12 @@ protected: /** * 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. @@ -161,9 +188,15 @@ private: */ 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 + DevelGesture::Type mType; ///< Type of GestureProcessor Actor* mCurrentGesturedActor; ///< The current actor that has been gestured. bool mGesturedActorDisconnected:1; ///< Indicates whether the gestured actor has been disconnected from the scene }; @@ -172,4 +205,4 @@ private: // Data } // namespace Dali -#endif // __DALI_INTERNAL_GESTURE_PROCESSOR_H__ +#endif // DALI_INTERNAL_GESTURE_PROCESSOR_H