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.

95 lines
3.4 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // halprov.h
  4. //
  5. // Defines the IHalProvider interface.
  6. //
  7. // Copyright (C) Microsoft Corporation, 1997.
  8. //
  9. //----------------------------------------------------------------------------
  10. #ifndef _HALPROV_H_
  11. #define _HALPROV_H_
  12. // The following stuff is for Ramp Rasterizer.
  13. typedef enum _RastRampServiceType
  14. {
  15. RAMP_SERVICE_CREATEMAT = 0,
  16. RAMP_SERVICE_DESTORYMAT = 1,
  17. RAMP_SERVICE_SETMATDATA = 2,
  18. RAMP_SERVICE_SETLIGHTSTATE = 3,
  19. // This returns base, size, and a texture ramp.
  20. // Arg1 is a pointer to RAMP_RANGE_INFO.
  21. RAMP_SERVICE_FIND_LIGHTINGRANGE = 4,
  22. // This service only calls BeginSceneHook. Both arg1 and arg2 are ignored.
  23. RAMP_SERVICE_CLEAR = 5,
  24. // Arg1 is a D3DMATERIALHANDLE, arg2 is a DWORD* to get the pixel value.
  25. RAMP_SERVICE_MATERIAL_TO_PIXEL = 6,
  26. // Arg1 is 0 if end scene, != 0 if begin scene
  27. RAMP_SERVICE_SCENE_CAPTURE = 8,
  28. // Arg1 is hTex
  29. RAMP_SERVICE_PALETTE_CHANGED = 9,
  30. // Arg1 is hMat, Arg2 is RECT*
  31. RAMP_SERVICE_CLEAR_TEX_RECT = 10,
  32. } RastRampServiceType;
  33. typedef enum _RastServiceType
  34. {
  35. // Arg1 is a D3DCOLOR, and Arg2 is a DWORD* to get the pixel value
  36. RAST_SERVICE_RGB8COLORTOPIXEL = 0,
  37. } RastServiceType;
  38. typedef HRESULT (*PFN_RASTRAMPSERVICE)
  39. (ULONG_PTR dwCtx, RastRampServiceType srvType, ULONG_PTR arg1, LPVOID arg2);
  40. typedef HRESULT (*PFN_RASTSERVICE)
  41. (ULONG_PTR dwCtx, RastServiceType srvType, DWORD arg1, LPVOID arg2);
  42. typedef struct _D3DHALPROVIDER_INTERFACEDATA
  43. {
  44. DWORD dwSize;
  45. LPD3DHAL_GLOBALDRIVERDATA pGlobalData;
  46. LPD3DHAL_D3DEXTENDEDCAPS pExtCaps;
  47. LPD3DHAL_CALLBACKS pCallbacks;
  48. LPD3DHAL_CALLBACKS2 pCallbacks2;
  49. LPD3DHAL_CALLBACKS3 pCallbacks3;
  50. // This function pointer should be NULL except for ramp rasterizer.
  51. PFN_RASTRAMPSERVICE pfnRampService;
  52. PFN_RASTSERVICE pfnRastService;
  53. } D3DHALPROVIDER_INTERFACEDATA, *LPD3DHALPROVIDER_INTERFACEDATA;
  54. #undef INTERFACE
  55. #define INTERFACE IHalProvider
  56. DECLARE_INTERFACE_(IHalProvider, IUnknown)
  57. {
  58. // IUnknown.
  59. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  60. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  61. STDMETHOD_(ULONG, Release)(THIS) PURE;
  62. // IHalProvider.
  63. STDMETHOD(GetCaps)(THIS_
  64. LPDDRAWI_DIRECTDRAW_GBL pDdGbl,
  65. LPD3DDEVICEDESC pHwDesc,
  66. LPD3DDEVICEDESC pHelDesc,
  67. DWORD dwVersion) PURE;
  68. STDMETHOD(GetInterface)(THIS_
  69. LPDDRAWI_DIRECTDRAW_GBL pDdGbl,
  70. LPD3DHALPROVIDER_INTERFACEDATA pInterfaceData,
  71. DWORD dwVersion) PURE;
  72. };
  73. STDAPI GetHwHalProvider(REFCLSID riid,
  74. IHalProvider **ppHalProvider, HINSTANCE *phDll, LPDDRAWI_DIRECTDRAW_GBL pDdGbl);
  75. STDAPI GetSwHalProvider(REFCLSID riid,
  76. IHalProvider **ppHalProvider, HINSTANCE *phDll);
  77. STDAPI GetSwZBufferFormats(REFCLSID riid, DDPIXELFORMAT **ppDDPF);
  78. STDAPI GetSwTextureFormats(REFCLSID riid, LPDDSURFACEDESC* lplpddsd, DWORD dwD3DDeviceVersion);
  79. #endif // #ifndef _HALPROV_H_