383d9a2ceb1623c01333336de73808d1a2a46eef
[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 /*
5 * Copyright (c) 2018 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 */\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 bool Eina_Bool;\r
26 \r
27 typedef unsigned int   winWindow;\r
28 typedef unsigned int   Win_Window_Handle;\r
29 typedef unsigned int   WinPixmap;\r
30 \r
31 namespace Dali
32 {
33
34 namespace Internal
35 {
36
37 namespace Adaptor
38 {
39 \r
40 namespace WindowsPlatformImplement\r
41 {\r
42 \r
43 void RunLoop();\r
44 \r
45 void SetParent(long child, long parent);\r
46 \r
47 int GetEdgeHeight();\r
48 \r
49 long CreateHwnd(\r
50     _In_opt_ const char *lpClassName,\r
51     _In_opt_ const char *lpWindowName,\r
52     _In_ int X,\r
53     _In_ int Y,\r
54     _In_ int nWidth,\r
55     _In_ int nHeight,\r
56     _In_opt_ long parent);\r
57 \r
58 typedef void (*winEventCallback)(long hWnd, unsigned int uMsg, long wParam, long lParam);\r
59 \r
60 void RemoveListener(int msgType);\r
61 \r
62 void AddListener( winEventCallback callback );\r
63 void AddListener( int msgType, Dali::CallbackBase *callback );\r
64 \r
65 bool PostWinMessage(\r
66     _In_ unsigned int Msg,\r
67     _In_ long wParam,\r
68     _In_ long lParam,\r
69     _In_ long hWnd = 0);\r
70 \r
71 void ShowWindow(long hWnd);\r
72 void HideWindow(long hWnd);\r
73 \r
74 long CreateWinSemaphore(_In_ long lInitialCount, _In_ long lMaximumCount);\r
75 \r
76 unsigned long WaitForSingleObject(_In_ long hHandle, _In_ unsigned long dwMilliseconds);\r
77 \r
78 bool ReleaseSemaphore(_In_ long hSemaphore, _In_ long lReleaseCount, _Out_opt_ long *lpPreviousCount);\r
79 \r
80 typedef void(*timerCallback)(void *data);\r
81 \r
82 int SetTimer(int interval, timerCallback callback, void *data);\r
83 \r
84 void KillTimer(int id);\r
85 \r
86 void GetDPI( float &xDpi, float &yDpi );\r
87 \r
88 const char* GetKeyName( int keyCode );\r
89 \r
90 long GetCurrentThreadId();\r
91 \r
92 void GetNanoseconds( uint64_t& timeInNanoseconds );\r
93 \r
94 unsigned int GetCurrentMilliSeconds( void );\r
95 \r
96 } // namespace WindowsPlatformImplement
97
98 } // namespace Adaptor
99
100 } // namespace internal
101
102 } // namespace Dali
103
104 #endif // WIN32_WINDOWS_SYSTEM_INCLUDE\r