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.

200 lines
7.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: ddraw7obj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // dDrawObj.h : Declaration of the CdDrawObject
  11. #include "resource.h" // main symbols
  12. #define typedef__dxj_DirectDraw7 LPDIRECTDRAW7
  13. /////////////////////////////////////////////////////////////////////////////
  14. // Direct
  15. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  16. //references as template arguments.
  17. class C_dxj_DirectDraw7Object :
  18. #ifdef USING_IDISPATCH
  19. public CComDualImpl<I_dxj_DirectDraw7, &IID_I_dxj_DirectDraw7, &LIBID_DIRECTLib>,
  20. public ISupportErrorInfo,
  21. #else
  22. public I_dxj_DirectDraw7,
  23. #endif
  24. //public CComCoClass<C_dxj_DirectDraw7Object, &CLSID__dxj_DirectDraw7>,
  25. public CComObjectRoot
  26. {
  27. public:
  28. C_dxj_DirectDraw7Object() ;
  29. virtual ~C_dxj_DirectDraw7Object() ;
  30. BEGIN_COM_MAP(C_dxj_DirectDraw7Object)
  31. COM_INTERFACE_ENTRY(I_dxj_DirectDraw7)
  32. #ifdef USING_IDISPATCH
  33. COM_INTERFACE_ENTRY(IDispatch)
  34. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  35. #endif
  36. END_COM_MAP()
  37. // DECLARE_REGISTRY(CLSID__dxj_DirectDraw7, "DIRECT.DirectDraw7.3", "DIRECT.DirectDraw7.3", IDS_DDRAW_DESC, THREADFLAGS_BOTH)
  38. // Use DECLARE_NOT_AGGREGATABLE(C_dxj_DirectDrawObject) if you don't want your object
  39. // to support aggregation
  40. DECLARE_AGGREGATABLE(C_dxj_DirectDraw7Object)
  41. #ifdef USING_IDISPATCH
  42. // ISupportsErrorInfo
  43. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  44. #endif
  45. // I_dxj_DirectDraw
  46. public:
  47. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  48. /* [in] */ IUnknown __RPC_FAR *lpdd);
  49. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  50. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  51. HRESULT STDMETHODCALLTYPE createClipper(
  52. /* [in] */ long flags,
  53. /* [retval][out] */ I_dxj_DirectDrawClipper __RPC_FAR *__RPC_FAR *val);
  54. HRESULT STDMETHODCALLTYPE createPalette(
  55. /* [in] */ long flags,
  56. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *pe,
  57. /* [retval][out] */ I_dxj_DirectDrawPalette __RPC_FAR *__RPC_FAR *val);
  58. HRESULT STDMETHODCALLTYPE createSurface(
  59. /* [in] */ DDSurfaceDesc2 __RPC_FAR *dd,
  60. /* [retval][out] */ I_dxj_DirectDrawSurface7 __RPC_FAR *__RPC_FAR *retv);
  61. HRESULT STDMETHODCALLTYPE createSurfaceFromFile(
  62. /* [in] */ BSTR file,
  63. /* [out][in] */ DDSurfaceDesc2 __RPC_FAR *dd,
  64. /* [retval][out] */ I_dxj_DirectDrawSurface7 __RPC_FAR *__RPC_FAR *retv);
  65. HRESULT STDMETHODCALLTYPE createSurfaceFromResource(
  66. /* [in] */ BSTR file,
  67. /* [in] */ BSTR resName,
  68. /* [out][in] */ DDSurfaceDesc2 __RPC_FAR *ddsd,
  69. /* [retval][out] */ I_dxj_DirectDrawSurface7 __RPC_FAR *__RPC_FAR *retv);
  70. HRESULT STDMETHODCALLTYPE duplicateSurface(
  71. /* [in] */ I_dxj_DirectDrawSurface7 __RPC_FAR *ddIn,
  72. /* [retval][out] */ I_dxj_DirectDrawSurface7 __RPC_FAR *__RPC_FAR *ddOut);
  73. HRESULT STDMETHODCALLTYPE flipToGDISurface( void);
  74. HRESULT STDMETHODCALLTYPE getAvailableTotalMem(
  75. /* [in] */ DDSCaps2 __RPC_FAR *ddsCaps,
  76. /* [retval][out] */ long __RPC_FAR *m);
  77. HRESULT STDMETHODCALLTYPE getCaps(
  78. /* [out][in] */ DDCaps __RPC_FAR *hwCaps,
  79. /* [out][in] */ DDCaps __RPC_FAR *helCaps);
  80. HRESULT STDMETHODCALLTYPE getDirect3D(
  81. /* [retval][out] */ I_dxj_Direct3d7 __RPC_FAR *__RPC_FAR *retv);
  82. HRESULT STDMETHODCALLTYPE getDisplayMode(
  83. /* [out][in] */ DDSurfaceDesc2 __RPC_FAR *surface);
  84. HRESULT STDMETHODCALLTYPE getDisplayModesEnum(
  85. /* [in] */ long flags,
  86. /* [in] */ DDSurfaceDesc2 __RPC_FAR *ddsd,
  87. /* [retval][out] */ I_dxj_DirectDrawEnumModes __RPC_FAR *__RPC_FAR *retval);
  88. HRESULT STDMETHODCALLTYPE getFourCCCodes(
  89. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *ccCodes);
  90. HRESULT STDMETHODCALLTYPE getFreeMem(
  91. /* [in] */ DDSCaps2 __RPC_FAR *ddsCaps,
  92. /* [retval][out] */ long __RPC_FAR *m);
  93. HRESULT STDMETHODCALLTYPE getGDISurface(
  94. /* [retval][out] */ I_dxj_DirectDrawSurface7 __RPC_FAR *__RPC_FAR *s);
  95. HRESULT STDMETHODCALLTYPE getMonitorFrequency(
  96. /* [retval][out] */ long __RPC_FAR *freq);
  97. HRESULT STDMETHODCALLTYPE getNumFourCCCodes(
  98. /* [retval][out] */ long __RPC_FAR *nCodes);
  99. HRESULT STDMETHODCALLTYPE getScanLine(
  100. /* [out][in] */ long __RPC_FAR *lines,
  101. /* [retval][out] */ long __RPC_FAR *status);
  102. HRESULT STDMETHODCALLTYPE getSurfaceFromDC(
  103. /* [in] */ long hdc,
  104. /* [retval][out] */ I_dxj_DirectDrawSurface7 __RPC_FAR *__RPC_FAR *retv);
  105. HRESULT STDMETHODCALLTYPE getSurfacesEnum(
  106. /* [in] */ long flags,
  107. /* [in] */ DDSurfaceDesc2 __RPC_FAR *desc,
  108. /* [retval][out] */ I_dxj_DirectDrawEnumSurfaces __RPC_FAR *__RPC_FAR *ret);
  109. HRESULT STDMETHODCALLTYPE getVerticalBlankStatus(
  110. /* [retval][out] */ long __RPC_FAR *status);
  111. HRESULT STDMETHODCALLTYPE loadPaletteFromBitmap(
  112. /* [in] */ BSTR bName,
  113. /* [retval][out] */ I_dxj_DirectDrawPalette __RPC_FAR *__RPC_FAR *retv);
  114. HRESULT STDMETHODCALLTYPE restoreAllSurfaces( void);
  115. HRESULT STDMETHODCALLTYPE restoreDisplayMode( void);
  116. HRESULT STDMETHODCALLTYPE setCooperativeLevel(
  117. /* [in] */ HWnd hdl,
  118. /* [in] */ long flags);
  119. HRESULT STDMETHODCALLTYPE setDisplayMode(
  120. /* [in] */ long w,
  121. /* [in] */ long h,
  122. /* [in] */ long bpp,
  123. /* [in] */ long ref,
  124. /* [in] */ long mode);
  125. HRESULT STDMETHODCALLTYPE testCooperativeLevel(
  126. /* [retval][out] */ long __RPC_FAR *status);
  127. HRESULT STDMETHODCALLTYPE waitForVerticalBlank(
  128. /* [in] */ long flags,
  129. /* [in] */ long handle,
  130. /* [retval][out] */ long __RPC_FAR *status);
  131. HRESULT STDMETHODCALLTYPE getDeviceIdentifier(
  132. /* [in] */ long flags, I_dxj_DirectDrawIdentifier **ret);
  133. ////////////////////////////////////////////////////////////////////////
  134. //
  135. // note: this is public for the callbacks
  136. DECL_VARIABLE(_dxj_DirectDraw7);
  137. private:
  138. HWND m_hwnd;
  139. public:
  140. DX3J_GLOBAL_LINKS(_dxj_DirectDraw7);
  141. DWORD InternalAddRef();
  142. DWORD InternalRelease();
  143. };