| 1 | // |
| 2 | // Copyright (C) Microsoft. All rights reserved. |
| 3 | // |
| 4 | #ifndef __dxgitype_h__ |
| 5 | #define __dxgitype_h__ |
| 6 | |
| 7 | #include "dxgicommon.h" |
| 8 | #include "dxgiformat.h" |
| 9 | |
| 10 | #define _FACDXGI 0x87a |
| 11 | #define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code) |
| 12 | #define MAKE_DXGI_STATUS(code) MAKE_HRESULT(0, _FACDXGI, code) |
| 13 | |
| 14 | // DXGI error messages have moved to winerror.h |
| 15 | |
| 16 | #define DXGI_CPU_ACCESS_NONE ( 0 ) |
| 17 | #define DXGI_CPU_ACCESS_DYNAMIC ( 1 ) |
| 18 | #define DXGI_CPU_ACCESS_READ_WRITE ( 2 ) |
| 19 | #define DXGI_CPU_ACCESS_SCRATCH ( 3 ) |
| 20 | #define DXGI_CPU_ACCESS_FIELD 15 |
| 21 | |
| 22 | |
| 23 | typedef struct DXGI_RGB |
| 24 | { |
| 25 | float Red; |
| 26 | float Green; |
| 27 | float Blue; |
| 28 | } DXGI_RGB; |
| 29 | |
| 30 | #ifndef D3DCOLORVALUE_DEFINED |
| 31 | typedef struct _D3DCOLORVALUE { |
| 32 | float r; |
| 33 | float g; |
| 34 | float b; |
| 35 | float a; |
| 36 | } D3DCOLORVALUE; |
| 37 | |
| 38 | #define D3DCOLORVALUE_DEFINED |
| 39 | #endif |
| 40 | |
| 41 | typedef D3DCOLORVALUE DXGI_RGBA; |
| 42 | |
| 43 | typedef struct DXGI_GAMMA_CONTROL |
| 44 | { |
| 45 | DXGI_RGB Scale; |
| 46 | DXGI_RGB Offset; |
| 47 | DXGI_RGB GammaCurve[ 1025 ]; |
| 48 | } DXGI_GAMMA_CONTROL; |
| 49 | |
| 50 | typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES |
| 51 | { |
| 52 | BOOL ScaleAndOffsetSupported; |
| 53 | float MaxConvertedValue; |
| 54 | float MinConvertedValue; |
| 55 | UINT NumGammaControlPoints; |
| 56 | float ControlPointPositions[1025]; |
| 57 | } DXGI_GAMMA_CONTROL_CAPABILITIES; |
| 58 | |
| 59 | typedef enum DXGI_MODE_SCANLINE_ORDER |
| 60 | { |
| 61 | DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, |
| 62 | DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, |
| 63 | DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, |
| 64 | DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3 |
| 65 | } DXGI_MODE_SCANLINE_ORDER; |
| 66 | |
| 67 | typedef enum DXGI_MODE_SCALING |
| 68 | { |
| 69 | DXGI_MODE_SCALING_UNSPECIFIED = 0, |
| 70 | DXGI_MODE_SCALING_CENTERED = 1, |
| 71 | DXGI_MODE_SCALING_STRETCHED = 2 |
| 72 | } DXGI_MODE_SCALING; |
| 73 | |
| 74 | typedef enum DXGI_MODE_ROTATION |
| 75 | { |
| 76 | DXGI_MODE_ROTATION_UNSPECIFIED = 0, |
| 77 | DXGI_MODE_ROTATION_IDENTITY = 1, |
| 78 | DXGI_MODE_ROTATION_ROTATE90 = 2, |
| 79 | DXGI_MODE_ROTATION_ROTATE180 = 3, |
| 80 | DXGI_MODE_ROTATION_ROTATE270 = 4 |
| 81 | } DXGI_MODE_ROTATION; |
| 82 | |
| 83 | typedef struct DXGI_MODE_DESC |
| 84 | { |
| 85 | UINT Width; |
| 86 | UINT Height; |
| 87 | DXGI_RATIONAL RefreshRate; |
| 88 | DXGI_FORMAT Format; |
| 89 | DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; |
| 90 | DXGI_MODE_SCALING Scaling; |
| 91 | } DXGI_MODE_DESC; |
| 92 | |
| 93 | typedef struct DXGI_JPEG_DC_HUFFMAN_TABLE |
| 94 | { |
| 95 | BYTE CodeCounts[12]; |
| 96 | BYTE CodeValues[12]; |
| 97 | } DXGI_JPEG_DC_HUFFMAN_TABLE; |
| 98 | |
| 99 | typedef struct DXGI_JPEG_AC_HUFFMAN_TABLE |
| 100 | { |
| 101 | BYTE CodeCounts[16]; |
| 102 | BYTE CodeValues[162]; |
| 103 | } DXGI_JPEG_AC_HUFFMAN_TABLE; |
| 104 | |
| 105 | typedef struct DXGI_JPEG_QUANTIZATION_TABLE |
| 106 | { |
| 107 | BYTE Elements[64]; |
| 108 | } DXGI_JPEG_QUANTIZATION_TABLE; |
| 109 | |
| 110 | #endif // __dxgitype_h__ |
| 111 | |
| 112 | |