2 * Copyright 2009 Henri Verbeet for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "wine/port.h"
23 #include "d3d10core_private.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(d3d10core);
27 /* IUnknown methods */
29 static HRESULT STDMETHODCALLTYPE d3d10_query_QueryInterface(ID3D10Query *iface, REFIID riid, void **object)
31 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
33 if (IsEqualGUID(riid, &IID_ID3D10Query)
34 || IsEqualGUID(riid, &IID_ID3D10Asynchronous)
35 || IsEqualGUID(riid, &IID_ID3D10DeviceChild)
36 || IsEqualGUID(riid, &IID_IUnknown))
38 IUnknown_AddRef(iface);
43 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
49 static ULONG STDMETHODCALLTYPE d3d10_query_AddRef(ID3D10Query *iface)
51 struct d3d10_query *This = (struct d3d10_query *)iface;
52 ULONG refcount = InterlockedIncrement(&This->refcount);
54 TRACE("%p increasing refcount to %u.\n", This, refcount);
59 static ULONG STDMETHODCALLTYPE d3d10_query_Release(ID3D10Query *iface)
61 struct d3d10_query *This = (struct d3d10_query *)iface;
62 ULONG refcount = InterlockedDecrement(&This->refcount);
64 TRACE("%p decreasing refcount to %u.\n", This, refcount);
68 HeapFree(GetProcessHeap(), 0, This);
74 /* ID3D10DeviceChild methods */
76 static void STDMETHODCALLTYPE d3d10_query_GetDevice(ID3D10Query *iface, ID3D10Device **device)
78 FIXME("iface %p, device %p stub!\n", iface, device);
81 static HRESULT STDMETHODCALLTYPE d3d10_query_GetPrivateData(ID3D10Query *iface,
82 REFGUID guid, UINT *data_size, void *data)
84 FIXME("iface %p, guid %s, data_size %p, data %p stub!\n",
85 iface, debugstr_guid(guid), data_size, data);
90 static HRESULT STDMETHODCALLTYPE d3d10_query_SetPrivateData(ID3D10Query *iface,
91 REFGUID guid, UINT data_size, const void *data)
93 FIXME("iface %p, guid %s, data_size %u, data %p stub!\n",
94 iface, debugstr_guid(guid), data_size, data);
99 static HRESULT STDMETHODCALLTYPE d3d10_query_SetPrivateDataInterface(ID3D10Query *iface,
100 REFGUID guid, const IUnknown *data)
102 FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data);
107 /* ID3D10Asynchronous methods */
109 static void STDMETHODCALLTYPE d3d10_query_Begin(ID3D10Query *iface)
111 FIXME("iface %p stub!\n", iface);
114 static void STDMETHODCALLTYPE d3d10_query_End(ID3D10Query *iface)
116 FIXME("iface %p stub!\n", iface);
119 static HRESULT STDMETHODCALLTYPE d3d10_query_GetData(ID3D10Query *iface, void *data, UINT data_size, UINT flags)
121 FIXME("iface %p, data %p, data_size %u, flags %#x stub!\n", iface, data, data_size, flags);
126 static UINT STDMETHODCALLTYPE d3d10_query_GetDataSize(ID3D10Query *iface)
128 FIXME("iface %p stub!\n", iface);
133 /* ID3D10Query methods */
135 static void STDMETHODCALLTYPE d3d10_query_GetDesc(ID3D10Query *iface, D3D10_QUERY_DESC *desc)
137 FIXME("iface %p, desc %p stub!\n", iface, desc);
140 static const struct ID3D10QueryVtbl d3d10_query_vtbl =
142 /* IUnknown methods */
143 d3d10_query_QueryInterface,
146 /* ID3D10DeviceChild methods */
147 d3d10_query_GetDevice,
148 d3d10_query_GetPrivateData,
149 d3d10_query_SetPrivateData,
150 d3d10_query_SetPrivateDataInterface,
151 /* ID3D10Asynchronous methods */
155 d3d10_query_GetDataSize,
156 /* ID3D10Query methods */
160 HRESULT d3d10_query_init(struct d3d10_query *query)
162 query->vtbl = &d3d10_query_vtbl;