35 #include "../common/document.h" |
35 #include "../common/document.h" |
36 #include "../common/properties.h" |
36 #include "../common/properties.h" |
37 |
37 |
38 static char *application_name; |
38 static char *application_name; |
39 |
39 |
40 static ui_callback appclose_fnc; |
40 static ui_callback appclose_fnc; |
41 static void *appclose_udata; |
41 static void *appclose_udata; |
42 |
42 |
43 void ui_init(char *appname, int argc, char **argv) { |
43 void ui_init(char *appname, int argc, char **argv) { |
44 gtk_init(&argc, &argv); |
44 gtk_init(&argc, &argv); |
45 application_name = appname; |
45 application_name = appname; |
46 |
46 |
51 //ui_list_init(); |
51 //ui_list_init(); |
52 |
52 |
53 uic_load_app_properties(); |
53 uic_load_app_properties(); |
54 } |
54 } |
55 |
55 |
|
56 char* ui_appname() { |
|
57 return application_name; |
|
58 } |
|
59 |
56 void ui_exitfunc(ui_callback f, void *udata) { |
60 void ui_exitfunc(ui_callback f, void *udata) { |
57 appclose_fnc = f; |
61 appclose_fnc = f; |
58 appclose_udata = udata; |
62 appclose_udata = udata; |
59 } |
63 } |
60 |
64 |
61 char* ui_appname() { |
65 void ui_openfilefunc(ui_callback f, void *userdata) { |
62 return application_name; |
66 // OS X only |
63 } |
67 } |
64 |
68 |
65 void ui_main() { |
69 void ui_main() { |
66 gtk_main(); |
70 gtk_main(); |
67 if(appclose_fnc) { |
71 if(appclose_fnc) { |