Merge branch 'master' of git://localhost/acess2
[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_Boolean  tIPCMsg_Boolean;
18 typedef struct sIPCMsg_SetWindowPos     tIPCMsg_SetWindowPos;
19 typedef struct sIPCMsg_SendMsg  tIPCMsg_SendMsg;
20 typedef struct sIPCMsg_RegAction        tIPCMsg_RegAction;
21
22 typedef struct sIPCMsg_GetDisplayDims   tIPCMsg_GetDisplayDims;
23 typedef struct sIPCMsg_RetDisplayDims   tIPCMsg_RetDisplayDims;
24
25 /**
26  * \name Flags for IPC Messages
27  * \{
28  */
29 //! Request a return value
30 #define IPCMSG_FLAG_RETURN      0x01
31 /**
32  * \}
33  */
34
35 struct sAxWin_IPCMessage
36 {
37          uint8_t        ID;
38          uint8_t        Flags;
39         uint16_t        Size;
40         uint32_t        Window;
41         char    Data[];
42 };
43
44 struct sIPCMsg_ReturnInt
45 {
46         uint32_t        Value;
47 };
48
49 struct sIPCMsg_CreateWin
50 {
51         uint32_t        NewWinID;
52         uint32_t        RendererArg;
53         char    Renderer[];
54 };
55
56 struct sIPCMsg_SendMsg
57 {
58         uint32_t        Remote; // Dest/Source for Server/Client bound
59         uint16_t        ID;
60         uint16_t        Length;
61         char    Data[];
62 };
63
64 struct sIPCMsg_Boolean
65 {
66         uint32_t        Value;
67 };
68
69 struct sIPCMsg_SetWindowPos
70 {
71          int16_t        X, Y;
72         uint16_t        W, H;
73         uint8_t         bSetPos;
74         uint8_t         bSetDims;
75 };
76
77 struct sIPCMsg_RegAction
78 {
79         uint16_t        Index;
80         char    Action[];
81 };
82
83 struct sIPCMsg_GetDisplayDims
84 {
85         uint16_t        DisplayID;
86 };
87
88 struct sIPCMsg_RetDisplayDims
89 {
90         uint16_t        X;
91         uint16_t        Y;
92         uint16_t        W;
93         uint16_t        H;
94 };
95
96 enum eAxWin_IPCMessageTypes
97 {
98         IPCMSG_PING,    //!< Get the server version
99         IPCMSG_GETDISPLAYCOUNT, 
100         IPCMSG_GETDISPLAYDIMS,
101
102         IPCMSG_SENDMSG,         //!< Send a message to another window (or to self)
103         IPCMSG_CREATEWIN,       //!< Create a window
104         IPCMSG_DESTROYWIN,      //!< Destroy a window
105         IPCMSG_SETWINTITLE,     //!< Set window title
106         IPCMSG_SHOWWINDOW,      //!< Show/Hide a window
107         IPCMSG_DECORATEWINDOW,  //!< Enable/Disable decorations
108         IPCMSG_FOCUSWINDOW,     //!< Give a window focus (no data)
109         IPCMSG_SETWINPOS,       //!< Set a window position
110         IPCMSG_REGACTION        //!< Register an action name
111 };
112
113 #endif

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