MGL(Win32)
読み取り中…
検索中…
一致する文字列を見つけられません
mgl_win32_main.h
[詳解]
1// SPDX-License-Identifier: Zlib
2/* ------------------------------------------------------------------------- */
9/* ------------------------------------------------------------------------- */
10
11#ifndef INCGUARD_MGL_WIN32_MAIN_H_1614567370
12#define INCGUARD_MGL_WIN32_MAIN_H_1614567370
13
14#include <mgl/mgl_environment.h>
15#if defined(MGL_TARGET_WIN32)
16
17#include <Windows.h>
20
21namespace MGL::Win32
22{
23int Main(
24 HINSTANCE hInstance,
25 HINSTANCE hPrevInstance,
26 LPSTR lpCmdLine,
27 int nCmdShow,
28 MGL::InitializerDelegate &initializer,
29 const Window::Descriptor &windowDescriptor,
30 MakeAppDelegateFunction makeDelegate) noexcept;
31
32/* ------------------------------------------------------------------------- */
43/* ------------------------------------------------------------------------- */
44template <class T>
45constexpr int Main(
46 HINSTANCE hInstance,
47 HINSTANCE hPrevInstance,
48 LPSTR lpCmdLine,
49 int nCmdShow,
50 MGL::InitializerDelegate &initializer,
51 const Window::Descriptor &windowDescriptor = Window::Descriptor()) noexcept
52{
53 return Main(hInstance, hPrevInstance, lpCmdLine, nCmdShow, initializer, windowDescriptor, [](STL::unique_ptr<ApplicationDelegate> &appDelegate)
54 {
55 appDelegate = STL::make_unique<T>();
56 });
57}
58} // namespace MGL::Win32
59
60#endif // MGL_TARGET_WIN32
61#endif // INCGUARD_MGL_WIN32_MAIN_H_1614567370
62
63// vim: et ts=4 sw=4 sts=4
イニシャライザデリゲート
Definition mgl_initializer_delegate.h:60
MGL 環境定義
MGL 初期化と終了
std::unique_ptr< T, Deleter > unique_ptr
MGLのアロケータを利用するユニークポインタ
Definition mgl_stl_memory.h:247
int Main(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow, MGL::InitializerDelegate &initializer, const Window::Descriptor &windowDescriptor, MakeAppDelegateFunction makeDelegate) noexcept
Win32メイン関数
Definition mgl_win32_main.cc:36
MGL Win32用ウィンドウ
ウィンドウ初期化用記述子
Definition mgl_win32_window.h:31