[dali_2.3.25] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / mouse-relative-event.h
1 #ifndef DALI_WINDOW_DEVEL_MOUSE_RELATIVE_EVENT_H
2 #define DALI_WINDOW_DEVEL_MOUSE_RELATIVE_EVENT_H
3
4 /*
5  * Copyright (c) 2023 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 <dali/public-api/events/device.h>
23 #include <dali/public-api/math/vector2.h>
24
25 // INTERNAL INCLUDES
26 #include <dali/public-api/dali-adaptor-common.h>
27
28 namespace Dali
29 {
30 namespace DevelWindow
31 {
32 /**
33  * @brief MouseRelativeEvent occurs when relative mouse movement occurs in the window.
34  *
35  * A signal is emitted when relative mouse movement occurs in the window.
36  */
37 struct DALI_ADAPTOR_API MouseRelativeEvent
38 {
39   enum class Type
40   {
41     NONE = 0,
42     RELATIVE_MOVE
43   };
44
45   /**
46    * @brief Constructor which creates a MouseRelativeEvent instance
47    * @param[in] type The type of the event.
48    * @param[in] modifiers The modifier keys pressed during the event (such as shift, alt and control).
49    * @param[in] timeStamp The time when the event being started.
50    * @param[in] diffPosition The co-ordinates of the cursor relative to the top-left of the screen
51    * @param[in] unaccelatedPosition The co-ordinates of the cursor relative to the top-left of the screen
52    * @param[in] deviceClass The device class the event originated from.
53    * @param[in] deviceSubclass The device subclass the event originated from.
54    */
55   MouseRelativeEvent(Type type, uint32_t modifiers, uint32_t timeStamp, Vector2 diffPosition, Vector2 unaccelatedPosition, const Device::Class::Type deviceClass, const Device::Subclass::Type deviceSubclass)
56   : type(type),
57     modifiers(modifiers),
58     timeStamp(timeStamp),
59     diffPosition(diffPosition),
60     unaccelatedPosition(unaccelatedPosition),
61     deviceClass(deviceClass),
62     deviceSubclass(deviceSubclass)
63   {
64   }
65
66   Type                         type;
67   uint32_t                     modifiers;
68   uint32_t                     timeStamp;
69   Vector2                      diffPosition;
70   Vector2                      unaccelatedPosition;
71   const Device::Class::Type    deviceClass;
72   const Device::Subclass::Type deviceSubclass;
73 };
74
75 } // namespace DevelWindow
76
77 } // namespace Dali
78
79 #endif // DALI_WINDOW_DEVEL_MOUSE_RELATIVE_EVENT_H