Usermode/AxWin3 - Adding pop-up menu support (via a new window type)
[tpg/acess2.git] / Usermode / Applications / axwin3_src / libaxwin3.so_src / main.c
index 3fba042..fcd572a 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)
@@ -25,8 +26,15 @@ void AxWin3_MainLoop(void)
        while(!bExit)
        {
                msg = AxWin3_int_GetIPCMessage();
-               
+               if(!msg)        continue;       
+
                // TODO: Handle message
+               _SysDebug("oh look, a message (Type=%i, Window=%i, Len=%i)",
+                       msg->ID, msg->Window, msg->Size);
+
+               AxWin3_int_HandleMessage( msg );
+               
+               free(msg);
        }
 }
 

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