E:/Download/ois-1.0RC1/includes/linux/LinuxJoyStick.h

Go to the documentation of this file.
00001                                                   /*
00002 The zlib/libpng License
00003 
00004 Copyright (c) 2006 Phillip Castaneda (pjcast -- www.wreckedgames.com)
00005 
00006 This software is provided 'as-is', without any express or implied warranty. In no event will
00007 the authors be held liable for any damages arising from the use of this software.
00008 
00009 Permission is granted to anyone to use this software for any purpose, including commercial
00010 applications, and to alter it and redistribute it freely, subject to the following
00011 restrictions:
00012 
00013     1. The origin of this software must not be misrepresented; you must not claim that
00014                 you wrote the original software. If you use this software in a product,
00015                 an acknowledgment in the product documentation would be appreciated but is
00016                 not required.
00017 
00018     2. Altered source versions must be plainly marked as such, and must not be
00019                 misrepresented as being the original software.
00020 
00021     3. This notice may not be removed or altered from any source distribution.
00022 */
00023 #ifndef _LINUX_JOYSTICK_H_EADER_
00024 #define _LINUX_JOYSTICK_H_EADER_
00025 
00026 //Check to see which JoyStick support is being compiled in
00027 #include "OISConfig.h"
00028 #ifndef OIS_JOYEVENTS
00029 
00030 #include "OISJoyStick.h"
00031 #include "linux/LinuxPrereqs.h"
00032 
00033 //Max amount of connected joys/pads
00034 #define OIS_MAX_DEVICES 32
00035 #define OIS_DEVICE_NAME 128
00036 
00037 namespace OIS
00038 {
00044         class LinuxJoyStick : public JoyStick
00045         {
00046         public:
00047                 LinuxJoyStick(bool buffered, const JoyStickInfo& js);
00048                 virtual ~LinuxJoyStick();
00049 
00051                 virtual void setBuffered(bool buffered);
00052 
00054                 virtual void capture();
00055 
00057                 virtual Interface* queryInterface(Interface::IType) {return 0;}
00058 
00060                 virtual void setEventCallback( JoyStickListener *joyListener ) {listener=joyListener;}
00061 
00063                 virtual void _initialize();
00064 
00070                 JoyStickInfo _getJoyInfo();
00071 
00072                 static JoyStickInfoList _scanJoys();
00073                 static void _clearJoys(JoyStickInfoList &joys);
00074         protected:
00075 
00076                 int mJoyStick;
00077         };
00078 }
00079 
00080 #endif //not defined OIS_JOYEVENTS
00081 #endif //_LINUX_JOYSTICK_H_EADER_

Generated on Sat Dec 1 20:13:51 2007 for OIS by  doxygen 1.5.4