11#ifndef INCGUARD_MGL_WIN32_WINDOW_H_1614567872
12#define INCGUARD_MGL_WIN32_WINDOW_H_1614567872
15#if defined(MGL_TARGET_WIN32)
42 bool Initialize(HINSTANCE hInstance,
int nCmdShow, WNDPROC windowProc, const Descriptor &descriptor) noexcept;
60 [[nodiscard]]
constexpr int GetWidth() const noexcept
71 [[nodiscard]]
constexpr int GetHeight() const noexcept
88 bool Resize(
int width,
int height)
noexcept;
94 HINSTANCE _hInstance{
nullptr};
98 float _scaleFactor{1.0f};
シングルトンテンプレート(共有ライブラリ用)
Definition mgl_singleton.h:44
Win32用ウィンドウクラス
Definition mgl_win32_window.h:26
constexpr HINSTANCE GetAppInstanceHandle() const noexcept
アプリケーションインスタンスのハンドルを取得
Definition mgl_win32_window.h:82
bool Resize(int width, int height) noexcept
ウィンドウのリサイズ
Definition mgl_win32_window.cc:126
constexpr int GetWidth() const noexcept
ウィンドウの幅を取得
Definition mgl_win32_window.h:60
constexpr int GetHeight() const noexcept
ウィンドウの高さを取得
Definition mgl_win32_window.h:71
void SetWindowTitle(const char *title) noexcept
ウィンドウタイトルの設定
Definition mgl_win32_window.cc:108
float GetLogicalScaleFactor() const noexcept
ウィンドウの論理サイズの倍率を取得
Definition mgl_win32_window.cc:149
void Update() noexcept
ウィンドウの更新処理
Definition mgl_win32_window.cc:160
bool Initialize(HINSTANCE hInstance, int nCmdShow, WNDPROC windowProc, const Descriptor &descriptor) noexcept
初期化処理
Definition mgl_win32_window.cc:40
constexpr HWND GetWindowHandler() noexcept
ウィンドウハンドラの取得
Definition mgl_win32_window.h:49
static STL::unique_ptr< Window > & GetInstanceRef() noexcept
インスタンスの取得
Definition mgl_win32_window.cc:22
std::unique_ptr< T, Deleter > unique_ptr
MGLのアロケータを利用するユニークポインタ
Definition mgl_stl_memory.h:248
ウィンドウ初期化用記述子
Definition mgl_win32_window.h:31
int height
ウィンドウの高さ
Definition mgl_win32_window.h:33
HICON icon
ウィンドウアイコン
Definition mgl_win32_window.h:36
int width
ウィンドウの幅
Definition mgl_win32_window.h:32
LPCWSTR className
クラス名(nullptr指定でウィンドウタイトルを使用)
Definition mgl_win32_window.h:35
HICON smallIcon
ウィンドウの小アイコン
Definition mgl_win32_window.h:37
LPCWSTR windowTitle
ウィンドウタイトル
Definition mgl_win32_window.h:34