Some classes in the file declare overloaded functions, and this causes a
C compiler to fail on module including dwrite_1.h.  This commit fixes
that.

No changes for compilation using C++ mode.

Signed-off-by: ‡Ruslan Garipov <[email protected]>
---
 mingw-w64-headers/include/dwrite_1.h | 651 ++++++++-------------------
 1 file changed, 188 insertions(+), 463 deletions(-)


diff --git a/mingw-w64-headers/include/dwrite_1.h b/mingw-w64-headers/include/dwrite_1.h
index 52de1fc75b..00c6b7d103 100644
--- a/mingw-w64-headers/include/dwrite_1.h
+++ b/mingw-w64-headers/include/dwrite_1.h
@@ -9,12 +9,57 @@
 
 #include <dwrite.h>
 
-enum DWRITE_OUTLINE_THRESHOLD {
+#ifndef __IDWriteFont1_FWD_DEFINED__
+#define __IDWriteFont1_FWD_DEFINED__
+typedef struct IDWriteFont1 IDWriteFont1;
+#endif
+
+#ifndef __IDWriteFontFace1_FWD_DEFINED__
+#define __IDWriteFontFace1_FWD_DEFINED__
+typedef struct IDWriteFontFace1 IDWriteFontFace1;
+#endif
+
+#ifndef __IDWriteRenderingParams1_FWD_DEFINED__
+#define __IDWriteRenderingParams1_FWD_DEFINED__
+typedef struct IDWriteRenderingParams1 IDWriteRenderingParams1;
+#endif
+
+#ifndef __IDWriteTextAnalysisSource1_FWD_DEFINED__
+#define __IDWriteTextAnalysisSource1_FWD_DEFINED__
+typedef struct IDWriteTextAnalysisSource1 IDWriteTextAnalysisSource1;
+#endif
+
+#ifndef __IDWriteTextAnalysisSink1_FWD_DEFINED__
+#define __IDWriteTextAnalysisSink1_FWD_DEFINED__
+typedef struct IDWriteTextAnalysisSink1 IDWriteTextAnalysisSink1;
+#endif
+
+#ifndef __IDWriteTextAnalyzer1_FWD_DEFINED__
+#define __IDWriteTextAnalyzer1_FWD_DEFINED__
+typedef struct IDWriteTextAnalyzer1 IDWriteTextAnalyzer1;
+#endif
+
+#ifndef __IDWriteTextLayout1_FWD_DEFINED__
+#define __IDWriteTextLayout1_FWD_DEFINED__
+typedef struct IDWriteTextLayout1 IDWriteTextLayout1;
+#endif
+
+#ifndef __IDWriteFactory1_FWD_DEFINED__
+#define __IDWriteFactory1_FWD_DEFINED__
+typedef struct IDWriteFactory1 IDWriteFactory1;
+#endif
+
+#ifndef __IDWriteBitmapRenderTarget1_FWD_DEFINED__
+#define __IDWriteBitmapRenderTarget1_FWD_DEFINED__
+typedef struct IDWriteBitmapRenderTarget1 IDWriteBitmapRenderTarget1;
+#endif
+
+typedef enum DWRITE_OUTLINE_THRESHOLD {
     DWRITE_OUTLINE_THRESHOLD_ANTIALIASED,
     DWRITE_OUTLINE_THRESHOLD_ALIASED
-};
+} DWRITE_OUTLINE_THRESHOLD;
 
-enum DWRITE_BASELINE
+typedef enum DWRITE_BASELINE
 {
     DWRITE_BASELINE_DEFAULT,
     DWRITE_BASELINE_ROMAN,
@@ -25,40 +70,40 @@ enum DWRITE_BASELINE
     DWRITE_BASELINE_IDEOGRAPHIC_TOP,
     DWRITE_BASELINE_MINIMUM,
     DWRITE_BASELINE_MAXIMUM,
-};
+} DWRITE_BASELINE;
 
-enum DWRITE_GLYPH_ORIENTATION_ANGLE
+typedef enum DWRITE_GLYPH_ORIENTATION_ANGLE
 {
     DWRITE_GLYPH_ORIENTATION_ANGLE_0_DEGREES,
     DWRITE_GLYPH_ORIENTATION_ANGLE_90_DEGREES,
     DWRITE_GLYPH_ORIENTATION_ANGLE_180_DEGREES,
     DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES,
-};
+} DWRITE_GLYPH_ORIENTATION_ANGLE;
 
-enum DWRITE_TEXT_ANTIALIAS_MODE
+typedef enum DWRITE_TEXT_ANTIALIAS_MODE
 {
     DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE,
     DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE
-};
+} DWRITE_TEXT_ANTIALIAS_MODE;
 
-enum DWRITE_VERTICAL_GLYPH_ORIENTATION
+typedef enum DWRITE_VERTICAL_GLYPH_ORIENTATION
 {
     DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT,
     DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED
-};
+} DWRITE_VERTICAL_GLYPH_ORIENTATION;
 
