|
| 1 | +From f9592e22e65a0e6c1d0c390534618e5bb946c2a2 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Martell Malone < [email protected]> |
| 3 | +Date: Mon, 16 Feb 2015 19:56:22 +0000 |
| 4 | +Subject: [PATCH 2/5] dxgi: Add interface for IDXGISurface1 |
| 5 | + |
| 6 | +--- |
| 7 | + mingw-w64-headers/direct-x/include/dxgi.h | 191 ++++++++++++++++++++++++++++ |
| 8 | + mingw-w64-headers/direct-x/include/dxgi.idl | 19 +++ |
| 9 | + 2 files changed, 210 insertions(+) |
| 10 | + |
| 11 | +diff --git a/mingw-w64-headers/direct-x/include/dxgi.h b/mingw-w64-headers/direct-x/include/dxgi.h |
| 12 | +index a8a99ed..edfae00 100644 |
| 13 | +--- a/mingw-w64-headers/direct-x/include/dxgi.h |
| 14 | ++++ b/mingw-w64-headers/direct-x/include/dxgi.h |
| 15 | +@@ -42,6 +42,11 @@ typedef interface IDXGIKeyedMutex IDXGIKeyedMutex; |
| 16 | + typedef interface IDXGISurface IDXGISurface; |
| 17 | + #endif |
| 18 | + |
| 19 | ++#ifndef __IDXGISurface1_FWD_DEFINED__ |
| 20 | ++#define __IDXGISurface1_FWD_DEFINED__ |
| 21 | ++typedef interface IDXGISurface1 IDXGISurface1; |
| 22 | ++#endif |
| 23 | ++ |
| 24 | + #ifndef __IDXGIOutput_FWD_DEFINED__ |
| 25 | + #define __IDXGIOutput_FWD_DEFINED__ |
| 26 | + typedef interface IDXGIOutput IDXGIOutput; |
| 27 | +@@ -1018,6 +1023,192 @@ void __RPC_STUB IDXGISurface_Unmap_Stub( |
| 28 | + #endif /* __IDXGISurface_INTERFACE_DEFINED__ */ |
| 29 | + |
| 30 | + /***************************************************************************** |
| 31 | ++ * IDXGISurface1 interface |
| 32 | ++ */ |
| 33 | ++#ifndef __IDXGISurface1_INTERFACE_DEFINED__ |
| 34 | ++#define __IDXGISurface1_INTERFACE_DEFINED__ |
| 35 | ++ |
| 36 | ++DEFINE_GUID(IID_IDXGISurface1, 0x4ae63092, 0x6327, 0x4c1b, 0x80,0xae, 0xbf,0xe1,0x2e,0xa3,0x2b,0x86); |
| 37 | ++#if defined(__cplusplus) && !defined(CINTERFACE) |
| 38 | ++MIDL_INTERFACE("4ae63092-6327-4c1b-80ae-bfe12ea32b86") |
| 39 | ++IDXGISurface1 : public IDXGISurface |
| 40 | ++{ |
| 41 | ++ virtual HRESULT STDMETHODCALLTYPE GetDC( |
| 42 | ++ WINBOOL Discard, |
| 43 | ++ HDC *dc) = 0; |
| 44 | ++ |
| 45 | ++ virtual HRESULT STDMETHODCALLTYPE ReleaseDC( |
| 46 | ++ RECT *rect) = 0; |
| 47 | ++ |
| 48 | ++}; |
| 49 | ++#ifdef __CRT_UUID_DECL |
| 50 | ++__CRT_UUID_DECL(IDXGISurface1, 0x4ae63092, 0x6327, 0x4c1b, 0x80,0xae, 0xbf,0xe1,0x2e,0xa3,0x2b,0x86) |
| 51 | ++#endif |
| 52 | ++#else |
| 53 | ++typedef struct IDXGISurface1Vtbl { |
| 54 | ++ BEGIN_INTERFACE |
| 55 | ++ |
| 56 | ++ /*** IUnknown methods ***/ |
| 57 | ++ HRESULT (STDMETHODCALLTYPE *QueryInterface)( |
| 58 | ++ IDXGISurface1* This, |
| 59 | ++ REFIID riid, |
| 60 | ++ void **ppvObject); |
| 61 | ++ |
| 62 | ++ ULONG (STDMETHODCALLTYPE *AddRef)( |
| 63 | ++ IDXGISurface1* This); |
| 64 | ++ |
| 65 | ++ ULONG (STDMETHODCALLTYPE *Release)( |
| 66 | ++ IDXGISurface1* This); |
| 67 | ++ |
| 68 | ++ /*** IDXGIObject methods ***/ |
| 69 | ++ HRESULT (STDMETHODCALLTYPE *SetPrivateData)( |
| 70 | ++ IDXGISurface1* This, |
| 71 | ++ REFGUID guid, |
| 72 | ++ UINT data_size, |
| 73 | ++ const void *data); |
| 74 | ++ |
| 75 | ++ HRESULT (STDMETHODCALLTYPE *SetPrivateDataInterface)( |
| 76 | ++ IDXGISurface1* This, |
| 77 | ++ REFGUID guid, |
| 78 | ++ const IUnknown *object); |
| 79 | ++ |
| 80 | ++ HRESULT (STDMETHODCALLTYPE *GetPrivateData)( |
| 81 | ++ IDXGISurface1* This, |
| 82 | ++ REFGUID guid, |
| 83 | ++ UINT *data_size, |
| 84 | ++ void *data); |
| 85 | ++ |
| 86 | ++ HRESULT (STDMETHODCALLTYPE *GetParent)( |
| 87 | ++ IDXGISurface1* This, |
| 88 | ++ REFIID riid, |
| 89 | ++ void **parent); |
| 90 | ++ |
| 91 | ++ /*** IDXGIDeviceSubObject methods ***/ |
| 92 | ++ HRESULT (STDMETHODCALLTYPE *GetDevice)( |
| 93 | ++ IDXGISurface1* This, |
| 94 | ++ REFIID riid, |
| 95 | ++ void **device); |
| 96 | ++ |
| 97 | ++ /*** IDXGISurface methods ***/ |
| 98 | ++ HRESULT (STDMETHODCALLTYPE *GetDesc)( |
| 99 | ++ IDXGISurface1* This, |
| 100 | ++ DXGI_SURFACE_DESC *desc); |
| 101 | ++ |
| 102 | ++ HRESULT (STDMETHODCALLTYPE *Map)( |
| 103 | ++ IDXGISurface1* This, |
| 104 | ++ DXGI_MAPPED_RECT *mapped_rect, |
| 105 | ++ UINT flags); |
| 106 | ++ |
| 107 | ++ HRESULT (STDMETHODCALLTYPE *Unmap)( |
| 108 | ++ IDXGISurface1* This); |
| 109 | ++ |
| 110 | ++ /*** IDXGISurface1 methods ***/ |
| 111 | ++ HRESULT (STDMETHODCALLTYPE *GetDC)( |
| 112 | ++ IDXGISurface1* This, |
| 113 | ++ WINBOOL Discard, |
| 114 | ++ HDC *dc); |
| 115 | ++ |
| 116 | ++ HRESULT (STDMETHODCALLTYPE *ReleaseDC)( |
| 117 | ++ IDXGISurface1* This, |
| 118 | ++ RECT *rect); |
| 119 | ++ |
| 120 | ++ END_INTERFACE |
| 121 | ++} IDXGISurface1Vtbl; |
| 122 | ++interface IDXGISurface1 { |
| 123 | ++ CONST_VTBL IDXGISurface1Vtbl* lpVtbl; |
| 124 | ++}; |
| 125 | ++ |
| 126 | ++#ifdef COBJMACROS |
| 127 | ++#ifndef WIDL_C_INLINE_WRAPPERS |
| 128 | ++/*** IUnknown methods ***/ |
| 129 | ++#define IDXGISurface1_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) |
| 130 | ++#define IDXGISurface1_AddRef(This) (This)->lpVtbl->AddRef(This) |
| 131 | ++#define IDXGISurface1_Release(This) (This)->lpVtbl->Release(This) |
| 132 | ++/*** IDXGIObject methods ***/ |
| 133 | ++#define IDXGISurface1_SetPrivateData(This,guid,data_size,data) (This)->lpVtbl->SetPrivateData(This,guid,data_size,data) |
| 134 | ++#define IDXGISurface1_SetPrivateDataInterface(This,guid,object) (This)->lpVtbl->SetPrivateDataInterface(This,guid,object) |
| 135 | ++#define IDXGISurface1_GetPrivateData(This,guid,data_size,data) (This)->lpVtbl->GetPrivateData(This,guid,data_size,data) |
| 136 | ++#define IDXGISurface1_GetParent(This,riid,parent) (This)->lpVtbl->GetParent(This,riid,parent) |
| 137 | ++/*** IDXGIDeviceSubObject methods ***/ |
| 138 | ++#define IDXGISurface1_GetDevice(This,riid,device) (This)->lpVtbl->GetDevice(This,riid,device) |
| 139 | ++/*** IDXGISurface methods ***/ |
| 140 | ++#define IDXGISurface1_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc) |
| 141 | ++#define IDXGISurface1_Map(This,mapped_rect,flags) (This)->lpVtbl->Map(This,mapped_rect,flags) |
| 142 | ++#define IDXGISurface1_Unmap(This) (This)->lpVtbl->Unmap(This) |
| 143 | ++/*** IDXGISurface1 methods ***/ |
| 144 | ++#define IDXGISurface1_GetDC(This,Discard,dc) (This)->lpVtbl->GetDC(This,Discard,dc) |
| 145 | ++#define IDXGISurface1_ReleaseDC(This,rect) (This)->lpVtbl->ReleaseDC(This,rect) |
| 146 | ++#else |
| 147 | ++/*** IUnknown methods ***/ |
| 148 | ++static FORCEINLINE HRESULT IDXGISurface1_QueryInterface(IDXGISurface1* This,REFIID riid,void **ppvObject) { |
| 149 | ++ return This->lpVtbl->QueryInterface(This,riid,ppvObject); |
| 150 | ++} |
| 151 | ++static FORCEINLINE ULONG IDXGISurface1_AddRef(IDXGISurface1* This) { |
| 152 | ++ return This->lpVtbl->AddRef(This); |
| 153 | ++} |
| 154 | ++static FORCEINLINE ULONG IDXGISurface1_Release(IDXGISurface1* This) { |
| 155 | ++ return This->lpVtbl->Release(This); |
| 156 | ++} |
| 157 | ++/*** IDXGIObject methods ***/ |
| 158 | ++static FORCEINLINE HRESULT IDXGISurface1_SetPrivateData(IDXGISurface1* This,REFGUID guid,UINT data_size,const void *data) { |
| 159 | ++ return This->lpVtbl->SetPrivateData(This,guid,data_size,data); |
| 160 | ++} |
| 161 | ++static FORCEINLINE HRESULT IDXGISurface1_SetPrivateDataInterface(IDXGISurface1* This,REFGUID guid,const IUnknown *object) { |
| 162 | ++ return This->lpVtbl->SetPrivateDataInterface(This,guid,object); |
| 163 | ++} |
| 164 | ++static FORCEINLINE HRESULT IDXGISurface1_GetPrivateData(IDXGISurface1* This,REFGUID guid,UINT *data_size,void *data) { |
| 165 | ++ return This->lpVtbl->GetPrivateData(This,guid,data_size,data); |
| 166 | ++} |
| 167 | ++static FORCEINLINE HRESULT IDXGISurface1_GetParent(IDXGISurface1* This,REFIID riid,void **parent) { |
| 168 | ++ return This->lpVtbl->GetParent(This,riid,parent); |
| 169 | ++} |
| 170 | ++/*** IDXGIDeviceSubObject methods ***/ |
| 171 | ++static FORCEINLINE HRESULT IDXGISurface1_GetDevice(IDXGISurface1* This,REFIID riid,void **device) { |
| 172 | ++ return This->lpVtbl->GetDevice(This,riid,device); |
| 173 | ++} |
| 174 | ++/*** IDXGISurface methods ***/ |
| 175 | ++static FORCEINLINE HRESULT IDXGISurface1_GetDesc(IDXGISurface1* This,DXGI_SURFACE_DESC *desc) { |
| 176 | ++ return This->lpVtbl->GetDesc(This,desc); |
| 177 | ++} |
| 178 | ++static FORCEINLINE HRESULT IDXGISurface1_Map(IDXGISurface1* This,DXGI_MAPPED_RECT *mapped_rect,UINT flags) { |
| 179 | ++ return This->lpVtbl->Map(This,mapped_rect,flags); |
| 180 | ++} |
| 181 | ++static FORCEINLINE HRESULT IDXGISurface1_Unmap(IDXGISurface1* This) { |
| 182 | ++ return This->lpVtbl->Unmap(This); |
| 183 | ++} |
| 184 | ++/*** IDXGISurface1 methods ***/ |
| 185 | ++static FORCEINLINE HRESULT IDXGISurface1_GetDC(IDXGISurface1* This,WINBOOL Discard,HDC *dc) { |
| 186 | ++ return This->lpVtbl->GetDC(This,Discard,dc); |
| 187 | ++} |
| 188 | ++static FORCEINLINE HRESULT IDXGISurface1_ReleaseDC(IDXGISurface1* This,RECT *rect) { |
| 189 | ++ return This->lpVtbl->ReleaseDC(This,rect); |
| 190 | ++} |
| 191 | ++#endif |
| 192 | ++#endif |
| 193 | ++ |
| 194 | ++#endif |
| 195 | ++ |
| 196 | ++HRESULT STDMETHODCALLTYPE IDXGISurface1_GetDC_Proxy( |
| 197 | ++ IDXGISurface1* This, |
| 198 | ++ WINBOOL Discard, |
| 199 | ++ HDC *dc); |
| 200 | ++void __RPC_STUB IDXGISurface1_GetDC_Stub( |
| 201 | ++ IRpcStubBuffer* This, |
| 202 | ++ IRpcChannelBuffer* pRpcChannelBuffer, |
| 203 | ++ PRPC_MESSAGE pRpcMessage, |
| 204 | ++ DWORD* pdwStubPhase); |
| 205 | ++HRESULT STDMETHODCALLTYPE IDXGISurface1_ReleaseDC_Proxy( |
| 206 | ++ IDXGISurface1* This, |
| 207 | ++ RECT *rect); |
| 208 | ++void __RPC_STUB IDXGISurface1_ReleaseDC_Stub( |
| 209 | ++ IRpcStubBuffer* This, |
| 210 | ++ IRpcChannelBuffer* pRpcChannelBuffer, |
| 211 | ++ PRPC_MESSAGE pRpcMessage, |
| 212 | ++ DWORD* pdwStubPhase); |
| 213 | ++ |
| 214 | ++#endif /* __IDXGISurface1_INTERFACE_DEFINED__ */ |
| 215 | ++ |
| 216 | ++/***************************************************************************** |
| 217 | + * IDXGIOutput interface |
| 218 | + */ |
| 219 | + #ifndef __IDXGIOutput_INTERFACE_DEFINED__ |
| 220 | +diff --git a/mingw-w64-headers/direct-x/include/dxgi.idl b/mingw-w64-headers/direct-x/include/dxgi.idl |
| 221 | +index bc9538e..330a2c3 100644 |
| 222 | +--- a/mingw-w64-headers/direct-x/include/dxgi.idl |
| 223 | ++++ b/mingw-w64-headers/direct-x/include/dxgi.idl |
| 224 | +@@ -1,5 +1,6 @@ |
| 225 | + /* |
| 226 | + * Copyright 2007 Andras Kovacs |
| 227 | ++ * Copyright 2015 Martell Malone |
| 228 | + * |
| 229 | + * This library is free software; you can redistribute it and/or |
| 230 | + * modify it under the terms of the GNU Lesser General Public |
| 231 | +@@ -222,6 +223,24 @@ interface IDXGISurface : IDXGIDeviceSubObject |
| 232 | + |
| 233 | + [ |
| 234 | + object, |
| 235 | ++ uuid(4ae63092-6327-4c1b-80ae-bfe12ea32b86), |
| 236 | ++ local, |
| 237 | ++ pointer_default(unique) |
| 238 | ++] |
| 239 | ++interface IDXGISurface1 : IDXGISurface |
| 240 | ++{ |
| 241 | ++ HRESULT GetDC( |
| 242 | ++ [in] BOOL Discard, |
| 243 | ++ [out] HDC *dc |
| 244 | ++ ); |
| 245 | ++ |
| 246 | ++ HRESULT ReleaseDC( |
| 247 | ++ [in] RECT *rect |
| 248 | ++ ); |
| 249 | ++} |
| 250 | ++ |
| 251 | ++[ |
| 252 | ++ object, |
| 253 | + local, |
| 254 | + uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa) |
| 255 | + ] |
| 256 | +-- |
| 257 | +2.3.0 |
| 258 | + |
0 commit comments