ui/common/object.c

changeset 51
e324291ca9f8
parent 0
2483f517c562
child 86
8e7c57c23133
equal deleted inserted replaced
50:9c25e2616bfa 51:e324291ca9f8
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