1 #ifndef DALI_INTEGRATION_MULTI_POINT_EVENT_H
2 #define DALI_INTEGRATION_MULTI_POINT_EVENT_H
5 * Copyright (c) 2020 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/integration-api/events/event.h>
23 #include <dali/integration-api/events/point.h>
24 #include <dali/public-api/common/vector-wrapper.h>
30 using PointContainer = std::vector<Point>; ///< Container of points
31 using PointContainerIterator = PointContainer::iterator; ///< Iterator for Dali::Integration::PointContainer
32 using PointContainerConstIterator = PointContainer::const_iterator; ///< Const iterator for Dali::Integration::PointContainer
35 * An instance of this structure should be used by the adaptor to send a multi-point event to Dali core.
37 * This class can contain one or multiple touch points. It also contains the time at which the
40 struct DALI_CORE_API MultiPointEvent : public Event
42 // Construction & Destruction
48 ~MultiPointEvent() override;
54 MultiPointEvent(Type eventType);
58 * @param[in] time The time the event occurred.
60 MultiPointEvent(Type eventType, uint32_t time);
66 * @brief A series of points
68 PointContainer points;
75 // Convenience Methods
78 * @brief Adds a point to the MultiPointEvent.
79 * @param[in] point The point to add.
81 void AddPoint(const Point& point);
84 * @brief Retrieves the Point at position point.
85 * @return The Point at position point.
87 Point& GetPoint(uint32_t point);
90 * @brief Retrieves a const ref of the Point at position point.
91 * @return The const ref of the Point at position point.
93 const Point& GetPoint(uint32_t point) const;
96 * @brief The total number of Points in this TouchEvent.
97 * @return The point count.
99 uint32_t GetPointCount() const;
102 } // namespace Integration
106 #endif // DALI_INTEGRATION_MULTI_POINT_EVENT_H