gfx_events.hh

Go to the documentation of this file.
00001 /*
00008  * LEGAL:   COPYRIGHT (C) 2007 JIM E. BROOKS
00009  *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
00010  *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
00011  *****************************************************************************/
00012 
00013 #ifndef GFX_EVENT_HH
00014 #define GFX_EVENT_HH 1
00015 
00016 #include "base_event.hh"
00017 #include "gfx_gui.hh"
00018 
00019 namespace gfx {
00020 
00026 class Events
00027 {
00028 public:
00030     struct TickInfo
00031     {
00032         TickInfo( Milliseconds elapsed, Milliseconds delta, Milliseconds freq )
00033         :   mMillisecondsElapsed(elapsed), mMillisecondsDelta(delta), mMillisecondsFreq(freq) { }
00034         const Milliseconds mMillisecondsElapsed;    
00035         const Milliseconds mMillisecondsDelta;      
00036         const Milliseconds mMillisecondsFreq;       
00037     };
00038 
00039 public:
00040     base::Event<>                           mReady;         // GFX is ready to execute graphics functions
00041     base::Event<>                           mIdle;          // when gfxsys is idle
00042     base::Event<TickInfo>                   mTick;          // timer-tick
00043     base::Event<>                           mDisplay;       // display/repaint event
00044     base::Event<WidthHeight<int> >          mWindow;        // window changed
00045     base::Event<Rect<int> >                 mViewport;      // viewport changed
00046     base::Event<>                           mPerspective;   // perspective/frustum changed
00047     base::Event<pair<eMouseEvent,bool> >    mMouseButton;
00048     base::Event<pair<int,int> >             mMouseMotion;
00049 };
00050 
00051 } // namespace gfx
00052 
00053 #endif // GFX_EVENT_HH
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:10 2007