00001
00012
00013
00014
00015
00016
00017 #if __linux__ || OS_FREEBSD
00018 #ifndef INP_JOYSTICK_LINUX_HH
00019 #define INP_JOYSTICK_LINUX_HH 1
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 namespace inp {
00031
00032 class Global;
00033
00037 class JoystickLinux : public Joystick
00038 {
00039
00040 friend class Global;
00041
00042 private:
00044 enum
00045 {
00046 eLinuxAxis_LEFT_RIGHT = 0,
00047 eLinuxAxis_UP_DOWN = 1,
00048 eLinuxAxis_THIRD = 2,
00049 };
00050
00051 private:
00052
00053 JoystickLinux( void );
00054 ~JoystickLinux();
00055
00056 public:
00057 void PrintStatus( void );
00058
00059 private:
00060 bool Open( void );
00061 void Close( void );
00062 bool PollEvent( Event& event );
00063
00064 private:
00065 const string mDeviceName;
00066 const string mDeviceName2;
00067 int mFiledesc;
00068 };
00069
00070 }
00071
00072 #endif // INP_JOYSTICK_LINUX_HH
00073 #endif // __linux__ || OS_FREEBSD