License conversion from Flora to Apache 2.0
[platform/core/uifw/dali-core.git] / dali / integration-api / events / mouse-wheel-event-integ.h
1 #ifndef __DALI_INTEGRATION_MOUSE_WHEEL_EVENT_H__
2 #define __DALI_INTEGRATION_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 // 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 DALI_IMPORT_API
29 {
30
31 namespace Integration
32 {
33
34 /**
35  * An instance of this class should be used by the adaptor to send a mouse wheel event to
36  * the Dali core.
37  *
38  */
39 struct MouseWheelEvent : public Event
40 {
41   /**
42    * Default Constructor
43    */
44   MouseWheelEvent();
45
46   /**
47    * Constructor
48    * @param[in]  direction  The direction of mouse wheel rolling (0 = default vertical wheel, 1 = horizontal wheel)
49    * @param[in]  modifiers  modifier keys pressed during the event (such as shift, alt and control)
50    * @param[in]  point      The co-ordinates of the mouse cursor relative to the top-left of the screen.
51    * @param[in]  z          The offset of rolling (positive value means roll down, and negative value means roll up)
52    * @param[in]  timeStamp  The time the mouse wheel is being rolled.
53    */
54   MouseWheelEvent(int direction, unsigned int modifiers, Vector2 point, int z, unsigned int timeStamp);
55
56   /**
57    * Virtual destructor
58    */
59   virtual ~MouseWheelEvent();
60
61   // Data
62
63   /**
64    *@copydoc Dali::MouseWheelEvent::direction
65    */
66   int direction;
67
68   /**
69    *@copydoc Dali::MouseWheelEvent::modifiers
70    */
71   unsigned int modifiers;
72
73   /**
74    *@copydoc Dali::MouseWheelEvent::point
75    */
76   Vector2 point;
77
78   /**
79    *@copydoc Dali::MouseWheelEvent::z
80    */
81   int z;
82
83   /**
84    *@copydoc Dali::MouseWheelEvent::timeStamp
85    */
86   unsigned int timeStamp;
87
88 };
89
90 } // namespace Integration
91
92 } // namespace Dali
93
94 #endif // __DALI_INTEGRATION_MOUSE_WHEEL_EVENT_H__