1 #ifndef DALI_INTERNAL_HOVER_EVENT_PROCESSOR_H
2 #define DALI_INTERNAL_HOVER_EVENT_PROCESSOR_H
5 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/internal/event/events/actor-observer.h>
23 #include <dali/internal/event/render-tasks/render-task-impl.h>
42 * <h3>Multi-Hover Event Processing:</h3>
44 * The HoverEventProcessor processes hover events and emits the Hovered signal on the hit actor (and
47 * - Hit Testing & Hover Event Delivery are described in Dali::Actor.
49 class HoverEventProcessor
53 * Create an event processor.
54 * @param[in] scene The scene the event processor belongs to.
56 HoverEventProcessor(Scene& scene);
59 * Non-virtual destructor; HoverEventProcessor is not a base class
61 ~HoverEventProcessor();
64 * This function is called by the event processor whenever a hover event occurs.
65 * @param[in] event The hover event that has occurred.
67 void ProcessHoverEvent(const Integration::HoverEvent& event);
70 * This function is called when sending a interrupted hover event to a specific actor.
71 * @param[in] actor The actor on which the hover event should occur.
73 void SendInterruptedHoverEvent(Dali::Internal::Actor* actor);
75 // Movable but not copyable
76 HoverEventProcessor(const HoverEventProcessor&) = delete;
77 HoverEventProcessor(HoverEventProcessor&&) = default;
78 HoverEventProcessor& operator=(const HoverEventProcessor&) = delete;
79 HoverEventProcessor& operator=(HoverEventProcessor&&) = default;
88 * Called by some actor-observers when the observed actor is disconnected.
89 * @param[in] actor The actor that has been disconnected.
91 void OnObservedActorDisconnected(Dali::Internal::Actor* actor);
93 Scene& mScene; ///< Reference to the scene
94 ActorObserver mLastPrimaryHitActor; ///< Stores the last primary point hit actor
95 ActorObserver mLastConsumedActor; ///< Stores the last consumed actor
96 ActorObserver mHoverStartConsumedActor; ///< Stores the hover-start consumed actor
97 RenderTaskPtr mLastRenderTask; ///< The RenderTask used for the last hit actor
98 std::list<Dali::Internal::Actor*> mCandidateActorLists; ///< Stores a list of actors that can be touched, from leaf actor to root.
99 std::list<Dali::Internal::Actor*> mLastActorLists; ///< Stores a list of actors that can be touched, from leaf actor to root.
104 } // namespace Internal
108 #endif // DALI_INTERNAL_HOVER_EVENT_PROCESSOR_H