dwrite/tests: Remove unused functions (Clang).
[wine.git] / dlls / d3drm / viewport.c
blob98ea582412dc10583c40f664430e54425c8baf27
1 /*
2 * Implementation of IDirect3DRMViewport Interface
4 * Copyright 2012 André Hentschel
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 struct d3drm_viewport
34 struct d3drm_object obj;
35 IDirect3DRMViewport IDirect3DRMViewport_iface;
36 IDirect3DRMViewport2 IDirect3DRMViewport2_iface;
37 D3DVALUE back;
38 D3DVALUE front;
39 D3DVALUE field;
40 D3DRMPROJECTIONTYPE projection;
43 static inline struct d3drm_viewport *impl_from_IDirect3DRMViewport(IDirect3DRMViewport *iface)
45 return CONTAINING_RECORD(iface, struct d3drm_viewport, IDirect3DRMViewport_iface);
48 static inline struct d3drm_viewport *impl_from_IDirect3DRMViewport2(IDirect3DRMViewport2 *iface)
50 return CONTAINING_RECORD(iface, struct d3drm_viewport, IDirect3DRMViewport2_iface);
53 static HRESULT WINAPI d3drm_viewport1_QueryInterface(IDirect3DRMViewport *iface, REFIID riid, void **out)
55 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
57 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
59 if (IsEqualGUID(riid, &IID_IDirect3DRMViewport)
60 || IsEqualGUID(riid, &IID_IDirect3DRMObject)
61 || IsEqualGUID(riid, &IID_IUnknown))
63 *out = &viewport->IDirect3DRMViewport_iface;
65 else if (IsEqualGUID(riid, &IID_IDirect3DRMViewport2))
67 *out = &viewport->IDirect3DRMViewport2_iface;
69 else
71 *out = NULL;
72 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
73 return E_NOINTERFACE;
76 IUnknown_AddRef((IUnknown *)*out);
77 return S_OK;
80 static ULONG WINAPI d3drm_viewport1_AddRef(IDirect3DRMViewport *iface)
82 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
83 ULONG refcount = InterlockedIncrement(&viewport->obj.ref);
85 TRACE("%p increasing refcount to %u.\n", iface, refcount);
87 return refcount;
90 static ULONG WINAPI d3drm_viewport1_Release(IDirect3DRMViewport *iface)
92 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
93 ULONG refcount = InterlockedDecrement(&viewport->obj.ref);
95 TRACE("%p decreasing refcount to %u.\n", iface, refcount);
97 if (!refcount)
99 d3drm_object_cleanup((IDirect3DRMObject*)iface, &viewport->obj);
100 HeapFree(GetProcessHeap(), 0, viewport);
103 return refcount;
106 static HRESULT WINAPI d3drm_viewport1_Clone(IDirect3DRMViewport *iface,
107 IUnknown *outer, REFIID iid, void **out)
109 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
111 return E_NOTIMPL;
114 static HRESULT WINAPI d3drm_viewport1_AddDestroyCallback(IDirect3DRMViewport *iface,
115 D3DRMOBJECTCALLBACK cb, void *ctx)
117 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
119 TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
121 return IDirect3DRMViewport2_AddDestroyCallback(&viewport->IDirect3DRMViewport2_iface, cb, ctx);
124 static HRESULT WINAPI d3drm_viewport1_DeleteDestroyCallback(IDirect3DRMViewport *iface,
125 D3DRMOBJECTCALLBACK cb, void *ctx)
127 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
129 TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
131 return IDirect3DRMViewport2_DeleteDestroyCallback(&viewport->IDirect3DRMViewport2_iface, cb, ctx);
134 static HRESULT WINAPI d3drm_viewport1_SetAppData(IDirect3DRMViewport *iface, DWORD data)
136 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
138 TRACE("iface %p, data %#x\n", iface, data);
140 return IDirect3DRMViewport2_SetAppData(&viewport->IDirect3DRMViewport2_iface, data);
143 static DWORD WINAPI d3drm_viewport1_GetAppData(IDirect3DRMViewport *iface)
145 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
147 TRACE("iface %p.\n", iface);
149 return IDirect3DRMViewport2_GetAppData(&viewport->IDirect3DRMViewport2_iface);
152 static HRESULT WINAPI d3drm_viewport1_SetName(IDirect3DRMViewport *iface, const char *name)
154 FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
156 return E_NOTIMPL;
159 static HRESULT WINAPI d3drm_viewport1_GetName(IDirect3DRMViewport *iface, DWORD *size, char *name)
161 FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
163 return E_NOTIMPL;
166 static HRESULT WINAPI d3drm_viewport1_GetClassName(IDirect3DRMViewport *iface, DWORD *size, char *name)
168 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
170 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
172 return IDirect3DRMViewport2_GetClassName(&viewport->IDirect3DRMViewport2_iface, size, name);
175 static HRESULT WINAPI d3drm_viewport1_Init(IDirect3DRMViewport *iface, IDirect3DRMDevice *device,
176 IDirect3DRMFrame *camera, DWORD x, DWORD y, DWORD width, DWORD height)
178 FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u stub!\n",
179 iface, device, camera, x, y, width, height);
181 return E_NOTIMPL;
184 static HRESULT WINAPI d3drm_viewport1_Clear(IDirect3DRMViewport *iface)
186 FIXME("iface %p.\n", iface);
188 return D3DRM_OK;
191 static HRESULT WINAPI d3drm_viewport1_Render(IDirect3DRMViewport *iface, IDirect3DRMFrame *frame)
193 FIXME("iface %p, frame %p stub!\n", iface, frame);
195 return D3DRM_OK;
198 static HRESULT WINAPI d3drm_viewport1_SetFront(IDirect3DRMViewport *iface, D3DVALUE front)
200 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
202 TRACE("iface %p, front %.8e.\n", iface, front);
204 return IDirect3DRMViewport2_SetFront(&viewport->IDirect3DRMViewport2_iface, front);
207 static HRESULT WINAPI d3drm_viewport1_SetBack(IDirect3DRMViewport *iface, D3DVALUE back)
209 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
211 TRACE("iface %p, back %.8e.\n", iface, back);
213 return IDirect3DRMViewport2_SetBack(&viewport->IDirect3DRMViewport2_iface, back);
216 static HRESULT WINAPI d3drm_viewport1_SetField(IDirect3DRMViewport *iface, D3DVALUE field)
218 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
220 TRACE("iface %p, field %.8e.\n", iface, field);
222 return IDirect3DRMViewport2_SetField(&viewport->IDirect3DRMViewport2_iface, field);
225 static HRESULT WINAPI d3drm_viewport1_SetUniformScaling(IDirect3DRMViewport *iface, BOOL b)
227 FIXME("iface %p, b %#x stub!\n", iface, b);
229 return E_NOTIMPL;
232 static HRESULT WINAPI d3drm_viewport1_SetCamera(IDirect3DRMViewport *iface, IDirect3DRMFrame *camera)
234 FIXME("iface %p, camera %p stub!\n", iface, camera);
236 return E_NOTIMPL;
239 static HRESULT WINAPI d3drm_viewport1_SetProjection(IDirect3DRMViewport *iface, D3DRMPROJECTIONTYPE type)
241 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
243 TRACE("iface %p, type %#x.\n", iface, type);
245 return IDirect3DRMViewport2_SetProjection(&viewport->IDirect3DRMViewport2_iface, type);
248 static HRESULT WINAPI d3drm_viewport1_Transform(IDirect3DRMViewport *iface, D3DRMVECTOR4D *d, D3DVECTOR *s)
250 FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
252 return E_NOTIMPL;
255 static HRESULT WINAPI d3drm_viewport1_InverseTransform(IDirect3DRMViewport *iface, D3DVECTOR *d, D3DRMVECTOR4D *s)
257 FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
259 return E_NOTIMPL;
262 static HRESULT WINAPI d3drm_viewport1_Configure(IDirect3DRMViewport *iface,
263 LONG x, LONG y, DWORD width, DWORD height)
265 FIXME("iface %p, x %d, y %d, width %u, height %u stub!\n", iface, x, y, width, height);
267 return E_NOTIMPL;
270 static HRESULT WINAPI d3drm_viewport1_ForceUpdate(IDirect3DRMViewport *iface,
271 DWORD x1, DWORD y1, DWORD x2, DWORD y2)
273 FIXME("iface %p, x1 %u, y1 %u, x2 %u, y2 %u stub!\n", iface, x1, y1, x2, y2);
275 return E_NOTIMPL;
278 static HRESULT WINAPI d3drm_viewport1_SetPlane(IDirect3DRMViewport *iface,
279 D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top)
281 FIXME("iface %p, left %.8e, right %.8e, bottom %.8e, top %.8e stub!\n",
282 iface, left, right, bottom, top);
284 return E_NOTIMPL;
287 static HRESULT WINAPI d3drm_viewport1_GetCamera(IDirect3DRMViewport *iface, IDirect3DRMFrame **camera)
289 FIXME("iface %p, camera %p stub!\n", iface, camera);
291 return E_NOTIMPL;
294 static HRESULT WINAPI d3drm_viewport1_GetDevice(IDirect3DRMViewport *iface, IDirect3DRMDevice **device)
296 FIXME("iface %p, device %p stub!\n", iface, device);
298 return E_NOTIMPL;
301 static HRESULT WINAPI d3drm_viewport1_GetPlane(IDirect3DRMViewport *iface,
302 D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top)
304 FIXME("iface %p, left %p, right %p, bottom %p, top %p stub!\n",
305 iface, left, right, bottom, top);
307 return E_NOTIMPL;
310 static HRESULT WINAPI d3drm_viewport1_Pick(IDirect3DRMViewport *iface,
311 LONG x, LONG y, IDirect3DRMPickedArray **visuals)
313 FIXME("iface %p, x %d, y %d, visuals %p stub!\n", iface, x, y, visuals);
315 return E_NOTIMPL;
318 static BOOL WINAPI d3drm_viewport1_GetUniformScaling(IDirect3DRMViewport *iface)
320 FIXME("iface %p stub!\n", iface);
322 return FALSE;
325 static LONG WINAPI d3drm_viewport1_GetX(IDirect3DRMViewport *iface)
327 FIXME("iface %p stub!\n", iface);
329 return E_NOTIMPL;
332 static LONG WINAPI d3drm_viewport1_GetY(IDirect3DRMViewport *iface)
334 FIXME("iface %p stub!\n", iface);
336 return E_NOTIMPL;
339 static DWORD WINAPI d3drm_viewport1_GetWidth(IDirect3DRMViewport *iface)
341 FIXME("iface %p stub!\n", iface);
343 return E_NOTIMPL;
346 static DWORD WINAPI d3drm_viewport1_GetHeight(IDirect3DRMViewport *iface)
348 FIXME("iface %p stub!\n", iface);
350 return E_NOTIMPL;
353 static D3DVALUE WINAPI d3drm_viewport1_GetField(IDirect3DRMViewport *iface)
355 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
357 TRACE("iface %p.\n", iface);
359 return IDirect3DRMViewport2_GetField(&viewport->IDirect3DRMViewport2_iface);
362 static D3DVALUE WINAPI d3drm_viewport1_GetBack(IDirect3DRMViewport *iface)
364 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
366 TRACE("iface %p.\n", iface);
368 return IDirect3DRMViewport2_GetBack(&viewport->IDirect3DRMViewport2_iface);
371 static D3DVALUE WINAPI d3drm_viewport1_GetFront(IDirect3DRMViewport *iface)
373 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
375 TRACE("iface %p.\n", iface);
377 return IDirect3DRMViewport2_GetFront(&viewport->IDirect3DRMViewport2_iface);
380 static D3DRMPROJECTIONTYPE WINAPI d3drm_viewport1_GetProjection(IDirect3DRMViewport *iface)
382 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport(iface);
384 TRACE("iface %p.\n", iface);
386 return IDirect3DRMViewport2_GetProjection(&viewport->IDirect3DRMViewport2_iface);
389 static HRESULT WINAPI d3drm_viewport1_GetDirect3DViewport(IDirect3DRMViewport *iface,
390 IDirect3DViewport **viewport)
392 FIXME("iface %p, viewport %p stub!\n", iface, viewport);
394 return E_NOTIMPL;
397 static const struct IDirect3DRMViewportVtbl d3drm_viewport1_vtbl =
399 d3drm_viewport1_QueryInterface,
400 d3drm_viewport1_AddRef,
401 d3drm_viewport1_Release,
402 d3drm_viewport1_Clone,
403 d3drm_viewport1_AddDestroyCallback,
404 d3drm_viewport1_DeleteDestroyCallback,
405 d3drm_viewport1_SetAppData,
406 d3drm_viewport1_GetAppData,
407 d3drm_viewport1_SetName,
408 d3drm_viewport1_GetName,
409 d3drm_viewport1_GetClassName,
410 d3drm_viewport1_Init,
411 d3drm_viewport1_Clear,
412 d3drm_viewport1_Render,
413 d3drm_viewport1_SetFront,
414 d3drm_viewport1_SetBack,
415 d3drm_viewport1_SetField,
416 d3drm_viewport1_SetUniformScaling,
417 d3drm_viewport1_SetCamera,
418 d3drm_viewport1_SetProjection,
419 d3drm_viewport1_Transform,
420 d3drm_viewport1_InverseTransform,
421 d3drm_viewport1_Configure,
422 d3drm_viewport1_ForceUpdate,
423 d3drm_viewport1_SetPlane,
424 d3drm_viewport1_GetCamera,
425 d3drm_viewport1_GetDevice,
426 d3drm_viewport1_GetPlane,
427 d3drm_viewport1_Pick,
428 d3drm_viewport1_GetUniformScaling,
429 d3drm_viewport1_GetX,
430 d3drm_viewport1_GetY,
431 d3drm_viewport1_GetWidth,
432 d3drm_viewport1_GetHeight,
433 d3drm_viewport1_GetField,
434 d3drm_viewport1_GetBack,
435 d3drm_viewport1_GetFront,
436 d3drm_viewport1_GetProjection,
437 d3drm_viewport1_GetDirect3DViewport,
440 static HRESULT WINAPI d3drm_viewport2_QueryInterface(IDirect3DRMViewport2 *iface, REFIID riid, void **out)
442 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
444 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
446 return d3drm_viewport1_QueryInterface(&viewport->IDirect3DRMViewport_iface, riid, out);
449 static ULONG WINAPI d3drm_viewport2_AddRef(IDirect3DRMViewport2 *iface)
451 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
453 TRACE("iface %p.\n", iface);
455 return d3drm_viewport1_AddRef(&viewport->IDirect3DRMViewport_iface);
458 static ULONG WINAPI d3drm_viewport2_Release(IDirect3DRMViewport2 *iface)
460 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
462 TRACE("iface %p.\n", iface);
464 return d3drm_viewport1_Release(&viewport->IDirect3DRMViewport_iface);
467 static HRESULT WINAPI d3drm_viewport2_Clone(IDirect3DRMViewport2 *iface,
468 IUnknown *outer, REFIID iid, void **out)
470 FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
472 return E_NOTIMPL;
475 static HRESULT WINAPI d3drm_viewport2_AddDestroyCallback(IDirect3DRMViewport2 *iface,
476 D3DRMOBJECTCALLBACK cb, void *ctx)
478 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
480 TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
482 return d3drm_object_add_destroy_callback(&viewport->obj, cb, ctx);
485 static HRESULT WINAPI d3drm_viewport2_DeleteDestroyCallback(IDirect3DRMViewport2 *iface,
486 D3DRMOBJECTCALLBACK cb, void *ctx)
488 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
490 TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
492 return d3drm_object_delete_destroy_callback(&viewport->obj, cb, ctx);
495 static HRESULT WINAPI d3drm_viewport2_SetAppData(IDirect3DRMViewport2 *iface, DWORD data)
497 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
499 TRACE("iface %p, data %#x\n", iface, data);
501 viewport->obj.appdata = data;
502 return S_OK;
505 static DWORD WINAPI d3drm_viewport2_GetAppData(IDirect3DRMViewport2 *iface)
507 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
509 TRACE("iface %p\n", iface);
511 return viewport->obj.appdata;
514 static HRESULT WINAPI d3drm_viewport2_SetName(IDirect3DRMViewport2 *iface, const char *name)
516 FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
518 return E_NOTIMPL;
521 static HRESULT WINAPI d3drm_viewport2_GetName(IDirect3DRMViewport2 *iface, DWORD *size, char *name)
523 FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
525 return E_NOTIMPL;
528 static HRESULT WINAPI d3drm_viewport2_GetClassName(IDirect3DRMViewport2 *iface, DWORD *size, char *name)
530 TRACE("iface %p, size %p, name %p.\n", iface, size, name);
532 if (!size || *size < strlen("Viewport") || !name)
533 return E_INVALIDARG;
535 strcpy(name, "Viewport");
536 *size = sizeof("Viewport");
538 return D3DRM_OK;
541 static HRESULT WINAPI d3drm_viewport2_Init(IDirect3DRMViewport2 *iface, IDirect3DRMDevice3 *device,
542 IDirect3DRMFrame3 *camera, DWORD x, DWORD y, DWORD width, DWORD height)
544 FIXME("iface %p, device %p, camera %p, x %u, y %u, width %u, height %u stub!\n",
545 iface, device, camera, x, y, width, height);
547 return E_NOTIMPL;
550 static HRESULT WINAPI d3drm_viewport2_Clear(IDirect3DRMViewport2 *iface, DWORD flags)
552 FIXME("iface %p, flags %#x.\n", iface, flags);
554 return D3DRM_OK;
557 static HRESULT WINAPI d3drm_viewport2_Render(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 *frame)
559 FIXME("iface %p, frame %p stub!\n", iface, frame);
561 return D3DRM_OK;
564 static HRESULT WINAPI d3drm_viewport2_SetFront(IDirect3DRMViewport2 *iface, D3DVALUE front)
566 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
568 TRACE("iface %p, front %.8e.\n", iface, front);
570 viewport->front = front;
572 return D3DRM_OK;
575 static HRESULT WINAPI d3drm_viewport2_SetBack(IDirect3DRMViewport2 *iface, D3DVALUE back)
577 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
579 TRACE("iface %p, back %.8e.\n", iface, back);
581 viewport->back = back;
583 return D3DRM_OK;
586 static HRESULT WINAPI d3drm_viewport2_SetField(IDirect3DRMViewport2 *iface, D3DVALUE field)
588 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
590 TRACE("iface %p, field %.8e.\n", iface, field);
592 viewport->field = field;
594 return D3DRM_OK;
597 static HRESULT WINAPI d3drm_viewport2_SetUniformScaling(IDirect3DRMViewport2 *iface, BOOL b)
599 FIXME("iface %p, b %#x stub!\n", iface, b);
601 return E_NOTIMPL;
604 static HRESULT WINAPI d3drm_viewport2_SetCamera(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 *camera)
606 FIXME("iface %p, camera %p stub!\n", iface, camera);
608 return E_NOTIMPL;
611 static HRESULT WINAPI d3drm_viewport2_SetProjection(IDirect3DRMViewport2 *iface, D3DRMPROJECTIONTYPE type)
613 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
615 TRACE("iface %p, type %#x.\n", iface, type);
617 viewport->projection = type;
619 return D3DRM_OK;
622 static HRESULT WINAPI d3drm_viewport2_Transform(IDirect3DRMViewport2 *iface, D3DRMVECTOR4D *d, D3DVECTOR *s)
624 FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
626 return E_NOTIMPL;
629 static HRESULT WINAPI d3drm_viewport2_InverseTransform(IDirect3DRMViewport2 *iface, D3DVECTOR *d, D3DRMVECTOR4D *s)
631 FIXME("iface %p, d %p, s %p stub!\n", iface, d, s);
633 return E_NOTIMPL;
636 static HRESULT WINAPI d3drm_viewport2_Configure(IDirect3DRMViewport2 *iface,
637 LONG x, LONG y, DWORD width, DWORD height)
639 FIXME("iface %p, x %d, y %d, width %u, height %u stub!\n", iface, x, y, width, height);
641 return E_NOTIMPL;
644 static HRESULT WINAPI d3drm_viewport2_ForceUpdate(IDirect3DRMViewport2* iface,
645 DWORD x1, DWORD y1, DWORD x2, DWORD y2)
647 FIXME("iface %p, x1 %u, y1 %u, x2 %u, y2 %u stub!\n", iface, x1, y1, x2, y2);
649 return E_NOTIMPL;
652 static HRESULT WINAPI d3drm_viewport2_SetPlane(IDirect3DRMViewport2 *iface,
653 D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top)
655 FIXME("iface %p, left %.8e, right %.8e, bottom %.8e, top %.8e stub!\n",
656 iface, left, right, bottom, top);
658 return E_NOTIMPL;
661 static HRESULT WINAPI d3drm_viewport2_GetCamera(IDirect3DRMViewport2 *iface, IDirect3DRMFrame3 **camera)
663 FIXME("iface %p, camera %p stub!\n", iface, camera);
665 return E_NOTIMPL;
668 static HRESULT WINAPI d3drm_viewport2_GetDevice(IDirect3DRMViewport2 *iface, IDirect3DRMDevice3 **device)
670 FIXME("iface %p, device %p stub!\n", iface, device);
672 return E_NOTIMPL;
675 static HRESULT WINAPI d3drm_viewport2_GetPlane(IDirect3DRMViewport2 *iface,
676 D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top)
678 FIXME("iface %p, left %p, right %p, bottom %p, top %p stub!\n",
679 iface, left, right, bottom, top);
681 return E_NOTIMPL;
684 static HRESULT WINAPI d3drm_viewport2_Pick(IDirect3DRMViewport2 *iface,
685 LONG x, LONG y, IDirect3DRMPickedArray **visuals)
687 FIXME("iface %p, x %d, y %d, visuals %p stub!\n", iface, x, y, visuals);
689 return E_NOTIMPL;
692 static BOOL WINAPI d3drm_viewport2_GetUniformScaling(IDirect3DRMViewport2 *iface)
694 FIXME("iface %p stub!\n", iface);
696 return FALSE;
699 static LONG WINAPI d3drm_viewport2_GetX(IDirect3DRMViewport2 *iface)
701 FIXME("iface %p stub!\n", iface);
703 return E_NOTIMPL;
706 static LONG WINAPI d3drm_viewport2_GetY(IDirect3DRMViewport2 *iface)
708 FIXME("iface %p stub!\n", iface);
710 return E_NOTIMPL;
713 static DWORD WINAPI d3drm_viewport2_GetWidth(IDirect3DRMViewport2 *iface)
715 FIXME("iface %p stub!\n", iface);
717 return E_NOTIMPL;
720 static DWORD WINAPI d3drm_viewport2_GetHeight(IDirect3DRMViewport2 *iface)
722 FIXME("iface %p stub!\n", iface);
724 return E_NOTIMPL;
727 static D3DVALUE WINAPI d3drm_viewport2_GetField(IDirect3DRMViewport2 *iface)
729 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
731 TRACE("iface %p.\n", iface);
733 return viewport->field;
736 static D3DVALUE WINAPI d3drm_viewport2_GetBack(IDirect3DRMViewport2 *iface)
738 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
740 TRACE("iface %p.\n", iface);
742 return viewport->back;
745 static D3DVALUE WINAPI d3drm_viewport2_GetFront(IDirect3DRMViewport2 *iface)
747 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
749 TRACE("iface %p.\n", iface);
751 return viewport->front;
754 static D3DRMPROJECTIONTYPE WINAPI d3drm_viewport2_GetProjection(IDirect3DRMViewport2 *iface)
756 struct d3drm_viewport *viewport = impl_from_IDirect3DRMViewport2(iface);
758 TRACE("iface %p.\n", iface);
760 return viewport->projection;
763 static HRESULT WINAPI d3drm_viewport2_GetDirect3DViewport(IDirect3DRMViewport2 *iface,
764 IDirect3DViewport **viewport)
766 FIXME("iface %p, viewport %p stub!\n", iface, viewport);
768 return E_NOTIMPL;
771 static HRESULT WINAPI d3drm_viewport2_TransformVectors(IDirect3DRMViewport2 *iface,
772 DWORD vector_count, D3DRMVECTOR4D *dst, D3DVECTOR *src)
774 FIXME("iface %p, vector_count %u, dst %p, src %p stub!\n", iface, vector_count, dst, src);
776 return E_NOTIMPL;
779 static HRESULT WINAPI d3drm_viewport2_InverseTransformVectors(IDirect3DRMViewport2 *iface,
780 DWORD vector_count, D3DVECTOR *dst, D3DRMVECTOR4D *src)
782 FIXME("iface %p, vector_count %u, dst %p, src %p stub!\n", iface, vector_count, dst, src);
784 return E_NOTIMPL;
787 static const struct IDirect3DRMViewport2Vtbl d3drm_viewport2_vtbl =
789 d3drm_viewport2_QueryInterface,
790 d3drm_viewport2_AddRef,
791 d3drm_viewport2_Release,
792 d3drm_viewport2_Clone,
793 d3drm_viewport2_AddDestroyCallback,
794 d3drm_viewport2_DeleteDestroyCallback,
795 d3drm_viewport2_SetAppData,
796 d3drm_viewport2_GetAppData,
797 d3drm_viewport2_SetName,
798 d3drm_viewport2_GetName,
799 d3drm_viewport2_GetClassName,
800 d3drm_viewport2_Init,
801 d3drm_viewport2_Clear,
802 d3drm_viewport2_Render,
803 d3drm_viewport2_SetFront,
804 d3drm_viewport2_SetBack,
805 d3drm_viewport2_SetField,
806 d3drm_viewport2_SetUniformScaling,
807 d3drm_viewport2_SetCamera,
808 d3drm_viewport2_SetProjection,
809 d3drm_viewport2_Transform,
810 d3drm_viewport2_InverseTransform,
811 d3drm_viewport2_Configure,
812 d3drm_viewport2_ForceUpdate,
813 d3drm_viewport2_SetPlane,
814 d3drm_viewport2_GetCamera,
815 d3drm_viewport2_GetDevice,
816 d3drm_viewport2_GetPlane,
817 d3drm_viewport2_Pick,
818 d3drm_viewport2_GetUniformScaling,
819 d3drm_viewport2_GetX,
820 d3drm_viewport2_GetY,
821 d3drm_viewport2_GetWidth,
822 d3drm_viewport2_GetHeight,
823 d3drm_viewport2_GetField,
824 d3drm_viewport2_GetBack,
825 d3drm_viewport2_GetFront,
826 d3drm_viewport2_GetProjection,
827 d3drm_viewport2_GetDirect3DViewport,
828 d3drm_viewport2_TransformVectors,
829 d3drm_viewport2_InverseTransformVectors,
832 HRESULT Direct3DRMViewport_create(REFIID riid, IUnknown **out)
834 struct d3drm_viewport *object;
836 TRACE("riid %s, out %p.\n", debugstr_guid(riid), out);
838 if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
839 return E_OUTOFMEMORY;
841 object->IDirect3DRMViewport_iface.lpVtbl = &d3drm_viewport1_vtbl;
842 object->IDirect3DRMViewport2_iface.lpVtbl = &d3drm_viewport2_vtbl;
843 d3drm_object_init(&object->obj);
845 if (IsEqualGUID(riid, &IID_IDirect3DRMViewport2))
846 *out = (IUnknown *)&object->IDirect3DRMViewport2_iface;
847 else
848 *out = (IUnknown *)&object->IDirect3DRMViewport_iface;
850 return S_OK;