Usermode/AxWin4 - Send mouse/keyboard events to client
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / ipc.hpp
1 /*
2  * Acess2 GUI v4
3  * - By John Hodge (thePowersGang) 
4  *
5  * ipc.hpp
6  * - IPC Interface Header
7  */
8 #ifndef _IPC_H_
9 #define _IPC_H_
10
11 #include <exception>
12
13 extern "C" {
14 #include <acess/sys.h>
15 };
16
17 #include <serialisation.hpp>
18 #include <CConfigIPC.hpp>
19
20 namespace AxWin {
21
22 class CCompositor;
23 class CClient;
24
25 namespace IPC {
26
27 extern void     Initialise(const CConfigIPC& config, CCompositor& compositor);
28 extern int      FillSelect(::fd_set& rfds);
29 extern void     HandleSelect(const ::fd_set& rfds);
30 extern void     RegisterClient(CClient& client);
31 extern CClient* GetClientByID(uint16_t id);
32 extern void     DeregisterClient(CClient& client);
33
34 extern void     SendMessage_NotifyDims(CClient& client, unsigned int WinID, unsigned int NewW, unsigned int NewH);
35 extern void     SendMessage_MouseButton(CClient& client, unsigned int WinID, unsigned int X, unsigned int Y, uint8_t Button, bool Pressed);
36 extern void     SendMessage_MouseMove(CClient& client, unsigned int WinID, unsigned int X, unsigned int Y);
37 extern void     SendMessage_KeyEvent(CClient& client, unsigned int WinID, uint32_t KeySym, bool Pressed, const char *Translated);
38
39 extern void     HandleMessage(CClient& client, CDeserialiser& message);
40
41 class CClientFailure:
42         public ::std::exception
43 {
44         const std::string m_what;
45 public:
46         CClientFailure(std::string&& what);
47         ~CClientFailure() throw();
48         const char *what() const throw();
49 };
50
51 };      // namespace IPC
52 };      // namespace AxWin
53
54 #endif
55

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