application/main.c

changeset 82
0cdb8089a29f
parent 81
5eb765a7a793
child 83
a38aec91bd66
equal deleted inserted replaced
81:5eb765a7a793 82:0cdb8089a29f
90 90
91 void action_test(UiEvent *event, void *data) { 91 void action_test(UiEvent *event, void *data) {
92 //ui_select_tab(tabview, 0); 92 //ui_select_tab(tabview, 0);
93 } 93 }
94 */ 94 */
95
96 void action_menu(UiEvent *event, void *data) {
97 printf("action_menu test: {%s}\n", data);
98 fflush(stdout);
99 }
100
95 int main(int argc, char** argv) { 101 int main(int argc, char** argv) {
96 ui_init("app1", argc, argv); 102 ui_init("app1", argc, argv);
97 103
98 ui_menu("File"); 104 ui_menu("File");
99 ui_menuitem("Hello", NULL, NULL); 105 ui_menuitem("Hello", action_menu, "hello");
106 ui_submenu("Submenu1");
107 ui_submenu("Submenu2");
108 ui_menuitem("item2", NULL, NULL);
109 ui_submenu_end();
110 ui_menuitem("item3", NULL, NULL);
111 ui_submenu_end();
112 ui_menuitem("item4", NULL, NULL);
100 113
101 UiObject *obj = ui_window("Test", NULL); 114 UiObject *obj = ui_window("Test", NULL);
102 ui_show(obj); 115 ui_show(obj);
103 ui_main(); 116 ui_main();
104 /* 117 /*

mercurial