client/main.c

changeset 986
6f7600c2b9e1
parent 954
07c1effb2a31
equal deleted inserted replaced
985:93f07ccfd997 986:6f7600c2b9e1
103 } 103 }
104 104
105 void application_onstartup(UiEvent *event, void *userdata) { 105 void application_onstartup(UiEvent *event, void *userdata) {
106 // We need at least one window for the event loop to work. 106 // We need at least one window for the event loop to work.
107 // Create a debug window, that is invisible by default 107 // Create a debug window, that is invisible by default
108 debug_window = ui_simple_window("debug", NULL); 108 debug_window = ui_simple_window("debug");
109 // TODO: debug UI 109 // TODO: debug UI
110 110
111 if(test_mode) { 111 if(test_mode) {
112 testwindow_create(); 112 testwindow_create();
113 } 113 }
143 TestWindow *window = event->window; 143 TestWindow *window = event->window;
144 ui_set(window->output, ""); 144 ui_set(window->output, "");
145 } 145 }
146 146
147 void testwindow_create(void) { 147 void testwindow_create(void) {
148 UiObject *obj = ui_simple_window("Test", NULL); 148 UiObject *obj = ui_simple_window("Test");
149 ui_context_closefunc(obj->ctx, testwindow_close, NULL); 149 ui_context_closefunc(obj->ctx, testwindow_close, NULL);
150 ui_window_size(obj, 1800, 1400); 150 ui_window_size(obj, 1800, 1400);
151 151
152 TestWindow *window = ui_malloc(obj->ctx, sizeof(TestWindow)); 152 TestWindow *window = ui_malloc(obj->ctx, sizeof(TestWindow));
153 window->input = ui_text_new(obj->ctx, NULL); 153 window->input = ui_text_new(obj->ctx, NULL);

mercurial