Equalizer  1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
agl/messagePump.h
1 
2 /* Copyright (c) 2007-2014, 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_AGL_MESSAGEPUMP_H
19 #define EQ_AGL_MESSAGEPUMP_H
20 
21 #include <eq/defines.h>
22 #ifdef AGL
23 
24 #include <eq/client/agl/types.h>
25 #include <eq/client/messagePump.h> // base class
26 #include <lunchbox/clock.h> // member
27 namespace eq
28 {
29 namespace agl
30 {
32 class MessagePump : public eq::MessagePump
33  {
34  public:
36  MessagePump();
37 
39  virtual ~MessagePump();
40 
41  virtual void postWakeup();
42  virtual void dispatchAll();
43  virtual void dispatchOne( const uint32_t timeout=LB_TIMEOUT_INDEFINITE);
44 
45  private:
46  EventQueueRef _receiverQueue;
47  EventRef _wakeupEvent;
48  lunchbox::Clock _clock;
49  bool _needGlobalLock;
50 
51  struct Private;
52  Private* _private; // placeholder for binary-compatible changes
53 
54  void _initReceiverQueue();
55  };
56 }
57 }
58 #endif // AGL
59 #endif // EQ_AGL_MESSAGEPUMP_H
An interface to process system messages or events.
Definition: messagePump.h:27