Usermode/axwin3 - RichText cursor (hacked)
[tpg/acess2.git] / Usermode / Applications / axwin3_src / libaxwin3.so_src / main.c
index 3fba042..453d4ba 100644 (file)
@@ -6,8 +6,9 @@
  * - Entrypoint and setup
  */
 #include <axwin3/axwin.h>
-#include "include/ipc.h"
 #include "include/internal.h"
+#include "include/ipc.h"
+#include <stdlib.h>
 
 // === CODE ===
 int SoMain(void *Base, int argc, const char *argv[], const char **envp)
@@ -24,9 +25,21 @@ void AxWin3_MainLoop(void)
 
        while(!bExit)
        {
-               msg = AxWin3_int_GetIPCMessage();
-               
-               // TODO: Handle message
+               msg = AxWin3_int_GetIPCMessage(0, NULL);
+               if(!msg)        continue;       
+
+               _SysDebug("AxWin3_MainLoop - Message (Type=%i, Window=%i, Len=%i)",
+                       msg->ID, msg->Window, msg->Size);
+
+               AxWin3_int_HandleMessage( msg );
        }
 }
 
+void AxWin3_MessageSelect(int nFD, fd_set *FDs)
+{
+       tAxWin_IPCMessage *msg;
+       msg = AxWin3_int_GetIPCMessage(nFD, FDs);
+       if( msg )
+               AxWin3_int_HandleMessage( msg );
+}
+

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