aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/win/god_window.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-03-31 17:14:47 +0800
committercrupest <crupest@outlook.com>2019-03-31 17:14:47 +0800
commitfbfd90255731954fb80483f4ba7188d3611fafec (patch)
tree8e3283c911d7aec76130d6a1dc7f5d8a85512b59 /include/cru/platform/win/god_window.hpp
parent877f65e2e2c40eecc7cfeb194dc9d391af60711b (diff)
downloadcru-fbfd90255731954fb80483f4ba7188d3611fafec.tar.gz
cru-fbfd90255731954fb80483f4ba7188d3611fafec.tar.bz2
cru-fbfd90255731954fb80483f4ba7188d3611fafec.zip
...
Diffstat (limited to 'include/cru/platform/win/god_window.hpp')
-rw-r--r--include/cru/platform/win/god_window.hpp33
1 files changed, 33 insertions, 0 deletions
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 <memory>
+#include <optional>
+
+#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<LRESULT> HandleGodWindowMessage(HWND hwnd, int msg,
+ WPARAM w_param, LPARAM l_param);
+
+ private:
+ WinApplication* application_;
+
+ std::shared_ptr<WindowClass> god_window_class_;
+ HWND hwnd_;
+};
+} // namespace cru::platform::win \ No newline at end of file