module external.directx.dxgi;

/*-------------------------------------------------------------------------------------
 *
 * Copyright (c) Microsoft Corporation
 *
 *-------------------------------------------------------------------------------------*/

// DXGI Header translation from dxgi.h
// Latest update: Windows 10, version 1809

public import external.directx.com;
public import external.directx.dxgitype;

mixin(uuid!(IDXGIObject, "aec22fb8", "76f3", "4639", ["9b", "e0", "28", "eb", "43", "a6", "7a", "2e"]));
extern (C++) interface IDXGIObject : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    HRESULT SetPrivateData(REFGUID Name, uint DataSize, const void* pData);
    HRESULT SetPrivateDataInterface(REFGUID Name, const IUnknown* pUnknown);
    HRESULT GetPrivateData(REFGUID Name, uint* pDataSize, void* pData);
    HRESULT GetParent(REFIID riid, void** ppParent);
}

mixin(uuid!(IDXGIDeviceSubObject, "3d3e0379", "f9de", "4d58", ["bb", "6c", "18", "d6", "29", "92", "f1", "a6"]));
extern (C++) interface IDXGIDeviceSubObject : IDXGIObject
{
    HRESULT GetDevice(REFIID riid, void** ppDevice);
}

mixin(uuid!(IDXGIResource, "035f3ab4", "482e", "4e50", ["b4", "1f", "8a", "7f", "8b", "d8", "96", "0b"]));
extern (C++) interface IDXGIResource : IDXGIDeviceSubObject
{
    HRESULT GetSharedHandle(HANDLE* pSharedHandle);
    HRESULT GetUsage(DXGI_USAGE* pUsage);
    HRESULT SetEvictionPriority(uint EvictionPriority);
    HRESULT GetEvictionPriority(uint* pEvictionPriority);
}

mixin(uuid!(IDXGIKeyedMutex, "9d8e1289", "d7b3", "465f", ["81", "26", "25", "0e", "34", "9a", "f8", "5d"]));
extern (C++) interface IDXGIKeyedMutex : IDXGIDeviceSubObject
{
    HRESULT AcquireSync(ulong Key, DWORD dwMilliseconds);
    HRESULT ReleaseSync(ulong Key);
}

mixin(uuid!(IDXGISurface, "cafcb56c", "6ac3", "4889", ["bf", "47", "9e", "23", "bb", "d2", "60", "ec"]));
extern (C++) interface IDXGISurface : IDXGIDeviceSubObject
{
    HRESULT GetDesc(DXGI_SURFACE_DESC* pDesc);
    HRESULT Map(DXGI_MAPPED_RECT* pLockedRect, uint MapFlags);
    HRESULT Unmap();
}

mixin(uuid!(IDXGISurface1, "4AE63092", "6327", "4c1b", ["80", "AE", "BF", "E1", "2E", "A3", "2B", "86"]));
extern (C++) interface IDXGISurface1 : IDXGISurface
{
    HRESULT GetDC(bool Discard, HDC* phdc);
    HRESULT ReleaseDC(RECT* pDirtyRect);
}

mixin(uuid!(IDXGIAdapter, "2411e7e1", "12ac", "4ccf", ["bd", "14", "97", "98", "e8", "53", "4d", "c0"]));
extern (C++) interface IDXGIAdapter : IDXGIObject
{
    HRESULT EnumOutputs(uint Output, IDXGIOutput** ppOutput);
    HRESULT GetDesc(DXGI_ADAPTER_DESC* pDesc);
    HRESULT CheckInterfaceSupport(REFGUID InterfaceName, LARGE_INTEGER* pUMDVersion);
}

mixin(uuid!(IDXGIOutput, "ae02eedb", "c735", "4690", ["8d", "52", "5a", "8d", "c2", "02", "13", "aa"]));
extern (C++) interface IDXGIOutput : IDXGIObject
{
    HRESULT GetDesc(DXGI_OUTPUT_DESC* pDesc);
    HRESULT GetDisplayModeList(DXGI_FORMAT EnumFormat, uint Flags, uint* pNumModes, DXGI_MODE_DESC* pDesc);
    HRESULT FindClosestMatchingMode(const DXGI_MODE_DESC* pModeToMatch, DXGI_MODE_DESC* pClosestMatch, IUnknown* pConcernedDevice);
    HRESULT WaitForVBlank();
    HRESULT TakeOwnership(IUnknown* pDevice, bool Exclusive);
    void ReleaseOwnership();
    HRESULT GetGammaControlCapabilities(DXGI_GAMMA_CONTROL_CAPABILITIES* pGammaCaps);
    HRESULT SetGammaControl(const DXGI_GAMMA_CONTROL* pArray);
    HRESULT GetGammaControl(DXGI_GAMMA_CONTROL* pArray);
    HRESULT SetDisplaySurface(IDXGISurface* pScanoutSurface);
    HRESULT GetDisplaySurfaceData(IDXGISurface* pDestination);
    HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats);
}

mixin(uuid!(IDXGISwapChain, "310d36a0", "d2e7", "4c0a", ["aa", "04", "6a", "9d", "23", "b8", "88", "6a"]));
extern (C++) interface IDXGISwapChain : IDXGIDeviceSubObject
{
    HRESULT Present(uint SyncInterval, uint Flags);
    HRESULT GetBuffer(uint Buffer, REFIID riid, void** ppSurface);
    HRESULT SetFullscreenState(bool Fullscreen, IDXGIOutput* pTarget);
    HRESULT GetFullscreenState(bool* pFullscreen, IDXGIOutput** ppTarget);
    HRESULT GetDesc(DXGI_SWAP_CHAIN_DESC* pDesc);
    HRESULT ResizeBuffers(uint BufferCount, uint Width, uint Height, DXGI_FORMAT NewFormat, uint SwapChainFlags);
    HRESULT ResizeTarget(const DXGI_MODE_DESC* pNewTargetParameters);
    HRESULT GetContainingOutput(IDXGIOutput** ppOutput);
    HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats);
    HRESULT GetLastPresentCount(uint* pLastPresentCount);
}

