Wrote a C version of xtest.go. I need to somehow restore the .net error handler in the Go code...

This commit is contained in:
Pietro Gagliardi 2015-11-25 17:25:57 -05:00
parent e775c3bb6c
commit c529ba86cf
1 changed files with 23 additions and 0 deletions

23
wpf/xtest.c Normal file
View File

@ -0,0 +1,23 @@
// 25 november 2015
#include <stdio.h>
#include "../ui.h"
int onClosing(uiWindow *w, void *data)
{
printf("in closing\n");
uiQuit();
return 1;
}
int main(void)
{
uiInitOptions o;
uiWindow *w;
if (uiInit(&o) != NULL) return 1;
w = uiNewWindow("Hello from C",
320, 240, 0);
uiWindowOnClosing(w, onClosing, NULL);
uiControlShow(uiControl(w));
uiMain();
printf("after main\n");
uiUninit();
printf("out\n");
}