51e40f8c7f249a52e181b5111e7f1a72fb026f72
[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 int GetEdgeHeight();\r
43 \r
44 int GetColorDepth();\r
45 \r
46 uint64_t CreateHwnd(\r
47     _In_opt_ const char *lpClassName,\r
48     _In_opt_ const char *lpWindowName,\r
49     _In_ int X,\r
50     _In_ int Y,\r
51     _In_ int nWidth,\r
52     _In_ int nHeight,\r
53     _In_opt_ uint64_t parent);\r
54 \r
55 void SetListener( CallbackBase *callback );\r
56 \r
57 bool PostWinMessage(\r
58     _In_ uint32_t Msg,\r
59     _In_ uint32_t wParam,\r
60     _In_ uint64_t lParam,\r
61     _In_ uint64_t hWnd);\r
62 \r
63 bool PostWinThreadMessage(\r
64     _In_ uint32_t Msg,\r
65     _In_ uint32_t wParam,\r
66     _In_ uint64_t lParam,\r
67     _In_ uint64_t threadID = -1 );\r
68 \r
69 void ShowWindow( uint64_t hWnd );\r
70 void HideWindow( uint64_t hWnd );\r
71 \r
72 using timerCallback = bool(*)(void *data);\r
73 \r
74 int SetTimer(int interval, timerCallback callback, void *data);\r
75 \r
76 void KillTimer(int id);\r
77 \r
78 void GetDPI( uint64_t hWnd, float &xDpi, float &yDpi );\r
79 \r
80 int GetOrientation() const;\r
81 \r
82 const char* GetKeyName( int keyCode );\r
83 \r
84 uint64_t GetCurrentThreadId();\r
85 \r
86 void GetNanoseconds( uint64_t& timeInNanoseconds );\r
87 \r
88 unsigned int GetCurrentMilliSeconds( void );\r
89 \r
90 } // namespace WindowsPlatformImplement\r
91 \r
92 } // namespace Adaptor\r
93 \r
94 } // namespace internal\r
95 \r
96 } // namespace Dali\r
97 \r
98 #endif // WIN32_WINDOWS_SYSTEM_INCLUDE\r