2018-08-19 09:46:58 +02:00
|
|
|
#pragma once
|
2019-05-09 13:50:55 +02:00
|
|
|
#pragma comment(linker,"/manifestdependency:\"" \
|
|
|
|
"type='win32' " \
|
|
|
|
"name='Microsoft.Windows.Common-Controls' " \
|
|
|
|
"version='6.0.0.0' " \
|
|
|
|
"processorArchitecture='*' " \
|
|
|
|
"publicKeyToken='6595b64144ccf1df' " \
|
|
|
|
"language='*'\"")
|
2019-05-09 08:06:30 +02:00
|
|
|
|
2020-05-30 15:55:23 +02:00
|
|
|
typedef struct WINAPP
|
|
|
|
{
|
|
|
|
HINSTANCE hInstance;
|
|
|
|
int nFillMode;
|
|
|
|
WNDCLASS WindowClass;
|
|
|
|
HWND WindowHandle;
|
|
|
|
bool bNoFocus;
|
|
|
|
bool isInScene;
|
|
|
|
};
|
|
|
|
|
2020-05-27 19:07:34 +02:00
|
|
|
extern WINAPP App;
|
2020-05-27 09:21:20 +02:00
|
|
|
extern unsigned int ThreadID;
|
|
|
|
extern uintptr_t ThreadHandle;
|
2018-08-19 09:46:58 +02:00
|
|
|
extern HACCEL hAccTable;
|
2020-04-23 19:22:01 +02:00
|
|
|
extern HWND WindowsHandle;
|
2018-08-19 09:46:58 +02:00
|
|
|
|
2020-05-27 19:07:34 +02:00
|
|
|
// return handle
|
|
|
|
#define BeginThread(function, threadid) _beginthreadex(0, 0, &function, 0, 0, &threadid)
|
|
|
|
#define EndThread() _endthreadex(1)
|
|
|
|
|
2020-06-18 15:54:08 +02:00
|
|
|
int lua_exception_handler(lua_State* L, sol::optional<const std::exception&> maybe_exception, sol::string_view description);
|
2020-05-27 09:21:20 +02:00
|
|
|
void WinProcMsg();
|
|
|
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
|
|
|
|
void WinClose();
|
2018-12-28 12:12:58 +01:00
|
|
|
LRESULT CALLBACK WinAppProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
2020-05-27 09:21:20 +02:00
|
|
|
void CALLBACK HandleWmCommand(unsigned short wParam);
|