60 ctx->allocator = mp->allocator; |
60 ctx->allocator = mp->allocator; |
61 ctx->obj = toplevel; |
61 ctx->obj = toplevel; |
62 ctx->vars = cxHashMapCreate(mp->allocator, CX_STORE_POINTERS, 16); |
62 ctx->vars = cxHashMapCreate(mp->allocator, CX_STORE_POINTERS, 16); |
63 |
63 |
64 ctx->documents = cxLinkedListCreate(mp->allocator, cx_cmp_intptr, CX_STORE_POINTERS); |
64 ctx->documents = cxLinkedListCreate(mp->allocator, cx_cmp_intptr, CX_STORE_POINTERS); |
65 ctx->group_widgets = cxLinkedListCreate(mp->allocator, NULL, sizeof(UiGroupWidget)); |
65 ctx->group_widgets = cxLinkedListCreate(mp->allocator, cx_cmp_ptr, sizeof(UiGroupWidget)); |
66 ctx->groups = cxArrayListCreate(mp->allocator, cx_cmp_int, sizeof(int), 32); |
66 ctx->groups = cxArrayListCreate(mp->allocator, cx_cmp_int, sizeof(int), 32); |
67 |
67 |
68 ctx->attach_document = uic_context_attach_document; |
68 ctx->attach_document = uic_context_attach_document; |
69 ctx->detach_document2 = uic_context_detach_document2; |
69 ctx->detach_document2 = uic_context_detach_document2; |
70 |
70 |
554 } |
555 } |
555 |
556 |
556 cxListAdd(ctx->group_widgets, &gw); |
557 cxListAdd(ctx->group_widgets, &gw); |
557 } |
558 } |
558 |
559 |
|
560 void uic_remove_group_widget(UiContext *ctx, void *widget) { |
|
561 (void)cxListFindRemove(ctx->group_widgets, widget); |
|
562 } |
|
563 |
559 UIEXPORT void *ui_allocator(UiContext *ctx) { |
564 UIEXPORT void *ui_allocator(UiContext *ctx) { |
560 return (void*)ctx->allocator; |
565 return (void*)ctx->allocator; |
561 } |
566 } |
562 |
567 |
563 void* ui_cx_mempool(UiContext *ctx) { |
568 void* ui_cx_mempool(UiContext *ctx) { |