mixin(uuid!(IDXGIFactory, "7b7166ec", "21c7", "44ae", ["b2", "1a", "c9", "ae", "32", "1a", "e3", "69"]));
extern (C++) interface IDXGIFactory : IDXGIObject
{
    HRESULT EnumAdapters(uint Adapter, IDXGIAdapter** ppAdapter);
    HRESULT MakeWindowAssociation(HWND WindowHandle, uint Flags);
    HRESULT GetWindowAssociation(HWND* pWindowHandle);
    HRESULT CreateSwapChain(IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain);
    HRESULT CreateSoftwareAdapter(HMODULE Module, IDXGIAdapter** ppAdapter);
}

mixin(uuid!(IDXGIDevice, "54ec77fa", "1377", "44e6", ["8c", "32", "88", "fd", "5f", "44", "c8", "4c"]));
extern (C++) interface IDXGIDevice : IDXGIObject
{
    HRESULT GetAdapter(IDXGIAdapter* pAdapter);
    HRESULT CreateSurface(const DXGI_SURFACE_DESC* pDesc, uint NumSurfaces, DXGI_USAGE Usage, const DXGI_SHARED_RESOURCE* pSharedResource, IDXGISurface** ppSurface);
    HRESULT QueryResourceResidency(const IUnknown** ppResources, DXGI_RESIDENCY* pResidencyStatus, uint NumResources);
    HRESULT SetGPUThreadPriority(int Priority);
    HRESULT GetGPUThreadPriority(int* pPriority);
}

mixin(uuid!(IDXGIFactory1, "770aae78", "f26f", "4dba", ["a8", "29", "25", "3c", "83", "d1", "b3", "87"]));
extern (C++) interface IDXGIFactory1 : IDXGIFactory
{
    HRESULT EnumAdapters1(uint Adapter, IDXGIAdapter1** ppAdapter);
    bool IsCurrent();
}

mixin(uuid!(IDXGIAdapter1, "29038f61", "3839", "4626", ["91", "fd", "08", "68", "79", "01", "1a", "05"]));
extern (C++) interface IDXGIAdapter1 : IDXGIAdapter
{
    HRESULT GetDesc1(DXGI_ADAPTER_DESC1* pDesc);
}

mixin(uuid!(IDXGIDevice1, "77db970f", "6276", "48ba", ["ba", "28", "07", "01", "43", "b4", "39", "2c"]));
extern (C++) interface IDXGIDevice1 : IDXGIDevice
{
    HRESULT SetMaximumFrameLatency(uint MaxLatency);
    HRESULT GetMaximumFrameLatency(uint* pMaxLatency);
}

enum DXGI_CPU_ACCESS_NONE = 0;
enum DXGI_CPU_ACCESS_DYNAMIC = 1;
enum DXGI_CPU_ACCESS_READ_WRITE = 2;
enum DXGI_CPU_ACCESS_SCRATCH = 3;
enum DXGI_CPU_ACCESS_FIELD = 15;
enum DXGI_USAGE_SHADER_INPUT = 0x00000010U;
enum DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x00000020U;
enum DXGI_USAGE_BACK_BUFFER = 0x00000040U;
enum DXGI_USAGE_SHARED = 0x00000080U;
enum DXGI_USAGE_READ_ONLY = 0x00000100U;
enum DXGI_USAGE_DISCARD_ON_PRESENT = 0x00000200U;
enum DXGI_USAGE_UNORDERED_ACCESS = 0x00000400U;

alias DXGI_USAGE = uint;

struct DXGI_FRAME_STATISTICS
{
    uint PresentCount;
    uint PresentRefreshCount;
    uint SyncRefreshCount;
    LARGE_INTEGER SyncQPCTime;
    LARGE_INTEGER SyncGPUTime;
}

struct DXGI_MAPPED_RECT
{
    int Pitch;
    byte* pBits;
}

struct DXGI_ADAPTER_DESC
{
    WCHAR[128] Description;
    uint VendorId;
    uint DeviceId;
    uint SubSysId;
    uint Revision;
    size_t DedicatedVideoMemory;
    size_t DedicatedSystemMemory;
    size_t SharedSystemMemory;
    LUID AdapterLuid;
}

struct DXGI_OUTPUT_DESC
{
    WCHAR[32] DeviceName;
    RECT DesktopCoordinates;
    bool AttachedToDesktop;
    DXGI_MODE_ROTATION Rotation;
    HANDLE Monitor;
}

struct DXGI_SHARED_RESOURCE
{
    HANDLE Handle;
}

enum DXGI_RESOURCE_PRIORITY_MINIMUM = (0x28000000);
enum DXGI_RESOURCE_PRIORITY_LOW = (0x50000000);
enum DXGI_RESOURCE_PRIORITY_NORMAL = (0x78000000);
enum DXGI_RESOURCE_PRIORITY_HIGH = (0xa0000000);
enum DXGI_RESOURCE_PRIORITY_MAXIMUM = (0xc8000000);

alias DXGI_RESIDENCY = uint;
enum : DXGI_RESIDENCY
{
    DXGI_RESIDENCY_FULLY_RESIDENT = 1,
    DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY = 2,
    DXGI_RESIDENCY_EVICTED_TO_DISK = 3
}

struct DXGI_SURFACE_DESC
{
    uint Width;
    uint Height;
    DXGI_FORMAT Format;
    DXGI_SAMPLE_DESC SampleDesc;
}

