162 i = cxListIterator(ls); |
162 i = cxListIterator(ls); |
163 cx_foreach(void *, doc, i) { |
163 cx_foreach(void *, doc, i) { |
164 ctx->detach_document2(ctx, doc); |
164 ctx->detach_document2(ctx, doc); |
165 } |
165 } |
166 |
166 |
167 cxListDestroy(ls); |
167 cxListFree(ls); |
168 } |
168 } |
169 |
169 |
170 static UiVar* ctx_getvar(UiContext *ctx, CxHashKey key) { |
170 static UiVar* ctx_getvar(UiContext *ctx, CxHashKey key) { |
171 UiVar *var = cxMapGet(ctx->vars, key); |
171 UiVar *var = cxMapGet(ctx->vars, key); |
172 if(!var && ctx->documents) { |
172 if(!var && ctx->documents) { |
464 ctx->close_callback = fnc; |
464 ctx->close_callback = fnc; |
465 ctx->close_data = udata; |
465 ctx->close_data = udata; |
466 } |
466 } |
467 |
467 |
468 UIEXPORT void ui_context_destroy(UiContext *ctx) { |
468 UIEXPORT void ui_context_destroy(UiContext *ctx) { |
469 cxMempoolDestroy(ctx->mp); |
469 cxMempoolFree(ctx->mp); |
470 } |
470 } |
471 |
471 |
472 |
472 |
473 void ui_set_group(UiContext *ctx, int group) { |
473 void ui_set_group(UiContext *ctx, int group) { |
474 if(cxListFind(ctx->groups, &group) == -1) { |
474 if(cxListFind(ctx->groups, &group) == -1) { |