diff --git a/include/Makefile.in b/include/Makefile.in index 6bc63dea2d7..41a23d3e08c 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -69,6 +69,7 @@ IDL_SRCS = \ dxgi.idl \ dxgi1_2.idl \ dxgi1_3.idl \ + dxgitype.idl \ dxva2api.idl \ dyngraph.idl \ endpointvolume.idl \ @@ -369,7 +370,6 @@ HEADER_SRCS = \ dxerr9.h \ dxfile.h \ dxgiformat.h \ - dxgitype.h \ errorrep.h \ errors.h \ evcode.h \ diff --git a/include/dxgi.idl b/include/dxgi.idl index b35c8911889..b2e53e309e6 100644 --- a/include/dxgi.idl +++ b/include/dxgi.idl @@ -18,7 +18,7 @@ import "oaidl.idl"; import "ocidl.idl"; -import "dxgitype.h"; +import "dxgitype.idl"; const UINT _FACDXGI = 0x87a; diff --git a/include/dxgitype.h b/include/dxgitype.idl similarity index 58% rename from include/dxgitype.h rename to include/dxgitype.idl index 13df04641d8..6e9ac9b4b3d 100644 --- a/include/dxgitype.h +++ b/include/dxgitype.idl @@ -16,55 +16,63 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __dxgitype_h__ -#define __dxgitype_h__ +import "dxgiformat.h"; -#include "dxgiformat.h" +cpp_quote("#if 0") +typedef unsigned int UINT; +typedef long BOOL; +cpp_quote("#endif") -#ifndef D3DCOLORVALUE_DEFINED -typedef struct _D3DCOLORVALUE { +typedef enum DXGI_MODE_ROTATION +{ + DXGI_MODE_ROTATION_UNSPECIFIED = 0x0, + DXGI_MODE_ROTATION_IDENTITY = 0x1, + DXGI_MODE_ROTATION_ROTATE90 = 0x2, + DXGI_MODE_ROTATION_ROTATE180 = 0x3, + DXGI_MODE_ROTATION_ROTATE270 = 0x4, +} DXGI_MODE_ROTATION; + +typedef enum DXGI_MODE_SCANLINE_ORDER +{ + DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0x0, + DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 0x1, + DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 0x2, + DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 0x3, +} DXGI_MODE_SCANLINE_ORDER; + +typedef enum DXGI_MODE_SCALING +{ + DXGI_MODE_SCALING_UNSPECIFIED = 0x0, + DXGI_MODE_SCALING_CENTERED = 0x1, + DXGI_MODE_SCALING_STRETCHED = 0x2, +} DXGI_MODE_SCALING; + +cpp_quote("#ifndef D3DCOLORVALUE_DEFINED") +cpp_quote("#define D3DCOLORVALUE_DEFINED") +typedef struct _D3DCOLORVALUE +{ float r; float g; float b; float a; } D3DCOLORVALUE; -#define D3DCOLORVALUE_DEFINED -#endif - +cpp_quote("#endif") typedef D3DCOLORVALUE DXGI_RGBA; -typedef struct DXGI_SAMPLE_DESC { +typedef struct DXGI_SAMPLE_DESC +{ UINT Count; UINT Quality; } DXGI_SAMPLE_DESC; -typedef enum DXGI_MODE_ROTATION { - DXGI_MODE_ROTATION_UNSPECIFIED = 0, - DXGI_MODE_ROTATION_IDENTITY = 1, - DXGI_MODE_ROTATION_ROTATE90 = 2, - DXGI_MODE_ROTATION_ROTATE180 = 3, - DXGI_MODE_ROTATION_ROTATE270 = 4, -} DXGI_MODE_ROTATION; - -typedef enum DXGI_MODE_SCANLINE_ORDER { - DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, - DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, - DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, - DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3, -} DXGI_MODE_SCANLINE_ORDER; - -typedef enum DXGI_MODE_SCALING { - DXGI_MODE_SCALING_UNSPECIFIED = 0, - DXGI_MODE_SCALING_CENTERED = 1, - DXGI_MODE_SCALING_STRETCHED = 2, -} DXGI_MODE_SCALING; - -typedef struct DXGI_RATIONAL { +typedef struct DXGI_RATIONAL +{ UINT Numerator; UINT Denominator; } DXGI_RATIONAL; -typedef struct DXGI_MODE_DESC { +typedef struct DXGI_MODE_DESC +{ UINT Width; UINT Height; DXGI_RATIONAL RefreshRate; @@ -73,7 +81,8 @@ typedef struct DXGI_MODE_DESC { DXGI_MODE_SCALING Scaling; } DXGI_MODE_DESC; -typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES { +typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES +{ BOOL ScaleAndOffsetSupported; float MaxConvertedValue; float MinConvertedValue; @@ -81,16 +90,16 @@ typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES { float ControlPointPositions[1025]; } DXGI_GAMMA_CONTROL_CAPABILITIES; -typedef struct DXGI_RGB { +typedef struct DXGI_RGB +{ float Red; float Green; float Blue; } DXGI_RGB; -typedef struct DXGI_GAMMA_CONTROL { +typedef struct DXGI_GAMMA_CONTROL +{ DXGI_RGB Scale; DXGI_RGB Offset; DXGI_RGB GammaCurve[1025]; } DXGI_GAMMA_CONTROL; - -#endif