1 #ifndef __DALI_TOUCH_EVENT_H__
2 #define __DALI_TOUCH_EVENT_H__
5 * Copyright (c) 2015 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/dali-common.h>
23 #include <dali/public-api/events/touch-point.h>
28 * @addtogroup dali_core_events
33 * @DEPRECATED_1_1.37 Use TouchData instead
35 * @brief Touch events are a collection of touch points at a specific moment in time.
37 * When a multi-touch event occurs, each touch point represents the points that are currently being
38 * touched or the points where a touch has stopped.
41 struct DALI_IMPORT_API TouchEvent
43 // Construction & Destruction
47 * @brief Default constructor
56 * @param[in] time The time the event occurred
58 TouchEvent(unsigned long time);
71 * @brief This is a container of points for this touch event.
73 * The first point in the set is always the
74 * primary touch point (i.e. the first point touched in a multi-touch event).
76 TouchPointContainer points;
80 * @brief The time (in ms) that the touch event occurred.
84 // Convenience Methods
88 * @brief Returns the total number of points in this TouchEvent.
91 * @return Total number of Points.
93 unsigned int GetPointCount() const;
97 * @brief Returns a touch point at the index requested.
99 * The first point in the set is always the primary
100 * touch point (i.e. the first point touched in a multi-touch event).
102 * @param[in] point The index of the required Point.
103 * @return Point requested
104 * @note "point" should be less than the value returned by GetPointCount().
105 * If out of range, then program asserts.
107 const TouchPoint& GetPoint(unsigned int point) const;
115 #endif // __DALI_TOUCH_EVENT_H__