1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #include <stdio.h>
30 #include <stdlib.h>
31
32 #ifdef _WIN32
33 #include <Windows.h>
34 #endif
35
36 #include <ui/ui.h>
37
38 #include "application.h"
39 #include "system.h"
40
41
42 int idav_main(
int argc,
char **argv) {
43 sys_init();
44 ui_init(
"idav", argc, argv);
45
46 application_init();
47 ui_onstartup(application_startup,
NULL);
48
49
50 ui_main();
51
52 sys_uninit();
53 return 0;
54 }
55
56 #ifndef _WIN32
57
58 int main(
int argc,
char** argv) {
59 return idav_main(argc, argv);
60 }
61 #else
62
63 int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
PSTR lpCmdLine,
int nCmdShow) {
64 return idav_main(__argc, __argv);
65 }
66 #endif
67
68