dxgi1_3.idl 5.5 KB

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