mimas::x11_display Class Reference

Wrapper for X11-display. More...

#include <x11_display.h>

Inheritance diagram for mimas::x11_display:

Inheritance graph
[legend]
Collaboration diagram for mimas::x11_display:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

Wrapper for X11-display.

This wrapper provides automatic destruction for an X11-display-variable.

Author:
Jan Wedekind (jan at wedesoft.de)
Date:
Fri Apr 08 10:07:26 UTC 2005

Definition at line 22 of file x11_display.h.


Constructor & Destructor Documentation

mimas::x11_display::x11_display ( const std::string &  name = ""  )  throw (mimasexception)

Constructor.

Open X11-display.

Parameters:
name Name of X11-display to use (default: use content of DISPLAY-variable.

virtual mimas::x11_display::~x11_display ( void   )  [inline, virtual]

Destructor.

Definition at line 32 of file x11_display.h.

References display.


Member Function Documentation

Display* mimas::x11_display::get ( void   )  [inline]

Get pointer to X11-display.

Definition at line 34 of file x11_display.h.

References display.

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.

Parameters:
mask Mask for filtering events.
timeout Time limit for the event-loop in milliseconds. Specify INT_MAX for no limit (default).
See also:
process_events

void mimas::x11_display::process_events ( long  mask = KeyPressMask|ExposureMask|StructureNotifyMask  )  throw (mimasexception)

Process pending events.

See also:
event_loop

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]

Definition at line 58 of file x11_display.h.

References doQuit.

void mimas::x11_display::handle_event ( XEvent &  event  )  throw (mimasexception) [protected]


Member Data Documentation

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]

Map of event-handlers.

Definition at line 65 of file x11_display.h.

bool mimas::x11_display::doQuit [protected]

Definition at line 67 of file x11_display.h.

Referenced by quit().


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:48 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...