1 #ifndef __DALI_MOUSE_WHEEL_EVENT_H__
2 #define __DALI_MOUSE_WHEEL_EVENT_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/public-api/math/vector2.h>
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.
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.
36 struct DALI_IMPORT_API MouseWheelEvent
39 * @brief Default constructor.
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.
52 MouseWheelEvent(int direction, unsigned int modifiers, Vector2 point, int z, unsigned int timeStamp);
60 * @brief Check to see if Shift key modifier has been supplied.
62 * @return bool true if shift modifier
64 bool IsShiftModifier() const;
67 * @brief Check to see if Ctrl (control) key modifier has been supplied.
69 * @return bool true if ctrl modifier
71 bool IsCtrlModifier() const;
74 * @brief Check to see if Alt key modifier has been supplied.
76 * @return bool true if alt modifier
78 bool IsAltModifier() const;
83 * @brief The direction in which the mouse wheel is being rolled.
85 * 0 means the default vertical wheel, and 1 means horizontal wheel
90 * @brief Modifier keys pressed during the event (such as shift, alt and control).
92 unsigned int modifiers;
95 * @brief The co-ordinates of the mouse cursor relative to the top-left of the screen
96 * when the wheel is being rolled.
101 * @brief The offset of the mouse wheel rolling, where positive value means rolling down
102 * and negative value means rolling up.
107 * @brief The time when the mouse wheel is being rolled.
109 unsigned int timeStamp;
115 #endif // __DALI_MOUSE_WHEEL_EVENT_H__