32 #include <stdlib.h> |
32 #include <stdlib.h> |
33 |
33 |
34 #include <ui/ui.h> |
34 #include <ui/ui.h> |
35 |
35 |
36 |
36 |
|
37 void action1(UiEvent* event, void* data) { |
|
38 char* action = data; |
|
39 printf("hello world!\n"); |
|
40 } |
37 |
41 |
38 void application_startup(UiEvent* event, void* data) { |
42 void application_startup(UiEvent* event, void* data) { |
39 UiObject* obj = ui_window("Test", NULL); |
43 UiObject* obj = ui_window("Test", NULL); |
|
44 |
|
45 ui_button(obj, "Button1", action1, "action1"); |
|
46 ui_button(obj, "Button2", action1, "action2"); |
|
47 ui_button(obj, "Button3", action1, "action3"); |
40 |
48 |
41 ui_show(obj); |
49 ui_show(obj); |
42 } |
50 } |
43 |
51 |
44 |
52 |