-struct DWRITE_CARET_METRICS {
+typedef struct DWRITE_CARET_METRICS {
     INT16 slopeRise;
     INT16 slopeRun;
     INT16 offset;
-};
+} DWRITE_CARET_METRICS;
 
-struct DWRITE_UNICODE_RANGE {
+typedef struct DWRITE_UNICODE_RANGE {
     UINT32 first;
     UINT32 last;
-};
+} DWRITE_UNICODE_RANGE;
 
-struct DWRITE_FONT_METRICS1
+typedef struct DWRITE_FONT_METRICS1
 #ifdef __cplusplus
     : public DWRITE_FONT_METRICS
 #endif
@@ -88,9 +133,9 @@ struct DWRITE_FONT_METRICS1
     INT16 superscriptSizeX;
     INT16 superscriptSizeY;
     WINBOOL hasTypographicMetrics;
-};
+} DWRITE_FONT_METRICS1;
 
-struct DWRITE_SCRIPT_PROPERTIES
+typedef struct DWRITE_SCRIPT_PROPERTIES
 {
     UINT32 isoScriptCode;
     UINT32 isoScriptNumber;
@@ -104,9 +149,9 @@ struct DWRITE_SCRIPT_PROPERTIES
     UINT32 isConnectedWriting           : 1;
     UINT32 isCursiveWriting             : 1;
     UINT32 reserved                     : 25;
-};
+} DWRITE_SCRIPT_PROPERTIES;
 
-struct DWRITE_JUSTIFICATION_OPPORTUNITY
+typedef struct DWRITE_JUSTIFICATION_OPPORTUNITY
 {
     FLOAT expansionMinimum;
     FLOAT expansionMaximum;
@@ -118,9 +163,9 @@ struct DWRITE_JUSTIFICATION_OPPORTUNITY
     UINT32 applyToLeadingEdge        : 1;
     UINT32 applyToTrailingEdge       : 1;
     UINT32 reserved                  : 12;
-};
+} DWRITE_JUSTIFICATION_OPPORTUNITY;
 
-union DWRITE_PANOSE {
+typedef union DWRITE_PANOSE {
     UINT8 values[10];
     UINT8 familyKind;
     struct {
@@ -171,7 +216,9 @@ union DWRITE_PANOSE {
         UINT8 aspectRatio163;
         UINT8 aspectRatio211;
     } symbol;
-};
+} DWRITE_PANOSE;
+
+#ifndef D2D_USE_C_DEFINITIONS
 
 #undef  INTERFACE
 #define INTERFACE IDWriteFont1
@@ -179,159 +226,101 @@ DECLARE_INTERFACE_(IDWriteFont1,IDWriteFont)
 {
     BEGIN_INTERFACE
 
-#ifndef __cplusplus
-    /* IUnknown methods */
-    STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG, Release)(THIS) PURE;
-
-    /* IDWriteFont methods */
-    STDMETHOD(GetFontFamily)(THIS_
-        IDWriteFontFamily **fontFamily) PURE;
+    STDMETHOD_(void, GetMetrics)(DWRITE_FONT_METRICS1 *fontMetrics) PURE;
 
-    STDMETHOD_(DWRITE_FONT_WEIGHT, GetWeight)(THIS) PURE;
-    STDMETHOD_(DWRITE_FONT_STRETCH, GetStretch)(THIS) PURE;
-    STDMETHOD_(DWRITE_FONT_STYLE, GetStyle)(THIS) PURE;
-    STDMETHOD_(WINBOOL, IsSymbolFont)(THIS) PURE;
+    STDMETHOD_(void, GetPanose)(DWRITE_PANOSE *panose) PURE;
 
-    STDMETHOD(GetFaceNames)(THIS_
-        IDWriteLocalizedStrings **names) PURE;
-
-    STDMETHOD(GetInformationalStrings)(THIS_
-        DWRITE_INFORMATIONAL_STRING_ID informationalStringID,
-        IDWriteLocalizedStrings **informationalStrings,
-        WINBOOL *exists) PURE;
-
-    STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)(THIS) PURE;
+    STDMETHOD(GetUnicodeRanges)(UINT32 maxCount,
+        DWRITE_UNICODE_RANGE *ranges,
+        UINT32 *actualCount) PURE;
 
-    STDMETHOD_(void, GetMetrics)(THIS_
-        DWRITE_FONT_METRICS *fontMetrics) PURE;
+    END_INTERFACE
+};
 
-    STDMETHOD(HasCharacter)(THIS_
-        UINT32 unicodeValue,
-        WINBOOL *exists) PURE;
+#else  /* D2D_USE_C_DEFINITIONS */
 
