Usermode/AxWin4 - Add very basic start on a UI program
[tpg/acess2.git] / Usermode / Applications / axwin4_src / UI / main.c
1 /*
2  * AxWin4 GUI - UI Core
3  * - By John Hodge (thePowersGang)
4  *
5  * main.c
6  * - Program core
7  */
8 #include <axwin4/axwin.h>
9 #include <assert.h>
10
11 // === CODE ===
12 int main(int argc, const char *argv[])
13 {
14         assert( AxWin4_Connect("ipcpipe:///Devices/ipcpipe/axwin4") );
15         
16         tAxWin4_Window  *bgwin = AxWin4_CreateWindow("background");
17         
18         AxWin4_MoveWindow(bgwin, 0,0);
19         AxWin4_ResizeWindow(bgwin, 640,480);
20         //AxWin4_SetWindowFlags(bgwin, AXWIN4_WNDFLAG_NODECORATE|AXWIN4_WNDFLAG_KEEPBELOW);
21         
22         // Load image
23         char *image = malloc(640*480*4);
24         AxWin4_DrawBitmap(bgwin, 0, 0, 640, 480, image);
25
26         _SysDebug("Beginning queue");
27         
28         while( AxWin4_WaitEventQueue(0) )
29                 ;
30         _SysDebug("Clean exit");
31         
32         return 0;
33 }

UCC git Repository :: git.ucc.asn.au