3f695ce971ee14aa2be2fbb8b5e3455b498a9f7b
[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_ReturnInt        tIPCMsg_ReturnInt;
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 typedef struct sIPCMsg_GetDisplayDims   tIPCMsg_GetDisplayDims;
22 typedef struct sIPCMsg_RetDisplayDims   tIPCMsg_RetDisplayDims;
23
24 /**
25  * \name Flags for IPC Messages
26  * \{
27  */
28 //! Request a return value
29 #define IPCMSG_FLAG_RETURN      0x01
30 /**
31  * \}
32  */
33
34 struct sAxWin_IPCMessage
35 {
36          uint8_t        ID;
37          uint8_t        Flags;
38         uint16_t        Size;
39         uint32_t        Window;
40         char    Data[];
41 };
42
43 struct sIPCMsg_ReturnInt
44 {
45         uint32_t        Value;
46 };
47
48 struct sIPCMsg_CreateWin
49 {
50         uint32_t        NewWinID;
51         uint32_t        RendererArg;
52         char    Renderer[];
53 };
54
55 struct sIPCMsg_SendMsg
56 {
57         uint32_t        Remote; // Dest/Source for Server/Client bound
58         uint16_t        ID;
59         uint16_t        Length;
60         char    Data[];
61 };
62
63 struct sIPCMsg_ShowWindow
64 {
65         uint32_t        bShow;
66 };
67
68 struct sIPCMsg_SetWindowPos
69 {
70          int16_t        X, Y;
71         uint16_t        W, H;
72         uint8_t         bSetPos;
73         uint8_t         bSetDims;
74 };
75
76 struct sIPCMsg_GetDisplayDims
77 {
78         uint16_t        DisplayID;
79 };
80
81 struct sIPCMsg_RetDisplayDims
82 {
83         uint16_t        X;
84         uint16_t        Y;
85         uint16_t        W;
86         uint16_t        H;
87 };
88
89 enum eAxWin_IPCMessageTypes
90 {
91         IPCMSG_PING,    //!< Get the server version
92         IPCMSG_GETDISPLAYCOUNT, 
93         IPCMSG_GETDISPLAYDIMS,
94
95         IPCMSG_SENDMSG,         //!< Send a message to another window (or to self)
96         IPCMSG_CREATEWIN,       //!< Create a window
97         IPCMSG_DESTROYWIN,      //!< Destroy a window
98         IPCMSG_SHOWWINDOW,      //!< Show/Hide a window
99         IPCMSG_SETWINPOS,       //!< Set a window position
100 };
101
102 #endif

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