1 #ifndef DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H
2 #define DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H
5 * Copyright (c) 2020 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>
45 * <h3>Multi-Touch Event Processing:</h3>
47 * The TouchEventProcessor processes touch events and emits the Touched signal on the hit actor (and
50 * - Hit Testing & Touch Event Delivery are described in Dali::Actor.
52 class TouchEventProcessor
57 * Create an event processor.
58 * @param[in] scene The scene the event processor belongs to.
60 TouchEventProcessor( Scene& scene );
63 * Non-virtual destructor; TouchEventProcessor is not a base class
65 ~TouchEventProcessor();
68 * This function is called by the event processor whenever a touch event occurs.
69 * @param[in] event The touch event that has occurred.
70 * @return true if consumed
72 bool ProcessTouchEvent( const Integration::TouchEvent& event );
77 TouchEventProcessor(const TouchEventProcessor&);
80 TouchEventProcessor& operator=(const TouchEventProcessor& rhs);
84 Scene& mScene; ///< Used to deliver touch events
87 * Called by some actor-observers when the observed actor is disconnected.
89 * @param[in] actor The actor that has been disconnected.
91 void OnObservedActorDisconnected( Actor* actor );
93 ActorObserver mLastPrimaryHitActor; ///< Stores the last primary point hit actor
94 ActorObserver mLastConsumedActor; ///< Stores the last consumed actor
95 ActorObserver mCapturingTouchActor; ///< Stored the actor that captures touch
96 ActorObserver mTouchDownConsumedActor; ///< Stores the touch-down consumed actor
97 RenderTaskPtr mLastRenderTask; ///< The RenderTask used for the last hit actor
100 } // namespace Internal
104 #endif // DALI_INTERNAL_TOUCH_EVENT_PROCESSOR_H