| 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 | 
  | 
 
 
 
 
 
 | 19 | 
 import "dxgi1_2.idl"; | 
 
 
 
 
 
 | 20 | 
  | 
 
 
 
 
 
 | 21 | 
 typedef struct DXGI_MATRIX_3X2_F | 
 
 
 
 
 
 | 22 | 
 { | 
 
 
 
 
 
 | 23 | 
     float _11; | 
 
 
 
 
 
 | 24 | 
     float _12; | 
 
 
 
 
 
 | 25 | 
     float _21; | 
 
 
 
 
 
 | 26 | 
     float _22; | 
 
 
 
 
 
 | 27 | 
     float _31; | 
 
 
 
 
 
 | 28 | 
     float _32; | 
 
 
 
 
 
 | 29 | 
 } DXGI_MATRIX_3X2_F; | 
 
 
 
 
 
 | 30 | 
  | 
 
 
 
 
 
 | 31 | 
 typedef struct DXGI_DECODE_SWAP_CHAIN_DESC | 
 
 
 
 
 
 | 32 | 
 { | 
 
 
 
 
 
 | 33 | 
     UINT Flags; | 
 
 
 
 
 
 | 34 | 
 } DXGI_DECODE_SWAP_CHAIN_DESC; | 
 
 
 
 
 
 | 35 | 
  | 
 
 
 
 
 
 | 36 | 
 typedef enum DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS | 
 
 
 
 
 
 | 37 | 
 { | 
 
 
 
 
 
 | 38 | 
     DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE = 0x1, | 
 
 
 
 
 
 | 39 | 
     DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709 = 0x2, | 
 
 
 
 
 
 | 40 | 
     DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC = 0x4, | 
 
 
 
 
 
 | 41 | 
 } DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS; | 
 
 
 
 
 
 | 42 | 
  | 
 
 
 
 
 
 | 43 | 
 typedef enum DXGI_FRAME_PRESENTATION_MODE | 
 
 
 
 
 
 | 44 | 
 { | 
 
 
 
 
 
 | 45 | 
     DXGI_FRAME_PRESENTATION_MODE_COMPOSED = 0, | 
 
 
 
 
 
 | 46 | 
     DXGI_FRAME_PRESENTATION_MODE_OVERLAY = 1, | 
 
 
 
 
 
 | 47 | 
     DXGI_FRAME_PRESENTATION_MODE_NONE = 2, | 
 
 
 
 
 
 | 48 | 
     DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE = 3, | 
 
 
 
 
 
 | 49 | 
 } DXGI_FRAME_PRESENTATION_MODE; | 
 
 
 
 
 
 | 50 | 
  | 
 
 
 
 
 
 | 51 | 
 typedef struct DXGI_FRAME_STATISTICS_MEDIA | 
 
 
 
 
 
 | 52 | 
 { | 
 
 
 
 
 
 | 53 | 
     UINT PresentCount; | 
 
 
 
 
 
 | 54 | 
     UINT PresentRefreshCount; | 
 
 
 
 
 
 | 55 | 
     UINT SyncRefreshCount; | 
 
 
 
 
 
 | 56 | 
     LARGE_INTEGER SyncQPCTime; | 
 
 
 
 
 
 | 57 | 
     LARGE_INTEGER SyncGPUTime; | 
 
 
 
 
 
 | 58 | 
     DXGI_FRAME_PRESENTATION_MODE CompositionMode; | 
 
 
 
 
 
 | 59 | 
     UINT ApprovedPresentDuration; | 
 
 
 
 
 
 | 60 | 
 } DXGI_FRAME_STATISTICS_MEDIA; | 
 
 
 
 
 
 | 61 | 
  | 
 
 
 
 
 
 | 62 | 
 typedef enum DXGI_OVERLAY_SUPPORT_FLAG | 
 
 
 
 
 
 | 63 | 
 { | 
 
 
 
 
 
 | 64 | 
     DXGI_OVERLAY_SUPPORT_FLAG_DIRECT = 0x1, | 
 
 
 
 
 
 | 65 | 
     DXGI_OVERLAY_SUPPORT_FLAG_SCALING = 0x2, | 
 
 
 
 
 
 | 66 | 
 } DXGI_OVERLAY_SUPPORT_FLAG; | 
 
 
 
 
 
 | 67 | 
  | 
 
 
 
 
 
 | 68 | 
 [ | 
 
 
 
 
 
 | 69 | 
     object, | 
 
 
 
 
 
 | 70 | 
     uuid(6007896c-3244-4afd-bf18-a6d3beda5023), | 
 
 
 
 
 
 | 71 | 
     local, | 
 
 
 
 
 
 | 72 | 
     pointer_default(unique) | 
 
 
 
 
 
 | 73 | 
 ] | 
 
 
 
 
 
 | 74 | 
 interface IDXGIDevice3 : IDXGIDevice2 | 
 
 
 
 
 
 | 75 | 
 { | 
 
 
 
 
 
 | 76 | 
     void Trim(); | 
 
 
 
 
 
 | 77 | 
 } | 
 
 
 
 
 
 | 78 | 
  | 
 
 
 
 
 
 | 79 | 
 [ | 
 
 
 
 
 
 | 80 | 
     object, | 
 
 
 
 
 
 | 81 | 
     uuid(a8be2ac4-199f-4946-b331-79599fb98de7), | 
 
 
 
 
 
 | 82 | 
     local, | 
 
 
 
 
 
 | 83 | 
     pointer_default(unique) | 
 
 
 
 
 
 | 84 | 
 ] | 
 
 
 
 
 
 | 85 | 
 interface IDXGISwapChain2 : IDXGISwapChain1 | 
 
 
 
 
 
 | 86 | 
 { | 
 
 
 
 
 
 | 87 | 
     HRESULT SetSourceSize(UINT width, UINT height); | 
 
 
 
 
 
 | 88 | 
  | 
 
 
 
 
 
 | 89 | 
     HRESULT GetSourceSize( | 
 
 
 
 
 
 | 90 | 
         [out] UINT *width, | 
 
 
 
 
 
 | 91 | 
         [out] UINT *height | 
 
 
 
 
 
 | 92 | 
     ); | 
 
 
 
 
 
 | 93 | 
  | 
 
 
 
 
 
 | 94 | 
     HRESULT SetMaximumFrameLatency(UINT max_latency); | 
 
 
 
 
 
 | 95 | 
  | 
 
 
 
 
 
 | 96 | 
     HRESULT GetMaximumFrameLatency( | 
 
 
 
 
 
 | 97 | 
         [out] UINT *max_latency | 
 
 
 
 
 
 | 98 | 
     ); | 
 
 
 
 
 
 | 99 | 
  | 
 
 
 
 
 
 | 100 | 
     HANDLE  GetFrameLatencyWaitableObject(); | 
 
 
 
 
 
 | 101 | 
  | 
 
 
 
 
 
 | 102 | 
     HRESULT SetMatrixTransform(const DXGI_MATRIX_3X2_F *matrix); | 
 
 
 
 
 
 | 103 | 
  | 
 
 
 
 
 
 | 104 | 
     HRESULT GetMatrixTransform( | 
 
 
 
 
 
 | 105 | 
         [out] DXGI_MATRIX_3X2_F *matrix | 
 
 
 
 
 
 | 106 | 
     ); | 
 
 
 
 
 
 | 107 | 
 } | 
 
 
 
 
 
 | 108 | 
  | 
 
 
 
 
 
 | 109 | 
 [ | 
 
 
 
 
 
 | 110 | 
     object, | 
 
 
 
 
 
 | 111 | 
     uuid(595e39d1-2724-4663-99b1-da969de28364), | 
 
 
 
 
 
 | 112 | 
     local, | 
 
 
 
 
 
 | 113 | 
     pointer_default(unique) | 
 
 
 
 
 
 | 114 | 
 ] | 
 
 
 
 
 
 | 115 | 
 interface IDXGIOutput2 : IDXGIOutput1 | 
 
 
 
 
 
 | 116 | 
 { | 
 
 
 
 
 
 | 117 | 
     BOOL SupportsOverlays(); | 
 
 
 
 
 
 | 118 | 
 } | 
 
 
 
 
 
 | 119 | 
  | 
 
 
 
 
 
 | 120 | 
 [ | 
 
 
 
 
 
 | 121 | 
     object, | 
 
 
 
 
 
 | 122 | 
     uuid(25483823-cd46-4c7d-86ca-47aa95b837bd), | 
 
 
 
 
 
 | 123 | 
     local, | 
 
 
 
 
 
 | 124 | 
     pointer_default(unique) | 
 
 
 
 
 
 | 125 | 
 ] | 
 
 
 
 
 
 | 126 | 
 interface IDXGIFactory3 : IDXGIFactory2 | 
 
 
 
 
 
 | 127 | 
 { | 
 
 
 
 
 
 | 128 | 
     UINT GetCreationFlags(); | 
 
 
 
 
 
 | 129 | 
 } | 
 
 
 
 
 
 | 130 | 
  | 
 
 
 
 
 
 | 131 | 
 [ | 
 
 
 
 
 
 | 132 | 
     object, | 
 
 
 
 
 
 | 133 | 
     uuid(2633066b-4514-4c7a-8fd8-12ea98059d18), | 
 
 
 
 
 
 | 134 | 
     local, | 
 
 
 
 
 
 | 135 | 
     pointer_default(unique) | 
 
 
 
 
 
 | 136 | 
 ] | 
 
 
 
 
 
 | 137 | 
 interface IDXGIDecodeSwapChain : IUnknown | 
 
 
 
 
 
 | 138 | 
 { | 
 
 
 
 
 
 | 139 | 
     HRESULT PresentBuffer(UINT buffer_to_present, UINT sync_interval, UINT flags); | 
 
 
 
 
 
 | 140 | 
  | 
 
 
 
 
 
 | 141 | 
     HRESULT SetSourceRect(const RECT *rect); | 
 
 
 
 
 
 | 142 | 
  | 
 
 
 
 
 
 | 143 | 
     HRESULT SetTargetRect(const RECT *rect); | 
 
 
 
 
 
 | 144 | 
  | 
 
 
 
 
 
 | 145 | 
     HRESULT SetDestSize(UINT width, UINT height); | 
 
 
 
 
 
 | 146 | 
  | 
 
 
 
 
 
 | 147 | 
     HRESULT GetSourceRect( | 
 
 
 
 
 
 | 148 | 
         [out] RECT *rect | 
 
 
 
 
 
 | 149 | 
     ); | 
 
 
 
 
 
 | 150 | 
  | 
 
 
 
 
 
 | 151 | 
     HRESULT GetTargetRect( | 
 
 
 
 
 
 | 152 | 
         [out] RECT *rect | 
 
 
 
 
 
 | 153 | 
     ); | 
 
 
 
 
 
 | 154 | 
  | 
 
 
 
 
 
 | 155 | 
     HRESULT GetDestSize( | 
 
 
 
 
 
 | 156 | 
         [out] UINT *width, | 
 
 
 
 
 
 | 157 | 
         [out] UINT *height | 
 
 
 
 
 
 | 158 | 
     ); | 
 
 
 
 
 
 | 159 | 
  | 
 
 
 
 
 
 | 160 | 
     HRESULT SetColorSpace(DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS colorspace); | 
 
 
 
 
 
 | 161 | 
  | 
 
 
 
 
 
 | 162 | 
     DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS GetColorSpace(); | 
 
 
 
 
 
 | 163 | 
 } | 
 
 
 
 
 
 | 164 | 
  | 
 
 
 
 
 
 | 165 | 
 [ | 
 
 
 
 
 
 | 166 | 
     object, | 
 
 
 
 
 
 | 167 | 
     uuid(41e7d1f2-a591-4f7b-a2e5-fa9c843e1c12), | 
 
 
 
 
 
 | 168 | 
     local, | 
 
 
 
 
 
 | 169 | 
     pointer_default(unique) | 
 
 
 
 
 
 | 170 | 
 ] | 
 
 
 
 
 
 | 171 | 
 interface IDXGIFactoryMedia : IUnknown | 
 
 
 
 
 
 | 172 | 
 { | 
 
 
 
 
 
 | 173 | 
     HRESULT CreateSwapChainForCompositionSurfaceHandle( | 
 
 
 
 
 
 | 174 | 
         [in] IUnknown *device, | 
 
 
 
 
 
 | 175 | 
         [in] HANDLE surface, | 
 
 
 
 
 
 | 176 | 
         [in] const DXGI_SWAP_CHAIN_DESC1 *desc, | 
 
 
 
 
 
 | 177 | 
         [in] IDXGIOutput *restrict_to_output, | 
 
 
 
 
 
 | 178 | 
         [out] IDXGISwapChain1 **swapchain | 
 
 
 
 
 
 | 179 | 
     ); | 
 
 
 
 
 
 | 180 | 
  | 
 
 
 
 
 
 | 181 | 
     HRESULT CreateDecodeSwapChainForCompositionSurfaceHandle( | 
 
 
 
 
 
 | 182 | 
         [in] IUnknown *device, | 
 
 
 
 
 
 | 183 | 
         [in] HANDLE surface, | 
 
 
 
 
 
 | 184 | 
         [in] DXGI_DECODE_SWAP_CHAIN_DESC *desc, | 
 
 
 
 
 
 | 185 | 
         [in] IDXGIResource *yuv_decode_buffers, | 
 
 
 
 
 
 | 186 | 
         [in] IDXGIOutput *restrict_to_output, | 
 
 
 
 
 
 | 187 | 
         [out] IDXGIDecodeSwapChain **swapchain | 
 
 
 
 
 
 | 188 | 
     ); | 
 
 
 
 
 
 | 189 | 
 } | 
 
 
 
 
 
 | 190 | 
  | 
 
 
 
 
 
 | 191 | 
 [ | 
 
 
 
 
 
 | 192 | 
     object, | 
 
 
 
 
 
 | 193 | 
     uuid(dd95b90b-f05f-4f6a-bd65-25bfb264bd84), | 
 
 
 
 
 
 | 194 | 
     local, | 
 
 
 
 
 
 | 195 | 
     pointer_default(unique) | 
 
 
 
 
 
 | 196 | 
 ] | 
 
 
 
 
 
 | 197 | 
 interface IDXGISwapChainMedia : IUnknown | 
 
 
 
 
 
 | 198 | 
 { | 
 
 
 
 
 
 | 199 | 
     HRESULT GetFrameStatisticsMedia( | 
 
 
 
 
 
 | 200 | 
         [out] DXGI_FRAME_STATISTICS_MEDIA *stats | 
 
 
 
 
 
 | 201 | 
     ); | 
 
 
 
 
 
 | 202 | 
  | 
 
 
 
 
 
 | 203 | 
     HRESULT SetPresentDuration(UINT duration); | 
 
 
 
 
 
 | 204 | 
  | 
 
 
 
 
 
 | 205 | 
     HRESULT CheckPresentDurationSupport( | 
 
 
 
 
 
 | 206 | 
         UINT desired_present_duration, | 
 
 
 
 
 
 | 207 | 
         [out] UINT *closest_smaller_present_duration, | 
 
 
 
 
 
 | 208 | 
         [out] UINT *closest_larger_present_duration | 
 
 
 
 
 
 | 209 | 
     ); | 
 
 
 
 
 
 | 210 | 
 } | 
 
 
 
 
 
 | 211 | 
  | 
 
 
 
 
 
 | 212 | 
 [ | 
 
 
 
 
 
 | 213 | 
     object, | 
 
 
 
 
 
 | 214 | 
     uuid(8a6bb301-7e7e-41F4-a8e0-5b32f7f99b18), | 
 
 
 
 
 
 | 215 | 
     local, | 
 
 
 
 
 
 | 216 | 
     pointer_default(unique) | 
 
 
 
 
 
 | 217 | 
 ] | 
 
 
 
 
 
 | 218 | 
 interface IDXGIOutput3 : IDXGIOutput2 | 
 
 
 
 
 
 | 219 | 
 { | 
 
 
 
 
 
 | 220 | 
     HRESULT CheckOverlaySupport( | 
 
 
 
 
 
 | 221 | 
         [in] DXGI_FORMAT enum_format, | 
 
 
 
 
 
 | 222 | 
         [out] IUnknown *concerned_device, | 
 
 
 
 
 
 | 223 | 
         [out] UINT *flags | 
 
 
 
 
 
 | 224 | 
     ); | 
 
 
 
 
 
 | 225 | 
 } | 
 
 
 
 
 
 | 226 | 
  | 
 
 
 
 
 
 | 227 | 
 const UINT DXGI_CREATE_FACTORY_DEBUG = 0x1; | 
 
 
 
 
 
 | 228 | 
  | 
 
 
 
 
 
 | 229 | 
 [local] HRESULT __stdcall CreateDXGIFactory2(UINT flags, REFIID iid, void **factory); | 
 
 
 
 
 
 | 230 | 
  | 
 
 
 
 
 
 | 231 | 
 [local] HRESULT __stdcall DXGIGetDebugInterface1(UINT flags, REFIID iid, void **debug); |