Merge branch 'master' of git://localhost/acess2
[tpg/acess2.git] / Usermode / Applications / axwin3_src / libaxwin3.so_src / main.c
1 /*
2  * AxWin3 Interface Library
3  * - By John Hodge (thePowersGang)
4  *
5  * main.c
6  * - Entrypoint and setup
7  */
8 #include <axwin3/axwin.h>
9 #include "include/internal.h"
10 #include "include/ipc.h"
11 #include <stdlib.h>
12
13 // === CODE ===
14 int SoMain(void *Base, int argc, const char *argv[], const char **envp)
15 {
16         // TODO: Parse the environment for the AXWIN3_SERVER variable
17         gsAxWin3_int_ServerDesc = getenv("AXWIN3_SERVER");
18         return 0;
19 }
20
21 void AxWin3_MainLoop(void)
22 {
23         tAxWin_IPCMessage       *msg;
24          int    bExit = 0;      
25
26         while(!bExit)
27         {
28                 msg = AxWin3_int_GetIPCMessage(0, NULL);
29                 if(!msg)        continue;       
30
31                 _SysDebug("AxWin3_MainLoop - Message (Type=%i, Window=%i, Len=%i)",
32                         msg->ID, msg->Window, msg->Size);
33
34                 AxWin3_int_HandleMessage( msg );
35         }
36 }
37
38 void AxWin3_MessageSelect(int nFD, fd_set *FDs)
39 {
40         tAxWin_IPCMessage *msg;
41         msg = AxWin3_int_GetIPCMessage(nFD, FDs);
42         if( msg )
43                 AxWin3_int_HandleMessage( msg );
44 }
45

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