]> git.proxmox.com Git - rustc.git/blame - src/vendor/winapi/src/shared/dxgi1_4.rs
New upstream version 1.31.0~beta.4+dfsg1
[rustc.git] / src / vendor / winapi / src / shared / dxgi1_4.rs
CommitLineData
ff7c6d11
XL
1// Copyright © 2015-2017 winapi-rs developers
2// Licensed under the Apache License, Version 2.0
3// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
4// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
5// All files in the project carrying such notice may not be copied, modified, or distributed
6// except according to those terms.
7//! Mappings for the contents of dxgi1_4.h
8use ctypes::c_void;
9use shared::basetsd::UINT64;
10use shared::dxgi1_2::{IDXGIAdapter2, IDXGIAdapter2Vtbl};
11use shared::dxgi1_3::{
12 IDXGIFactory3, IDXGIFactory3Vtbl, IDXGIOutput3, IDXGIOutput3Vtbl, IDXGISwapChain2,
13 IDXGISwapChain2Vtbl,
14};
15use shared::dxgiformat::DXGI_FORMAT;
16use shared::dxgitype::DXGI_COLOR_SPACE_TYPE;
17use shared::guiddef::REFGUID;
18use shared::minwindef::{DWORD, UINT};
19use um::unknwnbase::IUnknown;
20use um::winnt::{HANDLE, HRESULT, LUID};
21ENUM!{enum DXGI_MEMORY_SEGMENT_GROUP {
22 DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0,
23 DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1,
24}}
25ENUM!{enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG {
26 DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
27}}
28ENUM!{enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG {
29 DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
30 DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2,
31}}
32STRUCT!{struct DXGI_QUERY_VIDEO_MEMORY_INFO {
33 Budget: UINT64,
34 CurrentUsage: UINT64,
35 AvailableForReservation: UINT64,
36 CurrentReservation: UINT64,
37}}
0bf4aa26 38RIDL!{#[uuid(0x645967a4, 0x1392, 0x4310, 0xa7, 0x98, 0x80, 0x53, 0xce, 0x3e, 0x93, 0xfd)]
ff7c6d11
XL
39interface IDXGIAdapter3(IDXGIAdapter3Vtbl): IDXGIAdapter2(IDXGIAdapter2Vtbl) {
40 fn RegisterHardwareContentProtectionTeardownStatusEvent(
41 hEvent: HANDLE,
42 pdwCookie: *mut DWORD,
43 ) -> HRESULT,
44 fn UnregisterHardwareContentProtectionTeardownStatus(
45 dwCookie: DWORD,
46 ) -> (),
47 fn QueryVideoMemoryInfo(
48 NodeIndex: UINT,
49 MemorySegmentGroup: DXGI_MEMORY_SEGMENT_GROUP,
50 pVideoMemoryInfo: *mut DXGI_QUERY_VIDEO_MEMORY_INFO,
51 ) -> HRESULT,
52 fn SetVideoMemoryReservation(
53 NodeIndex: UINT,
54 MemorySegmentGroup: DXGI_MEMORY_SEGMENT_GROUP,
55 Reservation: UINT64,
56 ) -> HRESULT,
57 fn RegisterVideoMemoryBudgetChangeNotificationEvent(
58 hEvent: HANDLE,
59 pdwCookie: *mut DWORD,
60 ) -> HRESULT,
61 fn UnregisterVideoMemoryBudgetChangeNotification(
62 dwCookie: DWORD,
63 ) -> (),
0bf4aa26
XL
64}}
65RIDL!{#[uuid(0x1bc6ea02, 0xef36, 0x464f, 0xbf, 0x0c, 0x21, 0xca, 0x39, 0xe5, 0x16, 0x8a)]
ff7c6d11
XL
66interface IDXGIFactory4(IDXGIFactory4Vtbl): IDXGIFactory3(IDXGIFactory3Vtbl) {
67 fn EnumAdapterByLuid(
68 AdapterLuid: LUID,
69 riid: REFGUID,
70 ppvAdapter: *mut *mut c_void,
71 ) -> HRESULT,
72 fn EnumWarpAdapter(
73 riid: REFGUID,
74 ppvAdapter: *mut *mut c_void,
75 ) -> HRESULT,
0bf4aa26
XL
76}}
77RIDL!{#[uuid(0xdc7dca35, 0x2196, 0x414d, 0x9f, 0x53, 0x61, 0x78, 0x84, 0x03, 0x2a, 0x60)]
ff7c6d11
XL
78interface IDXGIOutput4(IDXGIOutput4Vtbl): IDXGIOutput3(IDXGIOutput3Vtbl) {
79 fn CheckOverlayColorSpaceSupport(
80 Format: DXGI_FORMAT,
81 ColorSpace: DXGI_COLOR_SPACE_TYPE,
82 pConcernedDevice: *mut IUnknown,
83 pFlags: *mut UINT,
84 ) -> HRESULT,
0bf4aa26
XL
85}}
86RIDL!{#[uuid(0x94d99bdb, 0xf1f8, 0x4ab0, 0xb2, 0x36, 0x7d, 0xa0, 0x17, 0x0e, 0xda, 0xb1)]
ff7c6d11
XL
87interface IDXGISwapChain3(IDXGISwapChain3Vtbl): IDXGISwapChain2(IDXGISwapChain2Vtbl) {
88 fn GetCurrentBackBufferIndex() -> UINT,
89 fn CheckColorSpaceSupport(
90 ColorSpace: DXGI_COLOR_SPACE_TYPE,
91 pColorSpaceSupport: *mut UINT,
92 ) -> HRESULT,
93 fn SetColorSpace1(
94 ColorSpace: DXGI_COLOR_SPACE_TYPE,
95 ) -> HRESULT,
96 fn ResizeBuffers1(
97 BufferCount: UINT,
98 Width: UINT,
99 Height: UINT,
100 Format: DXGI_FORMAT,
101 SwapChainFlags: UINT,
102 pCreationNodeMask: *const UINT,
103 ppPresentQueue: *mut *mut IUnknown,
104 ) -> HRESULT,
0bf4aa26 105}}
ff7c6d11
XL
106DEFINE_GUID!{IID_IDXGISwapChain3,
107 0x94d99bdb, 0xf1f8, 0x4ab0, 0xb2, 0x36, 0x7d, 0xa0, 0x17, 0x0e, 0xda, 0xb1}
108DEFINE_GUID!{IID_IDXGIOutput4,
109 0xdc7dca35, 0x2196, 0x414d, 0x9f, 0x53, 0x61, 0x78, 0x84, 0x03, 0x2a, 0x60}
110DEFINE_GUID!{IID_IDXGIFactory4,
111 0x1bc6ea02, 0xef36, 0x464f, 0xbf, 0x0c, 0x21, 0xca, 0x39, 0xe5, 0x16, 0x8a}
112DEFINE_GUID!{IID_IDXGIAdapter3,
113 0x645967a4, 0x1392, 0x4310, 0xa7, 0x98, 0x80, 0x53, 0xce, 0x3e, 0x93, 0xfd}