From fbfd90255731954fb80483f4ba7188d3611fafec Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 31 Mar 2019 17:14:47 +0800 Subject: ... --- include/cru/platform/win/god_window.hpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 include/cru/platform/win/god_window.hpp (limited to 'include/cru/platform/win/god_window.hpp') diff --git a/include/cru/platform/win/god_window.hpp b/include/cru/platform/win/god_window.hpp new file mode 100644 index 00000000..534dfedb --- /dev/null +++ b/include/cru/platform/win/god_window.hpp @@ -0,0 +1,33 @@ +#pragma once +#include "win_pre_config.hpp" + +#include +#include + +#include "cru/common/base.hpp" + +namespace cru::platform::win { +class WinApplication; +class WindowClass; + +class GodWindow : public Object { + public: + explicit GodWindow(WinApplication* application); + GodWindow(const GodWindow& other) = delete; + GodWindow(GodWindow&& other) = delete; + GodWindow& operator=(const GodWindow& other) = delete; + GodWindow& operator=(GodWindow&& other) = delete; + ~GodWindow() override; + + HWND GetHandle() const { return hwnd_; } + + std::optional HandleGodWindowMessage(HWND hwnd, int msg, + WPARAM w_param, LPARAM l_param); + + private: + WinApplication* application_; + + std::shared_ptr god_window_class_; + HWND hwnd_; +}; +} // namespace cru::platform::win \ No newline at end of file -- cgit v1.2.3