ui/common/object.c

branch
newapi
changeset 328
059cba080ab4
parent 174
0358f1d9c506
equal deleted inserted replaced
325:99a93a9250c4 328:059cba080ab4
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;

mercurial