alias DXGI_SWAP_EFFECT = uint;
enum : DXGI_SWAP_EFFECT
{
    DXGI_SWAP_EFFECT_DISCARD = 0,
    DXGI_SWAP_EFFECT_SEQUENTIAL = 1,
    DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL = 3,
    DXGI_SWAP_EFFECT_FLIP_DISCARD = 4
}

alias DXGI_SWAP_CHAIN_FLAG = uint;
enum : DXGI_SWAP_CHAIN_FLAG
{
    DXGI_SWAP_CHAIN_FLAG_NONPREROTATED = 1,
    DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH = 2,
    DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE = 4,
    DXGI_SWAP_CHAIN_FLAG_RESTRICTED_CONTENT = 8,
    DXGI_SWAP_CHAIN_FLAG_RESTRICT_SHARED_RESOURCE_DRIVER = 16,
    DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY = 32,
    DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT = 64,
    DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER = 128,
    DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO = 256,
    DXGI_SWAP_CHAIN_FLAG_YUV_VIDEO = 512,
    DXGI_SWAP_CHAIN_FLAG_HW_PROTECTED = 1024,
    DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING = 2048,
    DXGI_SWAP_CHAIN_FLAG_RESTRICTED_TO_ALL_HOLOGRAPHIC_DISPLAYS = 4096
}

struct DXGI_SWAP_CHAIN_DESC
{
    DXGI_MODE_DESC BufferDesc;
    DXGI_SAMPLE_DESC SampleDesc;
    DXGI_USAGE BufferUsage;
    uint BufferCount;
    HWND OutputWindow;
    bool Windowed;
    DXGI_SWAP_EFFECT SwapEffect;
    uint Flags;
}

enum DXGI_MAP_READ = (1U);
enum DXGI_MAP_WRITE = (2U);
enum DXGI_MAP_DISCARD = (4U);
enum DXGI_ENUM_MODES_INTERLACED = (1U);
enum DXGI_ENUM_MODES_SCALING = (2U);

enum DXGI_MAX_SWAP_CHAIN_BUFFERS = (16);
enum DXGI_PRESENT_TEST = 0x00000001U;
enum DXGI_PRESENT_DO_NOT_SEQUENCE = 0x00000002U;
enum DXGI_PRESENT_RESTART = 0x00000004U;
enum DXGI_PRESENT_DO_NOT_WAIT = 0x00000008U;
enum DXGI_PRESENT_STEREO_PREFER_RIGHT = 0x00000010U;
enum DXGI_PRESENT_STEREO_TEMPORARY_MONO = 0x00000020U;
enum DXGI_PRESENT_RESTRICT_TO_OUTPUT = 0x00000040U;
enum DXGI_PRESENT_USE_DURATION = 0x00000100U;
enum DXGI_PRESENT_ALLOW_TEARING = 0x00000200U;

enum DXGI_MWA_NO_WINDOW_CHANGES = (1 << 0);
enum DXGI_MWA_NO_ALT_ENTER = (1 << 1);
enum DXGI_MWA_NO_PRINT_SCREEN = (1 << 2);
enum DXGI_MWA_VALID = (0x7);

extern (Windows) nothrow HRESULT CreateDXGIFactory(REFIID riid, void** ppFactory);
extern (Windows) nothrow HRESULT CreateDXGIFactory1(REFIID riid, void** ppFactory);

alias DXGI_ADAPTER_FLAG = uint;
enum : DXGI_ADAPTER_FLAG
{
    DXGI_ADAPTER_FLAG_NONE = 0,
    DXGI_ADAPTER_FLAG_REMOTE = 1,
    DXGI_ADAPTER_FLAG_SOFTWARE = 2,
    DXGI_ADAPTER_FLAG_FORCE_DWORD = 0xffffffff
}

struct DXGI_ADAPTER_DESC1
{
    WCHAR[128] Description;
    uint VendorId;
    uint DeviceId;
    uint SubSysId;
    uint Revision;
    size_t DedicatedVideoMemory;
    size_t DedicatedSystemMemory;
    size_t SharedSystemMemory;
    LUID AdapterLuid;
    uint Flags;
}

struct DXGI_DISPLAY_COLOR_SPACE
{
    float[8][2] PrimaryCoordinates;
    float[16][2] WhitePoints;
}

/*-------------------------------------------------------------------------------------
 *
 * Copyright (c) Microsoft Corporation
 *
 *-------------------------------------------------------------------------------------*/

// DXGI 1.2 Header translation from dxgi1_2.h
// Latest update: Windows 10, version 1809

mixin(uuid!(IDXGIDisplayControl, "ea9dbf1a", "c88e", "4486", ["85", "4a", "98", "aa", "01", "38", "f3", "0c"]));
extern (C++) interface IDXGIDisplayControl : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    bool IsStereoEnabled();
    void SetStereoEnabled(bool enabled);
}

mixin(uuid!(IDXGIOutputDuplication, "191cfac3", "a341", "470d", ["b2", "6e", "a8", "64", "f4", "28", "31", "9c"]));
extern (C++) interface IDXGIOutputDuplication : IDXGIObject
{
    void GetDesc(DXGI_OUTDUPL_DESC* pDesc);
    HRESULT AcquireNextFrame(uint TimeoutInMilliseconds, DXGI_OUTDUPL_FRAME_INFO* pFrameInfo, IDXGIResource** ppDesktopResource);
    HRESULT GetFrameDirtyRects(uint DirtyRectsBufferSize, RECT* pDirtyRectsBuffer, uint* pDirtyRectsBufferSizeRequired);
    HRESULT GetFrameMoveRects(uint MoveRectsBufferSize, DXGI_OUTDUPL_MOVE_RECT* pMoveRectBuffer, uint* pMoveRectsBufferSizeRequired);
    HRESULT GetFramePointerShape(uint PointerShapeBufferSize, void* pPointerShapeBuffer, uint* pPointerShapeBufferSizeRequired, DXGI_OUTDUPL_POINTER_SHAPE_INFO* pPointerShapeInfo);
    HRESULT MapDesktopSurface(DXGI_MAPPED_RECT* pLockedRect);
    HRESULT UnMapDesktopSurface();
    HRESULT ReleaseFrame();
}

