Equalizer  2.1.0
Parallel Rendering Framework
glx/messagePump.h
1 
2 /* Copyright (c) 2007-2017, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef EQ_GLX_MESSAGEPUMP_H
19 #define EQ_GLX_MESSAGEPUMP_H
20 
21 #include <eq/glx/types.h>
22 #include <eq/messagePump.h> // base class
23 #include <eq/types.h>
24 
25 #include <co/connectionSet.h> // member
26 #include <unordered_map>
27 
28 namespace eq
29 {
30 namespace glx
31 {
34 {
35 public:
37  MessagePump();
38 
40  virtual ~MessagePump();
41 
42  void postWakeup() final;
43  void dispatchAll() final;
44  void dispatchOne(const uint32_t timeout = LB_TIMEOUT_INDEFINITE) final;
45 
57  void register_(Display* display);
58 
60  void deregister(Display* display);
61 
63  void register_(deflect::Proxy* proxy) override;
64 
66  void deregister(deflect::Proxy* proxy) override;
67 
68 private:
69  co::ConnectionSet _connections;
70  std::unordered_map<void*, size_t> _referenced;
71 };
72 }
73 }
74 #endif // EQ_GLX_MESSAGEPUMP_H
A message pump receiving and dispatching X11 events.
void dispatchAll() final
Dispatch all pending system events, does not block.
void deregister(Display *display)
Deregister a Display connection from event dispatch.
void register_(Display *display)
Register a new Display connection for event dispatch.
virtual ~MessagePump()
Destruct this message pump.
An interface to process system messages or events.
Definition: messagePump.h:27
MessagePump()
Construct a new X11 message pump.
The Equalizer client library.
Definition: eq/agl/types.h:23
void dispatchOne(const uint32_t timeout=LB_TIMEOUT_INDEFINITE) final
Dispatch at least one pending system event, blocks potentially.
void postWakeup() final
Unblock dispatchOne().