#include <CDirectInput.h>
Public Member Functions | |
| CDirectInput (void) | |
| ~CDirectInput (void) | |
| void | SetWindowHandle (HWND hWnd) |
| void | SetInstanceHandle (HINSTANCE hInstance) |
| bool | Create (void) |
| void | Destroy (void) |
| void | OpenKeyboard (void) |
| bool | IsKeyboardOpened (void) |
| void | CloseKeyboard (void) |
| void | UpdateKeyboard (void) |
| bool | GetKey (int Key) |
| const char * | GetKeyRealName (int Key) |
| const char * | GetKeyFriendlyName (int Key) |
| int | GetJoystickCount (void) |
| void | OpenJoystick (int Joystick) |
| bool | IsJoystickOpened (int Joystick) |
| void | CloseJoystick (int Joystick) |
| void | UpdateJoystick (int Joystick) |
| int | GetJoystickAxisX (int Joystick) |
| int | GetJoystickAxisY (int Joystick) |
| bool | GetJoystickButton (int Joystick, int Button) |
Private Member Functions | |
| bool | UpdateDevice (LPDIRECTINPUTDEVICE7 pDevice, void *pState, int StateSize) |
| void | MakeKeyFriendlyNames (void) |
Private Attributes | |
| bool | m_Ready |
| HINSTANCE | m_hInstance |
| Handle to the application instance (needed to use DirectInput). | |
| HWND | m_hWnd |
| Handle to the window (needed to use DirectInput). | |
| LPDIRECTINPUT7 | m_pDI |
| DirectInput object pointer. | |
| LPDIRECTINPUTDEVICE7 | m_pKeyboard |
| DirectInput device of the system keyboard. | |
| bool | m_KeyboardOpened |
| Is the system keyboard _supposed_ to be opened? | |
| char | m_KeyState [MAX_KEYS] |
| State of each key on the system keyboard. | |
| char | m_KeyRealName [MAX_KEYS][MAX_PATH] |
| Real name (the one given by Windows) of each key on the system keyboard. | |
| char | m_KeyFriendlyName [MAX_KEYS][MAX_PATH] |
| More friendly name for each key. | |
| vector< SJoystick * > | m_pJoysticks |
| All joystick DirectInput devices installed in Windows. | |
| CDirectInput::CDirectInput | ( | void | ) |
| CDirectInput::~CDirectInput | ( | void | ) |
| bool CDirectInput::UpdateDevice | ( | LPDIRECTINPUTDEVICE7 | pDevice, | |
| void * | pState, | |||
| int | StateSize | |||
| ) | [private] |

| void CDirectInput::MakeKeyFriendlyNames | ( | void | ) | [private] |

| void CDirectInput::SetWindowHandle | ( | HWND | hWnd | ) | [inline] |
| void CDirectInput::SetInstanceHandle | ( | HINSTANCE | hInstance | ) | [inline] |
| bool CDirectInput::Create | ( | void | ) |

| void CDirectInput::Destroy | ( | void | ) |
| void CDirectInput::OpenKeyboard | ( | void | ) | [inline] |

| bool CDirectInput::IsKeyboardOpened | ( | void | ) | [inline] |

| void CDirectInput::CloseKeyboard | ( | void | ) | [inline] |

| void CDirectInput::UpdateKeyboard | ( | void | ) |


| bool CDirectInput::GetKey | ( | int | Key | ) | [inline] |

| const char * CDirectInput::GetKeyRealName | ( | int | Key | ) | [inline] |
| const char * CDirectInput::GetKeyFriendlyName | ( | int | Key | ) | [inline] |

| int CDirectInput::GetJoystickCount | ( | void | ) | [inline] |
| void CDirectInput::OpenJoystick | ( | int | Joystick | ) | [inline] |

| bool CDirectInput::IsJoystickOpened | ( | int | Joystick | ) | [inline] |

| void CDirectInput::CloseJoystick | ( | int | Joystick | ) | [inline] |

| void CDirectInput::UpdateJoystick | ( | int | Joystick | ) |


| int CDirectInput::GetJoystickAxisX | ( | int | Joystick | ) | [inline] |

| int CDirectInput::GetJoystickAxisY | ( | int | Joystick | ) | [inline] |

| bool CDirectInput::GetJoystickButton | ( | int | Joystick, | |
| int | Button | |||
| ) | [inline] |

bool CDirectInput::m_Ready [private] |
HINSTANCE CDirectInput::m_hInstance [private] |
Handle to the application instance (needed to use DirectInput).
HWND CDirectInput::m_hWnd [private] |
Handle to the window (needed to use DirectInput).
LPDIRECTINPUT7 CDirectInput::m_pDI [private] |
DirectInput object pointer.
LPDIRECTINPUTDEVICE7 CDirectInput::m_pKeyboard [private] |
DirectInput device of the system keyboard.
bool CDirectInput::m_KeyboardOpened [private] |
Is the system keyboard _supposed_ to be opened?
char CDirectInput::m_KeyState[MAX_KEYS] [private] |
State of each key on the system keyboard.
char CDirectInput::m_KeyRealName[MAX_KEYS][MAX_PATH] [private] |
Real name (the one given by Windows) of each key on the system keyboard.
char CDirectInput::m_KeyFriendlyName[MAX_KEYS][MAX_PATH] [private] |
More friendly name for each key.
vector<SJoystick*> CDirectInput::m_pJoysticks [private] |
All joystick DirectInput devices installed in Windows.
1.5.5