X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fwindows%2Fplatform-implement-win.h;h=1425e29af9bf53f09059e45f71eeba932091d9c9;hb=6a42999cd06b00bbb181b6a6cf943caacd0e2ab3;hp=18b33c19272f9b395ae3f499cccd2a75c01abbdc;hpb=6f87db7f10cf41060ba6417eb108897f8140eb2a;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/windows/platform-implement-win.h b/dali/internal/window-system/windows/platform-implement-win.h index 18b33c1..1425e29 100755 --- a/dali/internal/window-system/windows/platform-implement-win.h +++ b/dali/internal/window-system/windows/platform-implement-win.h @@ -1,21 +1,21 @@ #ifndef PLATFORM_IMPLEMENT_WIN_INCLUDE #define PLATFORM_IMPLEMENT_WIN_INCLUDE -/* -* 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. -* +/* +* 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. +* */ // EXTERNAL_HEADERS @@ -25,72 +25,95 @@ typedef uint64_t WinWindowHandle; typedef uint64_t WinPixmap; -namespace Dali -{ - -namespace Internal -{ - -namespace Adaptor -{ +namespace Dali +{ + +namespace Internal +{ + +namespace Adaptor +{ namespace WindowsPlatformImplementation { void RunLoop(); -int GetEdgeHeight(); +bool PostWinThreadMessage( + _In_ uint32_t Msg, + _In_ uint32_t wParam, + _In_ uint64_t lParam, + _In_ uint64_t threadID = -1 ); + +using timerCallback = bool(*)(void *data); + +int SetTimer(int interval, timerCallback callback, void *data); + +void KillTimer(int id); + +const char* GetKeyName( int keyCode ); + +uint64_t GetCurrentThreadId(); + +void GetNanoseconds( uint64_t& timeInNanoseconds ); + +unsigned int GetCurrentMilliSeconds( void ); + +class WindowImpl +{ +public: + WindowImpl(); + + virtual ~WindowImpl(); + + static void ProcWinMessge( uint64_t hWnd, uint32_t uMsg, uint64_t wParam, uint64_t lParam ); -int GetColorDepth(); + void GetDPI( float &xDpi, float &yDpi ); -uint64_t CreateHwnd( + int GetColorDepth(); + + uint64_t CreateHwnd( _In_opt_ const char *lpClassName, _In_opt_ const char *lpWindowName, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, - _In_opt_ uint64_t parent); + _In_opt_ uint64_t parent ); -void SetListener( CallbackBase *callback ); + void SetListener( CallbackBase *callback ); -bool PostWinMessage( + bool PostWinMessage( _In_ uint32_t Msg, _In_ uint32_t wParam, - _In_ uint64_t lParam, - _In_ uint64_t hWnd); + _In_ uint64_t lParam ); -bool PostWinThreadMessage( - _In_ uint32_t Msg, - _In_ uint32_t wParam, - _In_ uint64_t lParam, - _In_ uint64_t threadID = -1 ); + int32_t GetEdgeWidth(); -void ShowWindow( uint64_t hWnd ); -void HideWindow( uint64_t hWnd ); + int32_t GetEdgeHeight(); -using timerCallback = bool(*)(void *data); + void SetHWND(uint64_t inHWnd); + void SetWinProc(); -int SetTimer(int interval, timerCallback callback, void *data); +protected: -void KillTimer(int id); +private: -void GetDPI( uint64_t hWnd, float &xDpi, float &yDpi ); + unsigned long windowStyle; -const char* GetKeyName( int keyCode ); + int colorDepth; + uint64_t mHWnd; + uint64_t mHdc; -uint64_t GetCurrentThreadId(); + CallbackBase *listener; +}; -void GetNanoseconds( uint64_t& timeInNanoseconds ); +} // namespace WindowsPlatformImplement -unsigned int GetCurrentMilliSeconds( void ); +} // namespace Adaptor + +} // namespace internal + +} // namespace Dali -} // namespace WindowsPlatformImplement - -} // namespace Adaptor - -} // namespace internal - -} // namespace Dali - #endif // WIN32_WINDOWS_SYSTEM_INCLUDE