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.

90 lines
3.2 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. } RastRampServiceType;
  31. typedef enum _RastServiceType
  32. {
  33. // Arg1 is a D3DCOLOR, and Arg2 is a DWORD* to get the pixel value
  34. RAST_SERVICE_RGB8COLORTOPIXEL = 0,
  35. } RastServiceType;
  36. typedef HRESULT (*PFN_RASTRAMPSERVICE)
  37. (ULONG_PTR dwCtx, RastRampServiceType srvType, ULONG_PTR arg1, LPVOID arg2);
  38. typedef HRESULT (*PFN_RASTSERVICE)
  39. (ULONG_PTR dwCtx, RastServiceType srvType, DWORD arg1, LPVOID arg2);
  40. typedef struct _D3DHALPROVIDER_INTERFACEDATA
  41. {
  42. DWORD dwSize;
  43. LPD3DHAL_GLOBALDRIVERDATA pGlobalData;
  44. LPD3DHAL_D3DEXTENDEDCAPS pExtCaps;
  45. LPD3DHAL_CALLBACKS pCallbacks;
  46. LPD3DHAL_CALLBACKS2 pCallbacks2;
  47. LPD3DHAL_CALLBACKS3 pCallbacks3;
  48. PFN_RASTSERVICE pfnRastService;
  49. LPDDHAL_GETDRIVERSTATE pfnGetDriverState;
  50. } D3DHALPROVIDER_INTERFACEDATA, *LPD3DHALPROVIDER_INTERFACEDATA;
  51. #undef INTERFACE
  52. #define INTERFACE IHalProvider
  53. DECLARE_INTERFACE_(IHalProvider, IUnknown)
  54. {
  55. // IUnknown.
  56. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  57. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  58. STDMETHOD_(ULONG, Release)(THIS) PURE;
  59. // IHalProvider.
  60. STDMETHOD(GetCaps)(THIS_
  61. LPDDRAWI_DIRECTDRAW_GBL pDdGbl,
  62. LPD3DDEVICEDESC7 pHwDesc,
  63. LPD3DDEVICEDESC7 pHelDesc,
  64. DWORD dwVersion) PURE;
  65. STDMETHOD(GetInterface)(THIS_
  66. LPDDRAWI_DIRECTDRAW_GBL pDdGbl,
  67. LPD3DHALPROVIDER_INTERFACEDATA pInterfaceData,
  68. DWORD dwVersion) PURE;
  69. };
  70. STDAPI GetHwHalProvider(REFCLSID riid,
  71. IHalProvider **ppHalProvider, HINSTANCE *phDll, LPDDRAWI_DIRECTDRAW_GBL pDdGbl);
  72. STDAPI GetSwHalProvider(REFCLSID riid,
  73. IHalProvider **ppHalProvider, HINSTANCE *phDll);
  74. STDAPI GetSwZBufferFormats(REFCLSID riid, DDPIXELFORMAT **ppDDPF);
  75. STDAPI GetSwTextureFormats(REFCLSID riid, LPDDSURFACEDESC* lplpddsd, DWORD dwD3DDeviceVersion);
  76. #endif // #ifndef _HALPROV_H_