[dali_2.3.25] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / windows / event-system-win.h
1 #ifndef _WINDOWEVENTSYSTEM_H_\r
2 #define _WINDOWEVENTSYSTEM_H_\r
3 \r
4 /*\r
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.\r
6 *\r
7 * Licensed under the Apache License, Version 2.0 (the "License");\r
8 * you may not use this file except in compliance with the License.\r
9 * You may obtain a copy of the License at\r
10 *\r
11 * http://www.apache.org/licenses/LICENSE-2.0\r
12 *\r
13 * Unless required by applicable law or agreed to in writing, software\r
14 * distributed under the License is distributed on an "AS IS" BASIS,\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16 * See the License for the specific language governing permissions and\r
17 * limitations under the License.\r
18 *\r
19 */\r
20 #define DEVICE_MOUSE 0\r
21 \r
22 // INTERNAL INCLUDES\r
23 #include <dali/internal/window-system/windows/platform-implement-win.h>\r
24 \r
25 namespace Dali\r
26 {\r
27 namespace Internal\r
28 {\r
29 namespace Adaptor\r
30 {\r
31 struct _Event_Mouse_Button\r
32 {\r
33   WinWindowHandle window; /**< The main window where event happened */\r
34 \r
35   uint32_t timestamp; /**< Time when the event occurred */\r
36 \r
37   int32_t x; /**< x coordinate relative to window where event happened */\r
38   int32_t y; /**< y coordinate relative to window where event happened */\r
39 \r
40   struct\r
41   {\r
42     int32_t device;                     /**< 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */\r
43     double  radius, radius_x, radius_y; /**< radius of press point - radius_x and y if its an ellipse (radius is the average of the 2) */\r
44     double  pressure;                   /**< pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */\r
45     double  angle;                      /**< angle relative to perpendicular (0.0 == perpendicular), in degrees */\r
46     double  x, y;                       /**< same as x, y, but with sub-pixel precision, if available */\r
47     struct\r
48     {\r
49       double x, y;\r
50     } root; /**< same as root.x, root.y, but with sub-pixel precision, if available */\r
51   } multi;\r
52 };\r
53 \r
54 /**\r
55 * @struct _Event_Mouse_Wheel\r
56 * Contains information about an Windows mouse wheel event.\r
57 */\r
58 struct _Event_Mouse_Wheel\r
59 {\r
60   WinWindowHandle window;       /**< The main window where event happened */\r
61   WinWindowHandle root_window;  /**< The root window where event happened */\r
62   WinWindowHandle event_window; /**< The child window where event happened */\r
63 \r
64   uint32_t timestamp; /**< Time when the event occurred */\r
65   uint32_t modifiers; /**< The combination of modifiers key (SHIFT,CTRL,ALT,..)*/\r
66 \r
67   int32_t direction; /**< Orientation of the wheel (horizontal/vertical) */\r
68   int32_t z;         /**< Value of the wheel event (+1/-1) */\r
69 \r
70   int32_t x; /**< x coordinate relative to window where event happened */\r
71   int32_t y; /**< y coordinate relative to window where event happened */\r
72   struct\r
73   {\r
74     int32_t x;\r
75     int32_t y;\r
76   } root; /**< Coordinates relative to root window */\r
77 };\r
78 \r
79 typedef struct _Event_Mouse_Button Event_Mouse_Button;\r
80 typedef struct _Event_Mouse_Wheel  Event_Mouse_Wheel;\r
81 \r
82 struct TWinEventInfo\r
83 {\r
84   TWinEventInfo(uint64_t hWnd, uint32_t uMsg, uint64_t wParam, uint64_t lParam)\r
85   {\r
86     this->mWindow = (WinWindowHandle)hWnd;\r
87     this->uMsg    = uMsg;\r
88     this->wParam  = wParam;\r
89     this->lParam  = lParam;\r
90   }\r
91 \r
92   WinWindowHandle mWindow;\r
93   uint32_t        uMsg;\r
94   uint64_t        wParam;\r
95   uint64_t        lParam;\r
96 };\r
97 \r
98 } // namespace Adaptor\r
99 \r
100 } // namespace Internal\r
101 \r
102 } // namespace Dali\r
103 \r
104 #endif\r