Source code of Windows XP (NT5)
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.

341 lines
14 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: d3drm.h
  6. * Content: Direct3DRM include file
  7. *
  8. ***************************************************************************/
  9. #ifndef __D3DRM_H__
  10. #define __D3DRM_H__
  11. #include "ddraw.h"
  12. #ifdef __cplusplus
  13. struct IDirect3DRM;
  14. #endif
  15. typedef struct IDirect3DRM *LPDIRECT3DRM;
  16. #include "d3drmobj.h"
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. DEFINE_GUID(IID_IDirect3DRM, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  21. DEFINE_GUID(IID_IDirect3DRM2, 0x4516ecc8, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
  22. DEFINE_GUID(IID_IDirect3DRM3, 0x2e34065, 0xc243, 0x11d1, 0x8e, 0xd8, 0x0, 0xa0, 0xc9, 0x67, 0xa4, 0x82);
  23. WIN_TYPES(IDirect3DRM, DIRECT3DRM);
  24. WIN_TYPES(IDirect3DRM2, DIRECT3DRM2);
  25. WIN_TYPES(IDirect3DRM3, DIRECT3DRM3);
  26. /*
  27. * Direct3DRM Object Class (for CoCreateInstance())
  28. */
  29. DEFINE_GUID(CLSID_CDirect3DRM, 0x4516ec41, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
  30. /* Create a Direct3DRM API */
  31. STDAPI Direct3DRMCreate(LPDIRECT3DRM FAR *lplpDirect3DRM);
  32. #undef INTERFACE
  33. #define INTERFACE IDirect3DRM
  34. DECLARE_INTERFACE_(IDirect3DRM, IUnknown)
  35. {
  36. IUNKNOWN_METHODS(PURE);
  37. STDMETHOD(CreateObject)
  38. (THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
  39. STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME *) PURE;
  40. STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
  41. STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER *) PURE;
  42. STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
  43. STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
  44. STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
  45. STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE *) PURE;
  46. STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
  47. STDMETHOD(CreateLightRGB)
  48. (THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
  49. STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
  50. STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE;
  51. /* Create a Windows Device using DirectDraw surfaces */
  52. STDMETHOD(CreateDeviceFromSurface)
  53. ( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
  54. LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE *
  55. ) PURE;
  56. /* Create a Windows Device using D3D objects */
  57. STDMETHOD(CreateDeviceFromD3D)
  58. ( THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev,
  59. LPDIRECT3DRMDEVICE *
  60. ) PURE;
  61. STDMETHOD(CreateDeviceFromClipper)
  62. ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
  63. int width, int height, LPDIRECT3DRMDEVICE *) PURE;
  64. STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE *) PURE;
  65. STDMETHOD(CreateShadow)
  66. ( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
  67. D3DVALUE px, D3DVALUE py, D3DVALUE pz,
  68. D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
  69. LPDIRECT3DRMVISUAL *
  70. ) PURE;
  71. STDMETHOD(CreateViewport)
  72. ( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
  73. DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
  74. ) PURE;
  75. STDMETHOD(CreateWrap)
  76. ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
  77. D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
  78. D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  79. D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
  80. D3DVALUE ou, D3DVALUE ov,
  81. D3DVALUE su, D3DVALUE sv,
  82. LPDIRECT3DRMWRAP *
  83. ) PURE;
  84. STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
  85. STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE *) PURE;
  86. STDMETHOD(LoadTextureFromResource) (THIS_ HRSRC rs, LPDIRECT3DRMTEXTURE *) PURE;
  87. STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
  88. STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
  89. STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
  90. STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
  91. STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
  92. STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
  93. STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
  94. STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
  95. STDMETHOD(Load)
  96. ( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
  97. D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
  98. LPDIRECT3DRMFRAME
  99. ) PURE;
  100. STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
  101. };
  102. #undef INTERFACE
  103. #define INTERFACE IDirect3DRM2
  104. DECLARE_INTERFACE_(IDirect3DRM2, IUnknown)
  105. {
  106. IUNKNOWN_METHODS(PURE);
  107. STDMETHOD(CreateObject)
  108. (THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
  109. STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME2 *) PURE;
  110. STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
  111. STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER2 *) PURE;
  112. STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
  113. STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
  114. STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
  115. STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE2 *) PURE;
  116. STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
  117. STDMETHOD(CreateLightRGB)
  118. (THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
  119. STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
  120. STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE2 *) PURE;
  121. /* Create a Windows Device using DirectDraw surfaces */
  122. STDMETHOD(CreateDeviceFromSurface)
  123. ( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
  124. LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE2 *
  125. ) PURE;
  126. /* Create a Windows Device using D3D objects */
  127. STDMETHOD(CreateDeviceFromD3D)
  128. ( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev,
  129. LPDIRECT3DRMDEVICE2 *
  130. ) PURE;
  131. STDMETHOD(CreateDeviceFromClipper)
  132. ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
  133. int width, int height, LPDIRECT3DRMDEVICE2 *) PURE;
  134. STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE2 *) PURE;
  135. STDMETHOD(CreateShadow)
  136. ( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
  137. D3DVALUE px, D3DVALUE py, D3DVALUE pz,
  138. D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
  139. LPDIRECT3DRMVISUAL *
  140. ) PURE;
  141. STDMETHOD(CreateViewport)
  142. ( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
  143. DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
  144. ) PURE;
  145. STDMETHOD(CreateWrap)
  146. ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
  147. D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
  148. D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  149. D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
  150. D3DVALUE ou, D3DVALUE ov,
  151. D3DVALUE su, D3DVALUE sv,
  152. LPDIRECT3DRMWRAP *
  153. ) PURE;
  154. STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
  155. STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE2 *) PURE;
  156. STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE2 *) PURE;
  157. STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
  158. STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
  159. STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
  160. STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
  161. STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
  162. STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
  163. STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
  164. STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
  165. STDMETHOD(Load)
  166. ( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
  167. D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
  168. LPDIRECT3DRMFRAME
  169. ) PURE;
  170. STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
  171. STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE;
  172. };
  173. #undef INTERFACE
  174. #define INTERFACE IDirect3DRM3
  175. DECLARE_INTERFACE_(IDirect3DRM3, IUnknown)
  176. {
  177. IUNKNOWN_METHODS(PURE);
  178. STDMETHOD(CreateObject)
  179. (THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
  180. STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME3, LPDIRECT3DRMFRAME3 *) PURE;
  181. STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
  182. STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER3 *) PURE;
  183. STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
  184. STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION2 *) PURE;
  185. STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET2 *) PURE;
  186. STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE3 *) PURE;
  187. STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
  188. STDMETHOD(CreateLightRGB)
  189. (THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
  190. STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL2 *) PURE;
  191. STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE3 *) PURE;
  192. /* Create a Windows Device using DirectDraw surfaces */
  193. STDMETHOD(CreateDeviceFromSurface)
  194. ( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
  195. LPDIRECTDRAWSURFACE lpDDSBack, DWORD dwFlags, LPDIRECT3DRMDEVICE3 *
  196. ) PURE;
  197. /* Create a Windows Device using D3D objects */
  198. STDMETHOD(CreateDeviceFromD3D)
  199. ( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev,
  200. LPDIRECT3DRMDEVICE3 *
  201. ) PURE;
  202. STDMETHOD(CreateDeviceFromClipper)
  203. ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
  204. int width, int height, LPDIRECT3DRMDEVICE3 *) PURE;
  205. STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE3 *) PURE;
  206. STDMETHOD(CreateShadow)
  207. ( THIS_ LPUNKNOWN, LPDIRECT3DRMLIGHT,
  208. D3DVALUE px, D3DVALUE py, D3DVALUE pz,
  209. D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
  210. LPDIRECT3DRMSHADOW2 *
  211. ) PURE;
  212. STDMETHOD(CreateViewport)
  213. ( THIS_ LPDIRECT3DRMDEVICE3, LPDIRECT3DRMFRAME3, DWORD, DWORD,
  214. DWORD, DWORD, LPDIRECT3DRMVIEWPORT2 *
  215. ) PURE;
  216. STDMETHOD(CreateWrap)
  217. ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME3,
  218. D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
  219. D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  220. D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
  221. D3DVALUE ou, D3DVALUE ov,
  222. D3DVALUE su, D3DVALUE sv,
  223. LPDIRECT3DRMWRAP *
  224. ) PURE;
  225. STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
  226. STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE3 *) PURE;
  227. STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE3 *) PURE;
  228. STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
  229. STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
  230. STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
  231. STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
  232. STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
  233. STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
  234. STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
  235. STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
  236. STDMETHOD(Load)
  237. ( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
  238. D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURE3CALLBACK, LPVOID,
  239. LPDIRECT3DRMFRAME3
  240. ) PURE;
  241. STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
  242. STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE;
  243. /* Used with IDirect3DRMObject2 */
  244. STDMETHOD(RegisterClient) (THIS_ REFGUID rguid, LPDWORD lpdwID) PURE;
  245. STDMETHOD(UnregisterClient) (THIS_ REFGUID rguid) PURE;
  246. STDMETHOD(CreateClippedVisual) (THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMCLIPPEDVISUAL *) PURE;
  247. STDMETHOD(SetOptions) (THIS_ DWORD);
  248. STDMETHOD(GetOptions) (THIS_ LPDWORD);
  249. };
  250. #define D3DRM_OK DD_OK
  251. #define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
  252. #define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
  253. #define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
  254. #define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
  255. #define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
  256. #define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
  257. #define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
  258. #define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
  259. #define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
  260. #define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
  261. #define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
  262. #define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
  263. #define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
  264. #define D3DRMERR_LIBRARYNOTFOUND MAKE_DDHRESULT(794)
  265. #define D3DRMERR_INVALIDLIBRARY MAKE_DDHRESULT(795)
  266. #define D3DRMERR_PENDING MAKE_DDHRESULT(796)
  267. #define D3DRMERR_NOTENOUGHDATA MAKE_DDHRESULT(797)
  268. #define D3DRMERR_REQUESTTOOLARGE MAKE_DDHRESULT(798)
  269. #define D3DRMERR_REQUESTTOOSMALL MAKE_DDHRESULT(799)
  270. #define D3DRMERR_CONNECTIONLOST MAKE_DDHRESULT(800)
  271. #define D3DRMERR_LOADABORTED MAKE_DDHRESULT(801)
  272. #define D3DRMERR_NOINTERNET MAKE_DDHRESULT(802)
  273. #define D3DRMERR_BADCACHEFILE MAKE_DDHRESULT(803)
  274. #define D3DRMERR_BOXNOTSET MAKE_DDHRESULT(804)
  275. #define D3DRMERR_BADPMDATA MAKE_DDHRESULT(805)
  276. #define D3DRMERR_CLIENTNOTREGISTERED MAKE_DDHRESULT(806)
  277. #define D3DRMERR_NOTCREATEDFROMDDS MAKE_DDHRESULT(807)
  278. #define D3DRMERR_NOSUCHKEY MAKE_DDHRESULT(808)
  279. #define D3DRMERR_INCOMPATABLEKEY MAKE_DDHRESULT(809)
  280. #define D3DRMERR_ELEMENTINUSE MAKE_DDHRESULT(810)
  281. #define D3DRMERR_TEXTUREFORMATNOTFOUND MAKE_DDHRESULT(811)
  282. #ifdef __cplusplus
  283. };
  284. #endif
  285. #endif /* _D3DRMAPI_H_ */