ui/winui/window.cpp

changeset 471
063a9f29098c
parent 379
958bae372271
child 477
be34594ee942
equal deleted inserted replaced
470:118e2386d5b4 471:063a9f29098c
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