1 #ifndef __DALI_INTEGRATION_MULTI_POINT_EVENT_H__
2 #define __DALI_INTEGRATION_MULTI_POINT_EVENT_H__
5 * Copyright (c) 2018 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>
32 typedef std::vector< Point > PointContainer; ///< Container of points
33 typedef PointContainer::iterator PointContainerIterator; ///< Iterator for Dali::Integration::PointContainer
34 typedef PointContainer::const_iterator PointContainerConstIterator; ///< Const iterator for Dali::Integration::PointContainer
37 * An instance of this structure should be used by the adaptor to send a multi-point event to Dali core.
39 * This class can contain one or multiple touch points. It also contains the time at which the
42 struct DALI_CORE_API MultiPointEvent : public Event
44 // Construction & Destruction
50 virtual ~MultiPointEvent();
56 MultiPointEvent(Type eventType);
60 * @param[in] time The time the event occurred.
62 MultiPointEvent(Type eventType, unsigned long time);
69 * @brief A series of points
71 PointContainer points;
78 // Convenience Methods
81 * @brief Adds a point to the MultiPointEvent.
82 * @param[in] point The point to add.
84 void AddPoint( const Point& point );
87 * @brief Retrieves the Point at position point.
88 * @return The Point at position point.
90 Point& GetPoint( uint32_t point );
93 * @brief Retrieves a const ref of the Point at position point.
94 * @return The const ref of the Point at position point.
96 const Point& GetPoint( uint32_t point ) const;
99 * @brief The total number of Points in this TouchEvent.
100 * @return The point count.
102 uint32_t GetPointCount() const;
105 } // namespace Integration
109 #endif // __DALI_INTEGRATION_MULTI_POINT_EVENT_H__