00001 #ifndef OSDL_EVENTS_COMMON_H_ 00002 #define OSDL_EVENTS_COMMON_H_ 00003 00004 00005 /* 00006 * Typedef cannot be forward-declared apparently, they therefore have to 00007 * be gathered separately. 00008 * 00009 * @note These are SDL-related typedefs, and there is also 00010 * EventsException defined here. 00011 * 00012 */ 00013 00014 #include "OSDLException.h" // for OSDL::Exception 00015 00016 #include "Ceylan.h" // for string operators 00017 00018 00019 #include "SDL.h" // for SDL_* 00020 00021 #include <string> 00022 00023 00025 typedef SDL_Event BasicEvent ; 00026 00027 00029 typedef SDL_ActiveEvent FocusEvent ; 00030 00032 typedef SDL_KeyboardEvent KeyboardEvent ; 00033 00035 typedef SDL_MouseMotionEvent MouseMotionEvent ; 00036 00038 typedef SDL_MouseButtonEvent MouseButtonEvent ; 00039 00041 typedef SDL_JoyAxisEvent JoystickAxisEvent ; 00042 00044 typedef SDL_JoyBallEvent JoystickTrackballEvent ; 00045 00047 typedef SDL_JoyHatEvent JoystickHatEvent ; 00048 00050 typedef SDL_JoyButtonEvent JoystickButtonEvent ; 00051 00053 typedef SDL_QuitEvent UserRequestedQuitEvent ; 00054 00056 typedef SDL_SysWMEvent SystemSpecificWindowManagerEvent ; 00057 00058 00064 typedef SDL_ResizeEvent WindowResizedEvent ; 00065 00066 00068 typedef SDL_ExposeEvent ScreenExposedEvent ; 00069 00070 00072 typedef SDL_UserEvent UserEvent ; 00073 00074 00075 // Unicode values defined in Ceylan. 00076 00077 00079 class OSDL_DLL EventsException: public OSDL::Exception 00080 { 00081 00082 public: 00083 00084 explicit EventsException( const std::string & reason ) throw() : 00085 OSDL::Exception( "Event exception : " + reason ) 00086 { 00087 00088 } 00089 00090 00091 virtual ~EventsException() throw() 00092 { 00093 00094 } 00095 00096 00097 } ; 00098 00099 00100 #endif // OSDL_EVENTS_COMMON_H_ 00101