353 job->finish_callback = f; |
353 job->finish_callback = f; |
354 job->finish_data = fd; |
354 job->finish_data = fd; |
355 pool->EnqueueJob(job); |
355 pool->EnqueueJob(job); |
356 } |
356 } |
357 |
357 |
|
358 |
|
359 |
|
360 void ui_set_widget_groups(UiContext *ctx, UIWIDGET widget, const int *groups) { |
|
361 if(!groups) { |
|
362 return; |
|
363 } |
|
364 size_t ngroups = uic_group_array_size(groups); |
|
365 ui_set_widget_ngroups(ctx, widget, groups, ngroups); |
|
366 } |
|
367 |
|
368 void ui_set_widget_ngroups(UiContext *ctx, UIWIDGET widget, const int *groups, size_t ngroups) { |
|
369 if(ngroups > 0) { |
|
370 uic_add_group_widget_i(ctx, widget, (ui_enablefunc)ui_set_enabled, groups, ngroups); |
|
371 ui_set_enabled(widget, FALSE); |
|
372 } |
|
373 } |
|
374 |
|
375 |
|
376 UIEXPORT void ui_set_enabled(UIWIDGET widget, int enabled) { |
|
377 Control ctrl = widget->uielement.as<Control>(); |
|
378 if (ctrl) { |
|
379 ctrl.IsEnabled(enabled); |
|
380 } |
|
381 } |