[dali_2.3.25] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / mouse-in-out-event.h
1 #ifndef DALI_WINDOW_DEVEL_MOUSE_IN_OUT_EVENT_H
2 #define DALI_WINDOW_DEVEL_MOUSE_IN_OUT_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 MouseInOutEvent occurs when the mouse enters or leaves the window.
34  *
35  * A signal is emitted whenever the mouse enters or leaves the window.
36  */
37 struct DALI_ADAPTOR_API MouseInOutEvent
38 {
39   enum class Type
40   {
41     NONE = 0,
42     IN,
43     OUT
44   };
45
46   /**
47    * @brief Constructor which creates a MouseInOutEvent instance
48    * @param[in] type The type of the event.
49    * @param[in] modifiers The modifier keys pressed during the event (such as shift, alt and control).
50    * @param[in] point The co-ordinates of the cursor relative to the top-left of the screen
51    * @param[in] timeStamp The time when the event being started.
52    * @param[in] deviceClass The device class the event originated from.
53    * @param[in] deviceSubclass The device subclass the event originated from.
54    */
55   MouseInOutEvent(Type type, uint32_t modifiers, Vector2 point, uint32_t timeStamp, const Device::Class::Type deviceClass, const Device::Subclass::Type deviceSubclass)
56   : type(type),
57     modifiers(modifiers),
58     point(point),
59     timeStamp(timeStamp),
60     deviceClass(deviceClass),
61     deviceSubclass(deviceSubclass)
62   {
63   }
64
65   Type                         type;
66   uint32_t                     modifiers;
67   Vector2                      point;
68   uint32_t                     timeStamp;
69   const Device::Class::Type    deviceClass;
70   const Device::Subclass::Type deviceSubclass;
71 };
72
73 } // namespace DevelWindow
74
75 } // namespace Dali
76
77 #endif // DALI_WINDOW_DEVEL_MOUSE_IN_OUT_EVENT_H