mixin(uuid!(IDXGISurface2, "aba496dd", "b617", "4cb8", ["a8", "66", "bc", "44", "d7", "eb", "1f", "a2"]));
extern (C++) interface IDXGISurface2 : IDXGISurface1
{
    HRESULT GetResource(REFIID riid, void** ppParentResource, uint* pSubresourceIndex);
}

mixin(uuid!(IDXGIResource1, "30961379", "4609", "4a41", ["99", "8e", "54", "fe", "56", "7e", "e0", "c1"]));
extern (C++) interface IDXGIResource1 : IDXGIResource
{
    HRESULT CreateSubresourceSurface(uint index, IDXGISurface2** ppSurface);
    HRESULT CreateSharedHandle(const SECURITY_ATTRIBUTES* pAttributes, DWORD dwAccess, LPCWSTR lpName, HANDLE* pHandle);
}

mixin(uuid!(IDXGIDevice2, "05008617", "fbfd", "4051", ["a7", "90", "14", "48", "84", "b4", "f6", "a9"]));
extern (C++) interface IDXGIDevice2 : IDXGIDevice1
{
    HRESULT OfferResources(uint NumResources, const IDXGIResource** ppResources, DXGI_OFFER_RESOURCE_PRIORITY Priority);
    HRESULT ReclaimResources(uint NumResources, const IDXGIResource** ppResources, bool* pDiscarded);
    HRESULT EnqueueSetEvent(HANDLE hEvent);
}

mixin(uuid!(IDXGISwapChain1, "790a45f7", "0d42", "4876", ["98", "3a", "0a", "55", "cf", "e6", "f4", "aa"]));
extern (C++) interface IDXGISwapChain1 : IDXGISwapChain
{
    HRESULT GetDesc1(DXGI_SWAP_CHAIN_DESC1* pDesc);
    HRESULT GetFullscreenDesc(DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pDesc);
    HRESULT GetHwnd(HWND* pHwnd);
    HRESULT GetCoreWindow(REFIID refiid, void** ppUnk);
    HRESULT Present1(uint SyncInterval, uint PresentFlags, const DXGI_PRESENT_PARAMETERS* pPresentParameters);
    bool IsTemporaryMonoSupported();
    HRESULT GetRestrictToOutput(IDXGIOutput** ppRestrictToOutput);
    HRESULT SetBackgroundColor(const DXGI_RGBA* pColor);
    HRESULT GetBackgroundColor(DXGI_RGBA* pColor);
    HRESULT SetRotation(DXGI_MODE_ROTATION Rotation);
    HRESULT GetRotation(DXGI_MODE_ROTATION* pRotation);
}

mixin(uuid!(IDXGIFactory2, "50c83a1c", "e072", "4c48", ["87", "b0", "36", "30", "fa", "36", "a6", "d0"]));
extern (C++) interface IDXGIFactory2 : IDXGIFactory1
{
    bool IsWindowedStereoEnabled();
    HRESULT CreateSwapChainForHwnd(IUnknown* pDevice, HWND hWnd, const DXGI_SWAP_CHAIN_DESC1* pDesc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC* pFullscreenDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain);
    HRESULT CreateSwapChainForCoreWindow(IUnknown* pDevice, IUnknown* pWindow, const DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain);
    HRESULT GetSharedResourceAdapterLuid(HANDLE hResource, LUID* pLuid);
    HRESULT RegisterStereoStatusWindow(HWND WindowHandle, uint wMsg, DWORD* pdwCookie);
    HRESULT RegisterStereoStatusEvent(HANDLE hEvent, DWORD* pdwCookie);
    void UnregisterStereoStatus(DWORD dwCookie);
    HRESULT RegisterOcclusionStatusWindow(HWND WindowHandle, uint wMsg, DWORD* pdwCookie);
    HRESULT RegisterOcclusionStatusEvent(HANDLE hEvent, DWORD* pdwCookie);
    void UnregisterOcclusionStatus(DWORD dwCookie);
    HRESULT CreateSwapChainForComposition(IUnknown* pDevice, const DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain);
}

mixin(uuid!(IDXGIAdapter2, "0AA1AE0A", "FA0E", "4B84", ["86", "44", "E0", "5F", "F8", "E5", "AC", "B5"]));
extern (C++) interface IDXGIAdapter2 : IDXGIAdapter1
{
    HRESULT GetDesc2(DXGI_ADAPTER_DESC2* pDesc);
}

mixin(uuid!(IDXGIOutput1, "00cddea8", "939b", "4b83", ["a3", "40", "a6", "85", "22", "66", "66", "cc"]));
extern (C++) interface IDXGIOutput1 : IDXGIOutput
{
    HRESULT GetDisplayModeList1(DXGI_FORMAT EnumFormat, uint Flags, uint* pNumModes, DXGI_MODE_DESC1* pDesc);
    HRESULT FindClosestMatchingMode1(const DXGI_MODE_DESC1* pModeToMatch, DXGI_MODE_DESC1* pClosestMatch, IUnknown* pConcernedDevice);
    HRESULT GetDisplaySurfaceData1(IDXGIResource* pDestination);
    HRESULT DuplicateOutput(IUnknown* pDevice, IDXGIOutputDuplication** ppOutputDuplication);
}

struct DXGI_OUTDUPL_MOVE_RECT
{
    POINT SourcePoint;
    RECT DestinationRect;
}

struct DXGI_OUTDUPL_DESC
{
    DXGI_MODE_DESC ModeDesc;
    DXGI_MODE_ROTATION Rotation;
    bool DesktopImageInSystemMemory;
}

