application/demo_bindings.c

changeset 981
1d47e71f26b6
parent 969
7385c26d998d
equal deleted inserted replaced
980:39cb60b6a81b 981:1d47e71f26b6
30 30
31 #include <stdio.h> 31 #include <stdio.h>
32 #include <stdlib.h> 32 #include <stdlib.h>
33 #include <string.h> 33 #include <string.h>
34 34
35 #if !defined(UI_WIN32) 35 #if !defined(UI_WIN32) && !defined(UI_SERVER)
36 36
37 Document* document_create(int id) { 37 Document* document_create(int id) {
38 Document* doc = ui_document_new(sizeof(Document)); 38 Document* doc = ui_document_new(sizeof(Document));
39 UiContext *ctx = ui_document_context(doc); 39 UiContext *ctx = ui_document_context(doc);
40 40
169 ui_list_setselection(wdata->doclist, 0); 169 ui_list_setselection(wdata->doclist, 0);
170 170
171 ui_show(obj); 171 ui_show(obj);
172 } 172 }
173 173
174 #endif 174 int main(int argc, char **argv) {
175 ui_init(NULL, argc, argv);
176 ui_onstartup(application_startup, NULL);
177 ui_main();
178 return 0;
179 }
180
181 #else
175 182
176 #ifndef UI_WIN32 183 #ifndef UI_WIN32
177 184
178 int main(int argc, char **argv) { 185 int main(int argc, char **argv) {
179 ui_init(NULL, argc, argv);
180 ui_onstartup(application_startup, NULL);
181 ui_main();
182 return 0; 186 return 0;
183 } 187 }
184 188
185 #else 189 #else
186 190
187 int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { 191 int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {
188 return 0; 192 return 0;
189 } 193 }
190 194
191 #endif 195 #endif
196
197 #endif

mercurial