1 #ifndef __DALI_INTERNAL_EVENT_PROCESSOR_H__
2 #define __DALI_INTERNAL_EVENT_PROCESSOR_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
21 #include <dali/internal/event/events/touch-event-processor.h>
22 #include <dali/internal/event/events/key-event-processor.h>
23 #include <dali/internal/event/events/mouse-wheel-event-processor.h>
24 #include <dali/internal/common/message-buffer.h>
39 class GestureEventProcessor;
40 class NotificationManager;
43 * The EventProcessor processes any events that are received by Dali. Such events include
44 * touch events, key events, mouse wheel events, and notification events.
46 * When the EventProcessor receives an event, it determines its type and passes it on to the
47 * appropriate processor.
55 * @param[in] stage The stage.
56 * @param[in] notificationManager The Notification Manager.
57 * @param[in] gestureEventProcessor The gesture event processor.
59 EventProcessor(Stage& stage, NotificationManager& notificationManager, GestureEventProcessor& gestureEventProcessor);
64 virtual ~EventProcessor();
69 * This function is called by Core when an event is queued.
70 * @param[in] event A event to queue.
72 void QueueEvent( const Integration::Event& event );
75 * This function is called by Core when events are processed.
82 * Helper for QueueEvent()
84 void QueueGestureEvent(const Integration::GestureEvent& event);
88 TouchEventProcessor mTouchEventProcessor; ///< Processes touch events.
89 GestureEventProcessor& mGestureEventProcessor; ///< Processes gesture events.
90 KeyEventProcessor mKeyEventProcessor; ///< Processes key events.
91 MouseWheelEventProcessor mMouseWheelEventProcessor; ///< Processes mouse wheel events.
93 // Allow messages to be added safely to one queue, while processing (iterating through) the second queue.
94 MessageBuffer mEventQueue0; ///< An event queue.
95 MessageBuffer mEventQueue1; ///< Another event queue.
96 MessageBuffer* mCurrentEventQueue; ///< QueueEvent() will queue here.
99 } // namespace Internal
103 #endif // __DALI_INTERNAL_EVENT_PROCESSOR_H__