1 #ifndef __DALI_INTEGRATION_TOUCH_EVENT_H__
2 #define __DALI_INTEGRATION_TOUCH_EVENT_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/public-api/common/vector-wrapper.h>
22 #include <dali/integration-api/events/event.h>
23 #include <dali/public-api/events/touch-event.h>
24 #include <dali/public-api/events/touch-point.h>
26 namespace Dali DALI_IMPORT_API
33 * An instance of this structure should be used by the adaptor to send a touch event to Dali core.
35 * This class can contain one or many touch points. It also contains the time at which the
38 struct TouchEvent : public Event
40 // Construction & Destruction
49 * @param[in] time The time the event occurred.
51 TouchEvent(unsigned long time);
56 virtual ~TouchEvent();
61 * @copydoc Dali::TouchEvent::points
63 std::vector<TouchPoint> points;
66 * @copydoc Dali::TouchEvent::time
70 // Convenience Methods
73 * Adds a point to the TouchEvent.
74 * @param[in] point The point to add.
76 void AddPoint(const TouchPoint& point);
79 * @copydoc Dali::TouchEvent::GetPoint()
81 TouchPoint& GetPoint(unsigned int point);
84 * @copydoc Dali::TouchEvent::GetPoint()
86 const TouchPoint& GetPoint(unsigned int point) const;
89 * @copydoc Dali::TouchEvent::GetPointCount() const
91 unsigned int GetPointCount() const;
94 } // namespace Integration
98 #endif // __DALI_INTEGRATION_TOUCH_EVENT_H__