Merge "Remove extension from shader." into devel/new_mesh
[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) 2014 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/public-api/common/vector-wrapper.h>
23 #include <dali/integration-api/events/event.h>
24 #include <dali/public-api/events/touch-point.h>
25
26 namespace Dali DALI_IMPORT_API
27 {
28
29 namespace Integration
30 {
31
32 /**
33  * An instance of this structure should be used by the adaptor to send a multi-point event to Dali core.
34  *
35  * This class can contain one or multiple touch points. It also contains the time at which the
36  * event occurred.
37  */
38 struct MultiPointEvent : public Event
39 {
40   // Construction & Destruction
41
42 public:
43   /**
44    * Virtual destructor
45    */
46   virtual ~MultiPointEvent();
47
48 protected:
49   /**
50    * Default Constructor
51    */
52   MultiPointEvent(Type eventType);
53
54   /**
55    * Constructor
56    * @param[in]  time  The time the event occurred.
57    */
58   MultiPointEvent(Type eventType, unsigned long time);
59
60 public:
61   // Data
62
63   /**
64    * @copydoc Dali::MultiPointEvent::points
65    */
66   std::vector<TouchPoint> points;
67
68   /**
69    * @copydoc Dali::MultiPointEvent::time
70    */
71   unsigned long time;
72
73   // Convenience Methods
74
75   /**
76    * Adds a point to the MultiPointEvent.
77    * @param[in]  point  The point to add.
78    */
79   void AddPoint(const TouchPoint& point);
80
81   /**
82    * @copydoc Dali::MultiPointEvent::GetPoint()
83    */
84   TouchPoint& GetPoint(unsigned int point);
85
86   /**
87    * @copydoc Dali::MultiPointEvent::GetPoint()
88    */
89   const TouchPoint& GetPoint(unsigned int point) const;
90
91   /**
92    * @copydoc Dali::MultiPointEvent::GetPointCount() const
93    */
94   unsigned int GetPointCount() const;
95 };
96
97 } // namespace Integration
98
99 } // namespace Dali
100
101 #endif // __DALI_INTEGRATION_MULTI_POINT_EVENT_H__