Revert "[Tizen] Not execute the remove callback"
[platform/core/uifw/dali-core.git] / dali / internal / event / events / hover-event-processor.h
1 #ifndef DALI_INTERNAL_HOVER_EVENT_PROCESSOR_H
2 #define DALI_INTERNAL_HOVER_EVENT_PROCESSOR_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/event/events/actor-observer.h>
23 #include <dali/internal/event/render-tasks/render-task-impl.h>
24
25 namespace Dali
26 {
27 class Actor;
28 struct Vector2;
29 struct Vector4;
30
31 namespace Integration
32 {
33 struct HoverEvent;
34 }
35
36 namespace Internal
37 {
38 struct ActorObserver;
39 class Scene;
40
41 /**
42  * <h3>Multi-Hover Event Processing:</h3>
43  *
44  * The HoverEventProcessor processes hover events and emits the Hovered signal on the hit actor (and
45  * its parents).
46  *
47  * - Hit Testing & Hover Event Delivery are described in Dali::Actor.
48  */
49 class HoverEventProcessor
50 {
51 public:
52   /**
53    * Create an event processor.
54    * @param[in] scene The scene the event processor belongs to.
55    */
56   HoverEventProcessor(Scene& scene);
57
58   /**
59    * Non-virtual destructor; HoverEventProcessor is not a base class
60    */
61   ~HoverEventProcessor();
62
63   /**
64    * This function is called by the event processor whenever a hover event occurs.
65    * @param[in] event The hover event that has occurred.
66    */
67   void ProcessHoverEvent(const Integration::HoverEvent& event);
68
69 private:
70   // Undefined
71   HoverEventProcessor(const HoverEventProcessor&);
72
73   // Undefined
74   HoverEventProcessor& operator=(const HoverEventProcessor& rhs);
75
76   Scene&        mScene;                   ///< Reference to the scene
77   ActorObserver mLastPrimaryHitActor;     ///< Stores the last primary point hit actor
78   ActorObserver mLastConsumedActor;       ///< Stores the last consumed actor
79   ActorObserver mHoverStartConsumedActor; ///< Stores the hover-start consumed actor
80   RenderTaskPtr mLastRenderTask;          ///< The RenderTask used for the last hit actor
81 };
82
83 } // namespace Internal
84
85 } // namespace Dali
86
87 #endif // DALI_INTERNAL_HOVER_EVENT_PROCESSOR_H