[Tizen] Add screen and client rotation itself function
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / windows / platform-implement-win.h
index 383d9a2..51e40f8 100755 (executable)
 #ifndef PLATFORM_IMPLEMENT_WIN_INCLUDE\r
 #define PLATFORM_IMPLEMENT_WIN_INCLUDE\r
 \r
-/*
-* Copyright (c) 2018 Samsung Electronics Co., Ltd.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
+/*\r
+* Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+*\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
 */\r
 \r
 // EXTERNAL_HEADERS\r
 #include <stdint.h>\r
 #include <dali/public-api/signals/callback.h>\r
 \r
-typedef bool Eina_Bool;\r
+typedef uint64_t   WinWindowHandle;\r
+typedef uint64_t   WinPixmap;\r
 \r
-typedef unsigned int   winWindow;\r
-typedef unsigned int   Win_Window_Handle;\r
-typedef unsigned int   WinPixmap;\r
+namespace Dali\r
+{\r
 \r
-namespace Dali
-{
-
-namespace Internal
-{
-
-namespace Adaptor
-{
+namespace Internal\r
+{\r
 \r
-namespace WindowsPlatformImplement\r
+namespace Adaptor\r
 {\r
 \r
-void RunLoop();\r
+namespace WindowsPlatformImplementation\r
+{\r
 \r
-void SetParent(long child, long parent);\r
+void RunLoop();\r
 \r
 int GetEdgeHeight();\r
 \r
-long CreateHwnd(\r
+int GetColorDepth();\r
+\r
+uint64_t CreateHwnd(\r
     _In_opt_ const char *lpClassName,\r
     _In_opt_ const char *lpWindowName,\r
     _In_ int X,\r
     _In_ int Y,\r
     _In_ int nWidth,\r
     _In_ int nHeight,\r
-    _In_opt_ long parent);\r
-\r
-typedef void (*winEventCallback)(long hWnd, unsigned int uMsg, long wParam, long lParam);\r
-\r
-void RemoveListener(int msgType);\r
+    _In_opt_ uint64_t parent);\r
 \r
-void AddListener( winEventCallback callback );\r
-void AddListener( int msgType, Dali::CallbackBase *callback );\r
+void SetListener( CallbackBase *callback );\r
 \r
 bool PostWinMessage(\r
-    _In_ unsigned int Msg,\r
-    _In_ long wParam,\r
-    _In_ long lParam,\r
-    _In_ long hWnd = 0);\r
+    _In_ uint32_t Msg,\r
+    _In_ uint32_t wParam,\r
+    _In_ uint64_t lParam,\r
+    _In_ uint64_t hWnd);\r
 \r
-void ShowWindow(long hWnd);\r
-void HideWindow(long hWnd);\r
+bool PostWinThreadMessage(\r
+    _In_ uint32_t Msg,\r
+    _In_ uint32_t wParam,\r
+    _In_ uint64_t lParam,\r
+    _In_ uint64_t threadID = -1 );\r
 \r
-long CreateWinSemaphore(_In_ long lInitialCount, _In_ long lMaximumCount);\r
+void ShowWindow( uint64_t hWnd );\r
+void HideWindow( uint64_t hWnd );\r
 \r
-unsigned long WaitForSingleObject(_In_ long hHandle, _In_ unsigned long dwMilliseconds);\r
-\r
-bool ReleaseSemaphore(_In_ long hSemaphore, _In_ long lReleaseCount, _Out_opt_ long *lpPreviousCount);\r
-\r
-typedef void(*timerCallback)(void *data);\r
+using timerCallback = bool(*)(void *data);\r
 \r
 int SetTimer(int interval, timerCallback callback, void *data);\r
 \r
 void KillTimer(int id);\r
 \r
-void GetDPI( float &xDpi, float &yDpi );\r
+void GetDPI( uint64_t hWnd, float &xDpi, float &yDpi );\r
+\r
+int GetOrientation() const;\r
 \r
 const char* GetKeyName( int keyCode );\r
 \r
-long GetCurrentThreadId();\r
+uint64_t GetCurrentThreadId();\r
 \r
 void GetNanoseconds( uint64_t& timeInNanoseconds );\r
 \r
 unsigned int GetCurrentMilliSeconds( void );\r
 \r
-} // namespace WindowsPlatformImplement
-
-} // namespace Adaptor
-
-} // namespace internal
-
-} // namespace Dali
-
+} // namespace WindowsPlatformImplement\r
+\r
+} // namespace Adaptor\r
+\r
+} // namespace internal\r
+\r
+} // namespace Dali\r
+\r
 #endif // WIN32_WINDOWS_SYSTEM_INCLUDE\r