winapi_ui_automation/shared/
dxgi1_4.rs1use ctypes::c_void;
8use shared::basetsd::UINT64;
9use shared::dxgi1_2::{IDXGIAdapter2, IDXGIAdapter2Vtbl};
10use shared::dxgi1_3::{
11 IDXGIFactory3, IDXGIFactory3Vtbl, IDXGIOutput3, IDXGIOutput3Vtbl, IDXGISwapChain2,
12 IDXGISwapChain2Vtbl,
13};
14use shared::dxgiformat::DXGI_FORMAT;
15use shared::dxgitype::DXGI_COLOR_SPACE_TYPE;
16use shared::guiddef::REFGUID;
17use shared::minwindef::{DWORD, UINT};
18use um::unknwnbase::IUnknown;
19use um::winnt::{HANDLE, HRESULT, LUID};
20ENUM!{enum DXGI_MEMORY_SEGMENT_GROUP {
21 DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0,
22 DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1,
23}}
24ENUM!{enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG {
25 DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
26}}
27ENUM!{enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG {
28 DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
29 DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2,
30}}
31STRUCT!{struct DXGI_QUERY_VIDEO_MEMORY_INFO {
32 Budget: UINT64,
33 CurrentUsage: UINT64,
34 AvailableForReservation: UINT64,
35 CurrentReservation: UINT64,
36}}
37RIDL!{#[uuid(0x645967a4, 0x1392, 0x4310, 0xa7, 0x98, 0x80, 0x53, 0xce, 0x3e, 0x93, 0xfd)]
38interface IDXGIAdapter3(IDXGIAdapter3Vtbl): IDXGIAdapter2(IDXGIAdapter2Vtbl) {
39 fn RegisterHardwareContentProtectionTeardownStatusEvent(
40 hEvent: HANDLE,
41 pdwCookie: *mut DWORD,
42 ) -> HRESULT,
43 fn UnregisterHardwareContentProtectionTeardownStatus(
44 dwCookie: DWORD,
45 ) -> (),
46 fn QueryVideoMemoryInfo(
47 NodeIndex: UINT,
48 MemorySegmentGroup: DXGI_MEMORY_SEGMENT_GROUP,
49 pVideoMemoryInfo: *mut DXGI_QUERY_VIDEO_MEMORY_INFO,
50 ) -> HRESULT,
51 fn SetVideoMemoryReservation(
52 NodeIndex: UINT,
53 MemorySegmentGroup: DXGI_MEMORY_SEGMENT_GROUP,
54 Reservation: UINT64,
55 ) -> HRESULT,
56 fn RegisterVideoMemoryBudgetChangeNotificationEvent(
57 hEvent: HANDLE,
58 pdwCookie: *mut DWORD,
59 ) -> HRESULT,
60 fn UnregisterVideoMemoryBudgetChangeNotification(
61 dwCookie: DWORD,
62 ) -> (),
63}}
64RIDL!{#[uuid(0x1bc6ea02, 0xef36, 0x464f, 0xbf, 0x0c, 0x21, 0xca, 0x39, 0xe5, 0x16, 0x8a)]
65interface IDXGIFactory4(IDXGIFactory4Vtbl): IDXGIFactory3(IDXGIFactory3Vtbl) {
66 fn EnumAdapterByLuid(
67 AdapterLuid: LUID,
68 riid: REFGUID,
69 ppvAdapter: *mut *mut c_void,
70 ) -> HRESULT,
71 fn EnumWarpAdapter(
72 riid: REFGUID,
73 ppvAdapter: *mut *mut c_void,
74 ) -> HRESULT,
75}}
76RIDL!{#[uuid(0xdc7dca35, 0x2196, 0x414d, 0x9f, 0x53, 0x61, 0x78, 0x84, 0x03, 0x2a, 0x60)]
77interface IDXGIOutput4(IDXGIOutput4Vtbl): IDXGIOutput3(IDXGIOutput3Vtbl) {
78 fn CheckOverlayColorSpaceSupport(
79 Format: DXGI_FORMAT,
80 ColorSpace: DXGI_COLOR_SPACE_TYPE,
81 pConcernedDevice: *mut IUnknown,
82 pFlags: *mut UINT,
83 ) -> HRESULT,
84}}
85RIDL!{#[uuid(0x94d99bdb, 0xf1f8, 0x4ab0, 0xb2, 0x36, 0x7d, 0xa0, 0x17, 0x0e, 0xda, 0xb1)]
86interface IDXGISwapChain3(IDXGISwapChain3Vtbl): IDXGISwapChain2(IDXGISwapChain2Vtbl) {
87 fn GetCurrentBackBufferIndex() -> UINT,
88 fn CheckColorSpaceSupport(
89 ColorSpace: DXGI_COLOR_SPACE_TYPE,
90 pColorSpaceSupport: *mut UINT,
91 ) -> HRESULT,
92 fn SetColorSpace1(
93 ColorSpace: DXGI_COLOR_SPACE_TYPE,
94 ) -> HRESULT,
95 fn ResizeBuffers1(
96 BufferCount: UINT,
97 Width: UINT,
98 Height: UINT,
99 Format: DXGI_FORMAT,
100 SwapChainFlags: UINT,
101 pCreationNodeMask: *const UINT,
102 ppPresentQueue: *mut *mut IUnknown,
103 ) -> HRESULT,
104}}
105DEFINE_GUID!{IID_IDXGISwapChain3,
106 0x94d99bdb, 0xf1f8, 0x4ab0, 0xb2, 0x36, 0x7d, 0xa0, 0x17, 0x0e, 0xda, 0xb1}
107DEFINE_GUID!{IID_IDXGIOutput4,
108 0xdc7dca35, 0x2196, 0x414d, 0x9f, 0x53, 0x61, 0x78, 0x84, 0x03, 0x2a, 0x60}
109DEFINE_GUID!{IID_IDXGIFactory4,
110 0x1bc6ea02, 0xef36, 0x464f, 0xbf, 0x0c, 0x21, 0xca, 0x39, 0xe5, 0x16, 0x8a}
111DEFINE_GUID!{IID_IDXGIAdapter3,
112 0x645967a4, 0x1392, 0x4310, 0xa7, 0x98, 0x80, 0x53, 0xce, 0x3e, 0x93, 0xfd}