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
00025
00026
00027
00028
00029
00030
00031
00032
00033
00039 #ifndef _CE_INPUTCORE_H_
00040 #define _CE_INPUTCORE_H_ 0x1
00042 #ifndef __cplusplus
00043 #error ceInputCore.h requires C++ compilation (use a .cpp suffix)
00044 #endif
00045
00046 #if __GNUC__ >= 0x3
00047 #pragma GCC system_header
00048 #endif
00049
00050 #if _MSC_VER > 1000
00051 #pragma once
00052 #pragma warning(disable: 4100)
00053 #endif
00054
00055 #include "ceKeyboard.h"
00056 #include "ceMouse.h"
00057 #include "ceJoystick.h"
00058
00059 #include "begin_code.h"
00060
00061
00062
00063 #define CE_INPUT_VERSION_MAJOR 0x0 //!< \brief Major version.
00064 #define CE_INPUT_VERSION_MINOR 0x0 //!< \brief Minor version.
00065 #define CE_INPUT_VERSION_PATCH 0x0 //!< \brief Patch number.
00066 #define CE_INPUT_VERSION_STRING "pre-alpha" //!< \brief Version in string.
00067
00071 #define CE_INPUT_VERSION ((CE_INPUT_VERSION_MAJOR << 16) | \
00072 (CE_INPUT_VERSION_MINOR << 0x8) | \
00073 CE_INPUT_VERSION_PATCH)
00074
00075
00076
00078 namespace ce {
00079
00080
00081
00082
00083
00084
00085
00089 class DECLSPEC IInputManager
00090 {
00091 public:
00092
00093 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00094 virtual ~IInputManager(void) { };
00095 #endif
00096
00101 virtual short APICALL
00102 SetInputDriver(
00103 const EInputDriver driver = InputDriver_Null) = 0;
00104
00109 virtual EInputDriver APICALL
00110 GetDriverType(void) = 0;
00111
00115 virtual IInputDevice* APICALL
00116 GetInputDevice(const EInputDevice device) = 0;
00117
00119 virtual void APICALL
00120 Update(void) = 0;
00121
00122 #ifndef CE_WITHOUT_KEYBOARD
00123
00127 virtual IKeyboardDevice* APICALL
00128 GetKeyboardDevice(void) = 0;
00129
00131 virtual void APICALL
00132 UpdateKeyboar(void) = 0;
00133 #endif
00134
00135 #ifndef CE_WITHOUT_MOUSE
00136
00140 virtual IMouseDevice* APICALL
00141 GetMouseDevice(void) = 0;
00142
00144 virtual void APICALL
00145 UpdateMouse(void) = 0;
00146 #endif
00147
00148 #ifndef CE_WITHOUT_JOYSTICK
00149
00153 virtual IJoystickDevice* APICALL
00154 GetJoystickDevice(void) = 0;
00155
00157 virtual void APICALL
00158 UpdateJoystick(void) = 0;
00159 #endif
00160
00161 };
00162
00163
00164
00165
00166
00171 extern DECLSPEC IInputManager* APICALL
00172 CreateInputManager(void);
00173
00177 extern DECLSPEC void APICALL
00178 DestroyInputManager(IInputManager **Instance = NULL);
00179
00180
00181
00182 }
00183
00184 #include "close_code.h"
00185
00186 #if _MSC_VER > 1000
00187 #pragma warning(default:4100)
00188 #endif
00189
00190 #endif // _CE_INPUTCORE_H_
00191