#include <x11_display.h>
Inheritance diagram for mimas::x11_display:


Public Member Functions | |
| x11_display (const std::string &name="") throw (mimasexception) | |
| Constructor. | |
| virtual | ~x11_display (void) |
| Destructor. | |
| Display * | get (void) |
| Get pointer to X11-display. | |
| void | event_loop (int timeout=INT_MAX, long mask=KeyPressMask|ExposureMask|StructureNotifyMask) throw (mimasexception) |
| Loop for events. | |
| void | process_events (long mask=KeyPressMask|ExposureMask|StructureNotifyMask) throw (mimasexception) |
| Process pending events. | |
| void | add_window (x11_window *win) |
| void | remove_window (x11_window *win) |
| void | quit (void) |
Protected Member Functions | |
| void | handle_event (XEvent &event) throw (mimasexception) |
Protected Attributes | |
| Display * | display |
| X11 display-variable. | |
| std::map< Window, x11_window * > | windows |
| Map of event-handlers. | |
| bool | doQuit |
This wrapper provides automatic destruction for an X11-display-variable.
Definition at line 22 of file x11_display.h.
| mimas::x11_display::x11_display | ( | const std::string & | name = "" |
) | throw (mimasexception) |
Constructor.
Open X11-display.
| name | Name of X11-display to use (default: use content of DISPLAY-variable. |
| virtual mimas::x11_display::~x11_display | ( | void | ) | [inline, virtual] |
| Display* mimas::x11_display::get | ( | void | ) | [inline] |
| void mimas::x11_display::event_loop | ( | int | timeout = INT_MAX, |
|
| long | mask = KeyPressMask|ExposureMask|StructureNotifyMask | |||
| ) | throw (mimasexception) |
Loop for events.
Loop for events until quit() is called by an x11_window object or until a time-out occurs.
| mask | Mask for filtering events. | |
| timeout | Time limit for the event-loop in milliseconds. Specify INT_MAX for no limit (default). |
| void mimas::x11_display::process_events | ( | long | mask = KeyPressMask|ExposureMask|StructureNotifyMask |
) | throw (mimasexception) |
| void mimas::x11_display::add_window | ( | x11_window * | win | ) |
| void mimas::x11_display::remove_window | ( | x11_window * | win | ) |
| void mimas::x11_display::quit | ( | void | ) | [inline] |
| void mimas::x11_display::handle_event | ( | XEvent & | event | ) | throw (mimasexception) [protected] |
Display* mimas::x11_display::display [protected] |
X11 display-variable.
Definition at line 63 of file x11_display.h.
Referenced by get(), and ~x11_display().
std::map< Window, x11_window * > mimas::x11_display::windows [protected] |
bool mimas::x11_display::doQuit [protected] |