struct DXGI_OUTDUPL_POINTER_POSITION
{
    POINT Position;
    bool Visible;
}

alias DXGI_OUTDUPL_POINTER_SHAPE_TYPE = uint;
enum : DXGI_OUTDUPL_POINTER_SHAPE_TYPE
{
    DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 0x1,
    DXGI_OUTDUPL_POINTER_SHAPE_TYPE_COLOR = 0x2,
    DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MASKED_COLOR = 0x4
}

struct DXGI_OUTDUPL_POINTER_SHAPE_INFO
{
    uint Type;
    uint Width;
    uint Height;
    uint Pitch;
    POINT HotSpot;
}

struct DXGI_OUTDUPL_FRAME_INFO
{
    LARGE_INTEGER LastPresentTime;
    LARGE_INTEGER LastMouseUpdateTime;
    uint AccumulatedFrames;
    bool RectsCoalesced;
    bool ProtectedContentMaskedOut;
    DXGI_OUTDUPL_POINTER_POSITION PointerPosition;
    uint TotalMetadataBufferSize;
    uint PointerShapeBufferSize;
}

alias DXGI_ALPHA_MODE = uint;
enum : DXGI_ALPHA_MODE
{
    DXGI_ALPHA_MODE_UNSPECIFIED = 0,
    DXGI_ALPHA_MODE_PREMULTIPLIED = 1,
    DXGI_ALPHA_MODE_STRAIGHT = 2,
    DXGI_ALPHA_MODE_IGNORE = 3,
    DXGI_ALPHA_MODE_FORCE_DWORD = 0xffffffff
}

alias DXGI_OFFER_RESOURCE_PRIORITY = uint;
enum : DXGI_OFFER_RESOURCE_PRIORITY
{
    DXGI_OFFER_RESOURCE_PRIORITY_LOW = 1,
    DXGI_OFFER_RESOURCE_PRIORITY_NORMAL = (DXGI_OFFER_RESOURCE_PRIORITY_LOW + 1),
    DXGI_OFFER_RESOURCE_PRIORITY_HIGH = (DXGI_OFFER_RESOURCE_PRIORITY_NORMAL + 1)
}

enum DXGI_ENUM_MODES_STEREO = (4UL);
enum DXGI_ENUM_MODES_DISABLED_STEREO = (8UL);
enum DXGI_SHARED_RESOURCE_READ = (0x80000000L);
enum DXGI_SHARED_RESOURCE_WRITE = (1);

struct DXGI_MODE_DESC1
{
    uint Width;
    uint Height;
    DXGI_RATIONAL RefreshRate;
    DXGI_FORMAT Format;
    DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
    DXGI_MODE_SCALING Scaling;
    bool Stereo;
}

alias DXGI_SCALING = uint;
enum : DXGI_SCALING
{
    DXGI_SCALING_STRETCH = 0,
    DXGI_SCALING_NONE = 1,
    DXGI_SCALING_ASPECT_RATIO_STRETCH = 2
}

struct DXGI_SWAP_CHAIN_DESC1
{
    uint Width;
    uint Height;
    DXGI_FORMAT Format;
    bool Stereo;
    DXGI_SAMPLE_DESC SampleDesc;
    DXGI_USAGE BufferUsage;
    uint BufferCount;
    DXGI_SCALING Scaling;
    DXGI_SWAP_EFFECT SwapEffect;
    DXGI_ALPHA_MODE AlphaMode;
    uint Flags;
}

struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC
{
    DXGI_RATIONAL RefreshRate;
    DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
    DXGI_MODE_SCALING Scaling;
    bool Windowed;
}

struct DXGI_PRESENT_PARAMETERS
{
    uint DirtyRectsCount;

    RECT* pDirtyRects;
    RECT* pScrollRect;
    POINT* pScrollOffset;
}

alias DXGI_GRAPHICS_PREEMPTION_GRANULARITY = uint;
enum : DXGI_GRAPHICS_PREEMPTION_GRANULARITY
{
    DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY = 0,
    DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY = 1,
    DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY = 2,
    DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY = 3,
    DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY = 4
}

alias DXGI_COMPUTE_PREEMPTION_GRANULARITY = uint;
enum : DXGI_COMPUTE_PREEMPTION_GRANULARITY
{
    DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY = 0,
    DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY = 1,
    DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY = 2,
    DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY = 3,
    DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY = 4
}

struct DXGI_ADAPTER_DESC2
{
    WCHAR[128] Description;
    uint VendorId;
    uint DeviceId;
    uint SubSysId;
    uint Revision;
    size_t DedicatedVideoMemory;
    size_t DedicatedSystemMemory;
    size_t SharedSystemMemory;
    LUID AdapterLuid;
    uint Flags;
    DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity;
    DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity;
}

/*-------------------------------------------------------------------------------------
 *
 * Copyright (c) Microsoft Corporation
 *
 *-------------------------------------------------------------------------------------*/

// DXGI 1.3 Header translation from dxgi1_3.h
// Latest update: Windows 10, version 1809

mixin(uuid!(IDXGIDevice3, "6007896c", "3244", "4afd", ["bf", "18", "a6", "d3", "be", "da", "50", "23"]));
extern (C++) interface IDXGIDevice3 : IDXGIDevice2
{
    void Trim();
}

mixin(uuid!(IDXGISwapChain2, "a8be2ac4", "199f", "4946", ["b3", "31", "79", "59", "9f", "b9", "8d", "e7"]));
extern (C++) interface IDXGISwapChain2 : IDXGISwapChain1
{
    HRESULT SetSourceSize(uint Width, uint Height);
    HRESULT GetSourceSize(uint* pWidth, uint* pHeight);
    HRESULT SetMaximumFrameLatency(uint MaxLatency);
    HRESULT GetMaximumFrameLatency(uint* pMaxLatency);
    HANDLE GetFrameLatencyWaitableObject();
    HRESULT SetMatrixTransform(const DXGI_MATRIX_3X2_F* pMatrix);
    HRESULT GetMatrixTransform(DXGI_MATRIX_3X2_F* pMatrix);
}

