1 #ifndef DALI_INTEGRATION_MULTI_POINT_EVENT_H
2 #define DALI_INTEGRATION_MULTI_POINT_EVENT_H
5 * Copyright (c) 2019 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/integration-api/events/point.h>
31 using PointContainer = std::vector<Point>; ///< Container of points
32 using PointContainerIterator = PointContainer::iterator; ///< Iterator for Dali::Integration::PointContainer
33 using PointContainerConstIterator = PointContainer::const_iterator; ///< Const iterator for Dali::Integration::PointContainer
36 * An instance of this structure should be used by the adaptor to send a multi-point event to Dali core.
38 * This class can contain one or multiple touch points. It also contains the time at which the
41 struct DALI_CORE_API MultiPointEvent : public Event
43 // Construction & Destruction
49 ~MultiPointEvent() override;
55 MultiPointEvent(Type eventType);
59 * @param[in] time The time the event occurred.
61 MultiPointEvent(Type eventType, uint32_t time);
68 * @brief A series of points
70 PointContainer points;
77 // Convenience Methods
80 * @brief Adds a point to the MultiPointEvent.
81 * @param[in] point The point to add.
83 void AddPoint( const Point& point );
86 * @brief Retrieves the Point at position point.
87 * @return The Point at position point.
89 Point& GetPoint( uint32_t point );
92 * @brief Retrieves a const ref of the Point at position point.
93 * @return The const ref of the Point at position point.
95 const Point& GetPoint( uint32_t point ) const;
98 * @brief The total number of Points in this TouchEvent.
99 * @return The point count.
101 uint32_t GetPointCount() const;
104 } // namespace Integration
108 #endif // DALI_INTEGRATION_MULTI_POINT_EVENT_H