Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
5.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: dinputdeviceobj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // ddPaletteObj.h : Declaration of the C_dxj_DirectDrawColorControlObject
  11. #include "direct.h"
  12. #include "resource.h" // main symbols
  13. #define typedef__dxj_DirectInputDevice LPDIRECTINPUTDEVICE2
  14. /////////////////////////////////////////////////////////////////////////////
  15. // Direct
  16. class C_dxj_DirectInputDeviceObject :
  17. public I_dxj_DirectInputDevice,
  18. public CComObjectRoot
  19. {
  20. public:
  21. C_dxj_DirectInputDeviceObject() ;
  22. virtual ~C_dxj_DirectInputDeviceObject();
  23. BEGIN_COM_MAP(C_dxj_DirectInputDeviceObject)
  24. COM_INTERFACE_ENTRY(I_dxj_DirectInputDevice)
  25. END_COM_MAP()
  26. DECLARE_AGGREGATABLE(C_dxj_DirectInputDeviceObject)
  27. public:
  28. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  29. /* [in] */ IUnknown __RPC_FAR *lpdd);
  30. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  31. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  32. HRESULT STDMETHODCALLTYPE acquire( void);
  33. HRESULT STDMETHODCALLTYPE getDeviceObjectsEnum(
  34. /* [in] */ long flags,
  35. /* [retval][out] */ I_dxj_DIEnumDeviceObjects __RPC_FAR *__RPC_FAR *ppret);
  36. HRESULT STDMETHODCALLTYPE getCapabilities(
  37. /* [out][in] */ DIDevCaps __RPC_FAR *caps);
  38. HRESULT STDMETHODCALLTYPE getDeviceData(
  39. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *deviceObjectDataArray,
  40. /* [in] */ long flags,
  41. /* [retval][out] */ long __RPC_FAR *c);
  42. HRESULT STDMETHODCALLTYPE getDeviceInfo(
  43. /* [retval][out] */ I_dxj_DirectInputDeviceInstance __RPC_FAR *__RPC_FAR *deviceInstance);
  44. HRESULT STDMETHODCALLTYPE getDeviceStateKeyboard(
  45. /* [out][in] */ DIKeyboardState __RPC_FAR *state);
  46. HRESULT STDMETHODCALLTYPE getDeviceStateMouse(
  47. /* [out][in] */ DIMouseState __RPC_FAR *state);
  48. HRESULT STDMETHODCALLTYPE getDeviceStateJoystick(
  49. /* [out][in] */ DIJoyState __RPC_FAR *state);
  50. HRESULT STDMETHODCALLTYPE getDeviceStateJoystick2(
  51. /* [out][in] */ DIJoyState2 __RPC_FAR *state);
  52. HRESULT STDMETHODCALLTYPE getDeviceState(
  53. /* [in] */ long cb,
  54. /* [in] */ void __RPC_FAR *state);
  55. HRESULT STDMETHODCALLTYPE getObjectInfo(
  56. /* [in] */ long obj,
  57. /* [in] */ long how,
  58. /* [retval][out] */ I_dxj_DirectInputDeviceObjectInstance __RPC_FAR *__RPC_FAR *ret);
  59. HRESULT STDMETHODCALLTYPE getProperty(
  60. /* [in] */ BSTR guid,
  61. /* [out] */ void __RPC_FAR *propertyInfo);
  62. HRESULT STDMETHODCALLTYPE runControlPanel(
  63. /* [in] */ long hwnd);
  64. HRESULT STDMETHODCALLTYPE setCooperativeLevel(
  65. /* [in] */ long hwnd,
  66. /* [in] */ long flags);
  67. HRESULT STDMETHODCALLTYPE setCommonDataFormat(
  68. /* [in] */ long format);
  69. HRESULT STDMETHODCALLTYPE setDataFormat(
  70. /* [in] */ DIDataFormat __RPC_FAR *format,
  71. SAFEARRAY __RPC_FAR * __RPC_FAR *formatArray);
  72. HRESULT STDMETHODCALLTYPE setEventNotification(
  73. /* [in] */ long hEvent);
  74. HRESULT STDMETHODCALLTYPE setProperty(
  75. /* [in] */ BSTR guid,
  76. /* [in] */ void __RPC_FAR *propertyInfo);
  77. HRESULT STDMETHODCALLTYPE unacquire( void);
  78. HRESULT STDMETHODCALLTYPE poll( void);
  79. HRESULT STDMETHODCALLTYPE createEffect(
  80. /* [in] */ BSTR effectGuid,
  81. /* [in] */ DIEffect __RPC_FAR *effectinfo,
  82. /* [retval][out] */ I_dxj_DirectInputEffect __RPC_FAR *__RPC_FAR *ret);
  83. HRESULT STDMETHODCALLTYPE createCustomEffect(
  84. /* [in] */ DIEffect __RPC_FAR *effectinfo,
  85. /* [in] */ long channels,
  86. /* [in] */ long samplePeriod,
  87. /* [in] */ long nSamples,
  88. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *sampledata,
  89. /* [retval][out] */ I_dxj_DirectInputEffect __RPC_FAR *__RPC_FAR *ret);
  90. HRESULT STDMETHODCALLTYPE sendDeviceData(
  91. /* [in] */ long count,
  92. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *data,
  93. /* [in] */ long flags,
  94. /* [retval][out] */ long __RPC_FAR *retcount);
  95. HRESULT STDMETHODCALLTYPE sendForceFeedbackCommand(
  96. /* [in] */ long flags);
  97. HRESULT STDMETHODCALLTYPE getForceFeedbackState(
  98. /* [retval][out] */ long __RPC_FAR *state);
  99. HRESULT STDMETHODCALLTYPE getEffectsEnum( long flag,
  100. /* [retval][out] */ I_dxj_DirectInputEnumEffects __RPC_FAR *__RPC_FAR *ret) ;
  101. private:
  102. DECL_VARIABLE(_dxj_DirectInputDevice);
  103. IDirectInputDevice2 *m__dxj_DirectInputDevice2;
  104. HRESULT cleanup();
  105. HRESULT init();
  106. public:
  107. DX3J_GLOBAL_LINKS(_dxj_DirectInput)
  108. DWORD nFormat;
  109. };