Add window support for Windows.
This commit is contained in:
parent
5d32592126
commit
c05b7b6315
27 changed files with 783 additions and 95 deletions
42
src/windows/ui_interfaces/win32/Win32Window.h
Normal file
42
src/windows/ui_interfaces/win32/Win32Window.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
#pragma once
|
||||
|
||||
#include "IPlatformWindow.h"
|
||||
#include <Windows.h>
|
||||
|
||||
class Win32ApplicationContext;
|
||||
class DesktopManager;
|
||||
|
||||
class Win32Window : public IPlatformWindow
|
||||
{
|
||||
public:
|
||||
Win32Window();
|
||||
virtual ~Win32Window() = default;
|
||||
|
||||
static std::unique_ptr<Win32Window> Create();
|
||||
|
||||
LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
HWND GetHandle() const;
|
||||
|
||||
void SetHandle(HWND handle)
|
||||
{
|
||||
mHandle = handle;
|
||||
}
|
||||
|
||||
int GetCmdShow() const
|
||||
{
|
||||
return mCmdShow;
|
||||
}
|
||||
|
||||
void SetCmdShow(int cmdShow)
|
||||
{
|
||||
mCmdShow = cmdShow;
|
||||
}
|
||||
|
||||
void CreateNative(Win32ApplicationContext* context, DesktopManager* desktopManager);
|
||||
|
||||
private:
|
||||
HWND mHandle{ 0 };
|
||||
int mCmdShow{ 0 };
|
||||
DesktopManager* mDesktopManager;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue