blob: 534dfedbcc9969499a5b3f84b2c9ff2be907ff0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
|