1/* 2 * Copyright 2017 Ihsan Akmal 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 19import "dxgi1_4.idl"; 20 21typedef enum DXGI_OUTDUPL_FLAG 22{ 23 DXGI_OUTDUPL_COMPOSITED_UI_CAPTURE_ONLY = 0x1, 24} DXGI_OUTDUPL_FLAG; 25 26typedef enum DXGI_HDR_METADATA_TYPE 27{ 28 DXGI_HDR_METADATA_TYPE_NONE = 0x0, 29 DXGI_HDR_METADATA_TYPE_HDR10 = 0x1, 30} DXGI_HDR_METADATA_TYPE; 31 32typedef enum _DXGI_OFFER_RESOURCE_FLAGS 33{ 34 DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT = 0x1, 35} DXGI_OFFER_RESOURCE_FLAGS; 36 37typedef enum _DXGI_RECLAIM_RESOURCE_RESULTS 38{ 39 DXGI_RECLAIM_RESOURCE_RESULT_OK = 0x0, 40 DXGI_RECLAIM_RESOURCE_RESULT_DISCARDED = 0x1, 41 DXGI_RECLAIM_RESOURCE_RESULT_NOT_COMMITTED = 0x2, 42} DXGI_RECLAIM_RESOURCE_RESULTS; 43 44typedef enum DXGI_FEATURE 45{ 46 DXGI_FEATURE_PRESENT_ALLOW_TEARING = 0x0, 47} DXGI_FEATURE; 48 49typedef struct DXGI_HDR_METADATA_HDR10 50{ 51 UINT16 RedPrimary[2]; 52 UINT16 GreenPrimary[2]; 53 UINT16 BluePrimary[2]; 54 UINT16 WhitePoint[2]; 55 UINT MaxMasteringLuminance; 56 UINT MinMasteringLuminance; 57 UINT16 MaxContentLightLevel; 58 UINT16 MaxFrameAverageLightLevel; 59} DXGI_HDR_METADATA_HDR10; 60 61[ 62 object, 63 uuid(80a07424-ab52-42eb-833c-0c42fd282d98), 64 local, 65 pointer_default(unique) 66] 67interface IDXGIOutput5 : IDXGIOutput4 68{ 69 HRESULT DuplicateOutput1( 70 [in] IUnknown *device, 71 [in] UINT flags, 72 [in] UINT format_count, 73 [in] const DXGI_FORMAT *formats, 74 [out] IDXGIOutputDuplication **duplication 75 ); 76} 77 78[ 79 object, 80 uuid(3d585d5a-bd4a-489e-b1f4-3dbcb6452ffb), 81 local, 82 pointer_default(unique) 83] 84interface IDXGISwapChain4 : IDXGISwapChain3 85{ 86 HRESULT SetHDRMetaData( 87 [in] DXGI_HDR_METADATA_TYPE type, 88 [in] UINT size, 89 [in] void *metadata 90 ); 91} 92 93[ 94 object, 95 uuid(95b4f95f-d8da-4ca4-9ee6-3b76d5968a10), 96 local, 97 pointer_default(unique) 98] 99interface IDXGIDevice4 : IDXGIDevice3 100{ 101 HRESULT OfferResources1( 102 [in] UINT resource_count, 103 [in] IDXGIResource *const *resources, 104 [in] DXGI_OFFER_RESOURCE_PRIORITY priority, 105 [in] UINT flags 106 ); 107 HRESULT ReclaimResources1( 108 [in] UINT resource_count, 109 [in] IDXGIResource *const *resources, 110 [out] DXGI_RECLAIM_RESOURCE_RESULTS *results 111 ); 112} 113 114[ 115 object, 116 uuid(7632e1f5-ee65-4dca-87fd-84cd75f8838d), 117 local, 118 pointer_default(unique) 119] 120interface IDXGIFactory5 : IDXGIFactory4 121{ 122 HRESULT CheckFeatureSupport( 123 DXGI_FEATURE feature, 124 [in, out] void *support_data, 125 UINT support_data_size 126 ); 127} 128