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.

178 lines
6.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: ddraw4obj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // dDrawObj.h : Declaration of the CdDrawObject
  11. #include "resource.h" // main symbols
  12. #define typedef__dxj_DirectDraw4 LPDIRECTDRAW4
  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_DirectDraw4Object :
  18. public I_dxj_DirectDraw4,
  19. public CComObjectRoot
  20. {
  21. public:
  22. C_dxj_DirectDraw4Object() ;
  23. virtual ~C_dxj_DirectDraw4Object() ;
  24. BEGIN_COM_MAP(C_dxj_DirectDraw4Object)
  25. COM_INTERFACE_ENTRY(I_dxj_DirectDraw4)
  26. #ifdef USING_IDISPATCH
  27. COM_INTERFACE_ENTRY(IDispatch)
  28. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  29. #endif
  30. END_COM_MAP()
  31. // DECLARE_REGISTRY(CLSID__dxj_DirectDraw4, "DIRECT.DirectDraw4.3", "DIRECT.DirectDraw4.3", IDS_DDRAW_DESC, THREADFLAGS_BOTH)
  32. // Use DECLARE_NOT_AGGREGATABLE(C_dxj_DirectDrawObject) if you don't want your object
  33. // to support aggregation
  34. DECLARE_AGGREGATABLE(C_dxj_DirectDraw4Object)
  35. // I_dxj_DirectDraw
  36. public:
  37. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  38. /* [in] */ IUnknown __RPC_FAR *lpdd);
  39. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  40. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  41. HRESULT STDMETHODCALLTYPE createClipper(
  42. /* [in] */ long flags,
  43. /* [retval][out] */ I_dxj_DirectDrawClipper __RPC_FAR *__RPC_FAR *val);
  44. HRESULT STDMETHODCALLTYPE createPalette(
  45. /* [in] */ long flags,
  46. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *pe,
  47. /* [retval][out] */ I_dxj_DirectDrawPalette __RPC_FAR *__RPC_FAR *val);
  48. HRESULT STDMETHODCALLTYPE createSurface(
  49. /* [in] */ DDSurfaceDesc2 __RPC_FAR *dd,
  50. /* [retval][out] */ I_dxj_DirectDrawSurface4 __RPC_FAR *__RPC_FAR *retv);
  51. HRESULT STDMETHODCALLTYPE createSurfaceFromFile(
  52. /* [in] */ BSTR file,
  53. /* [out][in] */ DDSurfaceDesc2 __RPC_FAR *dd,
  54. /* [retval][out] */ I_dxj_DirectDrawSurface4 __RPC_FAR *__RPC_FAR *retv);
  55. HRESULT STDMETHODCALLTYPE createSurfaceFromResource(
  56. /* [in] */ BSTR file,
  57. /* [in] */ BSTR resName,
  58. /* [out][in] */ DDSurfaceDesc2 __RPC_FAR *ddsd,
  59. /* [retval][out] */ I_dxj_DirectDrawSurface4 __RPC_FAR *__RPC_FAR *retv);
  60. HRESULT STDMETHODCALLTYPE duplicateSurface(
  61. /* [in] */ I_dxj_DirectDrawSurface4 __RPC_FAR *ddIn,
  62. /* [retval][out] */ I_dxj_DirectDrawSurface4 __RPC_FAR *__RPC_FAR *ddOut);
  63. HRESULT STDMETHODCALLTYPE flipToGDISurface( void);
  64. HRESULT STDMETHODCALLTYPE getAvailableTotalMem(
  65. /* [in] */ DDSCaps2 __RPC_FAR *ddsCaps,
  66. /* [retval][out] */ long __RPC_FAR *m);
  67. HRESULT STDMETHODCALLTYPE getCaps(
  68. /* [out][in] */ DDCaps __RPC_FAR *hwCaps,
  69. /* [out][in] */ DDCaps __RPC_FAR *helCaps);
  70. HRESULT STDMETHODCALLTYPE getDisplayMode(
  71. /* [out][in] */ DDSurfaceDesc2 __RPC_FAR *surface);
  72. HRESULT STDMETHODCALLTYPE getDisplayModesEnum(
  73. /* [in] */ long flags,
  74. /* [in] */ DDSurfaceDesc2 __RPC_FAR *ddsd,
  75. /* [retval][out] */ I_dxj_DirectDrawEnumModes __RPC_FAR *__RPC_FAR *retval);
  76. HRESULT STDMETHODCALLTYPE getFourCCCodes(
  77. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *ccCodes);
  78. HRESULT STDMETHODCALLTYPE getFreeMem(
  79. /* [in] */ DDSCaps2 __RPC_FAR *ddsCaps,
  80. /* [retval][out] */ long __RPC_FAR *m);
  81. HRESULT STDMETHODCALLTYPE getGDISurface(
  82. /* [retval][out] */ I_dxj_DirectDrawSurface4 __RPC_FAR *__RPC_FAR *s);
  83. HRESULT STDMETHODCALLTYPE getMonitorFrequency(
  84. /* [retval][out] */ long __RPC_FAR *freq);
  85. HRESULT STDMETHODCALLTYPE getNumFourCCCodes(
  86. /* [retval][out] */ long __RPC_FAR *nCodes);
  87. HRESULT STDMETHODCALLTYPE getScanLine(
  88. /* [out][in] */ long __RPC_FAR *lines,
  89. /* [retval][out] */ long __RPC_FAR *status);
  90. HRESULT STDMETHODCALLTYPE getSurfaceFromDC(
  91. /* [in] */ long hdc,
  92. /* [retval][out] */ I_dxj_DirectDrawSurface4 __RPC_FAR *__RPC_FAR *retv);
  93. HRESULT STDMETHODCALLTYPE getVerticalBlankStatus(
  94. /* [retval][out] */ long __RPC_FAR *status);
  95. HRESULT STDMETHODCALLTYPE loadPaletteFromBitmap(
  96. /* [in] */ BSTR bName,
  97. /* [retval][out] */ I_dxj_DirectDrawPalette __RPC_FAR *__RPC_FAR *retv);
  98. HRESULT STDMETHODCALLTYPE restoreAllSurfaces( void);
  99. HRESULT STDMETHODCALLTYPE restoreDisplayMode( void);
  100. HRESULT STDMETHODCALLTYPE setCooperativeLevel(
  101. /* [in] */ HWnd hdl,
  102. /* [in] */ long flags);
  103. HRESULT STDMETHODCALLTYPE setDisplayMode(
  104. /* [in] */ long w,
  105. /* [in] */ long h,
  106. /* [in] */ long bpp,
  107. /* [in] */ long ref,
  108. /* [in] */ long mode);
  109. HRESULT STDMETHODCALLTYPE testCooperativeLevel(
  110. /* [retval][out] */ long __RPC_FAR *status);
  111. HRESULT STDMETHODCALLTYPE waitForVerticalBlank(
  112. /* [in] */ long flags,
  113. /* [in] */ long handle,
  114. /* [retval][out] */ long __RPC_FAR *status);
  115. ////////////////////////////////////////////////////////////////////////
  116. //
  117. // note: this is public for the callbacks
  118. DECL_VARIABLE(_dxj_DirectDraw4);
  119. private:
  120. HWND m_hwnd;
  121. public:
  122. DX3J_GLOBAL_LINKS(_dxj_DirectDraw4);
  123. DWORD InternalAddRef();
  124. DWORD InternalRelease();
  125. };