Usermode/libc - Fix strchr and strrchr behavior
[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 //! IPC Message for renderer
32 #define IPCMSG_FLAG_RENDERER    0x80
33 /**
34  * \}
35  */
36
37 struct sAxWin_IPCMessage
38 {
39          uint8_t        ID;
40          uint8_t        Flags;
41         uint16_t        Size;
42         uint32_t        Window;
43         char    Data[];
44 };
45
46 struct sIPCMsg_ReturnInt
47 {
48         uint32_t        Value;
49 };
50
51 struct sIPCMsg_CreateWin
52 {
53         uint32_t        NewWinID;
54         uint32_t        RendererArg;
55         char    Renderer[];
56 };
57
58 struct sIPCMsg_SendMsg
59 {
60         uint32_t        Remote; // Dest/Source for Server/Client bound
61         uint16_t        ID;
62         uint16_t        Length;
63         char    Data[];
64 };
65
66 struct sIPCMsg_Boolean
67 {
68         uint32_t        Value;
69 };
70
71 struct sIPCMsg_SetWindowPos
72 {
73          int16_t        X, Y;
74         uint16_t        W, H;
75         uint8_t         bSetPos;
76         uint8_t         bSetDims;
77 };
78
79 struct sIPCMsg_RegAction
80 {
81         uint16_t        Index;
82         char    Action[];
83 };
84
85 struct sIPCMsg_GetDisplayDims
86 {
87         uint16_t        DisplayID;
88 };
89
90 struct sIPCMsg_RetDisplayDims
91 {
92         uint16_t        X;
93         uint16_t        Y;
94         uint16_t        W;
95         uint16_t        H;
96 };
97
98 enum eAxWin_IPCMessageTypes
99 {
100         IPCMSG_PING,    //!< Get the server version
101         IPCMSG_GETDISPLAYCOUNT, 
102         IPCMSG_GETDISPLAYDIMS,
103
104         IPCMSG_SENDMSG,         //!< Send a message to another window (or to self)
105         IPCMSG_CREATEWIN,       //!< Create a window
106         IPCMSG_DESTROYWIN,      //!< Destroy a window
107         IPCMSG_SETWINTITLE,     //!< Set window title
108         IPCMSG_SHOWWINDOW,      //!< Show/Hide a window
109         IPCMSG_DECORATEWINDOW,  //!< Enable/Disable decorations
110         IPCMSG_FOCUSWINDOW,     //!< Give a window focus (no data)
111         IPCMSG_SETWINPOS,       //!< Set a window position
112         IPCMSG_REGACTION        //!< Register an action name
113 };
114
115 #endif

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