winapi_ui_automation/shared/
dxgi1_5.rs1use ctypes::c_void;
8use shared::basetsd::UINT16;
9use shared::dxgi::IDXGIResource;
10use shared::dxgi1_2::{DXGI_OFFER_RESOURCE_PRIORITY, IDXGIOutputDuplication};
11use shared::dxgi1_3::{IDXGIDevice3, IDXGIDevice3Vtbl};
12use shared::dxgi1_4::{
13 IDXGIFactory4, IDXGIFactory4Vtbl, IDXGIOutput4, IDXGIOutput4Vtbl, IDXGISwapChain3,
14 IDXGISwapChain3Vtbl,
15};
16use shared::dxgiformat::DXGI_FORMAT;
17use shared::minwindef::UINT;
18use um::unknwnbase::IUnknown;
19use um::winnt::HRESULT;
20RIDL!{#[uuid(0x80a07424, 0xab52, 0x42eb, 0x83, 0x3c, 0x0c, 0x42, 0xfd, 0x28, 0x2d, 0x98)]
21interface IDXGIOutput5(IDXGIOutput5Vtbl): IDXGIOutput4(IDXGIOutput4Vtbl) {
22 fn DuplicateOutput1(
23 pDevice: *mut IUnknown,
24 Flags: UINT,
25 SupportedFormatsCount: UINT,
26 pSupportedFormats: *const DXGI_FORMAT,
27 ppOutputDuplication: *mut *mut IDXGIOutputDuplication,
28 )-> HRESULT,
29}}
30ENUM!{enum DXGI_HDR_METADATA_TYPE {
31 DXGI_HDR_METADATA_TYPE_NONE = 0,
32 DXGI_HDR_METADATA_TYPE_HDR10 = 1,
33}}
34STRUCT!{struct DXGI_HDR_METADATA_HDR10 {
35 RedPrimary: [UINT16; 2],
36 GreenPrimary: [UINT16; 2],
37 BluePrimary: [UINT16; 2],
38 WhitePoint: [UINT16; 2],
39 MaxMasteringLuminance: UINT,
40 MinMasteringLuminance: UINT,
41 MaxContentLightLevel: UINT16,
42 MaxFrameAverageLightLevel: UINT16,
43}}
44RIDL!{#[uuid(0x3d585d5a, 0xbd4a, 0x489e, 0xb1, 0xf4, 0x3d, 0xbc, 0xb6, 0x45, 0x2f, 0xfb)]
45interface IDXGISwapChain4(IDXGISwapChain4Vtbl): IDXGISwapChain3(IDXGISwapChain3Vtbl) {
46 fn SetHDRMetaData(
47 Type: DXGI_HDR_METADATA_TYPE,
48 Size: UINT,
49 pMetaData: *mut c_void,
50 )-> HRESULT,
51}}
52ENUM!{enum DXGI_OFFER_RESOURCE_FLAGS {
53 DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT = 0x1,
54}}
55ENUM!{enum DXGI_RECLAIM_RESOURCE_RESULTS {
56 DXGI_RECLAIM_RESOURCE_RESULT_OK = 0,
57 DXGI_RECLAIM_RESOURCE_RESULT_DISCARDED = 1,
58 DXGI_RECLAIM_RESOURCE_RESULT_NOT_COMMITTED = 2,
59}}
60RIDL!{#[uuid(0x95b4f95f, 0xd8da, 0x4ca4, 0x9e, 0xe6, 0x3b, 0x76, 0xd5, 0x96, 0x8a, 0x10)]
61interface IDXGIDevice4(IDXGIDevice4Vtbl): IDXGIDevice3(IDXGIDevice3Vtbl) {
62 fn OfferResources1(
63 NumResources: UINT,
64 ppResources: *mut *mut IDXGIResource,
65 Priority: DXGI_OFFER_RESOURCE_PRIORITY,
66 Flags: UINT,
67 ) -> HRESULT,
68 fn ReclaimResources1(
69 NumResources: UINT,
70 ppResources: *mut *mut IDXGIResource,
71 pResults: *mut DXGI_RECLAIM_RESOURCE_RESULTS,
72 ) -> HRESULT,
73}}
74ENUM!{enum DXGI_FEATURE {
75 DXGI_FEATURE_PRESENT_ALLOW_TEARING = 0,
76}}
77RIDL!{#[uuid(0x7632e1f5, 0xee65, 0x4dca, 0x87, 0xfd, 0x84, 0xcd, 0x75, 0xf8, 0x83, 0x8d)]
78interface IDXGIFactory5(IDXGIFactory5Vtbl): IDXGIFactory4(IDXGIFactory4Vtbl) {
79 fn CheckFeatureSupport(
80 Feature: DXGI_FEATURE,
81 pFeatureSupportData: *mut c_void,
82 FeatureSupportDataSize: UINT,
83 ) -> HRESULT,
84}}
85DEFINE_GUID!{IID_IDXGIOutput5,
86 0x80A07424, 0xAB52, 0x42EB, 0x83, 0x3C, 0x0C, 0x42, 0xFD, 0x28, 0x2D, 0x98}
87DEFINE_GUID!{IID_IDXGISwapChain4,
88 0x3D585D5A, 0xBD4A, 0x489E, 0xB1, 0xF4, 0x3D, 0xBC, 0xB6, 0x45, 0x2F, 0xFB}
89DEFINE_GUID!{IID_IDXGIDevice4,
90 0x95B4F95F, 0xD8DA, 0x4CA4, 0x9E, 0xE6, 0x3B, 0x76, 0xD5, 0x96, 0x8A, 0x10}
91DEFINE_GUID!{IID_IDXGIFactory5,
92 0x7632e1f5, 0xee65, 0x4dca, 0x87, 0xfd, 0x84, 0xcd, 0x75, 0xf8, 0x83, 0x8d}