| 26 * POSSIBILITY OF SUCH DAMAGE. |
26 * POSSIBILITY OF SUCH DAMAGE. |
| 27 */ |
27 */ |
| 28 |
28 |
| 29 #import "toolkit.h" |
29 #import "toolkit.h" |
| 30 |
30 |
| |
31 #include <stdlib.h> |
| |
32 #include <string.h> |
| |
33 |
| 31 #include "../common/document.h" |
34 #include "../common/document.h" |
| 32 #include "../common/properties.h" |
35 #include "../common/properties.h" |
| 33 #include "../common/menu.h" |
36 #include "../common/menu.h" |
| 34 #include "../common/toolbar.h" |
37 #include "../common/toolbar.h" |
| 35 #include "../common/threadpool.h" |
38 #include "../common/threadpool.h" |
| 51 |
54 |
| 52 /* ------------------- App Init / Event Loop functions ------------------- */ |
55 /* ------------------- App Init / Event Loop functions ------------------- */ |
| 53 |
56 |
| 54 |
57 |
| 55 void ui_init(const char *appname, int argc, char **argv) { |
58 void ui_init(const char *appname, int argc, char **argv) { |
| 56 application_name = appname; |
59 application_name = appname ? strdup(appname) : NULL; |
| 57 app_argc = argc; |
60 app_argc = argc; |
| 58 app_argv = (const char**)argv; |
61 app_argv = (const char**)argv; |
| 59 |
62 |
| 60 uic_init_global_context(); |
63 uic_init_global_context(); |
| 61 |
64 |