| 474 void ui_context_closefunc(UiContext *ctx, ui_callback fnc, void *udata) { |
474 void ui_context_closefunc(UiContext *ctx, ui_callback fnc, void *udata) { |
| 475 ctx->close_callback = fnc; |
475 ctx->close_callback = fnc; |
| 476 ctx->close_data = udata; |
476 ctx->close_data = udata; |
| 477 } |
477 } |
| 478 |
478 |
| 479 UIEXPORT void ui_context_destroy(UiContext *ctx) { |
479 void ui_context_destroy(UiContext *ctx) { |
| 480 CxIterator i = cxListIterator(ctx->destroy_handler); |
480 CxIterator i = cxListIterator(ctx->destroy_handler); |
| 481 cx_foreach(UiDestroyHandler *, h, i) { |
481 cx_foreach(UiDestroyHandler *, h, i) { |
| 482 h->destructor(h->data); |
482 h->destructor(h->data); |
| 483 } |
483 } |
| 484 cxMempoolFree(ctx->mp); |
484 cxMempoolFree(ctx->mp); |
| |
485 } |
| |
486 |
| |
487 UiContext* ui_context_parent(UiContext *ctx) { |
| |
488 return ctx->parent; |
| 485 } |
489 } |
| 486 |
490 |
| 487 |
491 |
| 488 void ui_set_group(UiContext *ctx, int group) { |
492 void ui_set_group(UiContext *ctx, int group) { |
| 489 if(!cxListIndexValid(ctx->groups, cxListFind(ctx->groups, &group))) { |
493 if(!cxListIndexValid(ctx->groups, cxListFind(ctx->groups, &group))) { |