49 } |
49 } |
50 } |
50 } |
51 |
51 |
52 |
52 |
53 UiObject* uic_object_new(UiObject *toplevel, UIWIDGET widget) { |
53 UiObject* uic_object_new(UiObject *toplevel, UIWIDGET widget) { |
54 UiContext *ctx = toplevel->ctx; |
54 return uic_ctx_object_new(toplevel->ctx, widget); |
55 |
55 } |
|
56 |
|
57 UiObject* uic_ctx_object_new(UiContext *ctx, UIWIDGET widget) { |
56 UiObject *newobj = cxCalloc(ctx->allocator, 1, sizeof(UiObject)); |
58 UiObject *newobj = cxCalloc(ctx->allocator, 1, sizeof(UiObject)); |
57 newobj->ctx = ctx; |
59 newobj->ctx = ctx; |
58 newobj->widget = widget; |
60 newobj->widget = widget; |
59 |
61 |
60 return newobj; |
62 return newobj; |