-    STDMETHOD(CreateFontFace)(THIS_
-        IDWriteFontFace **fontFace) PURE;
-#endif
+typedef struct IDWriteFont1Vtbl
+{
+    IDWriteFontVtbl Base;
 
-    STDMETHOD_(void, GetMetrics)(THIS_
+    STDMETHOD_(void, GetMetrics)(IDWriteFont1 *This,
         DWRITE_FONT_METRICS1 *fontMetrics) PURE;
 
-    STDMETHOD_(void, GetPanose)(THIS_
+    STDMETHOD_(void, GetPanose)(IDWriteFont1 *This,
         DWRITE_PANOSE *panose) PURE;
 
-    STDMETHOD(GetUnicodeRanges)(THIS_
+    STDMETHOD(GetUnicodeRanges)(IDWriteFont1 *This,
         UINT32 maxCount,
         DWRITE_UNICODE_RANGE *ranges,
         UINT32 *actualCount) PURE;
+}
+IDWriteFont1Vtbl;
 
-    END_INTERFACE
+interface IDWriteFont1
+{
+    const IDWriteFont1Vtbl *lpVtbl;
 };
 
+#endif  /* D2D_USE_C_DEFINITIONS */
+
 __CRT_UUID_DECL(IDWriteFont1, 0xacd16696,0x8c14,0x4f5d,0x87,0x7e,0xfe,0x3f,0xc1,0xd3,0x27,0x38);
 
+#ifndef D2D_USE_C_DEFINITIONS
+
 #undef  INTERFACE
 #define INTERFACE IDWriteFontFace1
 DECLARE_INTERFACE_(IDWriteFontFace1, IDWriteFontFace)
 {
     BEGIN_INTERFACE
 
-#ifndef __cplusplus
-    /* IUnknown methods */
-    STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG, Release)(THIS) PURE;
-
-    /* IDWriteFontFace methods */
-    STDMETHOD_(DWRITE_FONT_FACE_TYPE, GetType)(THIS) PURE;
-
-    STDMETHOD(GetFiles)(THIS_
-        UINT32 *numberOfFiles,
-        IDWriteFontFile **fontFiles) PURE;
-
-    STDMETHOD_(UINT32, GetIndex)(THIS) PURE;
-    STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)(THIS) PURE;
-    STDMETHOD_(WINBOOL, IsSymbolFont)(THIS) PURE;
-
-    STDMETHOD_(void, GetMetrics)(THIS_
-        DWRITE_FONT_METRICS *fontFaceMetrics) PURE;
-
-    STDMETHOD_(UINT16, GetGlyphCount)(THIS) PURE;
-
-    STDMETHOD(GetDesignGlyphMetrics)(THIS_
-        UINT16 const *glyphIndices,
-        UINT32 glyphCount,
-        DWRITE_GLYPH_METRICS *glyphMetrics,
-        WINBOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE;
-
-    STDMETHOD(GetGlyphIndices)(THIS_
-        UINT32 const *codePoints,
-        UINT32 codePointCount,
-        UINT16 *glyphIndices) PURE;
-
-    STDMETHOD(TryGetFontTable)(THIS_
-        UINT32 openTypeTableTag,
-        const void **tableData,
-        UINT32 *tableSize,
-        void **tableContext,
-        WINBOOL *exists) PURE;
-
-    STDMETHOD_(void, ReleaseFontTable)(THIS_
-        void *tableContext) PURE;
-
-    STDMETHOD(GetGlyphRunOutline)(THIS_
-        FLOAT emSize,
-        UINT16 const *glyphIndices,
-        FLOAT const *glyphAdvances,
-        DWRITE_GLYPH_OFFSET const *glyphOffsets,
-        UINT32 glyphCount,
-        WINBOOL isSideways,
-        WINBOOL isRightToLeft,
-        IDWriteGeometrySink *geometrySink) PURE;
-
-    STDMETHOD(GetRecommendedRenderingMode)(THIS_
-        FLOAT emSize,
-        FLOAT pixelsPerDip,
-        DWRITE_MEASURING_MODE measuringMode,
-        IDWriteRenderingParams *renderingParams,
-        DWRITE_RENDERING_MODE *renderingMode) PURE;
-
-    STDMETHOD(GetGdiCompatibleMetrics)(THIS_
-        FLOAT emSize,
-        FLOAT pixelsPerDip,
-        DWRITE_MATRIX const *transform,
-        DWRITE_FONT_METRICS *fontFaceMetrics) PURE;
+    STDMETHOD_(void, GetMetrics)(DWRITE_FONT_METRICS1*) PURE;
+    STDMETHOD(GetGdiCompatibleMetrics)(FLOAT,FLOAT,DWRITE_MATRIX const*,DWRITE_FONT_METRICS1*) PURE;
+    STDMETHOD_(void, GetCaretMetrics)(DWRITE_CARET_METRICS*) PURE;
+    STDMETHOD(GetUnicodeRanges)(UINT32, DWRITE_UNICODE_RANGE*,UINT32*) PURE;
+    STDMETHOD_(BOOL, IsMonospacedFont)(void) PURE;
+    STDMETHOD(GetDesignGlyphAdvances)(UINT32,UINT16 const*,INT32*,BOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE;
+    STDMETHOD(GetGdiCompatibleGlyphAdvances)(FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL,BOOL,UINT32,
+            UINT16 const*,INT32*) PURE;
+    STDMETHOD(GetKerningPairAdjustments)(UINT32,UINT16 const*,INT32*) PURE;
+    STDMETHOD_(BOOL, HasKerningPairs)(void);
+    STDMETHOD(GetRecommendedRenderingMode)(FLOAT,FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL,
+            DWRITE_OUTLINE_THRESHOLD,DWRITE_MEASURING_MODE,DWRITE_RENDERING_MODE*) PURE;
+    STDMETHOD(GetVerticalGlyphVariants)(UINT32,UINT16 const*,UINT16*);
+    STDMETHOD_(BOOL, HasVerticalGlyphVariants)(void);
 
+    END_INTERFACE
+};
 
-    STDMETHOD(GetGdiCompatibleGlyphMetrics)(THIS_
-        FLOAT emSize,
-        FLOAT pixelsPerDip,
-        DWRITE_MATRIX const *transform,
-        WINBOOL useGdiNatural,
-        UINT16 const *glyphIndices,
-        UINT32 glyphCount,
-        DWRITE_GLYPH_METRICS *glyphMetrics,
-        WINBOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE;
-#endif
+#else  /* D2D_USE_C_DEFINITIONS */
 
-    /* IDWriteFontFace1 methods */
-    STDMETHOD_(void, GetMetrics)(THIS_ DWRITE_FONT_METRICS1*) PURE;
-    STDMETHOD(GetGdiCompatibleMetrics)(THIS_ FLOAT,FLOAT,DWRITE_MATRIX const*,DWRITE_FONT_METRICS1*) PURE;
-    STDMETHOD_(void, GetCaretMetrics)(THIS_ DWRITE_CARET_METRICS*) PURE;
-    STDMETHOD(GetUnicodeRanges)(THIS_ UINT32, DWRITE_UNICODE_RANGE*,UINT32*) PURE;
-    STDMETHOD_(BOOL, IsMonospacedFont)(THIS) PURE;
-    STDMETHOD(GetDesignGlyphAdvances)(THIS_ UINT32,UINT16 const*,INT32*,BOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE;
-    STDMETHOD(GetGdiCompatibleGlyphAdvances)(THIS_ FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL,BOOL,UINT32,
+typedef struct IDWriteFontFace1Vtbl
+{
+    IDWriteFontFaceVtbl Base;
+
+    STDMETHOD_(void, GetMetrics)(IDWriteFontFace1 *This, DWRITE_FONT_METRICS1*) PURE;
+    STDMETHOD(GetGdiCompatibleMetrics)(IDWriteFontFace1 *This, FLOAT,FLOAT,DWRITE_MATRIX const*,DWRITE_FONT_METRICS1*) PURE;
+    STDMETHOD_(void, GetCaretMetrics)(IDWriteFontFace1 *This, DWRITE_CARET_METRICS*) PURE;
+    STDMETHOD(GetUnicodeRanges)(IDWriteFontFace1 *This, UINT32, DWRITE_UNICODE_RANGE*,UINT32*) PURE;
+    STDMETHOD_(BOOL, IsMonospacedFont)(IDWriteFontFace1 *This) PURE;
+    STDMETHOD(GetDesignGlyphAdvances)(IDWriteFontFace1 *This, UINT32,UINT16 const*,INT32*,BOOL isSideways __MINGW_DEF_ARG_VAL(FALSE)) PURE;
+    STDMETHOD(GetGdiCompatibleGlyphAdvances)(IDWriteFontFace1 *This, FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL,BOOL,UINT32,
             UINT16 const*,INT32*) PURE;
-    STDMETHOD(GetKerningPairAdjustments)(THIS_ UINT32,UINT16 const*,INT32*) PURE;
-    STDMETHOD_(BOOL, HasKerningPairs)(THIS);
-    STDMETHOD(GetRecommendedRenderingMode)(FLOAT,FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL,
+    STDMETHOD(GetKerningPairAdjustments)(IDWriteFontFace1 *This, UINT32,UINT16 const*,INT32*) PURE;
+    STDMETHOD_(BOOL, HasKerningPairs)(IDWriteFontFace1 *This);
+    STDMETHOD(GetRecommendedRenderingMode)(IDWriteFontFace1 *This, FLOAT,FLOAT,FLOAT,DWRITE_MATRIX const*,BOOL,
             DWRITE_OUTLINE_THRESHOLD,DWRITE_MEASURING_MODE,DWRITE_RENDERING_MODE*) PURE;
-    STDMETHOD(GetVerticalGlyphVariants)(THIS_ UINT32,UINT16 const*,UINT16*);
-    STDMETHOD_(BOOL, HasVerticalGlyphVariants)(THIS);
+    STDMETHOD(GetVerticalGlyphVariants)(IDWriteFontFace1 *This, UINT32,UINT16 const*,UINT16*);
+    STDMETHOD_(BOOL, HasVerticalGlyphVariants)(IDWriteFontFace1 *This);
+}
+IDWriteFontFace1Vtbl;
+
+interface IDWriteFontFace1
+{
+    const IDWriteFontFace1Vtbl *lpVtbl;
 };
 
+#endif  /* D2D_USE_C_DEFINITIONS */
+
 __CRT_UUID_DECL(IDWriteFontFace1, 0xa71efdb4,0x9fdb,0x4838,0xad,0x90,0xcf,0xc3,0xbe,0x8c,0x3d,0xaf);
 
 #undef  INTERFACE
@@ -657,366 +646,99 @@ DECLARE_INTERFACE_(IDWriteTextAnalyzer1,IDWriteTextAnalyzer)
 
 __CRT_UUID_DECL(IDWriteTextAnalyzer1, 0x80dad800,0xe21f,0x4e83,0x4e,0xce,0xbf,0xcc,0xe5,0x00,0xdb,0x7c);
 
+#ifndef D2D_USE_C_DEFINITIONS
+
 #undef  INTERFACE
 #define INTERFACE IDWriteTextLayout1
 DECLARE_INTERFACE_(IDWriteTextLayout1,IDWriteTextLayout)
 {
     BEGIN_INTERFACE
 
-#ifndef __cplusplus
-    /* IUnknown methods */
-    STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG, Release)(THIS) PURE;
-
-    /* IDWriteTextFormat methods */
-    STDMETHOD(SetTextAlignment)(THIS_
-            DWRITE_TEXT_ALIGNMENT textAlignment) PURE;
-    STDMETHOD(SetParagraphAlignment)(THIS_
-            DWRITE_PARAGRAPH_ALIGNMENT paragraphAlignment) PURE;
-    STDMETHOD(SetWordWrapping)(THIS_
-            DWRITE_WORD_WRAPPING wordWrapping) PURE;
-    STDMETHOD(SetReadingDirection)(THIS_
-            DWRITE_READING_DIRECTION readingDirection) PURE;
-    STDMETHOD(SetFlowDirection)(THIS_
-            DWRITE_FLOW_DIRECTION flowDirection) PURE;
-    STDMETHOD(SetIncrementalTabStop)(THIS_
-            FLOAT incrementalTabStop) PURE;
-    STDMETHOD(SetTrimming)(THIS_
-            DWRITE_TRIMMING const *trimmingOptions,
-            IDWriteInlineObject *trimmingSign) PURE;
-    STDMETHOD(SetLineSpacing)(THIS_
-            DWRITE_LINE_SPACING_METHOD lineSpacingMethod,
-            FLOAT lineSpacing,
-            FLOAT baseline) PURE;
-    STDMETHOD_(DWRITE_TEXT_ALIGNMENT, GetTextAlignment)(THIS) PURE;
-    STDMETHOD_(DWRITE_PARAGRAPH_ALIGNMENT, GetParagraphAlignment)(THIS) PURE;
-    STDMETHOD_(DWRITE_WORD_WRAPPING, GetWordWrapping)(THIS) PURE;
-    STDMETHOD_(DWRITE_READING_DIRECTION, GetReadingDirection)(THIS) PURE;
-    STDMETHOD_(DWRITE_FLOW_DIRECTION, GetFlowDirection)(THIS) PURE;
-    STDMETHOD_(FLOAT, GetIncrementalTabStop)(THIS) PURE;
-    STDMETHOD(GetTrimming)(THIS_
-            DWRITE_TRIMMING* trimmingOptions,
-            IDWriteInlineObject **trimmingSign) PURE;
-    STDMETHOD(GetLineSpacing)(THIS_
-            DWRITE_LINE_SPACING_METHOD *lineSpacingMethod,
-            FLOAT *lineSpacing,
-            FLOAT *baseline) PURE;
-    STDMETHOD(GetFontCollection)(THIS_
-            IDWriteFontCollection **fontCollection) PURE;
-    STDMETHOD_(UINT32, GetFontFamilyNameLength)(THIS) PURE;
-    STDMETHOD(GetFontFamilyName)(THIS_
-            WCHAR *fontFamilyName,
-            UINT32 nameSize) PURE;
-    STDMETHOD_(DWRITE_FONT_WEIGHT, GetFontWeight)(THIS) PURE;
-    STDMETHOD_(DWRITE_FONT_STYLE, GetFontStyle)(THIS) PURE;
-    STDMETHOD_(DWRITE_FONT_STRETCH, GetFontStretch)(THIS) PURE;
-    STDMETHOD_(FLOAT, GetFontSize)(THIS) PURE;
-    STDMETHOD_(UINT32, GetLocaleNameLength)(THIS) PURE;
-    STDMETHOD(GetLocaleName)(THIS_
-            WCHAR *localeName,
-            UINT32 nameSize) PURE;
-
-    /* IDWriteTextLayout methods */
-    STDMETHOD(SetMaxWidth)(THIS_
-            FLOAT maxWidth) PURE;
-    STDMETHOD(SetMaxHeight)(THIS_
-            FLOAT maxHeight) PURE;
-    STDMETHOD(SetFontCollection)(THIS_
-            IDWriteFontCollection *fontCollection,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetFontFamilyName)(THIS_
-            WCHAR const *fontFamilyName,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetFontWeight)(THIS_
-            DWRITE_FONT_WEIGHT fontWeight,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetFontStyle)(THIS_
-            DWRITE_FONT_STYLE fontStyle,
+    STDMETHOD(SetPairKerning)(WINBOOL isPairKerningEnabled,
             DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetFontStretch)(THIS_
-            DWRITE_FONT_STRETCH fontStretch,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetFontSize)(THIS_
-            FLOAT fontSize,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetUnderline)(THIS_
-            WINBOOL hasUnderline,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetStrikethrough)(THIS_
-            WINBOOL hasStrikethrough,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetDrawingEffect)(THIS_
-            IUnknown *drawingEffect,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetInlineObject)(THIS_
-            IDWriteInlineObject *inlineObject,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetTypography)(THIS_
-            IDWriteTypography *typography,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(SetLocaleName)(THIS_
-            WCHAR const *localeName,
-            DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD_(FLOAT, GetMaxWidth)(THIS) PURE;
-    STDMETHOD_(FLOAT, GetMaxHeight)(THIS) PURE;
-    STDMETHOD(GetFontCollection)(THIS_
-            UINT32 currentPosition,
-            IDWriteFontCollection** fontCollection,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetFontFamilyNameLength)(THIS_
-            UINT32 currentPosition,
-            UINT32 *nameLength,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetFontFamilyName)(THIS_
-            UINT32 currentPosition,
-            WCHAR *fontFamilyName,
-            UINT32 nameSize,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetFontWeight)(THIS_
-            UINT32 currentPosition,
-            DWRITE_FONT_WEIGHT *fontWeight,
-            DWRITE_TEXT_RANGE* textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetFontStyle)(THIS_
-            UINT32 currentPosition,
-            DWRITE_FONT_STYLE *fontStyle,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetFontStretch)(THIS_
-            UINT32 currentPosition,
-            DWRITE_FONT_STRETCH* fontStretch,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetFontSize)(THIS_
-            UINT32 currentPosition,
-            FLOAT *fontSize,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetUnderline)(THIS_
-            UINT32 currentPosition,
-            WINBOOL *hasUnderline,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetStrikethrough)(THIS_
-            UINT32 currentPosition,
-            WINBOOL *hasStrikethrough,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetDrawingEffect)(THIS_
-            UINT32 currentPosition,
-            IUnknown **drawingEffect,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetInlineObject)(THIS_
-            UINT32 currentPosition,
-            IDWriteInlineObject **inlineObject,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetTypography)(THIS_
-            UINT32 currentPosition,
-            IDWriteTypography **typography,
-            DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetLocaleNameLength)(THIS_
-            UINT32 currentPosition,
-            UINT32 *nameLength,
+    STDMETHOD(GetPairKerning)(UINT32 position,
+            WINBOOL *isPairKerningEnabled,
             DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(GetLocaleName)(THIS_
-            UINT32 currentPosition,
-            WCHAR *localeName,
-            UINT32 nameSize,
+    STDMETHOD(SetCharacterSpacing)(FLOAT leadingSpacing,
+            FLOAT trailingSpacing,
+            FLOAT minimumAdvance,
+            DWRITE_TEXT_RANGE textRange) PURE;
+    STDMETHOD(GetCharacterSpacing)(FLOAT *leadingSpacing,
+            FLOAT *trailingSpacing,
+            FLOAT *minimumAdvance,
             DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(Draw)(THIS_
-            void *clientDrawingContext,
-            IDWriteTextRenderer *renderer,
-            FLOAT originX,
-            FLOAT originY) PURE;
-    STDMETHOD(GetLineMetrics)(THIS_
-            DWRITE_LINE_METRICS *lineMetrics,
-            UINT32 maxLineCount,
-            UINT32 *actualLineCount) PURE;
-    STDMETHOD(GetMetrics)(THIS_
-            DWRITE_TEXT_METRICS *textMetrics) PURE;
-    STDMETHOD(GetOverhangMetrics)(THIS_
-            DWRITE_OVERHANG_METRICS *overhangs) PURE;
-    STDMETHOD(GetClusterMetrics)(THIS_
-            DWRITE_CLUSTER_METRICS *clusterMetrics,
-            UINT32 maxClusterCount,
-            UINT32 *actualClusterCount) PURE;
-    STDMETHOD(DetermineMinWidth)(THIS_
-            FLOAT *minWidth) PURE;
-    STDMETHOD(HitTestPoint)(THIS_
-            FLOAT pointX,
-            FLOAT pointY,
-            WINBOOL *isTrailingHit,
-            WINBOOL *isInside,
-            DWRITE_HIT_TEST_METRICS *hitTestMetrics) PURE;
-    STDMETHOD(HitTestTextPosition)(THIS_
-            UINT32 textPosition,
-            WINBOOL isTrailingHit,
-            FLOAT *pointX,
-            FLOAT *pointY,
-            DWRITE_HIT_TEST_METRICS *hitTestMetrics) PURE;
-    STDMETHOD(HitTestTextRange)(THIS_
-            UINT32 textPosition,
-            UINT32 textLength,
-            FLOAT originX,
-            FLOAT originY,
-            DWRITE_HIT_TEST_METRICS *hitTestMetrics,
-            UINT32 maxHitTestMetricsCount,
-            UINT32 *actualHitTestMetricsCount) PURE;
-#endif
 
-    /* IDWriteTextLayout1 methods */
-    STDMETHOD(SetPairKerning)(THIS_
+    END_INTERFACE
+};
+
+#else  /* D2D_USE_C_DEFINITIONS */
+
+typedef struct IDWriteTextLayout1Vtbl
+{
+    IDWriteTextLayoutVtbl Base;
+
+    STDMETHOD(SetPairKerning)(IDWriteTextLayout1 *This,
             WINBOOL isPairKerningEnabled,
             DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(GetPairKerning)(THIS_
+    STDMETHOD(GetPairKerning)(IDWriteTextLayout1 *This,
             UINT32 position,
             WINBOOL *isPairKerningEnabled,
             DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
-    STDMETHOD(SetCharacterSpacing)(THIS_
+    STDMETHOD(SetCharacterSpacing)(IDWriteTextLayout1 *This,
             FLOAT leadingSpacing,
             FLOAT trailingSpacing,
             FLOAT minimumAdvance,
             DWRITE_TEXT_RANGE textRange) PURE;
-    STDMETHOD(GetCharacterSpacing)(THIS_
+    STDMETHOD(GetCharacterSpacing)(IDWriteTextLayout1 *This,
             FLOAT *leadingSpacing,
             FLOAT *trailingSpacing,
             FLOAT *minimumAdvance,
             DWRITE_TEXT_RANGE *textRange __MINGW_DEF_ARG_VAL(NULL)) PURE;
+}
+IDWriteTextLayout1Vtbl;
 
-    END_INTERFACE
+interface IDWriteTextLayout1
+{
+    const IDWriteTextLayout1 *lpVtbl;
 };
 
+#endif  /* D2D_USE_C_DEFINITIONS */
+
 __CRT_UUID_DECL(IDWriteTextLayout1, 0x9064d822,0x80a7,0x465c,0xa9,0x86,0xdf,0x65,0xf7,0x8b,0x8f,0xeb)
 
+#ifndef D2D_USE_C_DEFINITIONS
+
 #undef  INTERFACE
 #define INTERFACE IDWriteFactory1
 DECLARE_INTERFACE_(IDWriteFactory1,IDWriteFactory)
 {
     BEGIN_INTERFACE
 
-#ifndef __cplusplus
-    /* IUnknown methods */
-    STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-    STDMETHOD_(ULONG, Release)(THIS) PURE;
+    STDMETHOD(GetEudcFontCollection)(IDWriteFontCollection **fontCollection,
+        BOOL checkForUpdates __MINGW_DEF_ARG_VAL(FALSE)) PURE;
 
-    /* IDWriteFactory methods */
-    STDMETHOD(GetSystemFontCollection)(THIS_
-        IDWriteFontCollection **fontCollection,
-        WINBOOL checkForUpdates __MINGW_DEF_ARG_VAL(FALSE)) PURE;
-
-    STDMETHOD(CreateCustomFontCollection)(THIS_
-        IDWriteFontCollectionLoader *collectionLoader,
-        void const *collectionKey,
-        UINT32 collectionKeySize,
-        IDWriteFontCollection **fontCollection) PURE;
-
-    STDMETHOD(RegisterFontCollectionLoader)(THIS_
-        IDWriteFontCollectionLoader *fontCollectionLoader) PURE;
-
-    STDMETHOD(UnregisterFontCollectionLoader)(THIS_
-        IDWriteFontCollectionLoader *fontCollectionLoader) PURE;
-
-    STDMETHOD(CreateFontFileReference)(THIS_
-        WCHAR const *filePath,
-        FILETIME const *lastWriteTime,
-        IDWriteFontFile **fontFile) PURE;
-
-    STDMETHOD(CreateCustomFontFileReference)(THIS_
-        void const *fontFileReferenceKey,
-        UINT32 fontFileReferenceKeySize,
-        IDWriteFontFileLoader *fontFileLoader,
-        IDWriteFontFile **fontFile) PURE;
-
-    STDMETHOD(CreateFontFace)(THIS_
-        DWRITE_FONT_FACE_TYPE fontFaceType,
-        UINT32 numberOfFiles,
-        IDWriteFontFile *const *fontFiles,
-        UINT32 faceIndex,
-        DWRITE_FONT_SIMULATIONS fontFaceSimulationFlags,
-        IDWriteFontFace **fontFace) PURE;
-
-    STDMETHOD(CreateRenderingParams)(THIS_
-        IDWriteRenderingParams **renderingParams) PURE;
-
-    STDMETHOD(CreateMonitorRenderingParams)(THIS_
-        HMONITOR monitor,
-        IDWriteRenderingParams **renderingParams) PURE;
-
-    STDMETHOD(CreateCustomRenderingParams)(THIS_
-        FLOAT gamma,
+    STDMETHOD(CreateCustomRenderingParams)(FLOAT gamma,
         FLOAT enhancedContrast,
+        FLOAT enhancedContrastGrayscale,
         FLOAT clearTypeLevel,
         DWRITE_PIXEL_GEOMETRY pixelGeometry,
         DWRITE_RENDERING_MODE renderingMode,
-        IDWriteRenderingParams **renderingParams) PURE;
-
-    STDMETHOD(RegisterFontFileLoader)(THIS_
-        IDWriteFontFileLoader *fontFileLoader) PURE;
-
-    STDMETHOD(UnregisterFontFileLoader)(THIS_
-        IDWriteFontFileLoader *fontFileLoader) PURE;
-
-    STDMETHOD(CreateTextFormat)(THIS_
-        WCHAR const *fontFamilyName,
-        IDWriteFontCollection *fontCollection,
-        DWRITE_FONT_WEIGHT fontWeight,
-        DWRITE_FONT_STYLE fontStyle,
-        DWRITE_FONT_STRETCH fontStretch,
-        FLOAT fontSize,
-        WCHAR const *localeName,
-        IDWriteTextFormat **textFormat) PURE;
-
-    STDMETHOD(CreateTypography)(THIS_
-        IDWriteTypography **typography) PURE;
-
-    STDMETHOD(GetGdiInterop)(THIS_
-        IDWriteGdiInterop **gdiInterop) PURE;
-
-    STDMETHOD(CreateTextLayout)(THIS_
-        WCHAR const *string,
-        UINT32 stringLength,
-        IDWriteTextFormat *textFormat,
-        FLOAT maxWidth,
-        FLOAT maxHeight,
-        IDWriteTextLayout **textLayout) PURE;
-
-    STDMETHOD(CreateGdiCompatibleTextLayout)(THIS_
-        WCHAR const *string,
-        UINT32 stringLength,
-        IDWriteTextFormat *textFormat,
-        FLOAT layoutWidth,
-        FLOAT layoutHeight,
-        FLOAT pixelsPerDip,
-        DWRITE_MATRIX const *transform,
-        WINBOOL useGdiNatural,
-        IDWriteTextLayout **textLayout) PURE;
+        IDWriteRenderingParams1 **renderingParams) PURE;
 
-    STDMETHOD(CreateEllipsisTrimmingSign)(THIS_
-        IDWriteTextFormat *textFormat,
-        IDWriteInlineObject **trimmingSign) PURE;
+    END_INTERFACE
+};
 
-    STDMETHOD(CreateTextAnalyzer)(THIS_
-        IDWriteTextAnalyzer **textAnalyzer) PURE;
+#else  /* D2D_USE_C_DEFINITIONS */
 
-    STDMETHOD(CreateNumberSubstitution)(THIS_
-        DWRITE_NUMBER_SUBSTITUTION_METHOD substitutionMethod,
-        WCHAR const *localeName,
-        WINBOOL ignoreUserOverride,
-        IDWriteNumberSubstitution **numberSubstitution) PURE;
-
-    STDMETHOD(CreateGlyphRunAnalysis)(THIS_
-        DWRITE_GLYPH_RUN const *glyphRun,
-        FLOAT pixelsPerDip,
-        DWRITE_MATRIX const *transform,
-        DWRITE_RENDERING_MODE renderingMode,
-        DWRITE_MEASURING_MODE measuringMode,
-        FLOAT baselineOriginX,
-        FLOAT baselineOriginY,
-        IDWriteGlyphRunAnalysis **glyphRunAnalysis) PURE;
-#endif
+typedef struct IDWriteFactory1Vtbl
+{
+    IDWriteFactoryVtbl Base;
 
-    /* IDWriteFactory1 methods */
-    STDMETHOD(GetEudcFontCollection)(THIS_
+    STDMETHOD(GetEudcFontCollection)(IDWriteFactory1 *This,
         IDWriteFontCollection **fontCollection,
         BOOL checkForUpdates __MINGW_DEF_ARG_VAL(FALSE)) PURE;
 
-    STDMETHOD(CreateCustomRenderingParams)(THIS_
+    STDMETHOD(CreateCustomRenderingParams)(IDWriteFactory1 *This,
         FLOAT gamma,
         FLOAT enhancedContrast,
         FLOAT enhancedContrastGrayscale,
@@ -1024,14 +746,17 @@ DECLARE_INTERFACE_(IDWriteFactory1,IDWriteFactory)
         DWRITE_PIXEL_GEOMETRY pixelGeometry,
         DWRITE_RENDERING_MODE renderingMode,
         IDWriteRenderingParams1 **renderingParams) PURE;
+}
+IDWriteFactory1Vtbl;
 
-#ifdef __cplusplus
-    using IDWriteFactory::CreateCustomRenderingParams;
-#endif
-
-    END_INTERFACE
+interface IDWriteFactory1
+{
+    const IDWriteFactory1Vtbl *lpVtbl;
 };
 
+#endif  /* D2D_USE_C_DEFINITIONS */
+
+DEFINE_GUID(IID_IDWriteFactory1, 0x30572f99,0xdac6,0x41db,0xa1,0x6e,0x04,0x86,0x30,0x7e,0x60,0x6a);
 __CRT_UUID_DECL(IDWriteFactory1, 0x30572f99,0xdac6,0x41db,0xa1,0x6e,0x04,0x86,0x30,0x7e,0x60,0x6a)
 
 #undef  INTERFACE

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to