53 |
53 |
54 static UiIcon* folder_icon; |
54 static UiIcon* folder_icon; |
55 |
55 |
56 UiList* menuList; |
56 UiList* menuList; |
57 |
57 |
|
58 void event_mt(UiEvent* event, void* data) { |
|
59 char* mt_str = data; |
|
60 |
|
61 printf("%s\n", mt_str); |
|
62 } |
|
63 |
|
64 int test_threadfunc(void *data) { |
|
65 char* str = data; |
|
66 |
|
67 return 0; |
|
68 } |
|
69 |
|
70 void action_thread_test(UiEvent* event, void* data) { |
|
71 ui_job(event->obj, test_threadfunc, "testdata", event_mt, "testdata2"); |
|
72 } |
58 |
73 |
59 void action1(UiEvent* event, void* data) { |
74 void action1(UiEvent* event, void* data) { |
60 char* action = data; |
75 char* action = data; |
61 |
76 |
62 WindowData* wdata = event->window; |
77 WindowData* wdata = event->window; |
245 ui_list_append(wdata->list2, td5); |
260 ui_list_append(wdata->list2, td5); |
246 ui_list_append(wdata->list2, td6); |
261 ui_list_append(wdata->list2, td6); |
247 |
262 |
248 ui_scrolledwindow0(obj) { |
263 ui_scrolledwindow0(obj) { |
249 ui_grid(obj, .margin = 10, .columnspacing = 5, .rowspacing = 20) { |
264 ui_grid(obj, .margin = 10, .columnspacing = 5, .rowspacing = 20) { |
250 ui_button(obj, .label = "Button1", .onclick = action1, .onclickdata = "action1"); |
265 ui_button(obj, .label = "Thread Test", .onclick = action_thread_test, .onclickdata = "action1"); |
251 ui_button(obj, .label = "Button2", .icon = "Back", .onclick = action1, .onclickdata = "action2"); |
266 ui_button(obj, .label = "Button2", .icon = "Back", .onclick = action1, .onclickdata = "action2"); |
252 ui_button(obj, .icon = "Forward", .onclick = action1, .onclickdata = "action3", .hexpand = true); |
267 ui_button(obj, .icon = "Forward", .onclick = action1, .onclickdata = "action3", .hexpand = true); |
253 ui_newline(obj); |
268 ui_newline(obj); |
254 |
269 |
255 ui_button(obj, .label = "Button4", .onclick = action1, .onclickdata = "action4"); |
270 ui_button(obj, .label = "Button4", .onclick = action1, .onclickdata = "action4"); |