diff options
author | crupest <crupest@outlook.com> | 2019-04-04 23:08:22 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-04 23:08:22 +0800 |
commit | 6268f3ca09afef812cf288f323cacff22fbfcffc (patch) | |
tree | 86e89d3b4212ae069075f799a5278c120e258e73 /src/platform_win/window_manager.cpp | |
parent | dbda5a8e4f0d59ad95be8fc3ee7b21e9122cc474 (diff) | |
download | cru-6268f3ca09afef812cf288f323cacff22fbfcffc.tar.gz cru-6268f3ca09afef812cf288f323cacff22fbfcffc.tar.bz2 cru-6268f3ca09afef812cf288f323cacff22fbfcffc.zip |
Finish refactor!!!
Diffstat (limited to 'src/platform_win/window_manager.cpp')
-rw-r--r-- | src/platform_win/window_manager.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/platform_win/window_manager.cpp b/src/platform_win/window_manager.cpp index 62a73499..e6c255c3 100644 --- a/src/platform_win/window_manager.cpp +++ b/src/platform_win/window_manager.cpp @@ -2,13 +2,15 @@ #include "cru/platform/win/win_application.hpp" #include "cru/platform/win/win_native_window.hpp" +#include "cru/platform/win/window_class.hpp" #include <assert.h> namespace cru::platform::win { LRESULT __stdcall GeneralWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - auto window = WinApplication::GetInstance()->GetWindowManager()->FromHandle(hWnd); + auto window = + WinApplication::GetInstance()->GetWindowManager()->FromHandle(hWnd); LRESULT result; if (window != nullptr && @@ -21,8 +23,7 @@ LRESULT __stdcall GeneralWndProc(HWND hWnd, UINT Msg, WPARAM wParam, WindowManager::WindowManager(WinApplication* application) { application_ = application; general_window_class_ = std::make_shared<WindowClass>( - L"CruUIWindowClass", GeneralWndProc, - application->GetInstanceHandle()); + L"CruUIWindowClass", GeneralWndProc, application->GetInstanceHandle()); } void WindowManager::RegisterWindow(HWND hwnd, WinNativeWindow* window) { @@ -50,4 +51,4 @@ std::vector<WinNativeWindow*> WindowManager::GetAllWindows() const { for (auto [key, value] : window_map_) windows.push_back(value); return windows; } -} +} // namespace cru::platform::win |