2 * AxWin Window Manager Interface Library
3 * By John Hodge (thePowersGang)
4 * This file is published under the terms of the Acess Licence. See the
5 * file COPYING for details.
7 * messages.c - Message Handling
12 int AxWin_MessageLoop();
13 tAxWin_Message *AxWin_WaitForMessage();
14 int AxWin_HandleMessage(tAxWin_Message *Message);
19 int AxWin_SendMessage(tAxWin_Message *Message)
24 SysSendMessage(giAxWin_PID, Message->Size*4, Message);
33 * \brief Loop forever, checking and waiting for messages
35 int AxWin_MessageLoop()
41 msg = AxWin_WaitForMessage();
42 ret = AxWin_HandleMessage(msg);
50 * \brief Wait for a message
52 tAxWin_Message *AxWin_WaitForMessage()
58 switch( giAxWin_Mode )
61 while( (length = SysGetMessage(&src, NULL)) == 0 ) sleep();
63 SysGetMessage(NULL, ret);
72 * \brief Handles a recieved message
74 int AxWin_HandleMessage(tAxWin_Message *Message)