Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00043 #ifndef _orxINPUT_H_
00044 #define _orxINPUT_H_
00045
00046
00047 #include "orxInclude.h"
00048
00049 #include "io/orxJoystick.h"
00050 #include "io/orxKeyboard.h"
00051 #include "io/orxMouse.h"
00052
00053
00056 #define orxINPUT_KU32_BINDING_NUMBER 4
00057
00058
00061 typedef enum __orxINPUT_TYPE_t
00062 {
00063 orxINPUT_TYPE_KEYBOARD_KEY = 0,
00064 orxINPUT_TYPE_MOUSE_BUTTON,
00065 orxINPUT_TYPE_MOUSE_AXIS,
00066 orxINPUT_TYPE_JOYSTICK_BUTTON,
00067 orxINPUT_TYPE_JOYSTICK_AXIS,
00068 orxINPUT_TYPE_EXTERNAL,
00069
00070 orxINPUT_TYPE_NUMBER,
00071
00072 orxINPUT_TYPE_NONE = orxENUM_NONE
00073
00074 } orxINPUT_TYPE;
00075
00078 typedef enum __orxINPUT_EVENT_t
00079 {
00080 orxINPUT_EVENT_ON = 0,
00081 orxINPUT_EVENT_OFF,
00082
00083 orxINPUT_EVENT_NUMBER,
00084
00085 orxINPUT_EVENT_NONE = orxENUM_NONE
00086
00087 } orxINPUT_EVENT;
00088
00091 typedef struct __orxINPUT_EVENT_PAYLOAD_t
00092 {
00093 const orxSTRING zSetName;
00094 const orxSTRING zInputName;
00095 orxINPUT_TYPE aeType[orxINPUT_KU32_BINDING_NUMBER];
00096 orxENUM aeID[orxINPUT_KU32_BINDING_NUMBER];
00097 orxFLOAT afValue[orxINPUT_KU32_BINDING_NUMBER];
00099 } orxINPUT_EVENT_PAYLOAD;
00100
00101
00104 extern orxDLLAPI void orxFASTCALL orxInput_Setup();
00105
00109 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_Init();
00110
00113 extern orxDLLAPI void orxFASTCALL orxInput_Exit();
00114
00115
00120 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_Load(const orxSTRING _zFileName);
00121
00126 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_Save(const orxSTRING _zFileName);
00127
00128
00132 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_SelectSet(const orxSTRING _zSetName);
00133
00137 extern orxDLLAPI const orxSTRING orxFASTCALL orxInput_GetCurrentSet();
00138
00139
00144 extern orxDLLAPI orxBOOL orxFASTCALL orxInput_IsActive(const orxSTRING _zInputName);
00145
00150 extern orxDLLAPI orxBOOL orxFASTCALL orxInput_HasNewStatus(const orxSTRING _zInputName);
00151
00156 extern orxDLLAPI orxFLOAT orxFASTCALL orxInput_GetValue(const orxSTRING _zInputName);
00157
00163 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_SetValue(const orxSTRING _zInputName, orxFLOAT _fValue);
00164
00170 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_SetPermanentValue(const orxSTRING _zInputName, orxFLOAT _fValue);
00171
00176 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_ResetValue(const orxSTRING _zInputName);
00177
00178
00184 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_SetCombineMode(const orxSTRING _zName, orxBOOL _bCombine);
00185
00190 extern orxDLLAPI orxBOOL orxFASTCALL orxInput_IsInCombineMode(const orxSTRING _zName);
00191
00192
00199 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_Bind(const orxSTRING _zName, orxINPUT_TYPE _eType, orxENUM _eID);
00200
00206 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_Unbind(orxINPUT_TYPE _eType, orxENUM _eID);
00207
00213 extern orxDLLAPI orxU32 orxFASTCALL orxInput_GetBoundInputCounter(orxINPUT_TYPE _eType, orxENUM _eID);
00214
00221 extern orxDLLAPI const orxSTRING orxFASTCALL orxInput_GetBoundInput(orxINPUT_TYPE _eType, orxENUM _eID, orxU32 _u32InputIndex);
00222
00230 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_GetBinding(const orxSTRING _zName, orxU32 _u32BindingIndex, orxINPUT_TYPE *_peType, orxENUM *_peID);
00231
00238 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_GetBindingList(const orxSTRING _zName, orxINPUT_TYPE _aeTypeList[orxINPUT_KU32_BINDING_NUMBER], orxENUM _aeIDList[orxINPUT_KU32_BINDING_NUMBER]);
00239
00240
00246 extern orxDLLAPI const orxSTRING orxFASTCALL orxInput_GetBindingName(orxINPUT_TYPE _eType, orxENUM _eID);
00247
00253 extern orxDLLAPI orxSTATUS orxFASTCALL orxInput_GetActiveBinding(orxINPUT_TYPE *_peType, orxENUM *_peID);
00254
00255 #endif
00256