mixin(uuid!(IDXGIOutput2, "595e39d1", "2724", "4663", ["99", "b1", "da", "96", "9d", "e2", "83", "64"]));
extern (C++) interface IDXGIOutput2 : IDXGIOutput1
{
    bool SupportsOverlays();
}

mixin(uuid!(IDXGIFactory3, "25483823", "cd46", "4c7d", ["86", "ca", "47", "aa", "95", "b8", "37", "bd"]));
extern (C++) interface IDXGIFactory3 : IDXGIFactory2
{
    uint GetCreationFlags();
}

mixin(uuid!(IDXGIDecodeSwapChain, "2633066b", "4514", "4c7a", ["8f", "d8", "12", "ea", "98", "05", "9d", "18"]));
extern (C++) interface IDXGIDecodeSwapChain : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    HRESULT PresentBuffer(uint BufferToPresent, uint SyncInterval, uint Flags);
    HRESULT SetSourceRect(const RECT* pRect);
    HRESULT SetTargetRect(const RECT* pRect);
    HRESULT SetDestSize(uint Width, uint Height);
    HRESULT GetSourceRect(RECT* pRect);
    HRESULT GetTargetRect(RECT* pRect);
    HRESULT GetDestSize(uint* pWidth, uint* pHeight);
    HRESULT SetColorSpace(DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ColorSpace);
    DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS GetColorSpace();
}

mixin(uuid!(IDXGIFactoryMedia, "41e7d1f2", "a591", "4f7b", ["a2", "e5", "fa", "9c", "84", "3e", "1c", "12"]));
extern (C++) interface IDXGIFactoryMedia : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    HRESULT CreateSwapChainForCompositionSurfaceHandle(IUnknown* pDevice, HANDLE hSurface, const DXGI_SWAP_CHAIN_DESC1* pDesc, IDXGIOutput* pRestrictToOutput, IDXGISwapChain1** ppSwapChain);
    HRESULT CreateDecodeSwapChainForCompositionSurfaceHandle(IUnknown* pDevice, HANDLE hSurface, DXGI_DECODE_SWAP_CHAIN_DESC* pDesc, IDXGIResource* pYuvDecodeBuffers, IDXGIOutput* pRestrictToOutput, IDXGIDecodeSwapChain** ppSwapChain);
}

mixin(uuid!(IDXGISwapChainMedia, "dd95b90b", "f05f", "4f6a", ["bd", "65", "25", "bf", "b2", "64", "bd", "84"]));
extern (C++) interface IDXGISwapChainMedia : IUnknown
{
    HRESULT QueryInterface(REFIID riid, void** ppvObject);
    ULONG AddRef();
    ULONG Release();
    HRESULT GetFrameStatisticsMedia(DXGI_FRAME_STATISTICS_MEDIA* pStats);
    HRESULT SetPresentDuration(uint Duration);
    HRESULT CheckPresentDurationSupport(uint DesiredPresentDuration, uint* pClosestSmallerPresentDuration, uint* pClosestLargerPresentDuration);
}

mixin(uuid!(IDXGIOutput3, "dd95b90b", "f05f", "4f6a", ["bd", "65", "25", "bf", "b2", "64", "bd", "84"]));
extern (C++) interface IDXGIOutput3 : IDXGIOutput2
{
    HRESULT CheckOverlaySupport(DXGI_FORMAT EnumFormat, IUnknown* pConcernedDevice, uint* pFlags);
}

enum DXGI_CREATE_FACTORY_DEBUG = 0x1;

extern (Windows)
{
    nothrow HRESULT CreateDXGIFactory2(uint Flags, REFIID riid, void** ppFactory);
    nothrow HRESULT DXGIGetDebugInterface1(uint Flags, REFIID riid, void* pDebug);
}

struct DXGI_MATRIX_3X2_F
{
    float _11;
    float _12;
    float _21;
    float _22;
    float _31;
    float _32;
}

struct DXGI_DECODE_SWAP_CHAIN_DESC
{
    uint Flags;
}

alias DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS = uint;
enum : DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS
{
    DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE = 0x1,
    DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709 = 0x2,
    DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC = 0x4
}

alias DXGI_FRAME_PRESENTATION_MODE = uint;
enum : DXGI_FRAME_PRESENTATION_MODE
{
    DXGI_FRAME_PRESENTATION_MODE_COMPOSED = 0,
    DXGI_FRAME_PRESENTATION_MODE_OVERLAY = 1,
    DXGI_FRAME_PRESENTATION_MODE_NONE = 2,
    DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE = 3
}

struct DXGI_FRAME_STATISTICS_MEDIA
{
    uint PresentCount;
    uint PresentRefreshCount;
    uint SyncRefreshCount;
    LARGE_INTEGER SyncQPCTime;
    LARGE_INTEGER SyncGPUTime;
    DXGI_FRAME_PRESENTATION_MODE CompositionMode;
    uint ApprovedPresentDuration;
}

alias DXGI_OVERLAY_SUPPORT_FLAG = uint;
enum : DXGI_OVERLAY_SUPPORT_FLAG
{
    DXGI_OVERLAY_SUPPORT_FLAG_DIRECT = 0x1,
    DXGI_OVERLAY_SUPPORT_FLAG_SCALING = 0x2
}

/*-------------------------------------------------------------------------------------
 *
 * Copyright (c) Microsoft Corporation
 *
 *-------------------------------------------------------------------------------------*/

// DXGI 1.4 Header translation from dxgi1_4.h
// Latest update: Windows 10, version 1809

