Support multiple surfaces for partial update
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / accessibility-gesture-event.h
1 #ifndef DALI_INTEGRAION_ACCESSIBILITY_GESTURE_STRUCTS_H
2 #define DALI_INTEGRAION_ACCESSIBILITY_GESTURE_STRUCTS_H
3
4 /*
5  * Copyright (c) 2019 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/events/gesture.h>
23 #include <dali/public-api/math/vector2.h>
24
25 namespace Dali
26 {
27
28 struct AccessibilityGestureEvent
29 {
30   // Construction & Destruction
31
32   /**
33    * Virtual destructor
34    */
35   ~AccessibilityGestureEvent()
36   {
37   }
38
39   // Data
40
41   /**
42    * The previous touch position of the primary touch point in screen coordinates.
43    */
44   Vector2 previousPosition;
45
46   /**
47    * This current touch position of the primary touch point in screen coordinates.
48    */
49   Vector2 currentPosition;
50
51   /**
52    * The time difference between the previous and latest touch motion events (in ms).
53    */
54   unsigned long timeDelta;
55
56   /**
57    * The total number of fingers touching the screen in a pan gesture.
58    */
59   unsigned int numberOfTouches;
60
61   enum State
62   {
63     Clear,      ///< There is no state associated with this gesture. @SINCE_1_0.0
64     Started,    ///< The touched points on the screen have moved enough to be considered a gesture. @SINCE_1_0.0
65     Continuing, ///< The gesture is continuing. @SINCE_1_0.0
66     Finished,   ///< The user has lifted a finger or touched an additional point on the screen. @SINCE_1_0.0
67     Cancelled,  ///< The gesture has been cancelled. @SINCE_1_0.0
68     Possible    ///< A gesture is possible. @SINCE_1_0.0
69   };
70
71   State state;
72
73   uint32_t time;
74
75   /**
76    * Default Constructor
77    * @param[in]  state  The state of the gesture
78    */
79   AccessibilityGestureEvent(AccessibilityGestureEvent::State state)
80   : timeDelta( 0 ),
81   numberOfTouches( 0 ),
82   state( state ),
83   time( 0 )
84   {}
85 };
86
87 } // namespace Dali
88
89 #endif // DALI_INTEGRAION_ACCESSIBILITY_GESTURE_STRUCTS_H