ui/motif/window.c

branch
newapi
changeset 176
bc63cb601f6d
parent 128
c284c15509a8
child 253
087cc9216f28
equal deleted inserted replaced
175:2cb06c231057 176:bc63cb601f6d
34 #include "toolbar.h" 34 #include "toolbar.h"
35 #include "container.h" 35 #include "container.h"
36 #include "../ui/window.h" 36 #include "../ui/window.h"
37 #include "../common/context.h" 37 #include "../common/context.h"
38 38
39 #include <cx/basic_mempool.h>
40
39 static int nwindows = 0; 41 static int nwindows = 0;
40 42
41 static int window_default_width = 600; 43 static int window_default_width = 600;
42 static int window_default_height = 500; 44 static int window_default_height = 500;
43 45
60 ui_exit_mainloop(); 62 ui_exit_mainloop();
61 } 63 }
62 } 64 }
63 65
64 static UiObject* create_window(char *title, void *window_data, UiBool simple) { 66 static UiObject* create_window(char *title, void *window_data, UiBool simple) {
65 UcxMempool *mp = ucx_mempool_new(256); 67 CxMempool *mp = cxBasicMempoolCreate(256);
66 UiObject *obj = ucx_mempool_calloc(mp, 1, sizeof(UiObject)); 68 const CxAllocator *a = mp->allocator;
67 obj->ctx = uic_context(obj, mp); 69 UiObject *obj = cxCalloc(a, 1, sizeof(UiObject));
70 obj->ctx = uic_context(obj, a);
68 obj->window = window_data; 71 obj->window = window_data;
69 72
70 Arg args[16]; 73 Arg args[16];
71 int n = 0; 74 int n = 0;
72 75

mercurial