VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GX::EventLoop Class Reference

An event-loop class that delivers Xlib 'Display' events to GX::Window objects via their GX::EventHandler interface. More...

#include <gxeventloop.h>

Public Member Functions

 EventLoop (Display &)
 Constructor. The display reference is kept.
 
void run ()
 Runs the event loop.
 
void runUntil (int event_type)
 Runs the event loop until the given event is received.
 
void runOnce ()
 Waits for one event and processes it.
 
void runToEmpty ()
 Processes all events in the queue and then returns.
 
void runToTimeout ()
 Processes all events until the timer goes off.
 
void startTimer (unsigned int milliseconds)
 Starts a timer for runToTimeout().
 
void handlePendingEvents ()
 Handles all pending events. More...
 

Detailed Description

An event-loop class that delivers Xlib 'Display' events to GX::Window objects via their GX::EventHandler interface.

Note that GX::Window objects register themselves with the GX::WindowMap singleton.

Definition at line 90 of file gxeventloop.h.

Member Function Documentation

void GX::EventLoop::handlePendingEvents ( )

Handles all pending events.

This is to allow the GX::EventLoop to be subservient to another event loop; the main event loop calls this method when it detects a read event on the display's file descriptor.

Definition at line 105 of file gxeventloop.cpp.


The documentation for this class was generated from the following files: