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 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/public-api/common/vector-wrapper.h>
23 #include <dali/integration-api/events/event.h>
24 #include <dali/public-api/events/touch-event.h>
25 #include <dali/public-api/events/touch-point.h>
27 namespace Dali DALI_IMPORT_API
34 * An instance of this structure should be used by the adaptor to send a touch event to Dali core.
36 * This class can contain one or many touch points. It also contains the time at which the
39 struct TouchEvent : public Event
41 // Construction & Destruction
50 * @param[in] time The time the event occurred.
52 TouchEvent(unsigned long time);
57 virtual ~TouchEvent();
62 * @copydoc Dali::TouchEvent::points
64 std::vector<TouchPoint> points;
67 * @copydoc Dali::TouchEvent::time
71 // Convenience Methods
74 * Adds a point to the TouchEvent.
75 * @param[in] point The point to add.
77 void AddPoint(const TouchPoint& point);
80 * @copydoc Dali::TouchEvent::GetPoint()
82 TouchPoint& GetPoint(unsigned int point);
85 * @copydoc Dali::TouchEvent::GetPoint()
87 const TouchPoint& GetPoint(unsigned int point) const;
90 * @copydoc Dali::TouchEvent::GetPointCount() const
92 unsigned int GetPointCount() const;
95 } // namespace Integration
99 #endif // __DALI_INTEGRATION_TOUCH_EVENT_H__