1 #ifndef PLATFORM_IMPLEMENT_WIN_INCLUDE
\r
2 #define PLATFORM_IMPLEMENT_WIN_INCLUDE
\r
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
\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
11 * http://www.apache.org/licenses/LICENSE-2.0
\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
22 #include <dali/public-api/signals/callback.h>
\r
26 typedef uintptr_t WinWindowHandle;
\r
27 typedef uint64_t WinPixmap;
\r
35 namespace WindowsPlatform
\r
37 bool PostWinThreadMessage(
\r
39 _In_ uint64_t wParam,
\r
40 _In_ uint64_t lParam,
\r
41 _In_ uint64_t threadID = -1);
\r
43 using timerCallback = bool (*)(void* data);
\r
45 intptr_t SetTimer(int interval, timerCallback callback, void* data);
\r
47 void KillTimer(intptr_t id);
\r
49 std::string GetKeyName(int keyCode);
\r
51 uint64_t GetCurrentThreadId();
\r
53 void GetNanoseconds(uint64_t& timeInNanoseconds);
\r
55 unsigned int GetCurrentMilliSeconds(void);
\r
60 static const uint32_t STYLE;
\r
61 static const int32_t EDGE_WIDTH;
\r
62 static const int32_t EDGE_HEIGHT;
\r
66 virtual ~WindowImpl();
\r
68 static void ProcWinMessage(uint64_t hWnd, uint32_t uMsg, uint64_t wParam, uint64_t lParam);
\r
70 static uint64_t CreateHwnd(
\r
71 _In_opt_ const char* lpWindowName,
\r
76 _In_opt_ uint64_t parent);
\r
78 static void DestroyHWnd(uint64_t hWnd);
\r
80 void GetDPI(float& xDpi, float& yDpi);
\r
82 int GetColorDepth();
\r
84 void SetListener(CallbackBase* callback);
\r
86 bool PostWinMessage(
\r
88 _In_ uint64_t wParam,
\r
89 _In_ uint64_t lParam);
\r
91 void SetHWND(uint64_t inHWnd);
\r
96 uint64_t mHWnd; // no ownership, managed outside
\r
99 CallbackBase* listener;
\r
102 } // namespace WindowsPlatform
\r
104 } // namespace Adaptor
\r
106 } // namespace Internal
\r
108 } // namespace Dali
\r
110 #endif // WIN32_WINDOWS_SYSTEM_INCLUDE
\r