9#include "crt_utils_intf.hpp"
10#include "../telemetry/telemetry.hpp"
11#include "../utility/utility.hpp"
12#include "../concurrency/concurrency.hpp"
13#include "../char_maps/char_maps.hpp"
14#include "../time/time.hpp"
15#include "../macros.hpp"
28hi_export_module(hikogui.crt.crt_utils : impl);
33hi_warning_ignore_msvc(26400);
35hi_export
namespace hi {
inline namespace v1 {
46 auto r =
new char[size + 1];
66 auto wargv = CommandLineToArgvW(GetCommandLineW(), &wargc);
67 hi_assert_not_null(wargv);
72 char **argv =
new char *[wargc + 2];
73 hi_assert_not_null(argv);
76 for (; argc != wargc; ++argc) {
83 argv[argc++] =
make_cstr(
"--window-state=maximize");
84 }
else if (show_cmd == 0 || show_cmd == 2 || show_cmd == 6 || show_cmd == 7 || show_cmd == 11) {
85 argv[argc++] =
make_cstr(
"--window-state=minimize");
92 auto const [tsc_frequency, aux_is_cpu_id] = hi::time_stamp_count::start_subsystem();
97 hi_log_info(
"The AUX value from the time-stamp-count is equal to the cpu-id.");
99 hi_log_info(
"The measured frequency of the TSC is {} Hz.", tsc_frequency);
105inline int crt_finish(
int argc,
char **argv,
int exit_code)
107 hi_assert_not_null(argv);
111 for (
auto i = 0; i != argc; ++i) {
Rules for working with win32 headers.
void shutdown_system() noexcept
Shutdown the system.
Definition subsystem.hpp:231
void start_system() noexcept
Start the system.
Definition subsystem.hpp:218
The HikoGUI namespace.
Definition array_generic.hpp:20
hi_export char * make_cstr(char const *c_str, std::size_t size=-1) noexcept
Copy a std::string to new memory.
Definition crt_utils_win32_impl.hpp:40
void initialize() noexcept
Initialize base functionality of HikoGUI.
Definition initialize.hpp:56
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
int crt_finish(int argc, char **argv, int exit_code)
Finish the hikogui system.
os_handle crt_application_instance
The application instance identified by the operating system.
Definition crt_utils_intf.hpp:24