msvcp90: Added _Stofx implementation.
[wine/multimedia.git] / dlls / d3drm / texture.c
blobcfa7e8586bfc80940fe06509b558052cbbe75cf5
1 /*
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"
23 #define COBJMACROS
25 #include "winbase.h"
26 #include "wingdi.h"
28 #include "d3drm_private.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
32 typedef struct {
33 IDirect3DRMTexture2 IDirect3DRMTexture2_iface;
34 IDirect3DRMTexture3 IDirect3DRMTexture3_iface;
35 LONG ref;
36 } IDirect3DRMTextureImpl;
38 static inline IDirect3DRMTextureImpl *impl_from_IDirect3DRMTexture2(IDirect3DRMTexture2 *iface)
40 return CONTAINING_RECORD(iface, IDirect3DRMTextureImpl, IDirect3DRMTexture2_iface);
43 static inline IDirect3DRMTextureImpl *impl_from_IDirect3DRMTexture3(IDirect3DRMTexture3 *iface)
45 return CONTAINING_RECORD(iface, IDirect3DRMTextureImpl, IDirect3DRMTexture3_iface);
48 /*** IUnknown methods ***/
49 static HRESULT WINAPI IDirect3DRMTexture2Impl_QueryInterface(IDirect3DRMTexture2* iface,
50 REFIID riid, void** object)
52 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
54 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), object);
56 *object = NULL;
58 if (IsEqualGUID(riid, &IID_IUnknown) ||
59 IsEqualGUID(riid, &IID_IDirect3DRMTexture) ||
60 IsEqualGUID(riid, &IID_IDirect3DRMTexture2))
62 *object = &This->IDirect3DRMTexture2_iface;
64 else if IsEqualGUID(riid, &IID_IDirect3DRMTexture3)
66 *object = &This->IDirect3DRMTexture3_iface;
68 else
70 FIXME("Interface %s not implemented\n", debugstr_guid(riid));
71 return E_NOINTERFACE;
74 IDirect3DRMTexture3_AddRef(iface);
76 return S_OK;
79 static ULONG WINAPI IDirect3DRMTexture2Impl_AddRef(IDirect3DRMTexture2* iface)
81 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
82 ULONG ref = InterlockedIncrement(&This->ref);
84 TRACE("(%p)->(): new ref = %d\n", iface, ref);
86 return ref;
89 static ULONG WINAPI IDirect3DRMTexture2Impl_Release(IDirect3DRMTexture2* iface)
91 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
92 ULONG ref = InterlockedDecrement(&This->ref);
94 TRACE("(%p)->(): new ref = %d\n", iface, ref);
96 if (!ref)
97 HeapFree(GetProcessHeap(), 0, This);
99 return ref;
102 /*** IDirect3DRMObject methods ***/
103 static HRESULT WINAPI IDirect3DRMTexture2Impl_Clone(IDirect3DRMTexture2* iface,
104 LPUNKNOWN unknown, REFIID riid,
105 LPVOID* object)
107 FIXME("(%p)->(%p, %s, %p): stub\n", iface, unknown, debugstr_guid(riid), object);
109 return E_NOTIMPL;
112 static HRESULT WINAPI IDirect3DRMTexture2Impl_AddDestroyCallback(IDirect3DRMTexture2* iface,
113 D3DRMOBJECTCALLBACK cb,
114 LPVOID argument)
116 FIXME("(%p)->(%p, %p): stub\n", iface, cb, argument);
118 return E_NOTIMPL;
121 static HRESULT WINAPI IDirect3DRMTexture2Impl_DeleteDestroyCallback(IDirect3DRMTexture2* iface,
122 D3DRMOBJECTCALLBACK cb,
123 LPVOID argument)
125 FIXME("(%p)->(%p, %p): stub\n", iface, cb, argument);
127 return E_NOTIMPL;
130 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetAppData(IDirect3DRMTexture2* iface,
131 DWORD data)
133 FIXME("(%p)->(%u): stub\n", iface, data);
135 return E_NOTIMPL;
138 static DWORD WINAPI IDirect3DRMTexture2Impl_GetAppData(IDirect3DRMTexture2* iface)
140 FIXME("(%p)->(): stub\n", iface);
142 return 0;
145 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetName(IDirect3DRMTexture2* iface, LPCSTR name)
147 FIXME("(%p)->(%s): stub\n", iface, name);
149 return E_NOTIMPL;
152 static HRESULT WINAPI IDirect3DRMTexture2Impl_GetName(IDirect3DRMTexture2* iface,
153 LPDWORD size, LPSTR name)
155 FIXME("(%p)->(%p, %p): stub\n", iface, size, name);
157 return E_NOTIMPL;
160 static HRESULT WINAPI IDirect3DRMTexture2Impl_GetClassName(IDirect3DRMTexture2* iface,
161 LPDWORD size, LPSTR name)
163 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
165 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
167 return IDirect3DRMTexture3_GetClassName(&This->IDirect3DRMTexture3_iface, size, name);
170 /*** IDirect3DRMTexture3 methods ***/
171 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromFile(IDirect3DRMTexture2* iface, const char *filename)
173 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
175 FIXME("(%p/%p)->(%s): stub\n", iface, This, debugstr_a(filename));
177 return E_NOTIMPL;
180 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromSurface(IDirect3DRMTexture2* iface, LPDIRECTDRAWSURFACE surface)
182 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
184 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
186 return E_NOTIMPL;
189 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromResource(IDirect3DRMTexture2* iface, HRSRC resource)
191 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
193 FIXME("(%p/%p)->(%p): stub\n", iface, This, resource);
195 return E_NOTIMPL;
198 static HRESULT WINAPI IDirect3DRMTexture2Impl_Changed(IDirect3DRMTexture2* iface, BOOL pixels, BOOL palette)
200 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
202 FIXME("(%p/%p)->(%u, %u): stub\n", iface, This, pixels, palette);
204 return E_NOTIMPL;
207 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetColors(IDirect3DRMTexture2* iface, DWORD max_colors)
209 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
211 FIXME("(%p/%p)->(%u): stub\n", iface, This, max_colors);
213 return E_NOTIMPL;
216 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetShades(IDirect3DRMTexture2* iface, DWORD max_shades)
218 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
220 FIXME("(%p/%p)->(%u): stub\n", iface, This, max_shades);
222 return E_NOTIMPL;
225 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalSize(IDirect3DRMTexture2* iface, D3DVALUE width, D3DVALUE height)
227 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
229 FIXME("(%p/%p)->(%f, %f): stub\n", iface, This, width, height);
231 return E_NOTIMPL;
234 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalOrigin(IDirect3DRMTexture2* iface, LONG x, LONG y)
236 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
238 FIXME("(%p/%p)->(%d, %d): stub\n", iface, This, x, y);
240 return E_NOTIMPL;
243 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalScale(IDirect3DRMTexture2* iface, DWORD scale)
245 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
247 FIXME("(%p/%p)->(%u): stub\n", iface, This, scale);
249 return E_NOTIMPL;
252 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalTransparency(IDirect3DRMTexture2* iface, BOOL transparency)
254 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
256 FIXME("(%p/%p)->(%u): stub\n", iface, This, transparency);
258 return E_NOTIMPL;
261 static HRESULT WINAPI IDirect3DRMTexture2Impl_SetDecalTransparentColor(IDirect3DRMTexture2* iface, D3DCOLOR color)
263 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
265 FIXME("(%p/%p)->(%x): stub\n", iface, This, color);
267 return E_NOTIMPL;
270 static HRESULT WINAPI IDirect3DRMTexture2Impl_GetDecalSize(IDirect3DRMTexture2* iface, D3DVALUE* width, D3DVALUE* height)
272 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
274 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, height, width);
276 return E_NOTIMPL;
279 static HRESULT WINAPI IDirect3DRMTexture2Impl_GetDecalOrigin(IDirect3DRMTexture2* iface, LONG* x, LONG* y)
281 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
283 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, x, y);
285 return E_NOTIMPL;
288 static D3DRMIMAGE* WINAPI IDirect3DRMTexture2Impl_GetImage(IDirect3DRMTexture2* iface)
290 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
292 FIXME("(%p/%p)->(): stub\n", iface, This);
294 return NULL;
297 static DWORD WINAPI IDirect3DRMTexture2Impl_GetShades(IDirect3DRMTexture2* iface)
299 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
301 FIXME("(%p/%p)->(): stub\n", iface, This);
303 return 0;
306 static DWORD WINAPI IDirect3DRMTexture2Impl_GetColors(IDirect3DRMTexture2* iface)
308 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
310 FIXME("(%p/%p)->(): stub\n", iface, This);
312 return 0;
315 static DWORD WINAPI IDirect3DRMTexture2Impl_GetDecalScale(IDirect3DRMTexture2* iface)
317 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
319 FIXME("(%p/%p)->(): stub\n", iface, This);
321 return 0;
324 static BOOL WINAPI IDirect3DRMTexture2Impl_GetDecalTransparency(IDirect3DRMTexture2* iface)
326 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
328 FIXME("(%p/%p)->(): stub\n", iface, This);
330 return FALSE;
333 static D3DCOLOR WINAPI IDirect3DRMTexture2Impl_GetDecalTransparentColor(IDirect3DRMTexture2* iface)
335 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
337 FIXME("(%p/%p)->(): stub\n", iface, This);
339 return 0;
342 /*** IDirect3DRMTexture2 methods ***/
343 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromImage(IDirect3DRMTexture2* iface, LPD3DRMIMAGE image)
345 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
347 FIXME("(%p/%p)->(%p): stub\n", iface, This, image);
349 return E_NOTIMPL;
352 static HRESULT WINAPI IDirect3DRMTexture2Impl_InitFromResource2(IDirect3DRMTexture2* iface, HMODULE module,
353 LPCSTR /* LPCTSTR */ name, LPCSTR /* LPCTSTR */ type)
355 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
357 FIXME("(%p/%p)->(%p, %s, %s): stub\n", iface, This, module, debugstr_a(name), debugstr_a(type));
359 return E_NOTIMPL;
362 static HRESULT WINAPI IDirect3DRMTexture2Impl_GenerateMIPMap(IDirect3DRMTexture2* iface, DWORD flags)
364 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture2(iface);
366 FIXME("(%p/%p)->(%x): stub\n", iface, This, flags);
368 return E_NOTIMPL;
371 static const struct IDirect3DRMTexture2Vtbl Direct3DRMTexture2_Vtbl =
373 /*** IUnknown methods ***/
374 IDirect3DRMTexture2Impl_QueryInterface,
375 IDirect3DRMTexture2Impl_AddRef,
376 IDirect3DRMTexture2Impl_Release,
377 /*** IDirect3DRMObject methods ***/
378 IDirect3DRMTexture2Impl_Clone,
379 IDirect3DRMTexture2Impl_AddDestroyCallback,
380 IDirect3DRMTexture2Impl_DeleteDestroyCallback,
381 IDirect3DRMTexture2Impl_SetAppData,
382 IDirect3DRMTexture2Impl_GetAppData,
383 IDirect3DRMTexture2Impl_SetName,
384 IDirect3DRMTexture2Impl_GetName,
385 IDirect3DRMTexture2Impl_GetClassName,
386 /*** IDirect3DRMTexture methods ***/
387 IDirect3DRMTexture2Impl_InitFromFile,
388 IDirect3DRMTexture2Impl_InitFromSurface,
389 IDirect3DRMTexture2Impl_InitFromResource,
390 IDirect3DRMTexture2Impl_Changed,
391 IDirect3DRMTexture2Impl_SetColors,
392 IDirect3DRMTexture2Impl_SetShades,
393 IDirect3DRMTexture2Impl_SetDecalSize,
394 IDirect3DRMTexture2Impl_SetDecalOrigin,
395 IDirect3DRMTexture2Impl_SetDecalScale,
396 IDirect3DRMTexture2Impl_SetDecalTransparency,
397 IDirect3DRMTexture2Impl_SetDecalTransparentColor,
398 IDirect3DRMTexture2Impl_GetDecalSize,
399 IDirect3DRMTexture2Impl_GetDecalOrigin,
400 IDirect3DRMTexture2Impl_GetImage,
401 IDirect3DRMTexture2Impl_GetShades,
402 IDirect3DRMTexture2Impl_GetColors,
403 IDirect3DRMTexture2Impl_GetDecalScale,
404 IDirect3DRMTexture2Impl_GetDecalTransparency,
405 IDirect3DRMTexture2Impl_GetDecalTransparentColor,
406 /*** IDirect3DRMTexture2 methods ***/
407 IDirect3DRMTexture2Impl_InitFromImage,
408 IDirect3DRMTexture2Impl_InitFromResource2,
409 IDirect3DRMTexture2Impl_GenerateMIPMap
412 /*** IUnknown methods ***/
413 static HRESULT WINAPI IDirect3DRMTexture3Impl_QueryInterface(IDirect3DRMTexture3* iface,
414 REFIID riid, void** object)
416 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
418 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), object);
420 *object = NULL;
422 if (IsEqualGUID(riid, &IID_IUnknown) ||
423 IsEqualGUID(riid, &IID_IDirect3DRMTexture) ||
424 IsEqualGUID(riid, &IID_IDirect3DRMTexture2))
426 *object = &This->IDirect3DRMTexture2_iface;
428 else if IsEqualGUID(riid, &IID_IDirect3DRMTexture3)
430 *object = &This->IDirect3DRMTexture3_iface;
432 else
434 FIXME("Interface %s not implemented\n", debugstr_guid(riid));
435 return E_NOINTERFACE;
438 IDirect3DRMTexture3_AddRef(iface);
440 return S_OK;
443 static ULONG WINAPI IDirect3DRMTexture3Impl_AddRef(IDirect3DRMTexture3* iface)
445 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
446 ULONG ref = InterlockedIncrement(&This->ref);
448 TRACE("(%p)->(): new ref = %d\n", iface, ref);
450 return ref;
453 static ULONG WINAPI IDirect3DRMTexture3Impl_Release(IDirect3DRMTexture3* iface)
455 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
456 ULONG ref = InterlockedDecrement(&This->ref);
458 TRACE("(%p)->(): new ref = %d\n", iface, ref);
460 if (!ref)
461 HeapFree(GetProcessHeap(), 0, This);
463 return ref;
466 /*** IDirect3DRMObject methods ***/
467 static HRESULT WINAPI IDirect3DRMTexture3Impl_Clone(IDirect3DRMTexture3* iface,
468 LPUNKNOWN unknown, REFIID riid,
469 LPVOID* object)
471 FIXME("(%p)->(%p, %s, %p): stub\n", iface, unknown, debugstr_guid(riid), object);
473 return E_NOTIMPL;
476 static HRESULT WINAPI IDirect3DRMTexture3Impl_AddDestroyCallback(IDirect3DRMTexture3* iface,
477 D3DRMOBJECTCALLBACK cb,
478 LPVOID argument)
480 FIXME("(%p)->(%p, %p): stub\n", iface, cb, argument);
482 return E_NOTIMPL;
485 static HRESULT WINAPI IDirect3DRMTexture3Impl_DeleteDestroyCallback(IDirect3DRMTexture3* iface,
486 D3DRMOBJECTCALLBACK cb,
487 LPVOID argument)
489 FIXME("(%p)->(%p, %p): stub\n", iface, cb, argument);
491 return E_NOTIMPL;
494 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetAppData(IDirect3DRMTexture3* iface,
495 DWORD data)
497 FIXME("(%p)->(%u): stub\n", iface, data);
499 return E_NOTIMPL;
502 static DWORD WINAPI IDirect3DRMTexture3Impl_GetAppData(IDirect3DRMTexture3* iface)
504 FIXME("(%p)->(): stub\n", iface);
506 return 0;
509 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetName(IDirect3DRMTexture3* iface, LPCSTR name)
511 FIXME("(%p)->(%s): stub\n", iface, name);
513 return E_NOTIMPL;
516 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetName(IDirect3DRMTexture3* iface,
517 LPDWORD size, LPSTR name)
519 FIXME("(%p)->(%p, %p): stub\n", iface, size, name);
521 return E_NOTIMPL;
524 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetClassName(IDirect3DRMTexture3* iface,
525 LPDWORD size, LPSTR name)
527 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
529 TRACE("(%p/%p)->(%p, %p)\n", iface, This, size, name);
531 if (!size || *size < strlen("Texture") || !name)
532 return E_INVALIDARG;
534 strcpy(name, "Texture");
535 *size = sizeof("Texture");
537 return D3DRM_OK;
540 /*** IDirect3DRMTexture3 methods ***/
541 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromFile(IDirect3DRMTexture3* iface, const char *filename)
543 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
545 FIXME("(%p/%p)->(%s): stub\n", iface, This, debugstr_a(filename));
547 return E_NOTIMPL;
550 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromSurface(IDirect3DRMTexture3* iface, LPDIRECTDRAWSURFACE surface)
552 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
554 FIXME("(%p/%p)->(%p): stub\n", iface, This, surface);
556 return E_NOTIMPL;
559 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromResource(IDirect3DRMTexture3* iface, HRSRC resource)
561 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
563 FIXME("(%p/%p)->(%p): stub\n", iface, This, resource);
565 return E_NOTIMPL;
568 static HRESULT WINAPI IDirect3DRMTexture3Impl_Changed(IDirect3DRMTexture3* iface, DWORD flags, DWORD nb_rects, LPRECT rects)
570 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
572 FIXME("(%p/%p)->(%x, %u, %p): stub\n", iface, This, flags, nb_rects, rects);
574 return E_NOTIMPL;
577 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetColors(IDirect3DRMTexture3* iface, DWORD max_colors)
579 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
581 FIXME("(%p/%p)->(%u): stub\n", iface, This, max_colors);
583 return E_NOTIMPL;
586 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetShades(IDirect3DRMTexture3* iface, DWORD max_shades)
588 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
590 FIXME("(%p/%p)->(%u): stub\n", iface, This, max_shades);
592 return E_NOTIMPL;
595 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalSize(IDirect3DRMTexture3* iface, D3DVALUE width, D3DVALUE height)
597 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
599 FIXME("(%p/%p)->(%f, %f): stub\n", iface, This, width, height);
601 return E_NOTIMPL;
604 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalOrigin(IDirect3DRMTexture3* iface, LONG x, LONG y)
606 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
608 FIXME("(%p/%p)->(%d, %d): stub\n", iface, This, x, y);
610 return E_NOTIMPL;
613 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalScale(IDirect3DRMTexture3* iface, DWORD scale)
615 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
617 FIXME("(%p/%p)->(%u): stub\n", iface, This, scale);
619 return E_NOTIMPL;
622 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalTransparency(IDirect3DRMTexture3* iface, BOOL transparency)
624 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
626 FIXME("(%p/%p)->(%u): stub\n", iface, This, transparency);
628 return E_NOTIMPL;
631 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDecalTransparentColor(IDirect3DRMTexture3* iface, D3DCOLOR color)
633 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
635 FIXME("(%p/%p)->(%x): stub\n", iface, This, color);
637 return E_NOTIMPL;
640 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetDecalSize(IDirect3DRMTexture3* iface, D3DVALUE* width, D3DVALUE* height)
642 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
644 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, height, width);
646 return E_NOTIMPL;
649 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetDecalOrigin(IDirect3DRMTexture3* iface, LONG* x, LONG* y)
651 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
653 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, x, y);
655 return E_NOTIMPL;
658 static D3DRMIMAGE* WINAPI IDirect3DRMTexture3Impl_GetImage(IDirect3DRMTexture3* iface)
660 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
662 FIXME("(%p/%p)->(): stub\n", iface, This);
664 return NULL;
667 static DWORD WINAPI IDirect3DRMTexture3Impl_GetShades(IDirect3DRMTexture3* iface)
669 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
671 FIXME("(%p/%p)->(): stub\n", iface, This);
673 return 0;
676 static DWORD WINAPI IDirect3DRMTexture3Impl_GetColors(IDirect3DRMTexture3* iface)
678 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
680 FIXME("(%p/%p)->(): stub\n", iface, This);
682 return 0;
685 static DWORD WINAPI IDirect3DRMTexture3Impl_GetDecalScale(IDirect3DRMTexture3* iface)
687 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
689 FIXME("(%p/%p)->(): stub\n", iface, This);
691 return 0;
694 static BOOL WINAPI IDirect3DRMTexture3Impl_GetDecalTransparency(IDirect3DRMTexture3* iface)
696 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
698 FIXME("(%p/%p)->(): stub\n", iface, This);
700 return FALSE;
703 static D3DCOLOR WINAPI IDirect3DRMTexture3Impl_GetDecalTransparentColor(IDirect3DRMTexture3* iface)
705 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
707 FIXME("(%p/%p)->(): stub\n", iface, This);
709 return 0;
712 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromImage(IDirect3DRMTexture3* iface, LPD3DRMIMAGE image)
714 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
716 FIXME("(%p/%p)->(%p): stub\n", iface, This, image);
718 return E_NOTIMPL;
721 static HRESULT WINAPI IDirect3DRMTexture3Impl_InitFromResource2(IDirect3DRMTexture3* iface, HMODULE module,
722 LPCSTR /* LPCTSTR */ name, LPCSTR /* LPCTSTR */ type)
724 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
726 FIXME("(%p/%p)->(%p, %s, %s): stub\n", iface, This, module, debugstr_a(name), debugstr_a(type));
728 return E_NOTIMPL;
731 static HRESULT WINAPI IDirect3DRMTexture3Impl_GenerateMIPMap(IDirect3DRMTexture3* iface, DWORD flags)
733 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
735 FIXME("(%p/%p)->(%x): stub\n", iface, This, flags);
737 return E_NOTIMPL;
740 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetSurface(IDirect3DRMTexture3* iface, DWORD flags, LPDIRECTDRAWSURFACE* surface)
742 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
744 FIXME("(%p/%p)->(%x, %p): stub\n", iface, This, flags, surface);
746 return E_NOTIMPL;
749 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetCacheOptions(IDirect3DRMTexture3* iface, LONG importance, DWORD flags)
751 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
753 FIXME("(%p/%p)->(%d, %x): stub\n", iface, This, importance, flags);
755 return E_NOTIMPL;
758 static HRESULT WINAPI IDirect3DRMTexture3Impl_GetCacheOptions(IDirect3DRMTexture3* iface, LPLONG importance, LPDWORD flags)
760 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
762 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, importance, flags);
764 return E_NOTIMPL;
767 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetDownsampleCallback(IDirect3DRMTexture3* iface, D3DRMDOWNSAMPLECALLBACK callback, LPVOID arg)
769 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
771 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, callback, arg);
773 return E_NOTIMPL;
776 static HRESULT WINAPI IDirect3DRMTexture3Impl_SetValidationCallback(IDirect3DRMTexture3* iface, D3DRMVALIDATIONCALLBACK callback, LPVOID arg)
778 IDirect3DRMTextureImpl *This = impl_from_IDirect3DRMTexture3(iface);
780 FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, callback, arg);
782 return E_NOTIMPL;
785 static const struct IDirect3DRMTexture3Vtbl Direct3DRMTexture3_Vtbl =
787 /*** IUnknown methods ***/
788 IDirect3DRMTexture3Impl_QueryInterface,
789 IDirect3DRMTexture3Impl_AddRef,
790 IDirect3DRMTexture3Impl_Release,
791 /*** IDirect3DRMObject methods ***/
792 IDirect3DRMTexture3Impl_Clone,
793 IDirect3DRMTexture3Impl_AddDestroyCallback,
794 IDirect3DRMTexture3Impl_DeleteDestroyCallback,
795 IDirect3DRMTexture3Impl_SetAppData,
796 IDirect3DRMTexture3Impl_GetAppData,
797 IDirect3DRMTexture3Impl_SetName,
798 IDirect3DRMTexture3Impl_GetName,
799 IDirect3DRMTexture3Impl_GetClassName,
800 /*** IDirect3DRMTexture3 methods ***/
801 IDirect3DRMTexture3Impl_InitFromFile,
802 IDirect3DRMTexture3Impl_InitFromSurface,
803 IDirect3DRMTexture3Impl_InitFromResource,
804 IDirect3DRMTexture3Impl_Changed,
805 IDirect3DRMTexture3Impl_SetColors,
806 IDirect3DRMTexture3Impl_SetShades,
807 IDirect3DRMTexture3Impl_SetDecalSize,
808 IDirect3DRMTexture3Impl_SetDecalOrigin,
809 IDirect3DRMTexture3Impl_SetDecalScale,
810 IDirect3DRMTexture3Impl_SetDecalTransparency,
811 IDirect3DRMTexture3Impl_SetDecalTransparentColor,
812 IDirect3DRMTexture3Impl_GetDecalSize,
813 IDirect3DRMTexture3Impl_GetDecalOrigin,
814 IDirect3DRMTexture3Impl_GetImage,
815 IDirect3DRMTexture3Impl_GetShades,
816 IDirect3DRMTexture3Impl_GetColors,
817 IDirect3DRMTexture3Impl_GetDecalScale,
818 IDirect3DRMTexture3Impl_GetDecalTransparency,
819 IDirect3DRMTexture3Impl_GetDecalTransparentColor,
820 IDirect3DRMTexture3Impl_InitFromImage,
821 IDirect3DRMTexture3Impl_InitFromResource2,
822 IDirect3DRMTexture3Impl_GenerateMIPMap,
823 IDirect3DRMTexture3Impl_GetSurface,
824 IDirect3DRMTexture3Impl_SetCacheOptions,
825 IDirect3DRMTexture3Impl_GetCacheOptions,
826 IDirect3DRMTexture3Impl_SetDownsampleCallback,
827 IDirect3DRMTexture3Impl_SetValidationCallback
830 HRESULT Direct3DRMTexture_create(REFIID riid, IUnknown** ret_iface)
832 IDirect3DRMTextureImpl* object;
834 TRACE("(%p)\n", ret_iface);
836 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMTextureImpl));
837 if (!object)
839 ERR("Out of memory\n");
840 return E_OUTOFMEMORY;
843 object->IDirect3DRMTexture2_iface.lpVtbl = &Direct3DRMTexture2_Vtbl;
844 object->IDirect3DRMTexture3_iface.lpVtbl = &Direct3DRMTexture3_Vtbl;
845 object->ref = 1;
847 if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3))
848 *ret_iface = (IUnknown*)&object->IDirect3DRMTexture3_iface;
849 else
850 *ret_iface = (IUnknown*)&object->IDirect3DRMTexture2_iface;
852 return S_OK;