--- a/make/vs/testapp/main.c Sun Jan 28 17:10:30 2024 +0100 +++ b/make/vs/testapp/main.c Sun Jan 28 19:33:56 2024 +0100 @@ -55,6 +55,21 @@ UiList* menuList; +void event_mt(UiEvent* event, void* data) { + char* mt_str = data; + + printf("%s\n", mt_str); +} + +int test_threadfunc(void *data) { + char* str = data; + + return 0; +} + +void action_thread_test(UiEvent* event, void* data) { + ui_job(event->obj, test_threadfunc, "testdata", event_mt, "testdata2"); +} void action1(UiEvent* event, void* data) { char* action = data; @@ -247,7 +262,7 @@ ui_scrolledwindow0(obj) { ui_grid(obj, .margin = 10, .columnspacing = 5, .rowspacing = 20) { - ui_button(obj, .label = "Button1", .onclick = action1, .onclickdata = "action1"); + ui_button(obj, .label = "Thread Test", .onclick = action_thread_test, .onclickdata = "action1"); ui_button(obj, .label = "Button2", .icon = "Back", .onclick = action1, .onclickdata = "action2"); ui_button(obj, .icon = "Forward", .onclick = action1, .onclickdata = "action3", .hexpand = true); ui_newline(obj);