Re: [Mingw-w64-public] [PATCH] include: Add remaining interface definitions from dwrite_1.h.

2019-01-15 Thread Martin Storsjö

On Wed, 16 Jan 2019, Nikolay Sivov wrote:


Sorry about that. Attaching a fix for both issues.


Thanks, pushed this one.

// Martin



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] headers: Remove C-compatibility parts from dwrite_2.h.

2019-01-15 Thread Nikolay Sivov
I don't see a reason in keeping this compatibility code, It already won't
work for C because of IDWriteFactory2 overloaded methods. Another reason
is DWRITE_FONT_METRICS1 definition from dwrite_1.h, included from
dwrite_2.h, which is also incompatible.

P.S. what's a deal with WINBOOL, should it be used everywhere? I see it's
used inconsistently, at least in dwrite*.h headers.
From 970a4adc69390af731fab200ee8f751c5d95ef58 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Mon, 14 Jan 2019 23:40:05 +0300
Subject: [PATCH 1/2] headers: Remove C-compatibility parts from dwrite_2.h.

Signed-off-by: Nikolay Sivov 
---
 mingw-w64-headers/include/dwrite_2.h | 276 +--
 1 file changed, 2 insertions(+), 274 deletions(-)

diff --git a/mingw-w64-headers/include/dwrite_2.h 
b/mingw-w64-headers/include/dwrite_2.h
index c939297b..64828bcf 100644
--- a/mingw-w64-headers/include/dwrite_2.h
+++ b/mingw-w64-headers/include/dwrite_2.h
@@ -56,13 +56,6 @@ DECLARE_INTERFACE_(IDWriteFontFallback,IUnknown)
 {
 BEGIN_INTERFACE
 
-#ifndef __cplusplus
-/* IUnknown methods */
-STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-STDMETHOD_(ULONG, Release)(THIS) PURE;
-#endif
-
 STDMETHOD(MapCharacters)(THIS_
 IDWriteTextAnalysisSource *analysisSource,
 UINT32 textPosition,
@@ -87,13 +80,6 @@ DECLARE_INTERFACE_(IDWriteFontFallbackBuilder,IUnknown)
 {
 BEGIN_INTERFACE
 
-#ifndef __cplusplus
-/* IUnknown methods */
-STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-STDMETHOD_(ULONG, Release)(THIS) PURE;
-#endif
-
 STDMETHOD(AddMapping)(THIS_
 DWRITE_UNICODE_RANGE const *ranges,
 UINT32 rangesCount,
@@ -121,13 +107,6 @@ DECLARE_INTERFACE_(IDWriteColorGlyphRunEnumerator,IUnknown)
 {
 BEGIN_INTERFACE
 
-#ifndef __cplusplus
-/* IUnknown methods */
-STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-STDMETHOD_(ULONG, Release)(THIS) PURE;
-#endif
-
 STDMETHOD(MoveNext)(THIS_
 BOOL *hasRun) PURE;
 
@@ -145,24 +124,6 @@ 
DECLARE_INTERFACE_(IDWriteRenderingParams2,IDWriteRenderingParams1)
 {
 BEGIN_INTERFACE
 
-#ifndef __cplusplus
-/* IUnknown methods */
-STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-STDMETHOD_(ULONG, Release)(THIS) PURE;
-
-/* IDWriteRenderingParams methods */
-STDMETHOD_(FLOAT, GetGamma)(THIS) PURE;
-STDMETHOD_(FLOAT, GetEnhancedContrast)(THIS) PURE;
-STDMETHOD_(FLOAT, GetClearTypeLevel)(THIS) PURE;
-STDMETHOD_(DWRITE_PIXEL_GEOMETRY, GetPixelGeometry)(THIS) PURE;
-STDMETHOD_(DWRITE_RENDERING_MODE, GetRenderingMode)(THIS) PURE;
-
-/* IDWriteRenderingParams1 methods */
-STDMETHOD_(FLOAT, GetGrayscaleEnhancedContrast)(THIS) PURE;
-#endif
-
-/* IDWriteRenderingParams2 methods */
 STDMETHOD_(DWRITE_GRID_FIT_MODE, GetGridFitMode)(THIS) PURE;
 
 END_INTERFACE
@@ -176,143 +137,6 @@ DECLARE_INTERFACE_(IDWriteFactory2,IDWriteFactory1)
 {
 BEGIN_INTERFACE
 
-#ifndef __cplusplus
-/* IUnknown methods */
-STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
-STDMETHOD_(ULONG, AddRef)(THIS) PURE;
-STDMETHOD_(ULONG, Release)(THIS) 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 

Re: [Mingw-w64-public] [PATCH] include: Add remaining interface definitions from dwrite_1.h.

2019-01-15 Thread Nikolay Sivov
Sorry about that. Attaching a fix for both issues.
From f3a525c57bba62bfc58f76db2d4e4472a55f6ce0 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Wed, 16 Jan 2019 10:10:03 +0300
Subject: [PATCH] headers: Add DWRITE_VERTICAL_GLYPH_ORIENTATION definition.

Signed-off-by: Nikolay Sivov 
---
 mingw-w64-headers/include/dwrite_1.h | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-headers/include/dwrite_1.h 
b/mingw-w64-headers/include/dwrite_1.h
index 67b28179..87fbdffc 100644
--- a/mingw-w64-headers/include/dwrite_1.h
+++ b/mingw-w64-headers/include/dwrite_1.h
@@ -41,6 +41,12 @@ enum DWRITE_TEXT_ANTIALIAS_MODE
 DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE
 };
 
+enum DWRITE_VERTICAL_GLYPH_ORIENTATION
+{
+DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT,
+DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED
+};
+
 struct DWRITE_CARET_METRICS {
 INT16 slopeRise;
 INT16 slopeRun;
@@ -429,7 +435,7 @@ 
DECLARE_INTERFACE_(IDWriteTextAnalysisSink1,IDWriteTextAnalysisSink)
 DWRITE_GLYPH_ORIENTATION_ANGLE angle,
 UINT8 adjustedBidilevel,
 WINBOOL isSideways,
-WINBOOL isRtl); PURE;
+WINBOOL isRtl) PURE;
 
 END_INTERFACE
 };
-- 
2.20.1

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] include: Add remaining interface definitions from dwrite_1.h.

2019-01-15 Thread Martin Storsjö

On Wed, 16 Jan 2019, Martin Storsjö wrote:


On Mon, 14 Jan 2019, Nikolay Sivov wrote:


---


+
+STDMETHOD(GetVerticalGlyphOrientation)(THIS_
+UINT32 textPosition,
+UINT32 *textLength,
+DWRITE_VERTICAL_GLYPH_ORIENTATION *orientation,
+UINT8 *bidiLevel) PURE;


The DWRITE_VERTICAL_GLYPH_ORIENTATION type is not defined anywhere in 
mingw-w64 at the moment, so this breaks compilation of any project that 
includes dwrite_1.h.


There's also another issue with the patch:


+/* IDWriteTextAnalysisSink1 methods */
+STDMETHOD(SetGlyphOrientation)(THIS_
+UINT32 textPosition,
+UINT32 textLength,
+DWRITE_GLYPH_ORIENTATION_ANGLE angle,
+UINT8 adjustedBidilevel,
+WINBOOL isSideways,
+WINBOOL isRtl); PURE;


The stray semicolon before PURE breaks compilation as well.

// Martin

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] include: Add remaining interface definitions from dwrite_1.h.

2019-01-15 Thread Martin Storsjö

On Mon, 14 Jan 2019, Nikolay Sivov wrote:


---


+
+STDMETHOD(GetVerticalGlyphOrientation)(THIS_
+UINT32 textPosition,
+UINT32 *textLength,
+DWRITE_VERTICAL_GLYPH_ORIENTATION *orientation,
+UINT8 *bidiLevel) PURE;


The DWRITE_VERTICAL_GLYPH_ORIENTATION type is not defined anywhere in 
mingw-w64 at the moment, so this breaks compilation of any project that 
includes dwrite_1.h.


// Martin



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] msys2 / mingw32 targets 0x601 unexpectedly

2019-01-15 Thread Tempelaar E. (Erik)
Thanks for the replies with answers and information.
I now know to not rely on the defaults.

Kind regards




Disclaimer: This mail transmission and any attached files are confidential and 
are intended for the addressee only. If you are not the person or organization 
to whom it is addressed, you must not copy, disclose, distribute or take any 
action in reliance upon it. If you have received this message in error, please 
contact the sender by email and delete all copies of this message and all 
copies of any attached files.

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] include: Add remaining interface definitions from dwrite_1.h.

2019-01-15 Thread Jacek Caban

Hi Nikolay,


The patch looks good, pushed to master.


Thanks,

Jacek



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public