Revert "[Tizen] Not execute the remove callback"
[platform/core/uifw/dali-core.git] / dali / integration-api / events / multi-point-event-integ.h
1 #ifndef DALI_INTEGRATION_MULTI_POINT_EVENT_H
2 #define DALI_INTEGRATION_MULTI_POINT_EVENT_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // INTERNAL INCLUDES
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>
25
26 namespace Dali
27 {
28 namespace Integration
29 {
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
33
34 /**
35  * An instance of this structure should be used by the adaptor to send a multi-point event to Dali core.
36  *
37  * This class can contain one or multiple touch points. It also contains the time at which the
38  * event occurred.
39  */
40 struct DALI_CORE_API MultiPointEvent : public Event
41 {
42   // Construction & Destruction
43
44 public:
45   /**
46    * Virtual destructor
47    */
48   ~MultiPointEvent() override;
49
50 protected:
51   /**
52    * Default Constructor
53    */
54   MultiPointEvent(Type eventType);
55
56   /**
57    * Constructor
58    * @param[in]  time  The time the event occurred.
59    */
60   MultiPointEvent(Type eventType, uint32_t time);
61
62 public:
63   // Data
64
65   /**
66    * @brief A series of points
67    */
68   PointContainer points;
69
70   /**
71    * @brief The time
72    */
73   uint32_t time;
74
75   // Convenience Methods
76
77   /**
78    * @brief Adds a point to the MultiPointEvent.
79    * @param[in]  point  The point to add.
80    */
81   void AddPoint(const Point& point);
82
83   /**
84    * @brief Retrieves the Point at position point.
85    * @return The Point at position point.
86    */
87   Point& GetPoint(uint32_t point);
88
89   /**
90    * @brief Retrieves a const ref of the Point at position point.
91    * @return The const ref of the Point at position point.
92    */
93   const Point& GetPoint(uint32_t point) const;
94
95   /**
96    * @brief The total number of Points in this TouchEvent.
97    * @return The point count.
98    */
99   uint32_t GetPointCount() const;
100 };
101
102 } // namespace Integration
103
104 } // namespace Dali
105
106 #endif // DALI_INTEGRATION_MULTI_POINT_EVENT_H