DALi signals refactor to remove V2 naming
[platform/core/uifw/dali-core.git] / dali / public-api / events / mouse-wheel-event.h
1 #ifndef __DALI_MOUSE_WHEEL_EVENT_H__
2 #define __DALI_MOUSE_WHEEL_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/dali-common.h>
23 #include <dali/public-api/math/vector2.h>
24
25
26 namespace Dali
27 {
28
29 /**
30  * @brief The mouse wheel event structure is used to store a mouse wheel rolling, it facilitates
31  * processing of the mouse wheel rolling and passing to other libraries like Toolkit.
32  *
33  * There is a key modifier which relates to keys like alt, shift and control functions are
34  * supplied to check if they have been pressed when the mouse wheel is being rolled.
35  */
36 struct DALI_IMPORT_API MouseWheelEvent
37 {
38   /**
39    * @brief Default constructor.
40    */
41   MouseWheelEvent();
42
43   /**
44    * @brief Constructor.
45    *
46    * @param[in]  direction  The direction of mouse wheel rolling (0 = default vertical wheel, 1 = horizontal wheel)
47    * @param[in]  modifiers  modifier keys pressed during the event (such as shift, alt and control)
48    * @param[in]  point      The co-ordinates of the mouse cursor relative to the top-left of the screen.
49    * @param[in]  z          The offset of rolling (positive value means roll down, and negative value means roll up)
50    * @param[in]  timeStamp  The time the mouse wheel is being rolled.
51    */
52   MouseWheelEvent(int direction, unsigned int modifiers, Vector2 point, int z, unsigned int timeStamp);
53
54   /**
55    * @brief Destructor.
56    */
57   ~MouseWheelEvent();
58
59   /**
60    * @brief Check to see if Shift key modifier has been supplied.
61    *
62    * @return bool true if shift modifier
63    */
64   bool IsShiftModifier() const;
65
66   /**
67    * @brief Check to see if Ctrl (control) key modifier has been supplied.
68    *
69    * @return bool true if ctrl modifier
70    */
71   bool IsCtrlModifier() const;
72
73   /**
74    * @brief Check to see if Alt key modifier has been supplied.
75    *
76    * @return bool true if alt modifier
77    */
78   bool IsAltModifier() const;
79
80   // Data
81
82   /**
83    * @brief The direction in which the mouse wheel is being rolled.
84    *
85    * 0 means the default vertical wheel, and 1 means horizontal wheel
86    */
87   int direction;
88
89   /**
90    * @brief Modifier keys pressed during the event (such as shift, alt and control).
91    */
92   unsigned int modifiers;
93
94   /**
95    * @brief The co-ordinates of the mouse cursor relative to the top-left of the screen
96    * when the wheel is being rolled.
97    */
98   Vector2 point;
99
100   /**
101    * @brief The offset of the mouse wheel rolling, where positive value means rolling down
102    * and negative value means rolling up.
103    */
104   int z;
105
106   /**
107    * @brief The time when the mouse wheel is being rolled.
108    */
109   unsigned int timeStamp;
110
111 };
112
113 } // namespace Dali
114
115 #endif // __DALI_MOUSE_WHEEL_EVENT_H__