| 105 uic_object_destroyed(obj); |
104 uic_object_destroyed(obj); |
| 106 cxMempoolFree(obj->ctx->mp); |
105 cxMempoolFree(obj->ctx->mp); |
| 107 } |
106 } |
| 108 |
107 |
| 109 UiObject* uic_object_new_toplevel(void) { |
108 UiObject* uic_object_new_toplevel(void) { |
| |
109 fflush(stdout); |
| 110 CxMempool *mp = cxMempoolCreateSimple(256); |
110 CxMempool *mp = cxMempoolCreateSimple(256); |
| 111 UiObject *obj = cxCalloc(mp->allocator, 1, sizeof(UiObject)); |
111 UiObject *obj = cxCalloc(mp->allocator, 1, sizeof(UiObject)); |
| |
112 fflush(stdout); |
| 112 obj->ctx = uic_context(obj, mp); |
113 obj->ctx = uic_context(obj, mp); |
| 113 obj->ctx->parent = ui_global_context(); |
114 obj->ctx->parent = ui_global_context(); |
| |
115 fflush(stdout); |
| 114 uic_object_created(obj); |
116 uic_object_created(obj); |
| |
117 fflush(stdout); |
| 115 return obj; |
118 return obj; |
| 116 } |
119 } |
| 117 |
120 |
| 118 UiObject* uic_ctx_object_new(UiContext *ctx, UIWIDGET widget) { |
121 UiObject* uic_ctx_object_new(UiContext *ctx, UIWIDGET widget) { |
| 119 UiObject *newobj = cxCalloc(ctx->allocator, 1, sizeof(UiObject)); |
122 UiObject *newobj = cxCalloc(ctx->allocator, 1, sizeof(UiObject)); |