mixin(uuid!(IDXGISwapChain3, "94d99bdb", "f1f8", "4ab0", ["b2", "36", "7d", "a0", "17", "0e", "da", "b1"]));
extern (C++) interface IDXGISwapChain3 : IDXGISwapChain2
{
    uint GetCurrentBackBufferIndex();
    HRESULT CheckColorSpaceSupport(DXGI_COLOR_SPACE_TYPE ColorSpace, uint* pColorSpaceSupport);
    HRESULT SetColorSpace1(DXGI_COLOR_SPACE_TYPE ColorSpace);
    HRESULT ResizeBuffers1(uint BufferCount, uint Width, uint Height, DXGI_FORMAT Format, uint SwapChainFlags, const uint* pCreationNodeMask, const IUnknown** ppPresentQueue);
}

mixin(uuid!(IDXGIOutput4, "dc7dca35", "2196", "414d", ["9F", "53", "61", "78", "84", "03", "2a", "60"]));
extern (C++) interface IDXGIOutput4 : IDXGIOutput3
{
    HRESULT CheckOverlayColorSpaceSupport(DXGI_FORMAT Format, DXGI_COLOR_SPACE_TYPE ColorSpace, IUnknown* pConcernedDevice, uint* pFlags);
}

mixin(uuid!(IDXGIFactory4, "1bc6ea02", "ef36", "464f", ["bf", "0c", "21", "ca", "39", "e5", "16", "8a"]));
extern (C++) interface IDXGIFactory4 : IDXGIFactory3
{
    HRESULT EnumAdapterByLuid(LUID AdapterLuid, REFIID riid, void** ppvAdapter);
    HRESULT EnumWarpAdapter(REFIID riid, void** ppvAdapter);
}

mixin(uuid!(IDXGIAdapter3, "645967A4", "1392", "4310", ["A7", "98", "80", "53", "CE", "3E", "93", "FD"]));
extern (C++) interface IDXGIAdapter3 : IDXGIAdapter2
{
    HRESULT RegisterHardwareContentProtectionTeardownStatusEvent(HANDLE hEvent, DWORD* pdwCookie);
    void UnregisterHardwareContentProtectionTeardownStatus(DWORD dwCookie);
    HRESULT QueryVideoMemoryInfo(uint NodeIndex, DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup, DXGI_QUERY_VIDEO_MEMORY_INFO* pVideoMemoryInfo);
    HRESULT SetVideoMemoryReservation(uint NodeIndex, DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup, ulong Reservation);
    HRESULT RegisterVideoMemoryBudgetChangeNotificationEvent(HANDLE hEvent, DWORD* pdwCookie);
    void UnregisterVideoMemoryBudgetChangeNotification(DWORD dwCookie);
}

alias DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG = uint;
enum : DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG
{
    DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
    DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2
}

alias DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG = uint;
enum : DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG
{
    DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1
}

alias DXGI_MEMORY_SEGMENT_GROUP = uint;
enum : DXGI_MEMORY_SEGMENT_GROUP
{
    DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0,
    DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1
}

struct DXGI_QUERY_VIDEO_MEMORY_INFO
{
    ulong Budget;
    ulong CurrentUsage;
    ulong AvailableForReservation;
    ulong CurrentReservation;
}

/*-------------------------------------------------------------------------------------
 *
 * Copyright (c) Microsoft Corporation
 *
 *-------------------------------------------------------------------------------------*/

// DXGI 1.5 Header translation from dxgi1_5.h
// Latest update: Windows 10, version 1809

mixin(uuid!(IDXGIOutput5, "80A07424", "AB52", "42EB", ["83", "3C", "0C", "42", "FD", "28", "2D", "98"]));
extern (C++) interface IDXGIOutput5 : IDXGIOutput4
{
    HRESULT DuplicateOutput1(IUnknown* pDevice, uint Flags, uint SupportedFormatsCount, const DXGI_FORMAT* pSupportedFormats, IDXGIOutputDuplication** ppOutputDuplication);
}

mixin(uuid!(IDXGISwapChain4, "3D585D5A", "BD4A", "489E", ["B1", "F4", "3D", "BC", "B6", "45", "2F", "FB"]));
extern (C++) interface IDXGISwapChain4 : IDXGISwapChain3
{
    HRESULT SetHDRMetaData(DXGI_HDR_METADATA_TYPE Type, uint Size, void* pMetaData);
}

mixin(uuid!(IDXGIDevice4, "95B4F95F", "D8DA", "4CA4", ["9E", "E6", "3B", "76", "D5", "96", "8A", "10"]));
extern (C++) interface IDXGIDevice4 : IDXGIDevice3
{
    HRESULT OfferResources1(uint NumResources, const IDXGIResource** ppResources, DXGI_OFFER_RESOURCE_PRIORITY Priority, uint Flags);
    HRESULT ReclaimResources1(uint NumResources, const IDXGIResource** ppResources, DXGI_RECLAIM_RESOURCE_RESULTS* pResults);
}

mixin(uuid!(IDXGIFactory5, "7632e1f5", "ee65", "4dca", ["87", "fd", "84", "cd", "75", "f8", "83", "8d"]));
extern (C++) interface IDXGIFactory5 : IDXGIFactory4
{
    HRESULT CheckFeatureSupport(DXGI_FEATURE Feature, void* pFeatureSupportData, uint FeatureSupportDataSize);
}

alias DXGI_OUTDUPL_FLAG = uint;
enum : DXGI_OUTDUPL_FLAG
{
    DXGI_OUTDUPL_COMPOSITED_UI_CAPTURE_ONLY = 1
}

alias DXGI_HDR_METADATA_TYPE = uint;
enum : DXGI_HDR_METADATA_TYPE
{
    DXGI_HDR_METADATA_TYPE_NONE = 0,
    DXGI_HDR_METADATA_TYPE_HDR10 = 1,
    DXGI_HDR_METADATA_TYPE_HDR10PLUS = 2
}

