Updates to ensure compilation with Visual Studio
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / windows / platform-implement-win.h
1 #ifndef PLATFORM_IMPLEMENT_WIN_INCLUDE\r
2 #define PLATFORM_IMPLEMENT_WIN_INCLUDE\r
3 \r
4 /*\r
5 * Copyright (c) 2018 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 \r
21 // EXTERNAL_HEADERS\r
22 #include <stdint.h>\r
23 #include <dali/public-api/signals/callback.h>\r
24 \r
25 typedef uint64_t   WinWindowHandle;\r
26 typedef uint64_t   WinPixmap;\r
27 \r
28 namespace Dali\r
29 {\r
30 \r
31 namespace Internal\r
32 {\r
33 \r
34 namespace Adaptor\r
35 {\r
36 \r
37 namespace WindowsPlatformImplementation\r
38 {\r
39 \r
40 void RunLoop();\r
41 \r
42 bool PostWinThreadMessage(\r
43     _In_ uint32_t Msg,\r
44     _In_ uint32_t wParam,\r
45     _In_ uint64_t lParam,\r
46     _In_ uint64_t threadID = -1 );\r
47 \r
48 using timerCallback = bool(*)(void *data);\r
49 \r
50 int SetTimer(int interval, timerCallback callback, void *data);\r
51 \r
52 void KillTimer(int id);\r
53 \r
54 const char* GetKeyName( int keyCode );\r
55 \r
56 uint64_t GetCurrentThreadId();\r
57 \r
58 void GetNanoseconds( uint64_t& timeInNanoseconds );\r
59 \r
60 unsigned int GetCurrentMilliSeconds( void );\r
61 \r
62 class WindowImpl\r
63 {\r
64 public:\r
65   WindowImpl();\r
66 \r
67   virtual ~WindowImpl();\r
68 \r
69   static void ProcWinMessge( uint64_t hWnd, uint32_t uMsg, uint64_t wParam, uint64_t lParam );\r
70 \r
71   void GetDPI( float &xDpi, float &yDpi );\r
72 \r
73   int GetColorDepth();\r
74 \r
75   uint64_t CreateHwnd(\r
76     _In_opt_ const char *lpClassName,\r
77     _In_opt_ const char *lpWindowName,\r
78     _In_ int X,\r
79     _In_ int Y,\r
80     _In_ int nWidth,\r
81     _In_ int nHeight,\r
82     _In_opt_ uint64_t parent );\r
83 \r
84   void SetListener( CallbackBase *callback );\r
85 \r
86   bool PostWinMessage(\r
87     _In_ uint32_t Msg,\r
88     _In_ uint32_t wParam,\r
89     _In_ uint64_t lParam );\r
90 \r
91   int32_t GetEdgeWidth();\r
92 \r
93   int32_t GetEdgeHeight();\r
94 \r
95 protected:\r
96 \r
97 private:\r
98 \r
99   void SetHWND( uint64_t inHWnd );\r
100 \r
101   unsigned long windowStyle;\r
102 \r
103   int colorDepth;\r
104   uint64_t mHWnd;\r
105   uint64_t mHdc;\r
106 \r
107   CallbackBase *listener;\r
108 };\r
109 \r
110 } // namespace WindowsPlatformImplement\r
111 \r
112 } // namespace Adaptor\r
113 \r
114 } // namespace internal\r
115 \r
116 } // namespace Dali\r
117 \r
118 #endif // WIN32_WINDOWS_SYSTEM_INCLUDE\r