00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef OIS_Prereqs_H
00024 #define OIS_Prereqs_H
00025
00026
00027
00028
00029
00030
00031
00032 #include <vector>
00033 #include <string>
00034 #include <map>
00035 #include "OISConfig.h"
00036
00037
00038 #define _OISExport
00039
00040
00041 #if defined( _MSC_VER )
00042 # define OIS_MSVC_COMPILER
00043 #elif defined( __GNUC__ )
00044 # if defined( __WIN32__ ) || defined( _WIN32 )
00045 # define OIS_MINGW_COMPILER
00046 # else
00047 # define OIS_GCC_COMPILER
00048 # endif
00049 #elif defined( __BORLANDC__ )
00050 # define OIS_BORLAND_COMPILER
00051 #else
00052 # error No Recognized Compiler!
00053 #endif
00054
00055
00056 #if defined( __WIN32__ ) || defined( _WIN32 ) // Windows 2000, XP, ETC
00057 # if defined ( _XBOX )
00058 # define OIS_XBOX_PLATFORM
00059 # else
00060 # define OIS_WIN32_PLATFORM
00061 # if defined( OIS_DYNAMIC_LIB ) && !defined(OIS_MINGW_COMPILER)
00062 # undef _OISExport
00063
00064 # pragma warning (disable : 4251)
00065 # if defined( OIS_NONCLIENT_BUILD )
00066 # define _OISExport __declspec( dllexport )
00067 # else
00068 # define _OISExport __declspec( dllimport )
00069 # endif
00070 # endif
00071 # endif
00072 #elif defined( __APPLE_CC__ ) // Apple OS X
00073 # define OIS_APPLE_PLATFORM
00074 #else //Probably Linux
00075 # define OIS_LINUX_PLATFORM
00076 #endif
00077
00078
00079 #if defined(__x86_64__)
00080 # define OIS_ARCH_64
00081 #else
00082 # define OIS_ARCH_32
00083 #endif
00084
00085
00086 #define OIS_VERSION_MAJOR 1
00087 #define OIS_VERSION_MINOR 0
00088 #define OIS_VERSION_PATCH 0
00089 #define OIS_VERSION_NAME "Nitro"
00090
00091 #define OIS_VERSION ((OIS_VERSION_MAJOR << 16) | (OIS_VERSION_MINOR << 8) | OIS_VERSION_PATCH)
00092
00093 namespace OIS
00094 {
00095
00096 class InputManager;
00097 class Object;
00098 class Keyboard;
00099 class Mouse;
00100 class JoyStick;
00101 class KeyListener;
00102 class MouseListener;
00103 class JoyStickListener;
00104 class Interface;
00105 class ForceFeedback;
00106 class Effect;
00107
00109 typedef _OISExport std::multimap<std::string, std::string> ParamList;
00110
00112 enum _OISExport Type
00113 {
00114 OISUnknown = 0,
00115 OISKeyboard = 1,
00116 OISMouse = 2,
00117 OISJoyStick = 3,
00118 OISTablet = 4
00119 };
00120
00121
00122
00124 enum _OISExport ComponentType
00125 {
00126 OIS_Unknown = 0,
00127 OIS_Button = 1,
00128 OIS_Axis = 2,
00129 OIS_Slider = 3,
00130 OIS_POV = 4
00131 };
00132
00134 struct _OISExport Component
00135 {
00136 Component() : cType(OIS_Unknown) {};
00137 Component(ComponentType type) : cType(type) {};
00139 ComponentType cType;
00140 };
00141
00143 struct _OISExport Button : Component
00144 {
00145 Button() {}
00146 Button(bool bPushed) : Component(OIS_Button), pushed(bPushed) {};
00148 bool pushed;
00149 };
00150
00152 struct _OISExport Axis : Component
00153 {
00154 Axis() : Component(OIS_Axis), abs(0), rel(0), absOnly(false) {};
00155
00157 int abs, rel;
00158
00160 bool absOnly;
00161
00163 void clear()
00164 {
00165 abs = rel = 0;
00166 }
00167 };
00168 }
00169
00170 #endif //end if prereq header defined