b7e78e53e97bf33c491c1eed4d0d29aac86cae42
[tpg/acess2.git] / Usermode / Applications / axwin3_src / include / ipcmessages.h
1 /*
2  * Acess2 Window Manager v3
3  * - By John Hodge (thePowersGang)
4  *
5  * ipcmessages.h
6  * - IPC Message format definition
7  * - Shared between library and server
8  */
9 #ifndef _IPCMESSAGES_H_
10 #define _IPCMESSAGES_H_
11
12 #include <stdint.h>
13
14 typedef struct sAxWin_IPCMessage        tAxWin_IPCMessage;
15 typedef struct sIPCMsg_Return   tIPCMsg_Return;
16 typedef struct sIPCMsg_CreateWin        tIPCMsg_CreateWin;
17 typedef struct sIPCMsg_ShowWindow       tIPCMsg_ShowWindow;
18 typedef struct sIPCMsg_SetWindowPos     tIPCMsg_SetWindowPos;
19 typedef struct sIPCMsg_SendMsg  tIPCMsg_SendMsg;
20
21 /**
22  * \name Flags for IPC Messages
23  * \{
24  */
25 //! Request a return value
26 #define IPCMSG_FLAG_RETURN      0x01
27 /**
28  * \}
29  */
30
31 struct sAxWin_IPCMessage
32 {
33          uint8_t        ID;
34          uint8_t        Flags;
35         uint16_t        Size;
36         uint32_t        Window;
37         char    Data[];
38 };
39
40 struct sIPCMsg_Return
41 {
42         uint32_t        Value;
43 };
44
45 struct sIPCMsg_CreateWin
46 {
47         uint32_t        NewWinID;
48         uint32_t        RendererArg;
49         char    Renderer[];
50 };
51
52 struct sIPCMsg_SendMsg
53 {
54         uint32_t        Dest;
55          int    ID;
56         uint16_t        Length;
57         char    Data[];
58 };
59
60 struct sIPCMsg_ShowWindow
61 {
62         uint32_t        bShow;
63 };
64
65 struct sIPCMsg_SetWindowPos
66 {
67          int16_t        X, Y;
68         uint16_t        W, H;
69         uint8_t         bSetPos;
70         uint8_t         bSetDims;
71 };
72
73 enum eAxWin_IPCMessageTypes
74 {
75         IPCMSG_PING,    //!< Get the server version
76         IPCMSG_SENDMSG,         //!< Send a message to another window (or to self)
77         IPCMSG_CREATEWIN,       //!< Create a window
78         IPCMSG_DESTROYWIN,      //!< Destroy a window
79         IPCMSG_SHOWWINDOW,      //!< Show/Hide a window
80         IPCMSG_SETWINPOS,       //!< Set a window position
81 };
82
83 #endif

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