ifndef __dxgitype_h__
define __dxgitype_h__
include dxgiformat.inc

define DXGI_STATUS_OCCLUDED		0x087A0001
define DXGI_STATUS_CLIPPED		0x087A0002
define DXGI_STATUS_NO_REDIRECTION	0x087A0004
define DXGI_STATUS_NO_DESKTOP_ACCESS	0x087A0005
define DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE 0x087A0006
define DXGI_STATUS_MODE_CHANGED		0x087A0007
define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS 0x087A0008

define DXGI_ERROR_INVALID_CALL		0x887A0001
define DXGI_ERROR_NOT_FOUND		0x887A0002
define DXGI_ERROR_MORE_DATA		0x887A0003
define DXGI_ERROR_UNSUPPORTED		0x887A0004
define DXGI_ERROR_DEVICE_REMOVED	0x887A0005
define DXGI_ERROR_DEVICE_HUNG		0x887A0006
define DXGI_ERROR_DEVICE_RESET		0x887A0007
define DXGI_ERROR_WAS_STILL_DRAWING	0x887A000A
define DXGI_ERROR_FRAME_STATISTICS_DISJOINT 0x887A000B
define DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE 0x887A000C
define DXGI_ERROR_DRIVER_INTERNAL_ERROR 0x887A0020
define DXGI_ERROR_NONEXCLUSIVE		0x887A0021
define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE 0x887A0022
define DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED 0x887A0023
define DXGI_ERROR_REMOTE_OUTOFMEMORY	0x887A0024
define DXGI_ERROR_ACCESS_LOST		0x887A0026
define DXGI_ERROR_WAIT_TIMEOUT		0x887A0027
define DXGI_ERROR_SESSION_DISCONNECTED	0x887A0028
define DXGI_ERROR_RESTRICT_TO_OUTPUT_STALE 0x887A0029
define DXGI_ERROR_CANNOT_PROTECT_CONTENT 0x887A002A
define DXGI_ERROR_ACCESS_DENIED		0x887A002B
define DXGI_ERROR_NAME_ALREADY_EXISTS	0x887A002C
define DXGI_ERROR_SDK_COMPONENT_MISSING 0x887A002D


DXGI_CPU_ACCESS_NONE	equ ( 0 )
DXGI_CPU_ACCESS_DYNAMIC equ ( 1 )
DXGI_CPU_ACCESS_READ_WRITE equ ( 2 )
DXGI_CPU_ACCESS_SCRATCH equ ( 3 )
DXGI_CPU_ACCESS_FIELD	equ 15

DXGI_USAGE_SHADER_INPUT equ ( 1L SHL (0 + 4) )
DXGI_USAGE_RENDER_TARGET_OUTPUT equ ( 1L SHL (1 + 4) )
DXGI_USAGE_BACK_BUFFER	equ ( 1L SHL (2 + 4) )
DXGI_USAGE_SHARED	equ ( 1L SHL (3 + 4) )
DXGI_USAGE_READ_ONLY	equ ( 1L SHL (4 + 4) )
DXGI_USAGE_DISCARD_ON_PRESENT equ ( 1L SHL (5 + 4) )
DXGI_USAGE_UNORDERED_ACCESS equ ( 1L SHL (6 + 4) )

.pragma pack(push, size_t)

DXGI_RGB		STRUC
Red			REAL4 ?
Green			REAL4 ?
Blue			REAL4 ?
DXGI_RGB		ENDS

DXGI_GAMMA_CONTROL	STRUC
Scale			DXGI_RGB <>
_Offset			DXGI_RGB <>
GammaCurve		DXGI_RGB  1025	dup(<>)
DXGI_GAMMA_CONTROL	ENDS

DXGI_GAMMA_CONTROL_CAPABILITIES STRUC
ScaleAndOffsetSupported BOOL ?
MaxConvertedValue	REAL4 ?
MinConvertedValue	REAL4 ?
NumGammaControlPoints	UINT ?
ControlPointPositions	REAL4 1025 dup(?)
DXGI_GAMMA_CONTROL_CAPABILITIES ENDS

DXGI_RATIONAL		STRUC
Numerator		UINT ?
Denominator		UINT ?
DXGI_RATIONAL		ENDS

DXGI_MODE_SCANLINE_ORDER typedef SDWORD
DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED equ 0
DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE equ 1
DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST equ 2
DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST equ 3

DXGI_MODE_SCALING	typedef SDWORD
DXGI_MODE_SCALING_UNSPECIFIED equ 0
DXGI_MODE_SCALING_CENTERED equ 1
DXGI_MODE_SCALING_STRETCHED equ 2

DXGI_MODE_ROTATION	typedef SDWORD
DXGI_MODE_ROTATION_UNSPECIFIED equ 0
DXGI_MODE_ROTATION_IDENTITY equ 1
DXGI_MODE_ROTATION_ROTATE90 equ 2
DXGI_MODE_ROTATION_ROTATE180 equ 3
DXGI_MODE_ROTATION_ROTATE270 equ 4

DXGI_MODE_DESC		STRUC
Width			UINT ?
Height			UINT ?
RefreshRate		DXGI_RATIONAL <>
Format			DXGI_FORMAT ?
ScanlineOrdering	DXGI_MODE_SCANLINE_ORDER ?
Scaling			DXGI_MODE_SCALING ?
DXGI_MODE_DESC		ENDS

DXGI_SAMPLE_DESC	STRUC
Count			UINT ?
Quality			UINT ?
DXGI_SAMPLE_DESC	ENDS

.pragma pack(pop)

endif