struct DXGI_HDR_METADATA_HDR10
{
    ushort[2] RedPrimary;
    ushort[2] GreenPrimary;
    ushort[2] BluePrimary;
    ushort[2] WhitePoint;
    uint MaxMasteringLuminance;
    uint MinMasteringLuminance;
    ushort MaxContentLightLevel;
    ushort MaxFrameAverageLightLevel;
}

struct DXGI_HDR_METADATA_HDR10PLUS
{
    byte[72] Data;
}

alias DXGI_OFFER_RESOURCE_FLAGS = uint;
enum : DXGI_OFFER_RESOURCE_FLAGS
{
    DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT = 0x1
}

alias DXGI_RECLAIM_RESOURCE_RESULTS = uint;
enum : DXGI_RECLAIM_RESOURCE_RESULTS
{
    DXGI_RECLAIM_RESOURCE_RESULT_OK = 0,
    DXGI_RECLAIM_RESOURCE_RESULT_DISCARDED = 1,
    DXGI_RECLAIM_RESOURCE_RESULT_NOT_COMMITTED = 2
}

alias DXGI_FEATURE = uint;
enum : DXGI_FEATURE
{
    DXGI_FEATURE_PRESENT_ALLOW_TEARING = 0
}

/*-------------------------------------------------------------------------------------
 *
 * Copyright (c) Microsoft Corporation
 *
 *-------------------------------------------------------------------------------------*/

// DXGI 1.6 Header translation from dxgi1_6.h
// Latest update: Windows 10, version 1809

mixin(uuid!(IDXGIAdapter4, "3c8d99d1", "4fbf", "4181", ["a8", "2c", "af", "66", "bf", "7b", "d2", "4e"]));
extern (C++) interface IDXGIAdapter4 : IDXGIAdapter3
{
    HRESULT GetDesc3(DXGI_ADAPTER_DESC3* pDesc);
}

mixin(uuid!(IDXGIOutput6, "068346e8", "aaec", "4b84", ["ad", "d7", "13", "7f", "51", "3f", "77", "a1"]));
extern (C++) interface IDXGIOutput6 : IDXGIOutput5
{
    HRESULT GetDesc1(DXGI_OUTPUT_DESC1* pDesc);
    HRESULT CheckHardwareCompositionSupport(uint* pFlags);
}

mixin(uuid!(IDXGIFactory6, "c1b6694f", "ff09", "44a9", ["b0", "3c", "77", "90", "0a", "0a", "1d", "17"]));
extern (C++) interface IDXGIFactory6 : IDXGIFactory5
{
    HRESULT EnumAdapterByGpuPreference(uint Adapter, DXGI_GPU_PREFERENCE GpuPreference, REFIID riid, void** ppvAdapter);
}

mixin(uuid!(IDXGIFactory7, "a4966eed", "76db", "44da", ["84", "c1", "ee", "9a", "7a", "fb", "20", "a8"]));
extern (C++) interface IDXGIFactory7 : IDXGIFactory6
{
    HRESULT RegisterAdaptersChangedEvent(HANDLE hEvent, DWORD* pdwCookie);
    HRESULT UnregisterAdaptersChangedEvent(DWORD dwCookie);
}

extern (Windows) nothrow HRESULT DXGIDeclareAdapterRemovalSupport();

alias DXGI_ADAPTER_FLAG3 = uint;
enum : DXGI_ADAPTER_FLAG3
{
    DXGI_ADAPTER_FLAG3_NONE = 0,
    DXGI_ADAPTER_FLAG3_REMOTE = 1,
    DXGI_ADAPTER_FLAG3_SOFTWARE = 2,
    DXGI_ADAPTER_FLAG3_ACG_COMPATIBLE = 4,
    DXGI_ADAPTER_FLAG3_SUPPORT_MONITORED_FENCES = 8,
    DXGI_ADAPTER_FLAG3_SUPPORT_NON_MONITORED_FENCES = 0x10,
    DXGI_ADAPTER_FLAG3_KEYED_MUTEX_CONFORMANCE = 0x20,
    DXGI_ADAPTER_FLAG3_FORCE_DWORD = 0xffffffff
}

struct DXGI_ADAPTER_DESC3
{
    WCHAR[128] Description;
    uint VendorId;
    uint DeviceId;
    uint SubSysId;
    uint Revision;
    size_t DedicatedVideoMemory;
    size_t DedicatedSystemMemory;
    size_t SharedSystemMemory;
    LUID AdapterLuid;
    DXGI_ADAPTER_FLAG3 Flags;
    DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity;
    DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity;
}

struct DXGI_OUTPUT_DESC1
{
    WCHAR[32] DeviceName;
    RECT DesktopCoordinates;
    bool AttachedToDesktop;
    DXGI_MODE_ROTATION Rotation;
    HANDLE Monitor;
    uint BitsPerColor;
    DXGI_COLOR_SPACE_TYPE ColorSpace;
    float[2] RedPrimary;
    float[2] GreenPrimary;
    float[2] BluePrimary;
    float[2] WhitePoint;
    float MinLuminance;
    float MaxLuminance;
    float MaxFullFrameLuminance;
}

alias DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS = uint;
enum : DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS
{
    DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_FULLSCREEN = 1,
    DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_WINDOWED = 2,
    DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_CURSOR_STRETCHED = 4
}

alias DXGI_GPU_PREFERENCE = uint;
enum : DXGI_GPU_PREFERENCE
{
    DXGI_GPU_PREFERENCE_UNSPECIFIED = 0,
    DXGI_GPU_PREFERENCE_MINIMUM_POWER = (DXGI_GPU_PREFERENCE_UNSPECIFIED + 1),
    DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE = (DXGI_GPU_PREFERENCE_MINIMUM_POWER + 1)
}