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> |
39 #include <cx/mempool.h> |
40 |
40 |
41 static int nwindows = 0; |
41 static int nwindows = 0; |
42 |
42 |
43 static int window_default_width = 600; |
43 static int window_default_width = 600; |
44 static int window_default_height = 500; |
44 static int window_default_height = 500; |
65 |
65 |
66 static UiObject* create_window(char *title, void *window_data, UiBool simple) { |
66 static UiObject* create_window(char *title, void *window_data, UiBool simple) { |
67 CxMempool *mp = cxBasicMempoolCreate(256); |
67 CxMempool *mp = cxBasicMempoolCreate(256); |
68 const CxAllocator *a = mp->allocator; |
68 const CxAllocator *a = mp->allocator; |
69 UiObject *obj = cxCalloc(a, 1, sizeof(UiObject)); |
69 UiObject *obj = cxCalloc(a, 1, sizeof(UiObject)); |
70 obj->ctx = uic_context(obj, a); |
70 obj->ctx = uic_context(obj, mp); |
71 obj->window = window_data; |
71 obj->window = window_data; |
72 |
72 |
73 Arg args[16]; |
73 Arg args[16]; |
74 int n = 0; |
74 int n = 0; |
75 |
75 |