HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
crt.hpp
Go to the documentation of this file.
1// Copyright Take Vos 2021-2022.
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 "utility.hpp"
24#include "crt_utils.hpp"
25
26#if not defined(HI_CRT_NO_MAIN)
27
34int hi_main(int argc, char *argv[]);
35
36#if HI_OPERATING_SYSTEM == HI_OS_WINDOWS
37#include "win32_headers.hpp"
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] = hi::crt_start(hInstance, nShowCmd);
56 hilet r = hi_main(argc, argv);
57 return hi::crt_finish(argc, argv, r);
58}
59
60#else
61#error "Need entry point for this architecture"
62#endif
63#endif
Utilities for starting and stopping a hikogui application.
Utilities used by the HikoGUI library itself.
#define hilet
Invariant should be the default for variables.
Definition utility.hpp:23
int hi_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
Rules for working with win32 headers.