00001 /// \file CATDIJoystick.h 00002 /// \brief DirectInput joystick wrapper 00003 /// \ingroup CAT 00004 /// 00005 /// Copyright (c) 2002-2008 by Michael Ellison. 00006 /// See COPYING.txt for the \ref gaslicense License (MIT License). 00007 /// 00008 // $Author: mikeellison $ 00009 // $Date: 2008-01-19 19:19:35 -0600 (Sat, 19 Jan 2008) $ 00010 // $Revision: $ 00011 // $NoKeywords: $ 00012 #ifndef _CATDIJoystick_H_ 00013 #define _CATDIJoystick_H_ 00014 00015 #include "CATInternal.h" 00016 #include "CATDirectInput.h" 00017 #include "CATJoystick.h" 00018 00019 class CATDIJoystick : public CATJoystick 00020 { 00021 public: 00022 CATDIJoystick(IDirectInput8* diInput); 00023 virtual ~CATDIJoystick(); 00024 00025 00026 virtual bool Configure(HWND hwnd); 00027 00028 00029 bool Init(DIDEVICEINSTANCE* devInstance); 00030 00031 virtual bool GetStatus(CATJOYSTICKSTRUCT& status); 00032 00033 protected: 00034 static BOOL CALLBACK AxesCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef ); 00035 00036 IDirectInput8* fDirectInput; 00037 IDirectInputDevice8* fInputDevice; 00038 DIDEVCAPS fInputDevCaps; 00039 }; 00040 00041 #endif // _CATDIJoystick_H_