ui/winui/window.cpp

changeset 102
64ded9f6a6c6
parent 79
483d7342b439
equal deleted inserted replaced
101:7b3a3130be44 102:64ded9f6a6c6
140 140
141 return obj; 141 return obj;
142 } 142 }
143 143
144 UIEXPORT UiObject* ui_simple_window(const char *title, void *window_data) { 144 UIEXPORT UiObject* ui_simple_window(const char *title, void *window_data) {
145 CxMempool* mp = cxBasicMempoolCreate(256); 145 CxMempool* mp = cxMempoolCreateSimple(256);
146 UiObject* obj = (UiObject*)cxCalloc(mp->allocator, 1, sizeof(UiObject)); 146 UiObject* obj = (UiObject*)cxCalloc(mp->allocator, 1, sizeof(UiObject));
147 147
148 obj->ctx = uic_context(obj, mp); 148 obj->ctx = uic_context(obj, mp);
149 obj->window = window_data; 149 obj->window = window_data;
150 150
221 UiWindow *window = parent->wobj; 221 UiWindow *window = parent->wobj;
222 if (!window) { 222 if (!window) {
223 return NULL; 223 return NULL;
224 } 224 }
225 225
226 CxMempool* mp = cxBasicMempoolCreate(256); 226 CxMempool* mp = cxMempoolCreateSimple(256);
227 UiObject* obj = (UiObject*)cxCalloc(mp->allocator, 1, sizeof(UiObject)); 227 UiObject* obj = (UiObject*)cxCalloc(mp->allocator, 1, sizeof(UiObject));
228 228
229 obj->ctx = uic_context(obj, mp); 229 obj->ctx = uic_context(obj, mp);
230 230
231 ContentDialog dialog = ContentDialog(); 231 ContentDialog dialog = ContentDialog();

mercurial