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:
parent
e775c3bb6c
commit
c529ba86cf
|
@ -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");
|
||||
}
|
Loading…
Reference in New Issue