Orxonox  0.0.5 Codename: Arcturus
LinuxJoyStickEvents.h
Go to the documentation of this file.
1 /*
2 The zlib/libpng License
3 
4 Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
5 
6 This software is provided 'as-is', without any express or implied warranty. In no event will
7 the authors be held liable for any damages arising from the use of this software.
8 
9 Permission is granted to anyone to use this software for any purpose, including commercial
10 applications, and to alter it and redistribute it freely, subject to the following
11 restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not claim that
14  you wrote the original software. If you use this software in a product,
15  an acknowledgment in the product documentation would be appreciated but is
16  not required.
17 
18  2. Altered source versions must be plainly marked as such, and must not be
19  misrepresented as being the original software.
20 
21  3. This notice may not be removed or altered from any source distribution.
22 */
23 #ifndef _LINUX_JOYSTICK_H_EADER_
24 #define _LINUX_JOYSTICK_H_EADER_
25 
26 #include "linux/LinuxPrereqs.h"
27 #include "OISJoyStick.h"
28 
29 namespace OIS
30 {
36  class LinuxJoyStick : public JoyStick
37  {
38  public:
39  LinuxJoyStick(InputManager* creator, bool buffered, const JoyStickInfo& js);
40  virtual ~LinuxJoyStick();
41 
43  virtual void setBuffered(bool buffered);
44 
46  virtual void capture();
47 
50 
52  virtual void _initialize();
53 
60 
61  static JoyStickInfoList _scanJoys();
62  static void _clearJoys(JoyStickInfoList &joys);
63  protected:
64 
65  int mJoyStick;
67  std::map <int, int> mButtonMap;
68  std::map <int, int> mAxisMap;
69  std::map <int, Range> mRanges;
70  };
71 }
72 #endif //_LINUX_JOYSTICK_H_EADER_
std::vector< JoyStickInfo > JoyStickInfoList
Definition: LinuxPrereqs.h:79
An Object&#39;s interface is a way to gain write access to devices which support it.
Definition: OISInterface.h:34
IType
Type of Interface.
Definition: OISInterface.h:40
Linux specialization of JoyStick class.
Definition: LinuxJoyStickEvents.h:36
virtual Interface * queryInterface(Interface::IType type)
Definition: LinuxJoyStickEvents.cpp:299
virtual void capture()
Definition: LinuxJoyStickEvents.cpp:87
virtual void setBuffered(bool buffered)
Definition: LinuxJoyStickEvents.cpp:215
static JoyStickInfoList _scanJoys()
Definition: LinuxJoyStickEvents.cpp:243
LinuxJoyStick(InputManager *creator, bool buffered, const JoyStickInfo &js)
Definition: LinuxJoyStickEvents.cpp:47
virtual void _initialize()
Definition: LinuxJoyStickEvents.cpp:73
std::map< int, Range > mRanges
Definition: LinuxJoyStickEvents.h:69
JoyStickInfo _getJoyInfo()
Definition: LinuxJoyStickEvents.cpp:225
LinuxForceFeedback * ff_effect
Definition: LinuxJoyStickEvents.h:66
virtual bool buffered() const
Definition: OISObject.h:44
Joystick base class.
Definition: OISJoyStick.h:159
std::map< int, int > mAxisMap
Definition: LinuxJoyStickEvents.h:68
Definition: LinuxPrereqs.h:53
virtual ~LinuxJoyStick()
Definition: LinuxJoyStickEvents.cpp:67
Base Manager class.
Definition: OISInputManager.h:38
static void _clearJoys(JoyStickInfoList &joys)
Definition: LinuxJoyStickEvents.cpp:291
Definition: EventHelpers.h:31
std::map< int, int > mButtonMap
Definition: LinuxJoyStickEvents.h:67
Definition: LinuxForceFeedback.h:32
Type type() const
Definition: OISObject.h:38
int mJoyStick
Definition: LinuxJoyStickEvents.h:65