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