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