2 * Implementation of IDirect3DRMTextureX interfaces
4 * Copyright 2012 Christian Costa
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "wine/debug.h"
28 #include "d3drm_private.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
33 IDirect3DRMTexture2 IDirect3DRMTexture2_iface;
34 IDirect3DRMTexture3 IDirect3DRMTexture3_iface;
37 } IDirect3DRMTextureImpl;
39 static inline IDirect3DRMTextureImpl *impl_from_IDirect3DRMTexture2(IDirect3DRMTexture2 *iface)
41 return CONTAINING_RECORD(iface, IDirect3DRMTextureImpl, IDirect3DRMTexture2_iface);
44 static inline IDirect3DRMTextureImpl *impl_from_IDirect3DRMTexture3(IDirect3DRMTexture3 *iface)
46 return CONTAINING_RECORD(iface, IDirect3DRMTextureImpl, IDirect3DRMTexture3_iface);
49 /*** IUnknown methods ***/
50 static HRESULT WINAPI IDirect3DRMTexture2Impl_QueryInterface(IDirect3DRMTexture2* iface,
51 REFIID riid, void** object)
53 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
55 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), object);
59 if (IsEqualGUID(riid, &IID_IUnknown) ||
60 IsEqualGUID(riid, &IID_IDirect3DRMTexture) ||
61 IsEqualGUID(riid, &IID_IDirect3DRMTexture2))
63 *object = &This->IDirect3DRMTexture2_iface;
65 else if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3))
67 *object = &This->IDirect3DRMTexture3_iface;
71 FIXME("Interface %s not implemented\n", debugstr_guid(riid));
75 IDirect3DRMTexture3_AddRef(iface);
80 static ULONG WINAPI IDirect3DRMTexture2Impl_AddRef(IDirect3DRMTexture2* iface)
82 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
83 ULONG ref = InterlockedIncrement(&This->ref);
85 TRACE("(%p)->(): new ref = %d\n", iface, ref);
90 static ULONG WINAPI IDirect3DRMTexture2Impl_Release(IDirect3DRMTexture2* iface)
92 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
93 ULONG ref = InterlockedDecrement(&This->ref);
95 TRACE("(%p)->(): new ref = %d\n", iface, ref);
98 HeapFree(GetProcessHeap(), 0, This);
103 /*** IDirect3DRMObject methods ***/
104 static HRESULT WINAPI IDirect3DRMTexture2Impl_Clone(IDirect3DRMTexture2* iface,
105 LPUNKNOWN unknown, REFIID riid,
108 FIXME("(%p)->(%p, %s, %p): stub\n", iface, unknown, debugstr_guid(riid), object);
113 static HRESULT WINAPI IDirect3DRMTexture2Impl_AddDestroyCallback(IDirect3DRMTexture2* iface,
114 D3DRMOBJECTCALLBACK cb,
117 FIXME("(%p)->(%p, %p): stub\n", iface, cb, argument);
122 static HRESULT WINAPI IDirect3DRMTexture2Impl_DeleteDestroyCallback(IDirect3DRMTexture2* iface,
123 D3DRMOBJECTCALLBACK cb,
126 FIXME("(%p)->(%p, %p): stub\n", iface, cb, argument);
131 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetAppData(IDirect3DRMTexture2* iface,
134 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
136 TRACE("(%p)->(%u)\n", iface, data);
138 return IDirect3DRMTexture3_SetAppData(&This->IDirect3DRMTexture3_iface, data);
141 static DWORD WINAPI IDirect3DRMTexture2Impl_GetAppData(IDirect3DRMTexture2* iface)
143 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
145 TRACE("(%p)->()\n", iface);
147 return IDirect3DRMTexture3_GetAppData(&This->IDirect3DRMTexture3_iface);
150 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetName(IDirect3DRMTexture2* iface, LPCSTR name)
152 FIXME("(%p)->(%s): stub\n", iface, name);
157 static HRESULT WINAPI IDirect3DRMTexture2Impl_GetName(IDirect3DRMTexture2* iface,
158 LPDWORD size, LPSTR name)
160 FIXME("(%p)->(%p, %p): stub\n", iface, size, name);
165 static HRESULT WINAPI IDirect3DRMTexture2Impl_GetClassName(IDirect3DRMTexture2* iface,
166 LPDWORD size, LPSTR name)
168 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
170 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
172 return IDirect3DRMTexture3_GetClassName(&This->IDirect3DRMTexture3_iface, size, name);
175 /*** IDirect3DRMTexture3 methods ***/
176 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromFile(IDirect3DRMTexture2* iface, const char *filename)
178 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
180 FIXME("(%p/%p)->(%s): stub\n", iface, This, debugstr_a(filename));
185 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromSurface(IDirect3DRMTexture2 *iface,
186 IDirectDrawSurface *surface)
188 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
190 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
195 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromResource(IDirect3DRMTexture2* iface, HRSRC resource)
197 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
199 FIXME("(%p/%p)->(%p): stub\n", iface, This, resource);
204 static HRESULT WINAPI IDirect3DRMTexture2Impl_Changed(IDirect3DRMTexture2* iface, BOOL pixels, BOOL palette)
206 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
208 FIXME("(%p/%p)->(%u, %u): stub\n", iface, This, pixels, palette);
213 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetColors(IDirect3DRMTexture2* iface, DWORD max_colors)
215 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
217 FIXME("(%p/%p)->(%u): stub\n", iface, This, max_colors);
222 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetShades(IDirect3DRMTexture2* iface, DWORD max_shades)
224 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
226 FIXME("(%p/%p)->(%u): stub\n", iface, This, max_shades);
231 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalSize(IDirect3DRMTexture2* iface, D3DVALUE width, D3DVALUE height)
233 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
235 FIXME("(%p/%p)->(%f, %f): stub\n", iface, This, width, height);
240 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalOrigin(IDirect3DRMTexture2* iface, LONG x, LONG y)
242 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
244 FIXME("(%p/%p)->(%d, %d): stub\n", iface, This, x, y);
249 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalScale(IDirect3DRMTexture2* iface, DWORD scale)
251 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
253 FIXME("(%p/%p)->(%u): stub\n", iface, This, scale);
258 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalTransparency(IDirect3DRMTexture2* iface, BOOL transparency)
260 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
262 FIXME("(%p/%p)->(%u): stub\n", iface, This, transparency);
267 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalTransparentColor(IDirect3DRMTexture2* iface, D3DCOLOR color)
269 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
271 FIXME("(%p/%p)->(%x): stub\n", iface, This, color);
276 static HRESULT WINAPI IDirect3DRMTexture2Impl_GetDecalSize(IDirect3DRMTexture2* iface, D3DVALUE* width, D3DVALUE* height)
278 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
280 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, height, width);
285 static HRESULT WINAPI IDirect3DRMTexture2Impl_GetDecalOrigin(IDirect3DRMTexture2* iface, LONG* x, LONG* y)
287 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
289 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, x, y);
294 static D3DRMIMAGE* WINAPI IDirect3DRMTexture2Impl_GetImage(IDirect3DRMTexture2* iface)
296 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
298 FIXME("(%p/%p)->(): stub\n", iface, This);
303 static DWORD WINAPI IDirect3DRMTexture2Impl_GetShades(IDirect3DRMTexture2* iface)
305 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
307 FIXME("(%p/%p)->(): stub\n", iface, This);
312 static DWORD WINAPI IDirect3DRMTexture2Impl_GetColors(IDirect3DRMTexture2* iface)
314 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
316 FIXME("(%p/%p)->(): stub\n", iface, This);
321 static DWORD WINAPI IDirect3DRMTexture2Impl_GetDecalScale(IDirect3DRMTexture2* iface)
323 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
325 FIXME("(%p/%p)->(): stub\n", iface, This);
330 static BOOL WINAPI IDirect3DRMTexture2Impl_GetDecalTransparency(IDirect3DRMTexture2* iface)
332 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
334 FIXME("(%p/%p)->(): stub\n", iface, This);
339 static D3DCOLOR WINAPI IDirect3DRMTexture2Impl_GetDecalTransparentColor(IDirect3DRMTexture2* iface)
341 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
343 FIXME("(%p/%p)->(): stub\n", iface, This);
348 /*** IDirect3DRMTexture2 methods ***/
349 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromImage(IDirect3DRMTexture2 *iface, D3DRMIMAGE *image)
351 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
353 FIXME("(%p/%p)->(%p): stub\n", iface, This, image);
358 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromResource2(IDirect3DRMTexture2* iface, HMODULE module,
359 LPCSTR /* LPCTSTR */ name, LPCSTR /* LPCTSTR */ type)
361 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
363 FIXME("(%p/%p)->(%p, %s, %s): stub\n", iface, This, module, debugstr_a(name), debugstr_a(type));
368 static HRESULT WINAPI IDirect3DRMTexture2Impl_GenerateMIPMap(IDirect3DRMTexture2* iface, DWORD flags)
370 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
372 FIXME("(%p/%p)->(%x): stub\n", iface, This, flags);
377 static const struct IDirect3DRMTexture2Vtbl Direct3DRMTexture2_Vtbl =
379 /*** IUnknown methods ***/
380 IDirect3DRMTexture2Impl_QueryInterface,
381 IDirect3DRMTexture2Impl_AddRef,
382 IDirect3DRMTexture2Impl_Release,
383 /*** IDirect3DRMObject methods ***/
384 IDirect3DRMTexture2Impl_Clone,
385 IDirect3DRMTexture2Impl_AddDestroyCallback,
386 IDirect3DRMTexture2Impl_DeleteDestroyCallback,
387 IDirect3DRMTexture2Impl_SetAppData,
388 IDirect3DRMTexture2Impl_GetAppData,
389 IDirect3DRMTexture2Impl_SetName,
390 IDirect3DRMTexture2Impl_GetName,
391 IDirect3DRMTexture2Impl_GetClassName,
392 /*** IDirect3DRMTexture methods ***/
393 IDirect3DRMTexture2Impl_InitFromFile,
394 IDirect3DRMTexture2Impl_InitFromSurface,
395 IDirect3DRMTexture2Impl_InitFromResource,
396 IDirect3DRMTexture2Impl_Changed,
397 IDirect3DRMTexture2Impl_SetColors,
398 IDirect3DRMTexture2Impl_SetShades,
399 IDirect3DRMTexture2Impl_SetDecalSize,
400 IDirect3DRMTexture2Impl_SetDecalOrigin,
401 IDirect3DRMTexture2Impl_SetDecalScale,
402 IDirect3DRMTexture2Impl_SetDecalTransparency,
403 IDirect3DRMTexture2Impl_SetDecalTransparentColor,
404 IDirect3DRMTexture2Impl_GetDecalSize,
405 IDirect3DRMTexture2Impl_GetDecalOrigin,
406 IDirect3DRMTexture2Impl_GetImage,
407 IDirect3DRMTexture2Impl_GetShades,
408 IDirect3DRMTexture2Impl_GetColors,
409 IDirect3DRMTexture2Impl_GetDecalScale,
410 IDirect3DRMTexture2Impl_GetDecalTransparency,
411 IDirect3DRMTexture2Impl_GetDecalTransparentColor,
412 /*** IDirect3DRMTexture2 methods ***/
413 IDirect3DRMTexture2Impl_InitFromImage,
414 IDirect3DRMTexture2Impl_InitFromResource2,
415 IDirect3DRMTexture2Impl_GenerateMIPMap
418 /*** IUnknown methods ***/
419 static HRESULT WINAPI IDirect3DRMTexture3Impl_QueryInterface(IDirect3DRMTexture3* iface,
420 REFIID riid, void** object)
422 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
424 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), object);
428 if (IsEqualGUID(riid, &IID_IUnknown) ||
429 IsEqualGUID(riid, &IID_IDirect3DRMTexture) ||
430 IsEqualGUID(riid, &IID_IDirect3DRMTexture2))
432 *object = &This->IDirect3DRMTexture2_iface;
434 else if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3))
436 *object = &This->IDirect3DRMTexture3_iface;
440 FIXME("Interface %s not implemented\n", debugstr_guid(riid));
441 return E_NOINTERFACE;
444 IDirect3DRMTexture3_AddRef(iface);
449 static ULONG WINAPI IDirect3DRMTexture3Impl_AddRef(IDirect3DRMTexture3* iface)
451 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
452 ULONG ref = InterlockedIncrement(&This->ref);
454 TRACE("(%p)->(): new ref = %d\n", iface, ref);
459 static ULONG WINAPI IDirect3DRMTexture3Impl_Release(IDirect3DRMTexture3* iface)
461 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
462 ULONG ref = InterlockedDecrement(&This->ref);
464 TRACE("(%p)->(): new ref = %d\n", iface, ref);
467 HeapFree(GetProcessHeap(), 0, This);
472 /*** IDirect3DRMObject methods ***/
473 static HRESULT WINAPI IDirect3DRMTexture3Impl_Clone(IDirect3DRMTexture3* iface,
474 LPUNKNOWN unknown, REFIID riid,
477 FIXME("(%p)->(%p, %s, %p): stub\n", iface, unknown, debugstr_guid(riid), object);
482 static HRESULT WINAPI IDirect3DRMTexture3Impl_AddDestroyCallback(IDirect3DRMTexture3* iface,
483 D3DRMOBJECTCALLBACK cb,
486 FIXME("(%p)->(%p, %p): stub\n", iface, cb, argument);
491 static HRESULT WINAPI IDirect3DRMTexture3Impl_DeleteDestroyCallback(IDirect3DRMTexture3* iface,
492 D3DRMOBJECTCALLBACK cb,
495 FIXME("(%p)->(%p, %p): stub\n", iface, cb, argument);
500 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetAppData(IDirect3DRMTexture3* iface,
503 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
505 TRACE("(%p)->(%u)\n", iface, data);
507 This->app_data = data;
512 static DWORD WINAPI IDirect3DRMTexture3Impl_GetAppData(IDirect3DRMTexture3* iface)
514 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
516 TRACE("(%p)->()\n", iface);
518 return This->app_data;
521 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetName(IDirect3DRMTexture3* iface, LPCSTR name)
523 FIXME("(%p)->(%s): stub\n", iface, name);
528 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetName(IDirect3DRMTexture3* iface,
529 LPDWORD size, LPSTR name)
531 FIXME("(%p)->(%p, %p): stub\n", iface, size, name);
536 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetClassName(IDirect3DRMTexture3* iface,
537 LPDWORD size, LPSTR name)
539 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
541 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
543 if (!size || *size < strlen("Texture") || !name)
546 strcpy(name, "Texture");
547 *size = sizeof("Texture");
552 /*** IDirect3DRMTexture3 methods ***/
553 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromFile(IDirect3DRMTexture3* iface, const char *filename)
555 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
557 FIXME("(%p/%p)->(%s): stub\n", iface, This, debugstr_a(filename));
562 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromSurface(IDirect3DRMTexture3 *iface,
563 IDirectDrawSurface *surface)
565 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
567 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
572 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromResource(IDirect3DRMTexture3* iface, HRSRC resource)
574 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
576 FIXME("(%p/%p)->(%p): stub\n", iface, This, resource);
581 static HRESULT WINAPI IDirect3DRMTexture3Impl_Changed(IDirect3DRMTexture3* iface, DWORD flags, DWORD nb_rects, LPRECT rects)
583 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
585 FIXME("(%p/%p)->(%x, %u, %p): stub\n", iface, This, flags, nb_rects, rects);
590 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetColors(IDirect3DRMTexture3* iface, DWORD max_colors)
592 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
594 FIXME("(%p/%p)->(%u): stub\n", iface, This, max_colors);
599 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetShades(IDirect3DRMTexture3* iface, DWORD max_shades)
601 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
603 FIXME("(%p/%p)->(%u): stub\n", iface, This, max_shades);
608 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalSize(IDirect3DRMTexture3* iface, D3DVALUE width, D3DVALUE height)
610 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
612 FIXME("(%p/%p)->(%f, %f): stub\n", iface, This, width, height);
617 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalOrigin(IDirect3DRMTexture3* iface, LONG x, LONG y)
619 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
621 FIXME("(%p/%p)->(%d, %d): stub\n", iface, This, x, y);
626 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalScale(IDirect3DRMTexture3* iface, DWORD scale)
628 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
630 FIXME("(%p/%p)->(%u): stub\n", iface, This, scale);
635 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalTransparency(IDirect3DRMTexture3* iface, BOOL transparency)
637 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
639 FIXME("(%p/%p)->(%u): stub\n", iface, This, transparency);
644 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalTransparentColor(IDirect3DRMTexture3* iface, D3DCOLOR color)
646 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
648 FIXME("(%p/%p)->(%x): stub\n", iface, This, color);
653 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetDecalSize(IDirect3DRMTexture3* iface, D3DVALUE* width, D3DVALUE* height)
655 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
657 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, height, width);
662 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetDecalOrigin(IDirect3DRMTexture3* iface, LONG* x, LONG* y)
664 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
666 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, x, y);
671 static D3DRMIMAGE* WINAPI IDirect3DRMTexture3Impl_GetImage(IDirect3DRMTexture3* iface)
673 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
675 FIXME("(%p/%p)->(): stub\n", iface, This);
680 static DWORD WINAPI IDirect3DRMTexture3Impl_GetShades(IDirect3DRMTexture3* iface)
682 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
684 FIXME("(%p/%p)->(): stub\n", iface, This);
689 static DWORD WINAPI IDirect3DRMTexture3Impl_GetColors(IDirect3DRMTexture3* iface)
691 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
693 FIXME("(%p/%p)->(): stub\n", iface, This);
698 static DWORD WINAPI IDirect3DRMTexture3Impl_GetDecalScale(IDirect3DRMTexture3* iface)
700 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
702 FIXME("(%p/%p)->(): stub\n", iface, This);
707 static BOOL WINAPI IDirect3DRMTexture3Impl_GetDecalTransparency(IDirect3DRMTexture3* iface)
709 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
711 FIXME("(%p/%p)->(): stub\n", iface, This);
716 static D3DCOLOR WINAPI IDirect3DRMTexture3Impl_GetDecalTransparentColor(IDirect3DRMTexture3* iface)
718 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
720 FIXME("(%p/%p)->(): stub\n", iface, This);
725 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromImage(IDirect3DRMTexture3 *iface, D3DRMIMAGE *image)
727 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
729 FIXME("(%p/%p)->(%p): stub\n", iface, This, image);
734 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromResource2(IDirect3DRMTexture3* iface, HMODULE module,
735 LPCSTR /* LPCTSTR */ name, LPCSTR /* LPCTSTR */ type)
737 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
739 FIXME("(%p/%p)->(%p, %s, %s): stub\n", iface, This, module, debugstr_a(name), debugstr_a(type));
744 static HRESULT WINAPI IDirect3DRMTexture3Impl_GenerateMIPMap(IDirect3DRMTexture3* iface, DWORD flags)
746 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
748 FIXME("(%p/%p)->(%x): stub\n", iface, This, flags);
753 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetSurface(IDirect3DRMTexture3 *iface,
754 DWORD flags, IDirectDrawSurface **surface)
756 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
758 FIXME("(%p/%p)->(%x, %p): stub\n", iface, This, flags, surface);
763 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetCacheOptions(IDirect3DRMTexture3* iface, LONG importance, DWORD flags)
765 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
767 FIXME("(%p/%p)->(%d, %x): stub\n", iface, This, importance, flags);
772 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetCacheOptions(IDirect3DRMTexture3* iface, LPLONG importance, LPDWORD flags)
774 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
776 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, importance, flags);
781 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDownsampleCallback(IDirect3DRMTexture3* iface, D3DRMDOWNSAMPLECALLBACK callback, LPVOID arg)
783 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
785 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, callback, arg);
790 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetValidationCallback(IDirect3DRMTexture3* iface, D3DRMVALIDATIONCALLBACK callback, LPVOID arg)
792 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
794 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, callback, arg);
799 static const struct IDirect3DRMTexture3Vtbl Direct3DRMTexture3_Vtbl =
801 /*** IUnknown methods ***/
802 IDirect3DRMTexture3Impl_QueryInterface,
803 IDirect3DRMTexture3Impl_AddRef,
804 IDirect3DRMTexture3Impl_Release,
805 /*** IDirect3DRMObject methods ***/
806 IDirect3DRMTexture3Impl_Clone,
807 IDirect3DRMTexture3Impl_AddDestroyCallback,
808 IDirect3DRMTexture3Impl_DeleteDestroyCallback,
809 IDirect3DRMTexture3Impl_SetAppData,
810 IDirect3DRMTexture3Impl_GetAppData,
811 IDirect3DRMTexture3Impl_SetName,
812 IDirect3DRMTexture3Impl_GetName,
813 IDirect3DRMTexture3Impl_GetClassName,
814 /*** IDirect3DRMTexture3 methods ***/
815 IDirect3DRMTexture3Impl_InitFromFile,
816 IDirect3DRMTexture3Impl_InitFromSurface,
817 IDirect3DRMTexture3Impl_InitFromResource,
818 IDirect3DRMTexture3Impl_Changed,
819 IDirect3DRMTexture3Impl_SetColors,
820 IDirect3DRMTexture3Impl_SetShades,
821 IDirect3DRMTexture3Impl_SetDecalSize,
822 IDirect3DRMTexture3Impl_SetDecalOrigin,
823 IDirect3DRMTexture3Impl_SetDecalScale,
824 IDirect3DRMTexture3Impl_SetDecalTransparency,
825 IDirect3DRMTexture3Impl_SetDecalTransparentColor,
826 IDirect3DRMTexture3Impl_GetDecalSize,
827 IDirect3DRMTexture3Impl_GetDecalOrigin,
828 IDirect3DRMTexture3Impl_GetImage,
829 IDirect3DRMTexture3Impl_GetShades,
830 IDirect3DRMTexture3Impl_GetColors,
831 IDirect3DRMTexture3Impl_GetDecalScale,
832 IDirect3DRMTexture3Impl_GetDecalTransparency,
833 IDirect3DRMTexture3Impl_GetDecalTransparentColor,
834 IDirect3DRMTexture3Impl_InitFromImage,
835 IDirect3DRMTexture3Impl_InitFromResource2,
836 IDirect3DRMTexture3Impl_GenerateMIPMap,
837 IDirect3DRMTexture3Impl_GetSurface,
838 IDirect3DRMTexture3Impl_SetCacheOptions,
839 IDirect3DRMTexture3Impl_GetCacheOptions,
840 IDirect3DRMTexture3Impl_SetDownsampleCallback,
841 IDirect3DRMTexture3Impl_SetValidationCallback
844 HRESULT Direct3DRMTexture_create(REFIID riid, IUnknown** ret_iface)
846 IDirect3DRMTextureImpl* object;
848 TRACE("(%p)\n", ret_iface);
850 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMTextureImpl));
852 return E_OUTOFMEMORY;
854 object->IDirect3DRMTexture2_iface.lpVtbl = &Direct3DRMTexture2_Vtbl;
855 object->IDirect3DRMTexture3_iface.lpVtbl = &Direct3DRMTexture3_Vtbl;
858 if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3))
859 *ret_iface = (IUnknown*)&object->IDirect3DRMTexture3_iface;
861 *ret_iface = (IUnknown*)&object->IDirect3DRMTexture2_iface;