ui/gtk/window.c

changeset 18
06be29a56f8b
parent 4
39b9b86ec452
child 21
012418e7dc90
equal deleted inserted replaced
17:db95c0104937 18:06be29a56f8b
54 } 54 }
55 } 55 }
56 56
57 UiObject* ui_window(char *title, void *window_data) { 57 UiObject* ui_window(char *title, void *window_data) {
58 UcxMempool *mp = ucx_mempool_new(256); 58 UcxMempool *mp = ucx_mempool_new(256);
59 UiObject *obj = ucx_mempool_calloc(mp, 1, sizeof(UiObject)); 59 UiObject *obj = ucx_mempool_calloc(mp, 1, sizeof(UiObject));
60 obj->widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
60 obj->ctx = uic_context(obj, mp); 61 obj->ctx = uic_context(obj, mp);
61 62
62 obj->widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
63 if(title != NULL) { 63 if(title != NULL) {
64 gtk_window_set_title(GTK_WINDOW(obj->widget), title); 64 gtk_window_set_title(GTK_WINDOW(obj->widget), title);
65 } 65 }
66 gtk_window_set_default_size( 66 gtk_window_set_default_size(
67 GTK_WINDOW(obj->widget), 67 GTK_WINDOW(obj->widget),

mercurial