00001 #ifndef OSDL_JOYSTICK_COMMON_H_ 00002 #define OSDL_JOYSTICK_COMMON_H_ 00003 00004 00005 #include "OSDLEvents.h" // for EventsException 00006 00007 #include "Ceylan.h" // for Uint8, etc. 00008 00009 00010 #include <string> 00011 #include <list> 00012 00013 00014 00015 namespace OSDL 00016 { 00017 00018 00019 namespace Events 00020 { 00021 00022 00024 typedef Ceylan::Uint32 JoystickNumber ; 00025 00026 00028 typedef Ceylan::Uint32 JoystickAxesCount ; 00029 00031 typedef Ceylan::Uint32 JoystickTrackballsCount ; 00032 00034 typedef Ceylan::Uint32 JoystickHatsCount ; 00035 00037 typedef Ceylan::Uint32 JoystickButtonsCount ; 00038 00039 00040 00045 typedef Ceylan::Sint16 AxisPosition ; 00046 00047 00053 typedef Ceylan::Uint8 HatPosition ; 00054 00055 00057 extern const HatPosition Centered ; 00058 00060 extern const HatPosition Up ; 00061 00063 extern const HatPosition Right ; 00064 00066 extern const HatPosition Down ; 00067 00069 extern const HatPosition Left ; 00070 00072 extern const HatPosition RightUp ; 00073 00075 extern const HatPosition RightDown ; 00076 00078 extern const HatPosition LeftUp ; 00079 00081 extern const HatPosition LeftDown ; 00082 00083 00088 typedef Ceylan::Sint32 BallMotion ; 00089 00090 00092 class OSDL_DLL JoystickException: public EventsException 00093 { 00094 public: 00095 explicit JoystickException( const std::string & reason ) 00096 throw() ; 00097 virtual ~JoystickException() throw() ; 00098 00099 } ; 00100 00101 00102 } 00103 00104 } 00105 00106 00107 00108 #endif // OSDL_JOYSTICK_COMMON_H_ 00109