Team Fortress 2 Source Code as on 22/4/2020
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.

101 lines
4.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. // CWMPEventDispatch.h : Declaration of the event dispatcher
  3. //
  4. #pragma once
  5. #include "stdafx.h"
  6. // if these files aren't found, set your path to include the wmp sdk include directory
  7. // download the sdk from http://www.microsoft.com/windows/windowsmedia/mp10/sdk.aspx
  8. #include "wmpids.h"
  9. #include "wmp.h"
  10. class CWMPEventDispatch:
  11. public CComObjectRootEx<CComSingleThreadModel>,
  12. public IWMPEvents,
  13. public _WMPOCXEvents
  14. {
  15. public:
  16. BEGIN_COM_MAP(CWMPEventDispatch)
  17. COM_INTERFACE_ENTRY(_WMPOCXEvents)
  18. COM_INTERFACE_ENTRY(IWMPEvents)
  19. COM_INTERFACE_ENTRY(IDispatch)
  20. END_COM_MAP()
  21. // IDispatch methods
  22. STDMETHOD(GetIDsOfNames)( REFIID riid,
  23. OLECHAR FAR *FAR *rgszNames,
  24. unsigned int cNames,
  25. LCID lcid,
  26. DISPID FAR *rgDispId )
  27. { return( E_NOTIMPL ); }
  28. STDMETHOD(GetTypeInfo)( unsigned int iTInfo,
  29. LCID lcid,
  30. ITypeInfo FAR *FAR *ppTInfo )
  31. { return( E_NOTIMPL ); }
  32. STDMETHOD(GetTypeInfoCount)( unsigned int FAR *pctinfo )
  33. {
  34. return( E_NOTIMPL );
  35. }
  36. STDMETHOD(Invoke)( DISPID dispIdMember,
  37. REFIID riid,
  38. LCID lcid,
  39. WORD wFlags,
  40. DISPPARAMS FAR* pDispParams,
  41. VARIANT FAR* pVarResult,
  42. EXCEPINFO FAR* pExcepInfo,
  43. unsigned int FAR* puArgErr );
  44. // IWMPEvents methods
  45. void STDMETHODCALLTYPE OpenStateChange( long NewState );
  46. void STDMETHODCALLTYPE PlayStateChange( long NewState );
  47. void STDMETHODCALLTYPE AudioLanguageChange( long LangID );
  48. void STDMETHODCALLTYPE StatusChange();
  49. void STDMETHODCALLTYPE ScriptCommand( BSTR scType, BSTR Param );
  50. void STDMETHODCALLTYPE NewStream();
  51. void STDMETHODCALLTYPE Disconnect( long Result );
  52. void STDMETHODCALLTYPE Buffering( VARIANT_BOOL Start );
  53. void STDMETHODCALLTYPE Error();
  54. void STDMETHODCALLTYPE Warning( long WarningType, long Param, BSTR Description );
  55. void STDMETHODCALLTYPE EndOfStream( long Result );
  56. void STDMETHODCALLTYPE PositionChange( double oldPosition, double newPosition);
  57. void STDMETHODCALLTYPE MarkerHit( long MarkerNum );
  58. void STDMETHODCALLTYPE DurationUnitChange( long NewDurationUnit );
  59. void STDMETHODCALLTYPE CdromMediaChange( long CdromNum );
  60. void STDMETHODCALLTYPE PlaylistChange( IDispatch * Playlist, WMPPlaylistChangeEventType change );
  61. void STDMETHODCALLTYPE CurrentPlaylistChange( WMPPlaylistChangeEventType change );
  62. void STDMETHODCALLTYPE CurrentPlaylistItemAvailable( BSTR bstrItemName );
  63. void STDMETHODCALLTYPE MediaChange( IDispatch * Item );
  64. void STDMETHODCALLTYPE CurrentMediaItemAvailable( BSTR bstrItemName );
  65. void STDMETHODCALLTYPE CurrentItemChange( IDispatch *pdispMedia);
  66. void STDMETHODCALLTYPE MediaCollectionChange();
  67. void STDMETHODCALLTYPE MediaCollectionAttributeStringAdded( BSTR bstrAttribName, BSTR bstrAttribVal );
  68. void STDMETHODCALLTYPE MediaCollectionAttributeStringRemoved( BSTR bstrAttribName, BSTR bstrAttribVal );
  69. void STDMETHODCALLTYPE MediaCollectionAttributeStringChanged( BSTR bstrAttribName, BSTR bstrOldAttribVal, BSTR bstrNewAttribVal);
  70. void STDMETHODCALLTYPE PlaylistCollectionChange();
  71. void STDMETHODCALLTYPE PlaylistCollectionPlaylistAdded( BSTR bstrPlaylistName);
  72. void STDMETHODCALLTYPE PlaylistCollectionPlaylistRemoved( BSTR bstrPlaylistName);
  73. void STDMETHODCALLTYPE PlaylistCollectionPlaylistSetAsDeleted( BSTR bstrPlaylistName, VARIANT_BOOL varfIsDeleted);
  74. void STDMETHODCALLTYPE ModeChange( BSTR ModeName, VARIANT_BOOL NewValue);
  75. void STDMETHODCALLTYPE MediaError( IDispatch * pMediaObject);
  76. void STDMETHODCALLTYPE OpenPlaylistSwitch( IDispatch *pItem );
  77. void STDMETHODCALLTYPE DomainChange( BSTR strDomain);
  78. void STDMETHODCALLTYPE SwitchedToPlayerApplication();
  79. void STDMETHODCALLTYPE SwitchedToControl();
  80. void STDMETHODCALLTYPE PlayerDockedStateChange();
  81. void STDMETHODCALLTYPE PlayerReconnect();
  82. void STDMETHODCALLTYPE Click( short nButton, short nShiftState, long fX, long fY );
  83. void STDMETHODCALLTYPE DoubleClick( short nButton, short nShiftState, long fX, long fY );
  84. void STDMETHODCALLTYPE KeyDown( short nKeyCode, short nShiftState );
  85. void STDMETHODCALLTYPE KeyPress( short nKeyAscii );
  86. void STDMETHODCALLTYPE KeyUp( short nKeyCode, short nShiftState );
  87. void STDMETHODCALLTYPE MouseDown( short nButton, short nShiftState, long fX, long fY );
  88. void STDMETHODCALLTYPE MouseMove( short nButton, short nShiftState, long fX, long fY );
  89. void STDMETHODCALLTYPE MouseUp( short nButton, short nShiftState, long fX, long fY );
  90. };
  91. typedef CComObject<CWMPEventDispatch> CComWMPEventDispatch;