CDirectInput Class Reference

#include <CDirectInput.h>

List of all members.

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.


Constructor & Destructor Documentation

CDirectInput::CDirectInput ( void   ) 

CDirectInput::~CDirectInput ( void   ) 


Member Function Documentation

bool CDirectInput::UpdateDevice ( LPDIRECTINPUTDEVICE7  pDevice,
void *  pState,
int  StateSize 
) [private]

Here is the caller graph for this function:

void CDirectInput::MakeKeyFriendlyNames ( void   )  [private]

Here is the caller graph for this function:

void CDirectInput::SetWindowHandle ( HWND  hWnd  )  [inline]

void CDirectInput::SetInstanceHandle ( HINSTANCE  hInstance  )  [inline]

bool CDirectInput::Create ( void   ) 

Here is the call graph for this function:

void CDirectInput::Destroy ( void   ) 

void CDirectInput::OpenKeyboard ( void   )  [inline]

Here is the caller graph for this function:

bool CDirectInput::IsKeyboardOpened ( void   )  [inline]

Here is the caller graph for this function:

void CDirectInput::CloseKeyboard ( void   )  [inline]

Here is the caller graph for this function:

void CDirectInput::UpdateKeyboard ( void   ) 

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

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

Here is the caller graph for this function:

int CDirectInput::GetJoystickCount ( void   )  [inline]

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

void CDirectInput::UpdateJoystick ( int  Joystick  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:


Member Data Documentation

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.

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.

All joystick DirectInput devices installed in Windows.


The documentation for this class was generated from the following files:

Generated on Sat Oct 18 12:26:44 2008 for Bombermaaan by  doxygen 1.5.5
Visit the Bombermaaan project page
SourceForge.net Logo