Equalizer  1.9.0
Parallel Rendering Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 {
34  {
35  public:
37  MessagePump();
38 
40  virtual ~MessagePump();
41 
42  virtual void postWakeup();
43  virtual void dispatchAll();
44  virtual void dispatchOne( const uint32_t timeout=LB_TIMEOUT_INDEFINITE);
45 
57  void register_( Display* display );
58 
60  void deregister( Display* display );
61 
63  void register_( dc::Proxy* dcProxy ) override;
64 
66  void deregister( dc::Proxy* dcProxy ) override;
67 
68  private:
69  co::ConnectionSet _connections;
70  stde::hash_map< void*, size_t > _referenced;
71  };
72 }
73 }
74 #endif //EQ_GLX_MESSAGEPUMP_H
A message pump receiving and dispatching X11 events.
void deregister(Display *display)
Deregister a Display connection from event dispatch.
virtual void postWakeup()
Unblock dispatchOne().
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.
virtual void dispatchAll()
Dispatch all pending system events, does not block.
virtual void dispatchOne(const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
Dispatch at least one pending system event, blocks potentially.