diff options
Diffstat (limited to 'new/test.c')
| -rw-r--r-- | new/test.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -9,10 +9,16 @@ int onClosing(uiWindow *w, void *data) return 1; } +void onClicked(uiControl *b, void *data) +{ + printf("button clicked!\n"); +} + int main(void) { uiInitError *err; uiWindow *w; + uiControl *button; err = uiInit(NULL); if (err != NULL) { @@ -25,6 +31,10 @@ int main(void) uiWindowOnClosing(w, onClosing, NULL); uiWindowShow(w); + button = uiNewButton("Click Me"); + uiButtonOnClicked(button, onClicked, NULL); + uiWindowSetChild(w, button); + uiMain(); printf("after uiMain()\n"); return 0; |
