|
HikoGUI
A low latency retained GUI
|
CRT - Main entry point of a ttauri program. More...
#include "os_detect.hpp"#include "application_win32.hpp"#include <Windows.h>Go to the source code of this file.
Macros | |
| #define | tt_application(...) tt::application_win32(__VA_ARGS__) |
Functions | |
| int | tt_main (std::vector< std::string > arguments, tt::os_handle instance) |
| Main entry-point. | |
| int WINAPI | WinMain (_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nShowCmd) |
| Windows entry-point. | |
CRT - Main entry point of a ttauri program.
This header file will abstract the entry point for a program for different operating systems, and call the tt_main() function that should be defined as a portable entry point of the program.
This header should be included only once by a only a single translation-unit, as it defines main() or WinMain().
The work done by this abstraction is purposfully very limitted, its task it to make sure the command-line arguments are split into tokens according to the rules of the operating system's shell. And that the command line arguments are encoded as UTF-8.
| int tt_main | ( | std::vector< std::string > | arguments, |
| tt::os_handle | instance ) |
Main entry-point.
| arguments | The command line arguments, split into tokens. The first argument is the executable. |
| instance | An handle to the application instance. On windows this is used open windows on this instance. |
| int WINAPI WinMain | ( | _In_ HINSTANCE | hInstance, |
| _In_opt_ HINSTANCE | hPrevInstance, | ||
| _In_ LPSTR | lpCmdLine, | ||
| _In_ int | nShowCmd ) |
Windows entry-point.
This function will call tt_main().
It will use GetCommandLineW() to retrieve the command line in Unicode.
The nShowCmd is used to insert add a command line argument at index 1: