~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/dxgi/adapter.c

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * Copyright 2008 Henri Verbeet for CodeWeavers
  3  *
  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.
  8  *
  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.
 13  *
 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
 17  *
 18  */
 19 
 20 #include "config.h"
 21 #include "wine/port.h"
 22 
 23 #include "dxgi_private.h"
 24 
 25 WINE_DEFAULT_DEBUG_CHANNEL(dxgi);
 26 
 27 /* IUnknown methods */
 28 
 29 static HRESULT STDMETHODCALLTYPE dxgi_adapter_QueryInterface(IWineDXGIAdapter *iface, REFIID riid, void **object)
 30 {
 31     TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
 32 
 33     if (IsEqualGUID(riid, &IID_IUnknown)
 34             || IsEqualGUID(riid, &IID_IDXGIObject)
 35             || IsEqualGUID(riid, &IID_IDXGIAdapter)
 36             || IsEqualGUID(riid, &IID_IWineDXGIAdapter))
 37     {
 38         IUnknown_AddRef(iface);
 39         *object = iface;
 40         return S_OK;
 41     }
 42 
 43     WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
 44 
 45     *object = NULL;
 46     return E_NOINTERFACE;
 47 }
 48 
 49 static ULONG STDMETHODCALLTYPE dxgi_adapter_AddRef(IWineDXGIAdapter *iface)
 50 {
 51     struct dxgi_adapter *This = (struct dxgi_adapter *)iface;
 52     ULONG refcount = InterlockedIncrement(&This->refcount);
 53 
 54     TRACE("%p increasing refcount to %u\n", This, refcount);
 55 
 56     return refcount;
 57 }
 58 
 59 static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IWineDXGIAdapter *iface)
 60 {
 61     struct dxgi_adapter *This = (struct dxgi_adapter *)iface;
 62     ULONG refcount = InterlockedDecrement(&This->refcount);
 63 
 64     TRACE("%p decreasing refcount to %u\n", This, refcount);
 65 
 66     if (!refcount)
 67     {
 68         HeapFree(GetProcessHeap(), 0, This);
 69     }
 70 
 71     return refcount;
 72 }
 73 
 74 /* IDXGIObject methods */
 75 
 76 static HRESULT STDMETHODCALLTYPE dxgi_adapter_SetPrivateData(IWineDXGIAdapter *iface,
 77         REFGUID guid, UINT data_size, const void *data)
 78 {
 79     FIXME("iface %p, guid %s, data_size %u, data %p stub!\n", iface, debugstr_guid(guid), data_size, data);
 80 
 81     return E_NOTIMPL;
 82 }
 83 
 84 static HRESULT STDMETHODCALLTYPE dxgi_adapter_SetPrivateDataInterface(IWineDXGIAdapter *iface,
 85         REFGUID guid, const IUnknown *object)
 86 {
 87     FIXME("iface %p, guid %s, object %p stub!\n", iface, debugstr_guid(guid), object);
 88 
 89     return E_NOTIMPL;
 90 }
 91 
 92 static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetPrivateData(IWineDXGIAdapter *iface,
 93         REFGUID guid, UINT *data_size, void *data)
 94 {
 95     FIXME("iface %p, guid %s, data_size %p, data %p stub!\n", iface, debugstr_guid(guid), data_size, data);
 96 
 97     return E_NOTIMPL;
 98 }
 99 
100 static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetParent(IWineDXGIAdapter *iface, REFIID riid, void **parent)
101 {
102     struct dxgi_adapter *This = (struct dxgi_adapter *)iface;
103 
104     TRACE("iface %p, riid %s, parent %p\n", iface, debugstr_guid(riid), parent);
105 
106     return IDXGIFactory_QueryInterface(This->parent, riid, parent);
107 }
108 
109 /* IDXGIAdapter methods */
110 
111 static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IWineDXGIAdapter *iface,
112         UINT output_idx, IDXGIOutput **output)
113 {
114     FIXME("iface %p, output_idx %u, output %p stub!\n", iface, output_idx, output);
115 
116     return E_NOTIMPL;
117 }
118 
119 static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc(IWineDXGIAdapter *iface, DXGI_ADAPTER_DESC *desc)
120 {
121     FIXME("iface %p, desc %p stub!\n", iface, desc);
122 
123     return E_NOTIMPL;
124 }
125 
126 static HRESULT STDMETHODCALLTYPE dxgi_adapter_CheckInterfaceSupport(IWineDXGIAdapter *iface,
127         REFGUID guid, LARGE_INTEGER *umd_version)
128 {
129     FIXME("iface %p, guid %s, umd_version %p stub!\n", iface, debugstr_guid(guid), umd_version);
130 
131     return E_NOTIMPL;
132 }
133 
134 /* IWineDXGIAdapter methods */
135 
136 static UINT STDMETHODCALLTYPE dxgi_adapter_get_ordinal(IWineDXGIAdapter *iface)
137 {
138     struct dxgi_adapter *This = (struct dxgi_adapter *)iface;
139 
140     TRACE("iface %p, returning %u\n", iface, This->ordinal);
141 
142     return This->ordinal;
143 }
144 
145 const struct IWineDXGIAdapterVtbl dxgi_adapter_vtbl =
146 {
147     /* IUnknown methods */
148     dxgi_adapter_QueryInterface,
149     dxgi_adapter_AddRef,
150     dxgi_adapter_Release,
151     /* IDXGIObject methods */
152     dxgi_adapter_SetPrivateData,
153     dxgi_adapter_SetPrivateDataInterface,
154     dxgi_adapter_GetPrivateData,
155     dxgi_adapter_GetParent,
156     /* IDXGIAdapter methods */
157     dxgi_adapter_EnumOutputs,
158     dxgi_adapter_GetDesc,
159     dxgi_adapter_CheckInterfaceSupport,
160     /* IWineDXGIAdapter methods */
161     dxgi_adapter_get_ordinal,
162 };
163 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.