Adding a way to get an hmodule.
This commit is contained in:
parent
93708c0c1c
commit
ca5e8fa073
|
@ -24,6 +24,7 @@
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace ui {
|
namespace ui {
|
||||||
|
|
||||||
|
typedef void* NativePlatformHandle;
|
||||||
typedef void* NativeWindowHandle;
|
typedef void* NativeWindowHandle;
|
||||||
|
|
||||||
class Window {
|
class Window {
|
||||||
|
@ -33,6 +34,7 @@ class Window {
|
||||||
virtual ~Window();
|
virtual ~Window();
|
||||||
|
|
||||||
Loop* loop() const { return loop_; }
|
Loop* loop() const { return loop_; }
|
||||||
|
virtual NativePlatformHandle native_platform_handle() const = 0;
|
||||||
virtual NativeWindowHandle native_handle() const = 0;
|
virtual NativeWindowHandle native_handle() const = 0;
|
||||||
|
|
||||||
MenuItem* main_menu() const { return main_menu_.get(); }
|
MenuItem* main_menu() const { return main_menu_.get(); }
|
||||||
|
|
|
@ -33,6 +33,10 @@ Win32Window::~Win32Window() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NativePlatformHandle Win32Window::native_platform_handle() const {
|
||||||
|
return ::GetModuleHandle(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
bool Win32Window::Initialize() { return OnCreate(); }
|
bool Win32Window::Initialize() { return OnCreate(); }
|
||||||
|
|
||||||
bool Win32Window::OnCreate() {
|
bool Win32Window::OnCreate() {
|
||||||
|
|
|
@ -26,6 +26,7 @@ class Win32Window : public Window {
|
||||||
Win32Window(Loop* loop, const std::wstring& title);
|
Win32Window(Loop* loop, const std::wstring& title);
|
||||||
~Win32Window() override;
|
~Win32Window() override;
|
||||||
|
|
||||||
|
NativePlatformHandle native_platform_handle() const override;
|
||||||
NativeWindowHandle native_handle() const override { return hwnd_; }
|
NativeWindowHandle native_handle() const override { return hwnd_; }
|
||||||
HWND hwnd() const { return hwnd_; }
|
HWND hwnd() const { return hwnd_; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue