Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / integration-api / events / touch-event-integ.h
1 #ifndef __DALI_INTEGRATION_TOUCH_EVENT_H__
2 #define __DALI_INTEGRATION_TOUCH_EVENT_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // INTERNAL INCLUDES
21 #include <dali/public-api/common/vector-wrapper.h>
22 #include <dali/integration-api/events/event.h>
23 #include <dali/public-api/events/touch-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 touch event to Dali core.
34  *
35  * This class can contain one or many touch points. It also contains the time at which the
36  * event occurred.
37  */
38 struct TouchEvent : public Event
39 {
40   // Construction & Destruction
41
42   /**
43    * Default Constructor
44    */
45   TouchEvent();
46
47   /**
48    * Constructor
49    * @param[in]  time  The time the event occurred.
50    */
51   TouchEvent(unsigned long time);
52
53   /**
54    * Virtual destructor
55    */
56   virtual ~TouchEvent();
57
58   // Data
59
60   /**
61    * @copydoc Dali::TouchEvent::points
62    */
63   std::vector<TouchPoint> points;
64
65   /**
66    * @copydoc Dali::TouchEvent::time
67    */
68   unsigned long time;
69
70   // Convenience Methods
71
72   /**
73    * Adds a point to the TouchEvent.
74    * @param[in]  point  The point to add.
75    */
76   void AddPoint(const TouchPoint& point);
77
78   /**
79    * @copydoc Dali::TouchEvent::GetPoint()
80    */
81   TouchPoint& GetPoint(unsigned int point);
82
83   /**
84    * @copydoc Dali::TouchEvent::GetPoint()
85    */
86   const TouchPoint& GetPoint(unsigned int point) const;
87
88   /**
89    * @copydoc Dali::TouchEvent::GetPointCount() const
90    */
91   unsigned int GetPointCount() const;
92 };
93
94 } // namespace Integration
95
96 } // namespace Dali
97
98 #endif // __DALI_INTEGRATION_TOUCH_EVENT_H__