HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
crt.hpp
Go to the documentation of this file.
1// Copyright Take Vos 2021.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
21#pragma once
22
23#include "required.hpp"
24#include "crt_utils.hpp"
25
26#if not defined(TT_CRT_NO_MAIN)
27
34int tt_main(int argc, char *argv[]);
35
36#if TT_OPERATING_SYSTEM == TT_OS_WINDOWS
37#include <Windows.h>
38
49int WINAPI WinMain(
50 _In_ HINSTANCE hInstance,
51 [[maybe_unused]] _In_opt_ HINSTANCE hPrevInstance,
52 [[maybe_unused]] _In_ LPSTR lpCmdLine,
53 _In_ int nShowCmd)
54{
55 auto [argc, argv] = tt::crt_start(hInstance, nShowCmd);
56 ttlet r = tt_main(argc, argv);
57 return tt::crt_finish(argc, argv, r);
58}
59
60#else
61#error "Need entry point for this architecture"
62#endif
63#endif
int tt_main(int argc, char *argv[])
Main entry-point.
int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nShowCmd)
Windows entry-point.
Definition crt.hpp:49