eb47e2c345710b0c9e466a27c8714eb8f8d28afa
[platform/core/uifw/dali-core.git] / dali / integration-api / events / wheel-event-integ.h
1 #ifndef DALI_INTEGRATION_WHEEL_EVENT_H
2 #define DALI_INTEGRATION_WHEEL_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 // EXTERNAL INCLUDES
22 #include <string>
23
24 // INTERNAL INCLUDES
25 #include <dali/integration-api/events/event.h>
26 #include <dali/public-api/math/vector2.h>
27
28 namespace Dali
29 {
30
31 namespace Integration
32 {
33
34 /**
35  * An instance of this class should be used by the adaptor to send a wheel event to
36  * the Dali core.
37  *
38  */
39 struct DALI_CORE_API WheelEvent : public Event
40 {
41   // Enumerations
42
43   /**
44    * @brief Specifies the type of the wheel event.
45    */
46   enum Type
47   {
48     MOUSE_WHEEL,      ///< Mouse wheel event
49     CUSTOM_WHEEL      ///< Custom wheel event
50   };
51
52   /**
53    * Default Constructor
54    */
55   WheelEvent();
56
57   /**
58    * Constructor
59    * @param[in]  type       The type of the wheel event
60    * @param[in]  direction  The direction of wheel rolling (0 = default vertical wheel, 1 = horizontal wheel)
61    * @param[in]  modifiers  modifier keys pressed during the event (such as shift, alt and control)
62    * @param[in]  point      The co-ordinates of the cursor relative to the top-left of the screen.
63    * @param[in]  delta      The offset of rolling (positive value means roll down, and negative value means roll up)
64    * @param[in]  timeStamp  The time the wheel is being rolled.
65    */
66   WheelEvent( Type type, int direction, unsigned int modifiers, Vector2 point, int delta, unsigned int timeStamp );
67
68   /**
69    * Virtual destructor
70    */
71   virtual ~WheelEvent();
72
73   // Data
74
75   /**
76    *@copydoc Dali::WheelEvent::GetType
77    */
78   Type type;
79
80   /**
81    *@copydoc Dali::WheelEvent::GetDrection
82    */
83   int direction;
84
85   /**
86    *@copydoc Dali::WheelEvent::GetModifiers
87    */
88   unsigned int modifiers;
89
90   /**
91    *@copydoc Dali::WheelEvent::GetPoint
92    */
93   Vector2 point;
94
95   /**
96    *@copydoc Dali::WheelEvent::GetDelta
97    */
98   int delta;
99
100   /**
101    *@copydoc Dali::WheelEvent::GetTime
102    */
103   unsigned int timeStamp;
104
105 };
106
107 } // namespace Integration
108
109 } // namespace Dali
110
111 #endif // DALI_INTEGRATION_WHEEL_EVENT_H