Equalizer  2.0.0
Parallel Rendering Framework
glx/messagePump.h
1 
2 /* Copyright (c) 2007-2013, 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 <lunchbox/stdExt.h> // member
27 
28 namespace eq
29 {
30 namespace glx
31 {
32 
35 {
36 public:
38  MessagePump();
39 
41  virtual ~MessagePump();
42 
43  void postWakeup() final;
44  void dispatchAll() final;
45  void dispatchOne( const uint32_t timeout=LB_TIMEOUT_INDEFINITE ) final;
46 
58  void register_( Display* display );
59 
61  void deregister( Display* display );
62 
64  void register_( deflect::Proxy* proxy ) override;
65 
67  void deregister( deflect::Proxy* proxy ) override;
68 
69 private:
70  co::ConnectionSet _connections;
71  stde::hash_map< void*, size_t > _referenced;
72 };
73 
74 }
75 }
76 #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().