-#ifndef __DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H__
-#define __DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H__
+#ifndef DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H
+#define DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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/actor-observer.h>
#include <dali/internal/event/render-tasks/render-task-impl.h>
+#include <dali/public-api/events/point-state.h>
namespace Dali
{
-
class Actor;
struct Vector2;
struct Vector4;
namespace Internal
{
-
class Actor;
-class Stage;
+class Scene;
struct ActorObserver;
/**
class TouchEventProcessor
{
public:
-
/**
* Create an event processor.
- * @param[in] stage The stage.
+ * @param[in] scene The scene the event processor belongs to.
*/
- TouchEventProcessor( Stage& stage );
+ TouchEventProcessor(Scene& scene);
/**
* Non-virtual destructor; TouchEventProcessor is not a base class
/**
* This function is called by the event processor whenever a touch event occurs.
* @param[in] event The touch event that has occurred.
+ * @return true if consumed
*/
- void ProcessTouchEvent( const Integration::TouchEvent& event );
+ bool ProcessTouchEvent(const Integration::TouchEvent& event);
private:
-
// Undefined
TouchEventProcessor(const TouchEventProcessor&);
// Undefined
TouchEventProcessor& operator=(const TouchEventProcessor& rhs);
+private:
+ Scene& mScene; ///< Used to deliver touch events
+
/**
* Called by some actor-observers when the observed actor is disconnected.
*
* @param[in] actor The actor that has been disconnected.
*/
- void OnObservedActorDisconnected( Actor* actor );
-
-private:
+ void OnObservedActorDisconnected(Actor* actor);
- Stage& mStage; ///< Used to deliver touch events
- ActorObserver mLastPrimaryHitActor; ///< Stores the last primary point hit actor
- ActorObserver mLastConsumedActor; ///< Stores the last consumed actor
- ActorObserver mTouchDownConsumedActor; ///< Stores the touch-down consumed actor
- RenderTaskPtr mLastRenderTask; ///< The RenderTask used for the last hit actor
+ /**
+ * Clears the value.
+ */
+ void Clear();
+
+ ActorObserver mLastPrimaryHitActor; ///< Stores the last primary point hit actor
+ ActorObserver mLastConsumedActor; ///< Stores the last consumed actor
+ ActorObserver mCapturingTouchActor; ///< Stored the actor that captures touch
+ ActorObserver mOwnTouchActor; ///< Stored the actor that own touch
+ ActorObserver mTouchDownConsumedActor; ///< Stores the touch-down consumed actor
+ RenderTaskPtr mLastRenderTask; ///< The RenderTask used for the last hit actor
+ PointState::Type mLastPrimaryPointState; ///< Stores the last primary point state
};
} // namespace Internal
} // namespace Dali
-#endif // __DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H__
+#endif // DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H