diff --git a/include/dxgi.idl b/include/dxgi.idl index d8f595f9..6b73e81b 100644 --- a/include/dxgi.idl +++ b/include/dxgi.idl @@ -34,6 +34,8 @@ typedef enum DXGI_MODE_ROTATION DXGI_MODE_ROTATION_ROTATE270 = 0x4, } DXGI_MODE_ROTATION; +interface IDXGIAdapter; +interface IDXGIAdapter1; interface IDXGIOutput; typedef struct DXGI_SWAP_CHAIN_DESC DXGI_SWAP_CHAIN_DESC; typedef struct DXGI_FRAME_STATISTICS DXGI_FRAME_STATISTICS; @@ -82,3 +84,33 @@ interface IDXGISwapChain : IDXGIDeviceSubObject HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS *stats); HRESULT GetLastPresentCount(UINT *last_present_count); }; + +[ + local, + object, + uuid(7b7166ec-21c7-44ae-b21a-c9ae321ae369), + pointer_default(unique) +] +interface IDXGIFactory : IDXGIObject +{ + HRESULT EnumAdapters(UINT adapter_idx, IDXGIAdapter **adapter); + HRESULT MakeWindowAssociation(HWND hwnd, UINT flags); + HRESULT GetWindowAssociation(HWND *hwnd); + HRESULT CreateSwapChain(IUnknown *device, DXGI_SWAP_CHAIN_DESC *desc, IDXGISwapChain **swapchain); + HRESULT CreateSoftwareAdapter(HMODULE hmodule, IDXGIAdapter **adapter); +}; + +[ + local, + object, + uuid(770aae78-f26f-4dba-a829-253c83d1b387), + pointer_default(unique) +] +interface IDXGIFactory1 : IDXGIFactory +{ + HRESULT EnumAdapters1(UINT adapter_idx, IDXGIAdapter1 **adpter); + BOOL IsCurrent(); +}; + +[local] HRESULT __stdcall CreateDXGIFactory(REFIID riid, void **factory); +[local] HRESULT __stdcall CreateDXGIFactory1(REFIID riid, void **factory); diff --git a/include/dxgi1_2.idl b/include/dxgi1_2.idl index 78f7eb45..7ff790f3 100644 --- a/include/dxgi1_2.idl +++ b/include/dxgi1_2.idl @@ -47,3 +47,27 @@ interface IDXGISwapChain1 : IDXGISwapChain HRESULT SetRotation(DXGI_MODE_ROTATION rotation); HRESULT GetRotation(DXGI_MODE_ROTATION *rotation); }; + +[ + local, + object, + uuid(50c83a1c-e072-4c48-87b0-3630fa36a6d0), + pointer_default(unique) +] +interface IDXGIFactory2 : IDXGIFactory1 +{ + BOOL IsWindowedStereoEnabled(); + HRESULT CreateSwapChainForHwnd(IUnknown *device, HWND window, const DXGI_SWAP_CHAIN_DESC1 *desc, + const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, IDXGIOutput *output, IDXGISwapChain1 **swapchain); + HRESULT CreateSwapChainForCoreWindow(IUnknown *device, IUnknown *window, const DXGI_SWAP_CHAIN_DESC1 *desc, + IDXGIOutput *output, IDXGISwapChain1 **swapchain); + HRESULT GetSharedResourceAdapterLuid(HANDLE resource, LUID *luid); + HRESULT RegisterStereoStatusWindow(HWND window, UINT msg, DWORD *cookie); + HRESULT RegisterStereoStatusEvent(HANDLE event, DWORD *cookie); + void UnregisterStereoStatus(DWORD cookie); + HRESULT RegisterOcclusionStatusWindow(HWND window, UINT msg, DWORD *cookie); + HRESULT RegisterOcclusionStatusEvent(HANDLE event, DWORD *cookie); + void UnregisterOcclusionStatus(DWORD cookie); + HRESULT CreateSwapChainForComposition(IUnknown *device, const DXGI_SWAP_CHAIN_DESC1 *desc, + IDXGIOutput *output, IDXGISwapChain1 **swapchain); +};