Re: [Mingw-w64-public] naming convention of mingw-w64 and compile Windows binary on MacOS

2021-01-10 Thread Nikolay Sivov



On 1/10/21 9:51 PM, Peng Yu wrote:
>>> They look like gcc and g++. But their options (according to --help)
>>> are much fewer than the gcc and g++. What are the options are missing
>>> in the *-w64-mingw32-* tools?
>> How are you testing this, and on what system?
> I use the --help option of *--w64-mingw32-gcc on Mac OS X.
>
For me output is identical for gcc and i686-w64-mingw32-gcc on Linux.

Maybe you didn't actually install gcc on macos, and are using clang
installed by xcode by default?
In that case you have gcc as a symlink to clang.


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


Re: [Mingw-w64-public] naming convention of mingw-w64 and compile Windows binary on MacOS

2021-01-10 Thread Nikolay Sivov



On 1/10/21 6:46 PM, Peng Yu wrote:
>> Welcome to the world of GNU. These are cpu-vendor-os triplets (yes, mingw32 
>> is
>> not an OS, welcome to the club) that identify the toolchain. i686 is 32-bit,
>> x86_64 is 64-bit - that's all you need to now with regards to mingw. A bit 
>> more
>> info can be found on the wiki[0], or just by googling.
> What does "w64" mean? What does w32 in mingw32 mean?

I think at this point you can see "w64-mingw32" as a project name.

>
>> If you are _this_ inexperienced, consider using a build system. Meson[1] and
>> CMake[2] are all the rage for C/C++ these days. A buildsystem will invoke the
>> toolchain for you, no need to muck around with command lines.
> I just want to know the basic of the compilation commands. I see these.
>
> $ i686-w64-mingw32-gcc main.c
> $ file a.exe
> a.exe: PE32 executable (console) Intel 80386, for MS Windows
> $ x86_64-w64-mingw32-gcc main.c
> $ file a.exe
> a.exe: PE32+ executable (console) x86-64, for MS Windows
>
> They look like gcc and g++. But their options (according to --help)
> are much fewer than the gcc and g++. What are the options are missing
> in the *-w64-mingw32-* tools?
How are you testing this, and on what system?
>
> Also, the resulted a.exe is considered as virus file and deleted
> immediately in the following VM. Why is it so?
That's a question for antivirus developers.
>
> https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
>



___
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] headers: Add more error codes in mferror.h.

2020-12-21 Thread Nikolay Sivov
On 12/21/20 12:11 PM, Biswapriyo Nath wrote:
> Any update on this?

I think it's good candidate to import from wine.

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



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


[Mingw-w64-public] [PATCH] Add missing MFCreateSampleCopierMFT() to 32-bit import library.

2020-11-07 Thread Nikolay Sivov
Signed-off-by: Nikolay Sivov 
---
 mingw-w64-crt/lib32/mf.def | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mingw-w64-crt/lib32/mf.def b/mingw-w64-crt/lib32/mf.def
index 96712a4c..9b60b337 100644
--- a/mingw-w64-crt/lib32/mf.def
+++ b/mingw-w64-crt/lib32/mf.def
@@ -48,6 +48,7 @@ MFCreatePresentationDescriptorFromASFProfile@8
 MFCreateProxyLocator@12
 MFCreateRemoteDesktopPlugin@4
 MFCreateSAMIByteStreamPlugin@8
+MFCreateSampleCopierMFT@4
 MFCreateSampleGrabberSinkActivate@12
 MFCreateSecureHttpSchemePlugin@8
 MFCreateSequencerSegmentOffset@16
-- 
2.28.0



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


Re: [Mingw-w64-public] missing dxgidebug import library

2020-10-26 Thread Nikolay Sivov



On 10/26/20 4:25 PM, Vincent Torri wrote:
> On Mon, Oct 26, 2020 at 2:06 PM Nikolay Sivov  wrote:
>>
>>
>> On 10/26/20 4:00 PM, Vincent Torri wrote:
>>> On Mon, Oct 26, 2020 at 12:44 PM Nikolay Sivov  
>>> wrote:
>>>>
>>>> On 10/26/20 2:35 PM, Vincent Torri wrote:
>>>>> On Mon, Oct 26, 2020 at 12:15 PM Nikolay Sivov  
>>>>> wrote:
>>>>>> On 10/26/20 11:55 AM, Vincent Torri wrote:
>>>>>>> On Sun, Oct 25, 2020 at 10:03 PM Biswapriyo Nath  
>>>>>>> wrote:
>>>>>>>> Which specific APIs are you interested in? As far as I know, most of
>>>>>>>> them are COM interfaces.
>>>>>>> IDXGIDebug_ReportLiveObjects
>>>>>>>
>>>>>>> i'm coding in C, not C++.
>>>>>> It's a regular interface method available through dxgidebug.h, why do
>>>>>> you need an import library for this?
>>>>> if i link against the dll directly, IDXGIDebug_ReportLiveObjects is 
>>>>> undefined
>>>>>
>>>>> so i guess that ass all the other symbols work, there is something in
>>>>> the import lib that takes care of the C API
>>>> To get C macros you'll need:
>>>>
>>>> #define COBJMACROS
>>> i know, i already do that and i already call direct3d, direct2d and dxgi C 
>>> API
>>>
>>>> My guess is that you should use DXGIGetDebugInterface(_IDXGIDebug),
>>>> and then call IDXGIDebug_ReportLiveObjects() on returned interface.
>>> btw, without linking to the dxgidebug dll :
>>>
>>> $ gcc -g -Wall -Wextra -o d2d.exe d2d.c -ld3d11 -ld2d1 -ldxgi -luuid
>>> C:/Documents/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>>> C:\Documents\msys2\tmp\ccjEHgWG.o:d2d.c:(.rdata$.refptr.DXGI_DEBUG_ALL[.refptr.DXGI_DEBUG_ALL]+0x0):
>>> undefined reference to `DXGI_DEBUG_ALL'
>>> C:/Documents/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>>> C:\Documents\msys2\tmp\ccjEHgWG.o:d2d.c:(.rdata$.refptr.IID_IDXGIDebug[.refptr.IID_IDXGIDebug]+0x0):
>>> undefined reference to `IID_IDXGIDebug'
>>> collect2.exe: error: ld returned 1 exit status
>>>
>>> DXGI_DEBUG_ALL and IID_IDXGIDebug are defined only with C++ in dxgidebug.h
>> How does it work with MS C compiler? You probably need to link with
>> -ldxguid as well.
> same error
Again, what would you be using on Windows with MS compiler to link with
these guids? My guess is dxguid, and if true mingw will simply have to
amend it with dxgidebug guids.
>
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



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


Re: [Mingw-w64-public] missing dxgidebug import library

2020-10-26 Thread Nikolay Sivov



On 10/26/20 4:00 PM, Vincent Torri wrote:
> On Mon, Oct 26, 2020 at 12:44 PM Nikolay Sivov  wrote:
>>
>>
>> On 10/26/20 2:35 PM, Vincent Torri wrote:
>>> On Mon, Oct 26, 2020 at 12:15 PM Nikolay Sivov  
>>> wrote:
>>>>
>>>> On 10/26/20 11:55 AM, Vincent Torri wrote:
>>>>> On Sun, Oct 25, 2020 at 10:03 PM Biswapriyo Nath  
>>>>> wrote:
>>>>>> Which specific APIs are you interested in? As far as I know, most of
>>>>>> them are COM interfaces.
>>>>> IDXGIDebug_ReportLiveObjects
>>>>>
>>>>> i'm coding in C, not C++.
>>>> It's a regular interface method available through dxgidebug.h, why do
>>>> you need an import library for this?
>>> if i link against the dll directly, IDXGIDebug_ReportLiveObjects is 
>>> undefined
>>>
>>> so i guess that ass all the other symbols work, there is something in
>>> the import lib that takes care of the C API
>> To get C macros you'll need:
>>
>> #define COBJMACROS
> i know, i already do that and i already call direct3d, direct2d and dxgi C API
>
>> My guess is that you should use DXGIGetDebugInterface(_IDXGIDebug),
>> and then call IDXGIDebug_ReportLiveObjects() on returned interface.
> btw, without linking to the dxgidebug dll :
>
> $ gcc -g -Wall -Wextra -o d2d.exe d2d.c -ld3d11 -ld2d1 -ldxgi -luuid
> C:/Documents/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> C:\Documents\msys2\tmp\ccjEHgWG.o:d2d.c:(.rdata$.refptr.DXGI_DEBUG_ALL[.refptr.DXGI_DEBUG_ALL]+0x0):
> undefined reference to `DXGI_DEBUG_ALL'
> C:/Documents/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
> C:\Documents\msys2\tmp\ccjEHgWG.o:d2d.c:(.rdata$.refptr.IID_IDXGIDebug[.refptr.IID_IDXGIDebug]+0x0):
> undefined reference to `IID_IDXGIDebug'
> collect2.exe: error: ld returned 1 exit status
>
> DXGI_DEBUG_ALL and IID_IDXGIDebug are defined only with C++ in dxgidebug.h

How does it work with MS C compiler? You probably need to link with
-ldxguid as well.

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



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


Re: [Mingw-w64-public] missing dxgidebug import library

2020-10-26 Thread Nikolay Sivov



On 10/26/20 2:35 PM, Vincent Torri wrote:
> On Mon, Oct 26, 2020 at 12:15 PM Nikolay Sivov  wrote:
>>
>>
>> On 10/26/20 11:55 AM, Vincent Torri wrote:
>>> On Sun, Oct 25, 2020 at 10:03 PM Biswapriyo Nath  
>>> wrote:
>>>> Which specific APIs are you interested in? As far as I know, most of
>>>> them are COM interfaces.
>>> IDXGIDebug_ReportLiveObjects
>>>
>>> i'm coding in C, not C++.
>> It's a regular interface method available through dxgidebug.h, why do
>> you need an import library for this?
> if i link against the dll directly, IDXGIDebug_ReportLiveObjects is undefined
>
> so i guess that ass all the other symbols work, there is something in
> the import lib that takes care of the C API
To get C macros you'll need:

#define COBJMACROS

My guess is that you should use DXGIGetDebugInterface(_IDXGIDebug),
and then call IDXGIDebug_ReportLiveObjects() on returned interface.
>
> Vincent
>
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


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


Re: [Mingw-w64-public] missing dxgidebug import library

2020-10-26 Thread Nikolay Sivov



On 10/26/20 11:55 AM, Vincent Torri wrote:
> On Sun, Oct 25, 2020 at 10:03 PM Biswapriyo Nath  wrote:
>> Which specific APIs are you interested in? As far as I know, most of
>> them are COM interfaces.
> IDXGIDebug_ReportLiveObjects
>
> i'm coding in C, not C++.
It's a regular interface method available through dxgidebug.h, why do
you need an import library for this?
>
> Vincent Torri
>
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



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


Re: [Mingw-w64-public] crashs using DComposition interfaces

2020-10-13 Thread Nikolay Sivov
On 10/13/20 5:46 PM, Pierre Lamot wrote:
>>> While I have no clear idea about the cause of the issue, my gut
>>> feeling is that it happens with overloaded functions. In above case:
>>>
>>>     STDMETHOD(SetOffsetX)(THIS_ float) PURE;
>>>     STDMETHOD(SetOffsetX)(THIS_ IDCompositionAnimation*) PURE;
>>
>> That's right, overloads like that appear in reversed order in actual
>> vtable. So method with float arg gets higher address.
>>
>
> So, does inverting the declaration order of these methods would do the
> tricks?
> This is quite surprising to declare member functions in different
> order according to the compiler.
It would, yes. We use that for similar cases in Wine, which does not use
C++, making that solution binary compatible.

As I understand it's an c++ abi difference between msvc and g++, or
maybe between msvc and everything else.
>
> Pierre




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


Re: [Mingw-w64-public] crashs using DComposition interfaces

2020-10-13 Thread Nikolay Sivov


On 10/13/20 3:40 PM, Pierre Lamot wrote:
> Hello
>
> I'm trying to write a program that uses the DirectComposition API on
> windows. While most of the API works correctly, some functions crash
> when compiled with clang/gcc mingw64 and works when compiled with MSVC.
>
> basically the following code works with MSVC and crashes with
> clang/gcc mingw64:
>
>     IDCompositionTranslateTransform* translateTransform = nullptr;
>     hr = dcompDevice->CreateTranslateTransform();
>     if (FAILED(hr) || !translateTransform)
>     throw
> std::runtime_error("dcompDevice->CreateTranslateTransform");
>     hr = translateTransform->SetOffsetX(42.f); //BOOM
>     if (FAILED(hr))
>     throw std::runtime_error("translateVisual->SetOffsetX");
>
> the translateTransform pointer seems correct, the call to SetOffsetX
> crashes, it doesn't return.
>
> I enclosed the full sample for reference.
>
> As far as I can tell there is no real differences between the header
> provided by MS and the one from Mingw.
>
> While I have no clear idea about the cause of the issue, my gut
> feeling is that it happens with overloaded functions. In above case:
>
>     STDMETHOD(SetOffsetX)(THIS_ float) PURE;
>     STDMETHOD(SetOffsetX)(THIS_ IDCompositionAnimation*) PURE;

That's right, overloads like that appear in reversed order in actual
vtable. So method with float arg gets higher address.

>
> I did my tests with
>   * MSVC 19.25.28612 (x86-64 & i686)  => works
>   * Mingw 7.0.x (ceb3ac2f42d56504fae5bd5cfe7f681643baccd6) with
>     * clang 10.0.0 (x86-64 & i686) => crash
>     * gcc 10.1.0 (x86-64) => crash
>
> Thanks for your input.
>
> Pierre
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



___
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] headers/mfidl: Import mftransform.idl instead of header.

2020-09-30 Thread Nikolay Sivov


On 9/30/20 1:09 PM, Martin Storsjö wrote:
> On Wed, 30 Sep 2020, Biswapriyo Nath wrote:
>
>>
>
> BTW, an unrelated point, but - if working on the mediafoundation
> headers, ffmpeg is a project happens to use them a bit, so if doing
> changes, I'd appreciate if you'd check that ffmpeg still builds (and
> ends up with mediafoundation enabled).
>
> The ffmpeg mediafoundation code also happens to use local
> redeclarations of many mediafoundation constants (to allow it to build
> with older versions of mingw-w64 and WinSDK) - so if working on header
> changes, it can also be useful to try building with a modified version
> that actually use the SDK headers properly:
> https://github.com/mstorsjo/ffmpeg/commits/mfenc-use-sdk
>
> (With current mingw-w64, all constants that are used are available,
> except for CODECAPI_AVScenarioInfo.)
>
> // Martin
>
>

No, it is very much related. Thanks for that. This could probably be
expanded to other major projects too, for validation before major
mingw-w64 updates are released.


___
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] headers/mfidl: Import mftransform.idl instead of header.

2020-09-30 Thread Nikolay Sivov
For Media Foundation headers I think we should work towards importing
them from Wine, after backporting whatever it's missing comparing to
mingw-w64 ones.


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


Re: [Mingw-w64-public] Trouble with new dwrite underscore notation

2020-09-20 Thread Nikolay Sivov


On 9/20/20 11:14 PM, Jacek Caban wrote:
> On 20/09/2020 14:02, Liu Hao wrote:
>
>> 在 2020/9/20 19:45, Jean Pierre Cimalando 写道:
>>> Le Sun, 20 Sep 2020 19:18:51 +0800,
>>> Liu Hao  a écrit :
>>>
 It is now imported from Wine. Perhaps it's a necessary trade-off,
 because not having a suffix would cause errors in C.

>>> The header has distinct interfaces for C and C++.
>>> It's understandable that C requires to use unique names, however will
>>> it be detrimental to modify code generation such that C++-only parts
>>> would conform to the original naming?
>>>
>> I presume it is possible; even a naive `#if...#else...#endif` could
>> resolve the issue.
>>
>> I would like to hear from Jacek first.
>
>
> #if is problematic, because it would need to be in cpp_quote() and we
> can't have those local to methods, so entire interfaces would need to
> be duplicated in cpp_quote()s.
>
>
> I think that we will need a widl extension. Maybe something like
> cpp_override attribute, which would look like:
>
> [cpp_override(GetPropertyValues)] HRESULT GetPropertyValues_( /*... */);
>
> and use the name provided by the attribute in C++ declaration.

Maybe we could rename suffixed names back to back name in idls and then
when duplicate is detected by widl do such branching for C++ vs C?
That might need some CLI switch to allow duplicates in a first place for
selected idl files.

Also another aspect to it. The order of such methods in compiled code is
reversed comparing to C++ definition.
That relies on gcc being compatible with msvc compiler, or maybe that's
standardized in C++ in which case please excuse my ignorance.

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




___
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] headers: add dcommon.idl

2020-05-10 Thread Nikolay Sivov

No, I didn't mean you should modify anything, just wondering why it's there.

On 5/10/20 8:50 PM, Biswapriyo Nath wrote:

widl could be improved to pad newlines automatically.

If it's possible then as you wish, I'll modify the patch.

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




___
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] headers: add dcommon.idl

2020-05-10 Thread Nikolay Sivov




On 5/10/20 8:38 PM, Biswapriyo Nath wrote:

Yes, I will try to add those IDL files also.

Ok.




what's a deal with empty lines like 'cpp_quote("")', what are those for ?

Just matching with other IDL files. It adds a newline separation between
two symbols.
I see, but what for? If header formatting was important, widl could be 
improved to pad newlines automatically.


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




___
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] headers: add dcommon.idl

2020-05-10 Thread Nikolay Sivov
That's only useful if you're going to introduce d2d/dwrite idl's, and 
even then you might as well import it from wine.


P.S. what's a deal with empty lines like 'cpp_quote("")', what are those 
for ?



___
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 2/3] d2d1_1.h: Add C declaration for ID2D1Factory1

2020-05-07 Thread Nikolay Sivov
Going with idl will make it dependent on widl, for both C and C++. I 
don't know if it's a problem,

those idl's should not be a part of mingw installation anyway.


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


Re: [Mingw-w64-public] How to compile a module including dwrite.h with C compiler?

2020-05-04 Thread Nikolay Sivov

On 5/4/20 2:22 PM, Ruslan Garipov wrote:

Hello!

The IDWriteTextLayout[1] interface inherits from the
IDWriteTextFormat[2] one.  Both declare, for example,
GetFontCollection() members.  Therefore, IDWriteTextLayout exploits C++
function overloading, which isn't available in C.

And that's where I failed: I need to compile a C code module including
dwrite.h header using CC:

$ cc -x c dwrite.h -o /dev/null 2>&1 | fgrep GetFontCollection
dwrite.h:2006:15: error: duplicate member 'GetFontCollection'
 2006 | STDMETHOD(GetFontCollection)(THIS_

Of course, there are other "duplicated member functions" like
GetFontFamilyNameLength(), GetFontFamilyName(), etc.

How can I compile my C code?  Am I doomed to use ITypeInfo and IDispatch
for IDWriteTextLayout objects in C code?


You can't compile it as C it looks like, as is. For Wine this header is 
built from dwrite.idl (that does not exist in SDK),
and widl was made to handle such cases by renaming vtable field of 
overloaded method. Second part
of this quirk is that inline wrappers like 
IDWriteTextLayout_GetFontCollection() are only emitted for overloaded 
variants.


It gets worse in newer dwrite headers, when same interface is using 
overloaded variants in its own methods list.


I didn't get the part about ITypeInfo/IDispatch, how are do you plan to 
apply it for dwrite that doesn't use automation-capable objects?


Oh, by the way, revision 75bdd3 misses a parenthesis:

diff --git a/mingw-w64-headers/include/dwrite.h 
b/mingw-w64-headers/include/dwrite.h

index 9a0cc02d..943cd738 100644
--- a/mingw-w64-headers/include/dwrite.h
+++ b/mingw-w64-headers/include/dwrite.h
@@ -1430,7 +1430,7 @@ 
DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IDWriteFontFileLoader)

 STDMETHOD_(ULONG, Release)(THIS) PURE;

 /* IDWriteFontFileLoader methods */
-    STDMETHOD(CreateStreamFromKey(THIS_ const void 
*fontFileReferenceKey,UINT32 
fontFileReferenceKeySize,IDWriteFontFileStream **fileStream) PURE;
+    STDMETHOD(CreateStreamFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 
fontFileReferenceKeySize,IDWriteFontFileStream **fileStream) PURE;

 #endif

 /* IDWriteLocalFontFileLoader methods */


Please send a patch for that.


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




___
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: Cleanup some typedefs in mfidl.idl.

2020-04-28 Thread Nikolay Sivov
Signed-off-by: Nikolay Sivov 
---

Some of remaining quoted types belong to other files, I'm going to move them 
next.

 mingw-w64-headers/include/mfidl.idl | 555 +++-
 1 file changed, 295 insertions(+), 260 deletions(-)

diff --git a/mingw-w64-headers/include/mfidl.idl 
b/mingw-w64-headers/include/mfidl.idl
index 97de9a4f..1cfc44f4 100644
--- a/mingw-w64-headers/include/mfidl.idl
+++ b/mingw-w64-headers/include/mfidl.idl
@@ -271,64 +271,72 @@ interface IMFClockStateSink : IUnknown
 cpp_quote("HRESULT WINAPI 
MFRequireProtectedEnvironment(IMFPresentationDescriptor 
*pPresentationDescriptor);")
 cpp_quote("HRESULT WINAPI 
MFSerializePresentationDescriptor(IMFPresentationDescriptor *pPD,DWORD 
*pcbData,BYTE **ppbData);")
 
-cpp_quote("typedef DWORD MFSequencerElementId; /*Unknown type*/")
-cpp_quote("")
-cpp_quote("typedef enum MFCLOCK_CHARACTERISTICS_FLAGS {")
-cpp_quote("  MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ   = 0x2,")
-cpp_quote("  MFCLOCK_CHARACTERISTICS_FLAG_ALWAYS_RUNNING= 0x4,")
-cpp_quote("  MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK   = 0x8")
-cpp_quote("} MFCLOCK_CHARACTERISTICS_FLAGS;")
-cpp_quote("")
+typedef DWORD MFSequencerElementId;
+
+typedef enum _MFCLOCK_CHARACTERISTICS_FLAGS
+{
+MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ   = 0x2,
+MFCLOCK_CHARACTERISTICS_FLAG_ALWAYS_RUNNING= 0x4,
+MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK   = 0x8
+} MFCLOCK_CHARACTERISTICS_FLAGS;
+
 cpp_quote("#if (WINVER >= 0x0601)")
-cpp_quote("")
-cpp_quote("typedef enum _MF_QUALITY_ADVISE_FLAGS {")
-cpp_quote("  MF_QUALITY_CANNOT_KEEP_UP   = 0x1")
-cpp_quote("} MF_QUALITY_ADVISE_FLAGS;")
-cpp_quote("")
+
+typedef enum _MF_QUALITY_ADVISE_FLAGS
+{
+MF_QUALITY_CANNOT_KEEP_UP = 0x1
+} MF_QUALITY_ADVISE_FLAGS;
+
 cpp_quote("#endif /*(WINVER >= 0x0601)*/")
-cpp_quote("")
-cpp_quote("typedef enum _MF_QUALITY_DROP_MODE {")
-cpp_quote("  MF_DROP_MODE_NONE   = 0x0,")
-cpp_quote("  MF_DROP_MODE_1  = 0x1,")
-cpp_quote("  MF_DROP_MODE_2  = 0x2,")
-cpp_quote("  MF_DROP_MODE_3  = 0x3,")
-cpp_quote("  MF_DROP_MODE_4  = 0x4,")
-cpp_quote("  MF_DROP_MODE_5  = 0x5,")
-cpp_quote("  MF_NUM_DROP_MODES   = 0x6")
-cpp_quote("} MF_QUALITY_DROP_MODE;")
-cpp_quote("")
-cpp_quote("typedef enum _MF_QUALITY_LEVEL {")
-cpp_quote("  MF_QUALITY_NORMAL   = 0x0,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_1   = 0x1,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_2   = 0x2,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_3   = 0x3,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_4   = 0x4,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_5   = 0x5,")
-cpp_quote("  MF_NUM_QUALITY_LEVELS   = 0x6")
-cpp_quote("} MF_QUALITY_LEVEL;")
-cpp_quote("")
+
+typedef enum _MF_QUALITY_DROP_MODE
+{
+MF_DROP_MODE_NONE = 0x0,
+MF_DROP_MODE_1= 0x1,
+MF_DROP_MODE_2= 0x2,
+MF_DROP_MODE_3= 0x3,
+MF_DROP_MODE_4= 0x4,
+MF_DROP_MODE_5= 0x5,
+MF_NUM_DROP_MODES = 0x6
+} MF_QUALITY_DROP_MODE;
+
+typedef enum _MF_QUALITY_LEVEL
+{
+MF_QUALITY_NORMAL = 0x0,
+MF_QUALITY_NORMAL_MINUS_1 = 0x1,
+MF_QUALITY_NORMAL_MINUS_2 = 0x2,
+MF_QUALITY_NORMAL_MINUS_3 = 0x3,
+MF_QUALITY_NORMAL_MINUS_4 = 0x4,
+MF_QUALITY_NORMAL_MINUS_5 = 0x5,
+MF_NUM_QUALITY_LEVELS = 0x6
+} MF_QUALITY_LEVEL;
+
 cpp_quote("typedef enum MF_SOURCE_READER_CONTROL_FLAG {")
 cpp_quote("  MF_SOURCE_READER_CONTROLF_DRAIN   = 0x0001")
 cpp_quote("} MF_SOURCE_READER_CONTROL_FLAG;")
 cpp_quote("")
-cpp_quote("typedef enum _MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS {")
-cpp_quote("  MF_TOPOLOGY_RESOLUTION_SUCCEEDED  = 0x,")
-cpp_quote("  MF_OPTIONAL_NODE_REJECTED_MEDIA_TYPE  = 0x0001,")
-cpp_quote("  MF_OPTIONAL_NODE_REJECTED_PROTECTED_PROCESS   = 0x0002")
-cpp_quote("} MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS;")
-cpp_quote("")
-cpp_quote("typedef enum _MF_TOPONODE_DRAIN_MODE {")
-cpp_quote("  MF_TOPONODE_DRAIN_DEFAULT,")
-cpp_quote("  MF_TOPONODE_DRAIN_ALWAYS,")
-cpp_quote("  MF_TOPONODE_DRAIN_NEVER")
-cpp_quote("} MF_TOPONODE_DRAIN_MODE;")
-cpp_quote("")
-cpp_quote("typedef enum _MF_TOPONODE_FLUSH_MODE {")
-cpp_quote("  MF_TOPONODE_FLUSH_ALWAYS,")
-cpp_quote("  MF_TOPONODE_FLUSH_SEEK,")
-cpp_quote("  MF_TOPONODE_FLUSH_NEVER")
-cpp_quote("} MF_TOPONODE_FLUSH_MODE;")
-cpp_quote("")
+
+typedef enum _MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS
+{
+MF_TOPOLOGY_RESO

[Mingw-w64-public] [PATCH] headers: Move some symbols to correct locations, remove duplicated symbols in mfidl.idl.

2020-04-16 Thread Nikolay Sivov
Signed-off-by: Nikolay Sivov 
---

Duplicates already exist in wmcontainer.idl, which isn't and shouldn't be 
imported from any other headers.

 mingw-w64-headers/include/mfapi.h | 16 +
 mingw-w64-headers/include/mfidl.idl   | 43 ---
 mingw-w64-headers/include/mfreadwrite.idl |  4 +++
 3 files changed, 27 insertions(+), 36 deletions(-)

diff --git a/mingw-w64-headers/include/mfapi.h 
b/mingw-w64-headers/include/mfapi.h
index fa41c971..6c49764c 100644
--- a/mingw-w64-headers/include/mfapi.h
+++ b/mingw-w64-headers/include/mfapi.h
@@ -147,6 +147,22 @@ extern "C" {
 #endif
 
 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
+
+  #define MF_1_BYTE_ALIGNMENT 0x
+  #define MF_2_BYTE_ALIGNMENT 0x0001
+  #define MF_4_BYTE_ALIGNMENT 0x0003
+  #define MF_8_BYTE_ALIGNMENT 0x0007
+  #define MF_16_BYTE_ALIGNMENT0x000F
+  #define MF_32_BYTE_ALIGNMENT0x001F
+  #define MF_64_BYTE_ALIGNMENT0x003F
+  #define MF_128_BYTE_ALIGNMENT   0x007F
+  #define MF_256_BYTE_ALIGNMENT   0x00FF
+  #define MF_512_BYTE_ALIGNMENT   0x01FF
+  #define MF_1024_BYTE_ALIGNMENT  0x03FF
+  #define MF_2048_BYTE_ALIGNMENT  0x07FF
+  #define MF_4096_BYTE_ALIGNMENT  0x0FFF
+  #define MF_8192_BYTE_ALIGNMENT  0x1FFF
+
   STDAPI MFLockDXGIDeviceManager (UINT *pResetToken, IMFDXGIDeviceManager 
**ppManager);
   STDAPI MFUnlockDXGIDeviceManager (void);
   STDAPI MFCreateDXGISurfaceBuffer (REFIID riid, IUnknown *punkSurface, UINT 
uSubresourceIndex, WINBOOL fBottomUpWhenLinear, IMFMediaBuffer **ppBuffer);
diff --git a/mingw-w64-headers/include/mfidl.idl 
b/mingw-w64-headers/include/mfidl.idl
index 1cfc44f4..9dcf51f4 100644
--- a/mingw-w64-headers/include/mfidl.idl
+++ b/mingw-w64-headers/include/mfidl.idl
@@ -311,11 +311,6 @@ typedef enum _MF_QUALITY_LEVEL
 MF_NUM_QUALITY_LEVELS = 0x6
 } MF_QUALITY_LEVEL;
 
-cpp_quote("typedef enum MF_SOURCE_READER_CONTROL_FLAG {")
-cpp_quote("  MF_SOURCE_READER_CONTROLF_DRAIN   = 0x0001")
-cpp_quote("} MF_SOURCE_READER_CONTROL_FLAG;")
-cpp_quote("")
-
 typedef enum _MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS
 {
 MF_TOPOLOGY_RESOLUTION_SUCCEEDED= 0x,
@@ -338,12 +333,13 @@ typedef enum _MF_TOPONODE_FLUSH_MODE
 } MF_TOPONODE_FLUSH_MODE;
 
 cpp_quote("#if (WINVER >= 0x0601)")
-cpp_quote("")
-cpp_quote("typedef enum _MF_TRANSCODE_TOPOLOGY_MODE_FLAGS {")
-cpp_quote("  MF_TRANSCODE_TOPOLOGYMODE_SOFTWARE_ONLY  = 0,")
-cpp_quote("  MF_TRANSCODE_TOPOLOGYMODE_HARDWARE_ALLOWED   = 1")
-cpp_quote("} MF_TRANSCODE_TOPOLOGYMODE_FLAGS;")
-cpp_quote("")
+
+typedef enum _MF_TRANSCODE_TOPOLOGY_MODE_FLAGS
+{
+  MF_TRANSCODE_TOPOLOGYMODE_SOFTWARE_ONLY= 0,
+  MF_TRANSCODE_TOPOLOGYMODE_HARDWARE_ALLOWED = 1
+} MF_TRANSCODE_TOPOLOGYMODE_FLAGS;
+
 cpp_quote("#endif")
 
 typedef enum
@@ -353,12 +349,6 @@ typedef enum
 MF_LICENSE_URL_TAMPERED
 } MF_URL_TRUST_STATUS;
 
-cpp_quote("typedef enum MFASF_INDEXERFLAGS {")
-cpp_quote("  MFASF_INDEXER_WRITE_NEW_INDEX= 0x0001,")
-cpp_quote("  MFASF_INDEXER_READ_FOR_REVERSEPLAYBACK   = 0x0004,")
-cpp_quote("  MFASF_INDEXER_WRITE_FOR_LIVEREAD = 0x0008")
-cpp_quote("} MFASF_INDEXERFLAGS;")
-
 typedef enum _MFCLOCK_RELATIONAL_FLAGS
 {
 MFCLOCK_RELATIONAL_FLAG_JITTER_NEVER_AHEAD = 0x1
@@ -494,14 +484,6 @@ typedef enum _MFSHUTDOWN_STATUS
 MFSHUTDOWN_COMPLETED
 } MFSHUTDOWN_STATUS;
 
-cpp_quote("typedef enum _MFSINK_WMDRMACTION {")
-cpp_quote("  MFSINK_WMDRMACTION_UNDEFINED= 0,")
-cpp_quote("  MFSINK_WMDRMACTION_ENCODE   = 1,")
-cpp_quote("  MFSINK_WMDRMACTION_TRANSCODE= 2,")
-cpp_quote("  MFSINK_WMDRMACTION_TRANSCRYPT   = 3,")
-cpp_quote("  MFSINK_WMDRMACTION_LAST = 3")
-cpp_quote("} MFSINK_WMDRMACTION;")
-
 typedef enum MFSTREAMSINK_MARKER_TYPE
 {
 MFSTREAMSINK_MARKER_DEFAULT,
@@ -594,17 +576,6 @@ typedef struct _MFNetCredentialManagerGetParam
 LONGnRetries;
 } MFNetCredentialManagerGetParam;
 
-cpp_quote("#define MF_1_BYTE_ALIGNMENT 0x")
-cpp_quote("#define MF_2_BYTE_ALIGNMENT 0x0001")
-cpp_quote("#define MF_4_BYTE_ALIGNMENT 0x0003")
-cpp_quote("#define MF_8_BYTE_ALIGNMENT 0x0007")
-cpp_quote("#define MF_16_BYTE_ALIGNMENT0x000F")
-cpp_quote("#define MF_32_BYTE_ALIGNMENT0x001F")
-cpp_quote("#define MF_64_BYTE_ALIGNMENT0x003F")
-cpp_quote("#define MF_128_BYTE_ALIGNMENT   0x007F")
-cpp_quote("#define MF_256_BYTE_ALIGNMENT   0x00FF")
-cpp_quote("#define MF_512_BYTE_ALIGNMENT   0x01FF")
-cpp_quote("")
 cpp_quote("#define MEDIASINK_FIXED_STREAMS   

[Mingw-w64-public] [resend PATCH] headers: Cleanup some typedefs in mfidl.idl.

2020-04-11 Thread Nikolay Sivov
Signed-off-by: Nikolay Sivov 
---

Resending, now subscribed to the list.

Remaining quote types belong to other files, I'll move them later.
Changes in this patch match current SDK (and Wine).

 mingw-w64-headers/include/mfidl.idl | 555 +++-
 1 file changed, 295 insertions(+), 260 deletions(-)

diff --git a/mingw-w64-headers/include/mfidl.idl 
b/mingw-w64-headers/include/mfidl.idl
index 97de9a4f..1cfc44f4 100644
--- a/mingw-w64-headers/include/mfidl.idl
+++ b/mingw-w64-headers/include/mfidl.idl
@@ -271,64 +271,72 @@ interface IMFClockStateSink : IUnknown
 cpp_quote("HRESULT WINAPI 
MFRequireProtectedEnvironment(IMFPresentationDescriptor 
*pPresentationDescriptor);")
 cpp_quote("HRESULT WINAPI 
MFSerializePresentationDescriptor(IMFPresentationDescriptor *pPD,DWORD 
*pcbData,BYTE **ppbData);")
 
-cpp_quote("typedef DWORD MFSequencerElementId; /*Unknown type*/")
-cpp_quote("")
-cpp_quote("typedef enum MFCLOCK_CHARACTERISTICS_FLAGS {")
-cpp_quote("  MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ   = 0x2,")
-cpp_quote("  MFCLOCK_CHARACTERISTICS_FLAG_ALWAYS_RUNNING= 0x4,")
-cpp_quote("  MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK   = 0x8")
-cpp_quote("} MFCLOCK_CHARACTERISTICS_FLAGS;")
-cpp_quote("")
+typedef DWORD MFSequencerElementId;
+
+typedef enum _MFCLOCK_CHARACTERISTICS_FLAGS
+{
+MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ   = 0x2,
+MFCLOCK_CHARACTERISTICS_FLAG_ALWAYS_RUNNING= 0x4,
+MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK   = 0x8
+} MFCLOCK_CHARACTERISTICS_FLAGS;
+
 cpp_quote("#if (WINVER >= 0x0601)")
-cpp_quote("")
-cpp_quote("typedef enum _MF_QUALITY_ADVISE_FLAGS {")
-cpp_quote("  MF_QUALITY_CANNOT_KEEP_UP   = 0x1")
-cpp_quote("} MF_QUALITY_ADVISE_FLAGS;")
-cpp_quote("")
+
+typedef enum _MF_QUALITY_ADVISE_FLAGS
+{
+MF_QUALITY_CANNOT_KEEP_UP = 0x1
+} MF_QUALITY_ADVISE_FLAGS;
+
 cpp_quote("#endif /*(WINVER >= 0x0601)*/")
-cpp_quote("")
-cpp_quote("typedef enum _MF_QUALITY_DROP_MODE {")
-cpp_quote("  MF_DROP_MODE_NONE   = 0x0,")
-cpp_quote("  MF_DROP_MODE_1  = 0x1,")
-cpp_quote("  MF_DROP_MODE_2  = 0x2,")
-cpp_quote("  MF_DROP_MODE_3  = 0x3,")
-cpp_quote("  MF_DROP_MODE_4  = 0x4,")
-cpp_quote("  MF_DROP_MODE_5  = 0x5,")
-cpp_quote("  MF_NUM_DROP_MODES   = 0x6")
-cpp_quote("} MF_QUALITY_DROP_MODE;")
-cpp_quote("")
-cpp_quote("typedef enum _MF_QUALITY_LEVEL {")
-cpp_quote("  MF_QUALITY_NORMAL   = 0x0,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_1   = 0x1,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_2   = 0x2,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_3   = 0x3,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_4   = 0x4,")
-cpp_quote("  MF_QUALITY_NORMAL_MINUS_5   = 0x5,")
-cpp_quote("  MF_NUM_QUALITY_LEVELS   = 0x6")
-cpp_quote("} MF_QUALITY_LEVEL;")
-cpp_quote("")
+
+typedef enum _MF_QUALITY_DROP_MODE
+{
+MF_DROP_MODE_NONE = 0x0,
+MF_DROP_MODE_1= 0x1,
+MF_DROP_MODE_2= 0x2,
+MF_DROP_MODE_3= 0x3,
+MF_DROP_MODE_4= 0x4,
+MF_DROP_MODE_5= 0x5,
+MF_NUM_DROP_MODES = 0x6
+} MF_QUALITY_DROP_MODE;
+
+typedef enum _MF_QUALITY_LEVEL
+{
+MF_QUALITY_NORMAL = 0x0,
+MF_QUALITY_NORMAL_MINUS_1 = 0x1,
+MF_QUALITY_NORMAL_MINUS_2 = 0x2,
+MF_QUALITY_NORMAL_MINUS_3 = 0x3,
+MF_QUALITY_NORMAL_MINUS_4 = 0x4,
+MF_QUALITY_NORMAL_MINUS_5 = 0x5,
+MF_NUM_QUALITY_LEVELS = 0x6
+} MF_QUALITY_LEVEL;
+
 cpp_quote("typedef enum MF_SOURCE_READER_CONTROL_FLAG {")
 cpp_quote("  MF_SOURCE_READER_CONTROLF_DRAIN   = 0x0001")
 cpp_quote("} MF_SOURCE_READER_CONTROL_FLAG;")
 cpp_quote("")
-cpp_quote("typedef enum _MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS {")
-cpp_quote("  MF_TOPOLOGY_RESOLUTION_SUCCEEDED  = 0x,")
-cpp_quote("  MF_OPTIONAL_NODE_REJECTED_MEDIA_TYPE  = 0x0001,")
-cpp_quote("  MF_OPTIONAL_NODE_REJECTED_PROTECTED_PROCESS   = 0x0002")
-cpp_quote("} MF_TOPOLOGY_RESOLUTION_STATUS_FLAGS;")
-cpp_quote("")
-cpp_quote("typedef enum _MF_TOPONODE_DRAIN_MODE {")
-cpp_quote("  MF_TOPONODE_DRAIN_DEFAULT,")
-cpp_quote("  MF_TOPONODE_DRAIN_ALWAYS,")
-cpp_quote("  MF_TOPONODE_DRAIN_NEVER")
-cpp_quote("} MF_TOPONODE_DRAIN_MODE;")
-cpp_quote("")
-cpp_quote("typedef enum _MF_TOPONODE_FLUSH_MODE {")
-cpp_quote("  MF_TOPONODE_FLUSH_ALWAYS,")
-cpp_quote("  MF_TOPONODE_FLUSH_SEEK,")
-cpp_quote("  MF_TOPONODE_FLUSH_NEVER")
-cpp_quote("} MF_TOPONODE_FLUSH_MODE;")
-cpp_quote(""

Re: [Mingw-w64-public] [PATCH] include: Fix definition of VMR9AlphaBitmap

2020-03-04 Thread Nikolay Sivov
On Wed, Mar 4, 2020 at 4:57 PM Liu Hao  wrote:

> 在 2020/3/4 20:03, xtne6f 写道:
> > Hello everyone!
> >
> > I have encountered a problem on using VMR9AlphaBitmap structure in
> > "vmr9.h". According to
> >
> https://docs.microsoft.com/en-us/windows/win32/directshow/directshow-structures
> >
> > , the `rDest` field of the structure is 'immediate', though the current
> > mingw-w64 definition is a pointer. Actually, I can use the structure
> > with no problem only if I modify it to the immediate one.
> >
> > At first, I tried generating "vmr9.h" from "vmr9.idl" by WIDL 5.0-rc1,
> but
> > some declarations in the generated header changed from WINBOOL to BOOL..
> > WINBOOL seems desirable according to mailing list logs, so I have edited
> > it without WIDL.
> >
> >
>
>
> This looks like a typo. Thanks for the report. I pushed this patch.
>

We have the issue in our copy, unsurprisingly. Just sent a fix to wine
headers.


>
>
> --
> Best regards,
> LH_Mouse
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>

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


Re: [Mingw-w64-public] ID2D1HwndRenderTarget_GetSize() SIGSERV with gcc 9.2

2019-11-23 Thread Nikolay Sivov
On Sat, Nov 23, 2019 at 10:12 PM Arthur Girardi 
wrote:

> > > > Could you post your converted source somewhere? It could be an issue
> > with
> > > > particular method prototype,
> > > > for example for GetSize() correct C prototype would be:
> > > >
> > > > D2D1_SIZE_F * target_GetSize(ID2D1HwndRenderTarget *iface,
> D2D1_SIZE_F
> > > > *size)
> > > >
> > >
> > > I've uploaded complete buildable source here[1]. It also includes a
> > > temporary fix at line 215 of WicViewerD2D.c that you need to remove to
> > see
> > > the problem.
> > >
> >
> > Thanks, I think mingw headers are broken when in C mode. Like I said,
> vtbl
> > method prototype should be:
> >
> >  D2D1_SIZE_F * (STDMETHODCALLTYPE *GetSize)(
> >  ID2D1HwndRenderTarget *This,
> >  D2D1_SIZE_F *__ret);
> >
> > In Wine we generate it from .idl sources, fixed up inline wrapper is like
> > this:
> >
> > static FORCEINLINE D2D1_SIZE_F
> > ID2D1HwndRenderTarget_GetSize(ID2D1HwndRenderTarget* This) {
> >  D2D1_SIZE_F __ret;
> >  return *This->lpVtbl->GetSize(This,&__ret);
> > }
> >
> >
> >
> > >
> > > [1] https://github.com/udbr/WicViewerD2D-C
> > >
> >
>
> Sorry, I think I got lost here. That fixed up wrapper should have to do
> with GetSize() returning incorrect data, right? Or is it related with the
> SIGSERV with gcc 9?
>

I think it's the same issue.


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

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


Re: [Mingw-w64-public] ID2D1HwndRenderTarget_GetSize() SIGSERV with gcc 9.2

2019-11-23 Thread Nikolay Sivov
On Sat, Nov 23, 2019 at 9:27 PM Arthur Girardi 
wrote:

> Em sáb., 23 de nov. de 2019 às 14:27, Nikolay Sivov 
> escreveu:
>
> > On Sat, Nov 23, 2019 at 8:12 PM Arthur Girardi 
> > wrote:
> >
> > > > > I'm building the WIC Viewer using Direct2D[1] sample from
> Microsoft,
> > > > > converted to C, and I'm getting some strange SIGSERV at the
> function
> > > > > ID2D1HwndRenderTarget_GetSize(m_pRT) when the program is compiled
> > with
> > > > gcc
> > > > > 9.x on a x86_64 system. No problem occurs when compiled with any
> gcc
> > > 8.x
> > > > > x86_64 or gcc 9.x i686. All builds using MSYS2 toolchain packages.
> > > > >
> > > >
> > > > Please provide the exact commands that you used to invoke G++. I
> > > > compiled the sample program with the following commands and ran it
> but
> > > > observed no segmentation faults:
> > > >
> > > > ```
> > > > windres WicViewerD2D.rc -o WicViewerD2D.o
> > > > g++ -municode -mwindows *.cpp *.o  \
> > > > -ld2d1 -lwindowscodecs -lole32  \
> > > > -o WicViewerD2D.exe
> > > > ```
> > > >
> > >
> > > Below is the complete command used by the IDE. Please allow me to
> remind
> > > you that this program is a direct conversion to C from the sample, so
> no
> > > g++ is used.
> > >
> > > gcc.exe -c WicViewerD2D.c -o WicViewerD2D.o
> -I"C:/msys64/mingw64/include"
> > > -I"C:/msys64/mingw64/x86_64-w64-mingw32/include"
> > > -I"C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/include"
> > > windres.exe -i WicViewer_private.rc --input-format=rc -o
> > > WicViewer_private.res -O coff
> > > gcc.exe WicViewerD2D.o WicViewer_private.res -o WicViewer.exe
> > > -L"C:/msys64/mingw64/lib" -L"C:/msys64/mingw64/x86_64-w64-mingw32/lib"
> > > -static-libgcc -mwindows -lole32 -ld2d1
> > >
> >
> > Could you post your converted source somewhere? It could be an issue with
> > particular method prototype,
> > for example for GetSize() correct C prototype would be:
> >
> > D2D1_SIZE_F * target_GetSize(ID2D1HwndRenderTarget *iface, D2D1_SIZE_F
> > *size)
> >
>
> I've uploaded complete buildable source here[1]. It also includes a
> temporary fix at line 215 of WicViewerD2D.c that you need to remove to see
> the problem.
>

Thanks, I think mingw headers are broken when in C mode. Like I said, vtbl
method prototype should be:

 D2D1_SIZE_F * (STDMETHODCALLTYPE *GetSize)(
 ID2D1HwndRenderTarget *This,
 D2D1_SIZE_F *__ret);

In Wine we generate it from .idl sources, fixed up inline wrapper is like
this:

static FORCEINLINE D2D1_SIZE_F
ID2D1HwndRenderTarget_GetSize(ID2D1HwndRenderTarget* This) {
 D2D1_SIZE_F __ret;
 return *This->lpVtbl->GetSize(This,&__ret);
}



>
> [1] https://github.com/udbr/WicViewerD2D-C
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>

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


[Mingw-w64-public] [PATCH] include/d2d1.h: Add missing D2D1_DRAW_TEXT_OPTIONS members.

2019-02-11 Thread Nikolay Sivov
---
From d570aebbda12a85bc28fc7da6f4a6a8881b0a624 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Tue, 12 Feb 2019 09:03:22 +0300
Subject: [PATCH] include/d2d1.h: Add missing D2D1_DRAW_TEXT_OPTIONS members.

Signed-off-by: Nikolay Sivov 
---
 mingw-w64-headers/include/d2d1.h | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-headers/include/d2d1.h b/mingw-w64-headers/include/d2d1.h
index 89ad1dc8..765c6809 100644
--- a/mingw-w64-headers/include/d2d1.h
+++ b/mingw-w64-headers/include/d2d1.h
@@ -274,10 +274,12 @@ typedef enum D2D1_DEBUG_LEVEL {
 } D2D1_DEBUG_LEVEL;
 
 typedef enum D2D1_DRAW_TEXT_OPTIONS {
-  D2D1_DRAW_TEXT_OPTIONS_NO_SNAP = 0x0001,
-  D2D1_DRAW_TEXT_OPTIONS_CLIP= 0x0002,
-  D2D1_DRAW_TEXT_OPTIONS_NONE= 0x,
-  D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD = 0x
+  D2D1_DRAW_TEXT_OPTIONS_NO_SNAP   = 0x0001,
+  D2D1_DRAW_TEXT_OPTIONS_CLIP  = 0x0002,
+  D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT = 0x0004,
+  D2D1_DRAW_TEXT_OPTIONS_DISABLE_COLOR_BITMAP_SNAPPING = 0x0008,
+  D2D1_DRAW_TEXT_OPTIONS_NONE  = 0x,
+  D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD   = 0x
 } D2D1_DRAW_TEXT_OPTIONS;
 
 typedef enum D2D1_EXTEND_MODE {
-- 
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] [v2] headers: Fixes for d2d1.h enum definitions

2019-02-11 Thread Nikolay Sivov
On Mon, Feb 11, 2019 at 1:16 PM Liu Hao  wrote:

> 在 2019/2/7 14:42, Liu Hao 写道:
> > 在 2019/2/5 下午9:38, Nikolay Sivov 写道:
> >> Split up from version 1.
> >>
> >>
> >>
> >
> > These patches seem to look fine. I may push them a few days later.
> > Thanks for the work.
> >
>
> Pushed both patches as `13345699` and `96916608`.
>

Great, thank you.


>
>
> --
> Best regards,
> LH_Mouse
>
>

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


[Mingw-w64-public] [v2] headers: Fixes for d2d1.h enum definitions

2019-02-05 Thread Nikolay Sivov
Split up from version 1.
From df63c0597f34b3f1969070e0d195f39b9f338a94 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Tue, 5 Feb 2019 16:05:43 +0300
Subject: [PATCH 1/2] headers: Fix enum identifier names from d2d1.h.

Signed-off-by: Nikolay Sivov 
---
 mingw-w64-headers/include/d2d1.h | 60 
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/mingw-w64-headers/include/d2d1.h b/mingw-w64-headers/include/d2d1.h
index ea8a0329..0ba2d7b8 100644
--- a/mingw-w64-headers/include/d2d1.h
+++ b/mingw-w64-headers/include/d2d1.h
@@ -190,19 +190,19 @@ typedef struct IDWriteTextLayout IDWriteTextLayout;
 typedef struct IDWriteFontFace IDWriteFontFace;
 #endif
 
-typedef enum _D2D1_ALPHA_MODE {
+typedef enum D2D1_ALPHA_MODE {
   D2D1_ALPHA_MODE_UNKNOWN = 0,
   D2D1_ALPHA_MODE_PREMULTIPLIED   = 1,
   D2D1_ALPHA_MODE_STRAIGHT= 2,
   D2D1_ALPHA_MODE_IGNORE  = 3 
 } D2D1_ALPHA_MODE;
 
-typedef enum _D2D1_ANTIALIAS_MODE {
+typedef enum D2D1_ANTIALIAS_MODE {
   D2D1_ANTIALIAS_MODE_PER_PRIMITIVE   = 0,
   D2D1_ANTIALIAS_MODE_ALIASED = 1 
 } D2D1_ANTIALIAS_MODE;
 
-typedef enum _D2D1_ARC_SIZE {
+typedef enum D2D1_ARC_SIZE {
   D2D1_ARC_SIZE_SMALL   = 0,
   D2D1_ARC_SIZE_LARGE   = 1 
 } D2D1_ARC_SIZE;
@@ -218,31 +218,31 @@ enum {
 D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR   = 7
 };
 
-typedef enum _D2D1_BITMAP_INTERPOLATION_MODE {
+typedef enum D2D1_BITMAP_INTERPOLATION_MODE {
   D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR   = 0,
   D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = 1 
 } D2D1_BITMAP_INTERPOLATION_MODE;
 
-typedef enum _D2D1_CAP_STYLE {
+typedef enum D2D1_CAP_STYLE {
   D2D1_CAP_STYLE_FLAT   = 0,
   D2D1_CAP_STYLE_SQUARE = 1,
   D2D1_CAP_STYLE_ROUND  = 2,
   D2D1_CAP_STYLE_TRIANGLE   = 3 
 } D2D1_CAP_STYLE;
 
-typedef enum _D2D1_COMBINE_MODE {
+typedef enum D2D1_COMBINE_MODE {
   D2D1_COMBINE_MODE_UNION   = 0,
   D2D1_COMBINE_MODE_INTERSECT   = 1,
   D2D1_COMBINE_MODE_XOR = 2,
   D2D1_COMBINE_MODE_EXCLUDE = 3 
 } D2D1_COMBINE_MODE;
 
-typedef enum _D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS {
+typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS {
   D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x,
   D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE   = 0x0001 
 } D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS;
 
-typedef enum _D2D1_DASH_STYLE {
+typedef enum D2D1_DASH_STYLE {
   D2D1_DASH_STYLE_SOLID  = 0,
   D2D1_DASH_STYLE_DASH   = 1,
   D2D1_DASH_STYLE_DOT= 2,
@@ -251,62 +251,62 @@ typedef enum _D2D1_DASH_STYLE {
   D2D1_DASH_STYLE_CUSTOM = 5 
 } D2D1_DASH_STYLE;
 
-typedef enum _D2D1_DC_INITIALIZE_MODE {
+typedef enum D2D1_DC_INITIALIZE_MODE {
   D2D1_DC_INITIALIZE_MODE_COPY= 0,
   D2D1_DC_INITIALIZE_MODE_CLEAR   = 1 
 } D2D1_DC_INITIALIZE_MODE;
 
-typedef enum _D2D1_DEBUG_LEVEL {
+typedef enum D2D1_DEBUG_LEVEL {
   D2D1_DEBUG_LEVEL_NONE  = 0,
   D2D1_DEBUG_LEVEL_ERROR = 1,
   D2D1_DEBUG_LEVEL_WARNING   = 2,
   D2D1_DEBUG_LEVEL_INFORMATION   = 3 
 } D2D1_DEBUG_LEVEL;
 
-typedef enum _D2D1_DRAW_TEXT_OPTIONS {
+typedef enum D2D1_DRAW_TEXT_OPTIONS {
   D2D1_DRAW_TEXT_OPTIONS_NO_SNAP   = 0x0001,
   D2D1_DRAW_TEXT_OPTIONS_CLIP  = 0x0002,
   D2D1_DRAW_TEXT_OPTIONS_NONE  = 0x 
 } D2D1_DRAW_TEXT_OPTIONS;
 
-typedef enum _D2D1_EXTEND_MODE {
+typedef enum D2D1_EXTEND_MODE {
   D2D1_EXTEND_MODE_CLAMP= 0,
   D2D1_EXTEND_MODE_WRAP = 1,
   D2D1_EXTEND_MODE_MIRROR   = 2 
 } D2D1_EXTEND_MODE;
 
-typedef enum _D2D1_FACTORY_TYPE {
+typedef enum D2D1_FACTORY_TYPE {
   D2D1_FACTORY_TYPE_SINGLE_THREADED   = 0,
   D2D1_FACTORY_TYPE_MULTI_THREADED= 1 
 } D2D1_FACTORY_TYPE;
 
-typedef enum _D2D1_FEATURE_LEVEL {
+typedef enum D2D1_FEATURE_LEVEL {
   D2D1_FEATURE_LEVEL_DEFAULT   = 0,
   D2D1_FEATURE_LEVEL_9 = D3D10_FEATURE_LEVEL_9_1,
   D2D1_FEATURE_LEVEL_10= D3D10_FEATURE_LEVEL_10_0 
 } D2D1_FEATURE_LEVEL;
 
-typedef enum _D2D1_FIGURE_BEGIN {
+typedef enum D2D1_FIGURE_BEGIN {
   D2D1_FIGURE_BEGIN_FILLED   = 0,
   D2D1_FIGURE_BEGIN_HOLLOW   = 1 
 } D2D1_FIGURE_BEGIN;
 
-typedef enum _D2D1_FIGURE_END {
+typedef enum D2D1_FIGURE_END {
   D2D1_FIGURE_END_OPEN = 0,
   D2D1_FIGURE_END_CLOSED   = 1 
 } D2D1_FIGURE_END;
 
-typedef enum _D2D1_FILL_MODE {
+typedef enum D2D1_FILL_MODE {
   D2D1_FILL_MODE_ALTERNATE   = 0,
   D2D1_FILL_MODE_WINDING = 1 
 } D2D1_FILL_MODE;
 
-typedef enum _D2D1_GAMMA {
+typedef enum D2D1_GAMMA {
   D2D1_GAMMA_2_2   = 0,
   D2D1_GAMMA_1_0   = 1 
 } D2D1_GAMMA;
 
-typedef enum _D2D1_GEOMETRY_RELATION {
+typedef enum D2D1_GEOMETRY_RELATION {
   D2D1_GEOMETRY_RELATION_UNKNOWN= 0,
   D2D1_GEOMETRY_RELATION_DISJOINT   = 1,
   D2D1_GEOMETRY_RELATION_IS_CONTAINED   = 2,
@@ -314,66 +314,66 @@ typedef enum _D2D1_GEOMETRY_RELATION {
   D2D1_GEOMETRY_RELATION_OVERLAP= 4 
 } D2D1_GEOMETRY_RELATION;
 
-typedef enum

Re: [Mingw-w64-public] [PATCH] headers: Update d2d1.h enums with missing members.

2019-01-28 Thread Nikolay Sivov
On Mon, Jan 28, 2019 at 3:53 PM Liu Hao  wrote:

> 在 2019/1/28 0:16, Nikolay Sivov 写道:
> > From 789bdbbfa35f0145a656d31a06b4bb54d7181155 Mon Sep 17 00:00:00 2001
> > From: Nikolay Sivov 
> > Date: Sun, 27 Jan 2019 19:15:17 +0300
> > Subject: [PATCH] headers: Update d2d1.h enums with missing members.
> >
> > Signed-off-by: Nikolay Sivov 
> > ---
> >  mingw-w64-headers/include/d2d1.h | 182 ++-
> >  1 file changed, 107 insertions(+), 75 deletions(-)
>
> This probably looks good, as it makes enum tags match those in Windows
> SDK. Those little alignment fixups probably don't need a separated patch.
>

You mean member values formatting? I changed alignment only because those
additional members.

I can split name change, FORCE_DWORD addition, and new members for text
options enum, so 3 patches total. Does that sound good?


>
>
> --
> Best regards,
> LH_Mouse
>
>

___
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] headers: Update d2d1.h enums with missing members.

2019-01-27 Thread Nikolay Sivov
On Mon, Jan 28, 2019 at 3:27 AM JonY via Mingw-w64-public <
mingw-w64-public@lists.sourceforge.net> wrote:

> On 1/27/19 4:16 PM, Nikolay Sivov wrote:
> > ---
> >
>
> Please split functionality and styling changes into separate patches,
> and explain why the _StructName variants are removed.
>

Underscored names do no exist in Windows SDK for those enums, every type
there is defined as 'typedef enum name {} name;' and this patch matches
that.


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

___
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: Update d2d1.h enums with missing members.

2019-01-27 Thread Nikolay Sivov
---
From 789bdbbfa35f0145a656d31a06b4bb54d7181155 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Sun, 27 Jan 2019 19:15:17 +0300
Subject: [PATCH] headers: Update d2d1.h enums with missing members.

Signed-off-by: Nikolay Sivov 
---
 mingw-w64-headers/include/d2d1.h | 182 ++-
 1 file changed, 107 insertions(+), 75 deletions(-)

diff --git a/mingw-w64-headers/include/d2d1.h b/mingw-w64-headers/include/d2d1.h
index ea8a0329..765c6809 100644
--- a/mingw-w64-headers/include/d2d1.h
+++ b/mingw-w64-headers/include/d2d1.h
@@ -190,21 +190,24 @@ typedef struct IDWriteTextLayout IDWriteTextLayout;
 typedef struct IDWriteFontFace IDWriteFontFace;
 #endif
 
-typedef enum _D2D1_ALPHA_MODE {
+typedef enum D2D1_ALPHA_MODE {
   D2D1_ALPHA_MODE_UNKNOWN = 0,
   D2D1_ALPHA_MODE_PREMULTIPLIED   = 1,
   D2D1_ALPHA_MODE_STRAIGHT= 2,
-  D2D1_ALPHA_MODE_IGNORE  = 3 
+  D2D1_ALPHA_MODE_IGNORE  = 3,
+  D2D1_ALPHA_MODE_FORCE_DWORD = 0x
 } D2D1_ALPHA_MODE;
 
-typedef enum _D2D1_ANTIALIAS_MODE {
+typedef enum D2D1_ANTIALIAS_MODE {
   D2D1_ANTIALIAS_MODE_PER_PRIMITIVE   = 0,
-  D2D1_ANTIALIAS_MODE_ALIASED = 1 
+  D2D1_ANTIALIAS_MODE_ALIASED = 1,
+  D2D1_ANTIALIAS_MODE_FORCE_DWORD = 0x
 } D2D1_ANTIALIAS_MODE;
 
-typedef enum _D2D1_ARC_SIZE {
-  D2D1_ARC_SIZE_SMALL   = 0,
-  D2D1_ARC_SIZE_LARGE   = 1 
+typedef enum D2D1_ARC_SIZE {
+  D2D1_ARC_SIZE_SMALL   = 0,
+  D2D1_ARC_SIZE_LARGE   = 1,
+  D2D1_ARC_SIZE_FORCE_DWORD = 0x
 } D2D1_ARC_SIZE;
 
 enum {
@@ -218,164 +221,193 @@ enum {
 D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR   = 7
 };
 
-typedef enum _D2D1_BITMAP_INTERPOLATION_MODE {
+typedef enum D2D1_BITMAP_INTERPOLATION_MODE {
   D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR   = 0,
-  D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = 1 
+  D2D1_BITMAP_INTERPOLATION_MODE_LINEAR = 1,
+  D2D1_BITMAP_INTERPOLATION_MODE_FORCE_DWORD= 0x
 } D2D1_BITMAP_INTERPOLATION_MODE;
 
-typedef enum _D2D1_CAP_STYLE {
-  D2D1_CAP_STYLE_FLAT   = 0,
-  D2D1_CAP_STYLE_SQUARE = 1,
-  D2D1_CAP_STYLE_ROUND  = 2,
-  D2D1_CAP_STYLE_TRIANGLE   = 3 
+typedef enum D2D1_CAP_STYLE {
+  D2D1_CAP_STYLE_FLAT= 0,
+  D2D1_CAP_STYLE_SQUARE  = 1,
+  D2D1_CAP_STYLE_ROUND   = 2,
+  D2D1_CAP_STYLE_TRIANGLE= 3,
+  D2D1_CAP_STYLE_FORCE_DWORD = 0x
 } D2D1_CAP_STYLE;
 
-typedef enum _D2D1_COMBINE_MODE {
+typedef enum D2D1_COMBINE_MODE {
   D2D1_COMBINE_MODE_UNION   = 0,
   D2D1_COMBINE_MODE_INTERSECT   = 1,
   D2D1_COMBINE_MODE_XOR = 2,
-  D2D1_COMBINE_MODE_EXCLUDE = 3 
+  D2D1_COMBINE_MODE_EXCLUDE = 3,
+  D2D1_COMBINE_MODE_FORCE_DWORD = 0x
 } D2D1_COMBINE_MODE;
 
-typedef enum _D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS {
+typedef enum D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS {
   D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE = 0x,
-  D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE   = 0x0001 
+  D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE   = 0x0001,
+  D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_FORCE_DWORD  = 0x
 } D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS;
 
-typedef enum _D2D1_DASH_STYLE {
+typedef enum D2D1_DASH_STYLE {
   D2D1_DASH_STYLE_SOLID  = 0,
   D2D1_DASH_STYLE_DASH   = 1,
   D2D1_DASH_STYLE_DOT= 2,
   D2D1_DASH_STYLE_DASH_DOT   = 3,
   D2D1_DASH_STYLE_DASH_DOT_DOT   = 4,
-  D2D1_DASH_STYLE_CUSTOM = 5 
+  D2D1_DASH_STYLE_CUSTOM = 5,
+  D2D1_DASH_STYLE_FORCE_DWORD= 0x
 } D2D1_DASH_STYLE;
 
-typedef enum _D2D1_DC_INITIALIZE_MODE {
-  D2D1_DC_INITIALIZE_MODE_COPY= 0,
-  D2D1_DC_INITIALIZE_MODE_CLEAR   = 1 
+typedef enum D2D1_DC_INITIALIZE_MODE {
+  D2D1_DC_INITIALIZE_MODE_COPY= 0,
+  D2D1_DC_INITIALIZE_MODE_CLEAR   = 1,
+  D2D1_DC_INITIALIZE_MODE_FORCE_DWORD = 0x
 } D2D1_DC_INITIALIZE_MODE;
 
-typedef enum _D2D1_DEBUG_LEVEL {
+typedef enum D2D1_DEBUG_LEVEL {
   D2D1_DEBUG_LEVEL_NONE  = 0,
   D2D1_DEBUG_LEVEL_ERROR = 1,
   D2D1_DEBUG_LEVEL_WARNING   = 2,
-  D2D1_DEBUG_LEVEL_INFORMATION   = 3 
+  D2D1_DEBUG_LEVEL_INFORMATION   = 3,
+  D2D1_DEBUG_LEVEL_FORCE_DWORD   = 0x
 } D2D1_DEBUG_LEVEL;
 
-typedef enum _D2D1_DRAW_TEXT_OPTIONS {
-  D2D1_DRAW_TEXT_OPTIONS_NO_SNAP   = 0x0001,
-  D2D1_DRAW_TEXT_OPTIONS_CLIP  = 0x0002,
-  D2D1_DRAW_TEXT_OPTIONS_NONE  = 0x 
+typedef enum D2D1_DRAW_TEXT_OPTIONS {
+  D2D1_DRAW_TEXT_OPTIONS_NO_SNAP   = 0x0001,
+  D2D1_DRAW_TEXT_OPTIONS_CLIP  = 0x0002,
+  D2D1_DRAW_TEXT_OPTIONS_ENABLE_COLOR_FONT = 0x0004,
+  D2D1_DRAW_TEXT_OPTIONS_DISABLE_COLOR_BITMAP_SNAPPING = 0x0008,
+  D2D1_DRAW_TEXT_OPTIONS_NONE  = 0x,
+  D2D1_DRAW_TEXT_OPTIONS_FORCE_DWORD   = 0x
 } D2D1_DRAW_TEXT_OPTIONS;
 
-typedef enum _D2D1_EXTEND_MODE

[Mingw-w64-public] [v3 PATCH] headers: Make dwrite_1.h C friendly.

2019-01-25 Thread Nikolay Sivov
---
From 8096ec452013f96a48b08d886e8abb547e5f413f Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Fri, 25 Jan 2019 01:25:19 +0300
Subject: [PATCH] headers: Make dwrite_1.h C friendly.

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

diff --git a/mingw-w64-headers/include/dwrite_1.h 
b/mingw-w64-headers/include/dwrite_1.h
index 87fbdffc..52de1fc7 100644
--- a/mingw-w64-headers/include/dwrite_1.h
+++ b/mingw-w64-headers/include/dwrite_1.h
@@ -58,7 +58,23 @@ struct DWRITE_UNICODE_RANGE {
 UINT32 last;
 };
 
-struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS {
+struct DWRITE_FONT_METRICS1
+#ifdef __cplusplus
+: public DWRITE_FONT_METRICS
+#endif
+{
+#ifndef __cplusplus
+UINT16 designUnitsPerEm;
+UINT16 ascent;
+UINT16 descent;
+INT16 lineGap;
+UINT16 capHeight;
+UINT16 xHeight;
+INT16 underlinePosition;
+UINT16 underlineThickness;
+INT16 strikethroughPosition;
+UINT16 strikethroughThickness;
+#endif
 INT16 glyphBoxLeft;
 INT16 glyphBoxTop;
 INT16 glyphBoxRight;
@@ -71,7 +87,7 @@ struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS {
 INT16 superscriptPositionY;
 INT16 superscriptSizeX;
 INT16 superscriptSizeY;
-BOOL hasTypographicMetrics;
+WINBOOL hasTypographicMetrics;
 };
 
 struct DWRITE_SCRIPT_PROPERTIES
-- 
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] [v2 PATCH] headers: Make dwrite_1.h C friendly.

2019-01-25 Thread Nikolay Sivov
Alright, thanks.

On Fri, Jan 25, 2019 at 3:53 PM JonY via Mingw-w64-public <
mingw-w64-public@lists.sourceforge.net> wrote:

> On 1/25/19 12:27 PM, Nikolay Sivov wrote:
> > v2: added separate definition for C
> >
>
> No need to repeat the members, you should be able to do something like:
>
> struct DWRITE_FONT_METRICS1
> #ifdef __cplusplus
>   : public DWRITE_FONT_METRICS
> #endif
> {
> #ifndef __cplusplus
> UINT16 designUnitsPerEm;
> UINT16 ascent;
> UINT16 descent;
> INT16 lineGap;
> UINT16 capHeight;
> UINT16 xHeight;
> INT16 underlinePosition;
> UINT16 underlineThickness;
> INT16 strikethroughPosition;
> UINT16 strikethroughThickness;
> #endif
> INT16 glyphBoxLeft;
> INT16 glyphBoxTop;
> INT16 glyphBoxRight;
> INT16 glyphBoxBottom;
> INT16 subscriptPositionX;
> INT16 subscriptPositionY;
> INT16 subscriptSizeX;
> INT16 subscriptSizeY;
> INT16 superscriptPositionX;
> INT16 superscriptPositionY;
> INT16 superscriptSizeX;
> INT16 superscriptSizeY;
> WINBOOL hasTypographicMetrics;
> };
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>

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


[Mingw-w64-public] [v2 PATCH] headers: Make dwrite_1.h C friendly.

2019-01-25 Thread Nikolay Sivov
v2: added separate definition for C
From 8252ec9bb36419722fc810af8c53a7f40e4dd208 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Fri, 25 Jan 2019 01:25:19 +0300
Subject: [PATCH] headers: Make dwrite_1.h C friendly.

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

diff --git a/mingw-w64-headers/include/dwrite_1.h 
b/mingw-w64-headers/include/dwrite_1.h
index 87fbdffc..bf71c5ca 100644
--- a/mingw-w64-headers/include/dwrite_1.h
+++ b/mingw-w64-headers/include/dwrite_1.h
@@ -58,7 +58,36 @@ struct DWRITE_UNICODE_RANGE {
 UINT32 last;
 };
 
-struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS {
+#ifdef __cplusplus
+struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS
+{
+INT16 glyphBoxLeft;
+INT16 glyphBoxTop;
+INT16 glyphBoxRight;
+INT16 glyphBoxBottom;
+INT16 subscriptPositionX;
+INT16 subscriptPositionY;
+INT16 subscriptSizeX;
+INT16 subscriptSizeY;
+INT16 superscriptPositionX;
+INT16 superscriptPositionY;
+INT16 superscriptSizeX;
+INT16 superscriptSizeY;
+BOOL hasTypographicMetrics;
+};
+#else
+struct DWRITE_FONT_METRICS1
+{
+UINT16 designUnitsPerEm;
+UINT16 ascent;
+UINT16 descent;
+INT16 lineGap;
+UINT16 capHeight;
+UINT16 xHeight;
+INT16 underlinePosition;
+UINT16 underlineThickness;
+INT16 strikethroughPosition;
+UINT16 strikethroughThickness;
 INT16 glyphBoxLeft;
 INT16 glyphBoxTop;
 INT16 glyphBoxRight;
@@ -73,6 +102,7 @@ struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS {
 INT16 superscriptSizeY;
 BOOL hasTypographicMetrics;
 };
+#endif
 
 struct DWRITE_SCRIPT_PROPERTIES
 {
-- 
2.20.1

___
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: Make dwrite_1.h C friendly.

2019-01-24 Thread Nikolay Sivov
---
From 0a52048e0368b043abc0791ef4c6969fc1e603ef Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Fri, 25 Jan 2019 01:25:19 +0300
Subject: [PATCH] headers: Make dwrite_1.h C friendly.

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

diff --git a/mingw-w64-headers/include/dwrite_1.h 
b/mingw-w64-headers/include/dwrite_1.h
index 87fbdffc..a3262207 100644
--- a/mingw-w64-headers/include/dwrite_1.h
+++ b/mingw-w64-headers/include/dwrite_1.h
@@ -58,7 +58,18 @@ struct DWRITE_UNICODE_RANGE {
 UINT32 last;
 };
 
-struct DWRITE_FONT_METRICS1 : public DWRITE_FONT_METRICS {
+struct DWRITE_FONT_METRICS1
+{
+UINT16 designUnitsPerEm;
+UINT16 ascent;
+UINT16 descent;
+INT16 lineGap;
+UINT16 capHeight;
+UINT16 xHeight;
+INT16 underlinePosition;
+UINT16 underlineThickness;
+INT16 strikethroughPosition;
+UINT16 strikethroughThickness;
 INT16 glyphBoxLeft;
 INT16 glyphBoxTop;
 INT16 glyphBoxRight;
-- 
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] headers: Remove C-compatibility parts from dwrite_2.h.

2019-01-23 Thread Nikolay Sivov
On Wed, Jan 23, 2019 at 3:34 PM Jacek Caban  wrote:

> On 1/16/19 2:32 PM, Nikolay Sivov wrote:
> > after it's decided where to go with this patch.
>
>
> FWIW, I don't have a strong opinion, but if supporting pure C is a
> matter of fixing just one struct that uses C++ inheritance, I'd just fix
> it.
>
>
I don't disagree. This structure is in dwrite_1.h, this patch is for
dwrite_2.h. Fixing this structure will help with dwrite_1.h only, because
newer headers have this overloading thing, in addition to structure
inheritance.


>
> Thanks,
>
> Jacek
>
>

___
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] headers: Remove C-compatibility parts from dwrite_2.h.

2019-01-16 Thread Nikolay Sivov
On Wed, Jan 16, 2019 at 4:30 PM Tomasz Konojacki  wrote:

> On Wed, 16 Jan 2019 16:02:09 +0300
> Nikolay Sivov  wrote:
>
> > I'm not, but I don't see how "struct a: public struct b" would work in
> > objc, same for overloaded methods.
>
> It won't work in Objective C, but I think it will work in Objective C++.
>

Okay, I didn't know that was a thing. I'll update those headers to use
WINBOOL then, after it's decided where to go with this patch.


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

___
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] headers: Remove C-compatibility parts from dwrite_2.h.

2019-01-16 Thread Nikolay Sivov
On Wed, Jan 16, 2019 at 3:03 PM JonY via Mingw-w64-public <
mingw-w64-public@lists.sourceforge.net> wrote:

> On 1/16/19 11:46 AM, Nikolay Sivov wrote:
> > On Wed, Jan 16, 2019 at 2:42 PM JonY via Mingw-w64-public <
> > mingw-w64-public@lists.sourceforge.net> wrote:
> >
> >> On 1/16/19 7:18 AM, Nikolay Sivov wrote:
> >>> 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.
> >>>
> >>
> >> WINBOOL is used to get around type conflicts when Objective C/C++ is
> >> used. So, preferably WINBOOL is used.
> >>
> >
> > Right, I gathered that much from the way it's defined. But why does it
> > matter for headers that are not meant to be used with Obj-C compiler?
> >
> >
>
> Are you sure they're not meant to be used for Objc?
>

I'm not, but I don't see how "struct a: public struct b" would work in
objc, same for overloaded methods.


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

___
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] headers: Remove C-compatibility parts from dwrite_2.h.

2019-01-16 Thread Nikolay Sivov
On Wed, Jan 16, 2019 at 2:42 PM JonY via Mingw-w64-public <
mingw-w64-public@lists.sourceforge.net> wrote:

> On 1/16/19 7:18 AM, Nikolay Sivov wrote:
> > 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.
> >
>
> WINBOOL is used to get around type conflicts when Objective C/C++ is
> used. So, preferably WINBOOL is used.
>

Right, I gathered that much from the way it's defined. But why does it
matter for headers that are not meant to be used with Obj-C compiler?


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

___
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


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

2019-01-14 Thread Nikolay Sivov
---
From df308012e23c28fe774bf93076369ab96c9b3e78 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Mon, 14 Jan 2019 17:58:05 +0300
Subject: [PATCH] include: Add remaining interface definitions from dwrite_1.h.

Signed-off-by: Nikolay Sivov 
---
 mingw-w64-headers/include/dwrite_1.h | 158 ++-
 1 file changed, 154 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-headers/include/dwrite_1.h 
b/mingw-w64-headers/include/dwrite_1.h
index 1550972f..67b28179 100644
--- a/mingw-w64-headers/include/dwrite_1.h
+++ b/mingw-w64-headers/include/dwrite_1.h
@@ -152,7 +152,65 @@ union DWRITE_PANOSE {
 };
 
 #undef  INTERFACE
-#define INTERFACE IDWriteFontCollection
+#define INTERFACE IDWriteFont1
+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_(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(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_(void, GetMetrics)(THIS_
+DWRITE_FONT_METRICS *fontMetrics) PURE;
+
+STDMETHOD(HasCharacter)(THIS_
+UINT32 unicodeValue,
+WINBOOL *exists) PURE;
+
+STDMETHOD(CreateFontFace)(THIS_
+IDWriteFontFace **fontFace) PURE;
+#endif
+
+STDMETHOD_(void, GetMetrics)(THIS_
+DWRITE_FONT_METRICS1 *fontMetrics) PURE;
+
+STDMETHOD_(void, GetPanose)(THIS_
+DWRITE_PANOSE *panose) PURE;
+
+STDMETHOD(GetUnicodeRanges)(THIS_
+UINT32 maxCount,
+DWRITE_UNICODE_RANGE *ranges,
+UINT32 *actualCount) PURE;
+
+END_INTERFACE
+};
+
+__CRT_UUID_DECL(IDWriteFont1, 
0xacd16696,0x8c14,0x4f5d,0x87,0x7e,0xfe,0x3f,0xc1,0xd3,0x27,0x38);
+
+#undef  INTERFACE
+#define INTERFACE IDWriteFontFace1
 DECLARE_INTERFACE_(IDWriteFontFace1, IDWriteFontFace)
 {
 BEGIN_INTERFACE
@@ -282,9 +340,101 @@ 
DECLARE_INTERFACE_(IDWriteRenderingParams1,IDWriteRenderingParams)
 
 __CRT_UUID_DECL(IDWriteRenderingParams1, 
0x94413cf4,0xa6fc,0x4248,0x8b,0x50,0x66,0x74,0x34,0x8f,0xca,0xd3)
 
-interface IDWriteTextAnalysisSource1;
-interface IDWriteTextAnalysisSink1;
-interface IDWriteRenderingParams1;
+#undef  INTERFACE
+#define INTERFACE IDWriteTextAnalysisSource1
+DECLARE_INTERFACE_(IDWriteTextAnalysisSource1,IDWriteTextAnalysisSource)
+{
+BEGIN_INTERFACE
+
+#ifndef __cplusplus
+/* IUnknown methods */
+STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
+STDMETHOD_(ULONG, AddRef)(THIS) PURE;
+STDMETHOD_(ULONG, Release)(THIS) PURE;
+
+/* IDWriteTextAnalysisSource methods */
+STDMETHOD(GetTextAtPosition)(THIS_
+UINT32 textPosition,
+WCHAR const **textString,
+UINT32 *textLength) PURE;
+
+STDMETHOD(GetTextBeforePosition)(THIS_
+UINT32 textPosition,
+WCHAR const **textString,
+UINT32 *textLength) PURE;
+
+STDMETHOD_(DWRITE_READING_DIRECTION, GetParagraphReadingDirection)(THIS) 
PURE;
+
+STDMETHOD(GetLocaleName)(THIS_
+UINT32 textPosition,
+UINT32 *textLength,
+WCHAR const **localeName) PURE;
+
+STDMETHOD(GetNumberSubstitution)(THIS_
+UINT32 textPosition,
+UINT32 *textLength,
+IDWriteNumberSubstitution **numberSubstitution) PURE;
+#endif
+
+STDMETHOD(GetVerticalGlyphOrientation)(THIS_
+UINT32 textPosition,
+UINT32 *textLength,
+DWRITE_VERTICAL_GLYPH_ORIENTATION *orientation,
+UINT8 *bidiLevel) PURE;
+
+END_INTERFACE
+};
+
+__CRT_UUID_DECL(IDWriteTextAnalysisSource1, 
0x639cfad8,0x0fb4,0x4b21,0xa5,0x8a,0x06,0x79,0x20,0x12,0x00,0x09);
+
+#undef  INTERFACE
+#define INTERFACE IDWriteTextAnalysisSink1
+DECLARE_INTERFACE_(IDWriteTextAnalysisSink1,IDWriteTextAnalysisSink)
+{
+BEGIN_INTERFACE
+
+#ifndef __cplusplus
+/* IUnknown methods */
+STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
+STDMETHOD_(ULONG, AddRef)(THIS) PURE;
+STDMETHOD_(ULONG, Release)(THIS) PURE;
+
+/* IDWriteTextAnalysisSink methods */
+STDMETHOD(SetScriptAnalysis)(THIS_
+UINT32 textPosition,
+UINT32 textLength,
+DWRITE_SCRIPT_ANALYSIS const *scriptAnalysis) PURE;
+
+STDMETHOD(SetLineBreakpoints)(THIS_
+UINT32 textPosition

[Mingw-w64-public] [v2 PATCH] include: Add IDWriteTextLayout1 definition.

2019-01-14 Thread Nikolay Sivov
v2: fixed typos
From 20da81be71594594a2aa804c7409761ab6cb9692 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov 
Date: Mon, 14 Jan 2019 13:03:53 +0300
Subject: [PATCH] include: Add IDWriteTextLayout1 definition.

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

diff --git a/mingw-w64-headers/include/dwrite_1.h 
b/mingw-w64-headers/include/dwrite_1.h
index 413f9e87..1550972f 100644
--- a/mingw-w64-headers/include/dwrite_1.h
+++ b/mingw-w64-headers/include/dwrite_1.h
@@ -485,6 +485,232 @@ 
DECLARE_INTERFACE_(IDWriteTextAnalyzer1,IDWriteTextAnalyzer)
 
 __CRT_UUID_DECL(IDWriteTextAnalyzer1, 
0x80dad800,0xe21f,0x4e83,0x4e,0xce,0xbf,0xcc,0xe5,0x00,0xdb,0x7c);
 
+#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,
+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

[Mingw-w64-public] [PATCH] dwrite.h: Fix IDWriteLocalFontFileLoader definition.

2018-09-02 Thread Nikolay Sivov
Signed-off-by: Nikolay Sivov 
---
 mingw-w64-headers/include/dwrite.h | 22 +-
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/mingw-w64-headers/include/dwrite.h 
b/mingw-w64-headers/include/dwrite.h
index fa83d561..f3968bea 100644
--- a/mingw-w64-headers/include/dwrite.h
+++ b/mingw-w64-headers/include/dwrite.h
@@ -8,13 +8,6 @@
 
 #define DWRITEAPI DECLSPEC_IMPORT
 
-#ifdef __MINGW_USE_BROKEN_INTERFACE
-#define __MINGW_POISON_NAME(__IFACE) __IFACE
-#else
-#define __MINGW_POISON_NAME(__IFACE)\
-  
__IFACE##_layout_has_not_been_verified_and_its_declaration_is_most_likely_incorrect
-#endif
-
 #include 
 
 #ifndef DWRITE_DECLARE_INTERFACE
@@ -1426,7 +1419,7 @@ DECLARE_INTERFACE_(IDWriteInlineObject,IUnknown)
 
 #undef  INTERFACE
 #define INTERFACE IDWriteLocalFontFileLoader
-DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
+DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IDWriteFontFileLoader)
 {
 BEGIN_INTERFACE
 
@@ -1437,10 +1430,13 @@ DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
 STDMETHOD_(ULONG, Release)(THIS) PURE;
 #endif
 
+/* IDWriteFontFileLoader methods */
+STDMETHOD(CreateStreamFromKey(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,IDWriteFontFileStream 
**fileStream) PURE;
+
 /* IDWriteLocalFontFileLoader methods */
-STDMETHOD_(HRESULT,GetFilePathLengthFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,UINT32 *filePathLength) 
PURE;
-STDMETHOD_(HRESULT,GetFilePathFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,WCHAR *filePath,UINT32 
filePathSize) PURE;
-STDMETHOD_(HRESULT,GetLastWriteTimeFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,FILETIME *lastWriteTime) 
PURE;
+STDMETHOD(GetFilePathLengthFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,UINT32 *filePathLength) 
PURE;
+STDMETHOD(GetFilePathFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,WCHAR *filePath,UINT32 
filePathSize) PURE;
+STDMETHOD(GetLastWriteTimeFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,FILETIME *lastWriteTime) 
PURE;
 
 END_INTERFACE
 };
@@ -1448,6 +1444,7 @@ DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
 #define IDWriteLocalFontFileLoader_QueryInterface(This,riid,ppvObject) 
(This)->lpVtbl->QueryInterface(This,riid,ppvObject)
 #define IDWriteLocalFontFileLoader_AddRef(This) (This)->lpVtbl->AddRef(This)
 #define IDWriteLocalFontFileLoader_Release(This) (This)->lpVtbl->Release(This)
+#define 
IDWriteLocalFontFileLoader_CreateStreamFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,fileStream)
 
(This)->lpVtbl->CreateStreamFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,fileStream)
 #define 
IDWriteLocalFontFileLoader_GetFilePathLengthFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePathLength)
 
(This)->lpVtbl->GetFilePathLengthFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePathLength)
 #define 
IDWriteLocalFontFileLoader_GetFilePathFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePath,filePathSize)
 
(This)->lpVtbl->GetFilePathFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePath,filePathSize)
 #define 
IDWriteLocalFontFileLoader_GetLastWriteTimeFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,lastWriteTime)
 
(This)->lpVtbl->GetLastWriteTimeFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,lastWriteTime)
@@ -2313,7 +2310,6 @@ __CRT_UUID_DECL(IDWriteTextLayout, 
0x53737037,0x6d14,0x410b,0x9b,0xfe,0x0b,0x18,
 __CRT_UUID_DECL(IDWriteFontFileEnumerator, 
0x72755049,0x5ff7,0x435d,0x83,0x48,0x4b,0xe9,0x7c,0xfa,0x6c,0x7c);
 __CRT_UUID_DECL(IDWriteFontCollectionLoader, 
0xcca920e4,0x52f0,0x492b,0xbf,0xa8,0x29,0xc7,0x2e,0xe0,0xa4,0x68);
 __CRT_UUID_DECL(IDWriteTypography, 
0x55f1112b,0x1dc2,0x4b3c,0x95,0x41,0xf4,0x68,0x94,0xed,0x85,0xb6);
-
-#define IDWriteLocalFontFileLoader 
__MINGW_POISON_NAME(IDWriteLocalFontFileLoader)
+__CRT_UUID_DECL(IDWriteLocalFontFileLoader,0xb2d9f3ec,0xc9fe,0x4a11,0xa2,0xec,0xd8,0x62,0x08,0xf7,0xc0,0xa2);
 
 #endif /* __INC_DWRITE__ */
-- 
2.18.0


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [v2 PATCH] dwrite.h: Fix IDWriteLocalFontFileLoader definition.

2018-09-01 Thread Nikolay Sivov
Signed-off-by: Nikolay Sivov 
---

v2: moved IDWriteFontFileLoader methods to __cplusplus block.

 mingw-w64-headers/include/dwrite.h | 22 +-
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/mingw-w64-headers/include/dwrite.h 
b/mingw-w64-headers/include/dwrite.h
index fa83d561..9a0cc02d 100644
--- a/mingw-w64-headers/include/dwrite.h
+++ b/mingw-w64-headers/include/dwrite.h
@@ -8,13 +8,6 @@
 
 #define DWRITEAPI DECLSPEC_IMPORT
 
-#ifdef __MINGW_USE_BROKEN_INTERFACE
-#define __MINGW_POISON_NAME(__IFACE) __IFACE
-#else
-#define __MINGW_POISON_NAME(__IFACE)\
-  
__IFACE##_layout_has_not_been_verified_and_its_declaration_is_most_likely_incorrect
-#endif
-
 #include 
 
 #ifndef DWRITE_DECLARE_INTERFACE
@@ -1426,7 +1419,7 @@ DECLARE_INTERFACE_(IDWriteInlineObject,IUnknown)
 
 #undef  INTERFACE
 #define INTERFACE IDWriteLocalFontFileLoader
-DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
+DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IDWriteFontFileLoader)
 {
 BEGIN_INTERFACE
 
@@ -1435,12 +1428,15 @@ DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
 STDMETHOD_(ULONG, Release)(THIS) PURE;
+
+/* IDWriteFontFileLoader methods */
+STDMETHOD(CreateStreamFromKey(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,IDWriteFontFileStream 
**fileStream) PURE;
 #endif
 
 /* IDWriteLocalFontFileLoader methods */
-STDMETHOD_(HRESULT,GetFilePathLengthFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,UINT32 *filePathLength) 
PURE;
-STDMETHOD_(HRESULT,GetFilePathFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,WCHAR *filePath,UINT32 
filePathSize) PURE;
-STDMETHOD_(HRESULT,GetLastWriteTimeFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,FILETIME *lastWriteTime) 
PURE;
+STDMETHOD(GetFilePathLengthFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,UINT32 *filePathLength) 
PURE;
+STDMETHOD(GetFilePathFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,WCHAR *filePath,UINT32 
filePathSize) PURE;
+STDMETHOD(GetLastWriteTimeFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,FILETIME *lastWriteTime) 
PURE;
 
 END_INTERFACE
 };
@@ -1448,6 +1444,7 @@ DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
 #define IDWriteLocalFontFileLoader_QueryInterface(This,riid,ppvObject) 
(This)->lpVtbl->QueryInterface(This,riid,ppvObject)
 #define IDWriteLocalFontFileLoader_AddRef(This) (This)->lpVtbl->AddRef(This)
 #define IDWriteLocalFontFileLoader_Release(This) (This)->lpVtbl->Release(This)
+#define 
IDWriteLocalFontFileLoader_CreateStreamFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,fileStream)
 
(This)->lpVtbl->CreateStreamFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,fileStream)
 #define 
IDWriteLocalFontFileLoader_GetFilePathLengthFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePathLength)
 
(This)->lpVtbl->GetFilePathLengthFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePathLength)
 #define 
IDWriteLocalFontFileLoader_GetFilePathFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePath,filePathSize)
 
(This)->lpVtbl->GetFilePathFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePath,filePathSize)
 #define 
IDWriteLocalFontFileLoader_GetLastWriteTimeFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,lastWriteTime)
 
(This)->lpVtbl->GetLastWriteTimeFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,lastWriteTime)
@@ -2313,7 +2310,6 @@ __CRT_UUID_DECL(IDWriteTextLayout, 
0x53737037,0x6d14,0x410b,0x9b,0xfe,0x0b,0x18,
 __CRT_UUID_DECL(IDWriteFontFileEnumerator, 
0x72755049,0x5ff7,0x435d,0x83,0x48,0x4b,0xe9,0x7c,0xfa,0x6c,0x7c);
 __CRT_UUID_DECL(IDWriteFontCollectionLoader, 
0xcca920e4,0x52f0,0x492b,0xbf,0xa8,0x29,0xc7,0x2e,0xe0,0xa4,0x68);
 __CRT_UUID_DECL(IDWriteTypography, 
0x55f1112b,0x1dc2,0x4b3c,0x95,0x41,0xf4,0x68,0x94,0xed,0x85,0xb6);
-
-#define IDWriteLocalFontFileLoader 
__MINGW_POISON_NAME(IDWriteLocalFontFileLoader)
+__CRT_UUID_DECL(IDWriteLocalFontFileLoader,0xb2d9f3ec,0xc9fe,0x4a11,0xa2,0xec,0xd8,0x62,0x08,0xf7,0xc0,0xa2);
 
 #endif /* __INC_DWRITE__ */
-- 
2.18.0


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
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] dwrite.h: Fix IDWriteLocalFontFileLoader definition.

2018-09-01 Thread Nikolay Sivov
On Sat, Sep 1, 2018 at 2:01 PM Liu Hao  wrote:

> 在 2018/9/1 18:21, Nikolay Sivov 写道:
> > Signed-off-by: Nikolay Sivov 
> > ---
> > @@ -1426,7 +1419,7 @@ DECLARE_INTERFACE_(IDWriteInlineObject,IUnknown)
> >
> >   #undef  INTERFACE
> >   #define INTERFACE IDWriteLocalFontFileLoader
> > -DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
> > +DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IDWriteFontFileLoader)
> >   {
> >   BEGIN_INTERFACE
> >
> > @@ -1437,10 +1430,13 @@
> DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
> >   STDMETHOD_(ULONG, Release)(THIS) PURE;
> >   #endif
> >
> > +/* IDWriteFontFileLoader methods */
> > +STDMETHOD(CreateStreamFromKey(THIS_ const void
> *fontFileReferenceKey,UINT32 fontFileReferenceKeySize,IDWriteFontFileStream
> **fileStream) PURE;
> > +
>
> Shouldn't this be moved inside the `__cplusplus` clause above ?
>

Yes, it should, I'll send a fix. Thanks.


>
> >   /* IDWriteLocalFontFileLoader methods */
> > -STDMETHOD_(HRESULT,GetFilePathLengthFromKey)(THIS_ const void
> *fontFileReferenceKey,UINT32 fontFileReferenceKeySize,UINT32
> *filePathLength) PURE;
>
>
>
> --
> Best regards,
> LH_Mouse
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] dwrite.h: Fix IDWriteLocalFontFileLoader definition.

2018-09-01 Thread Nikolay Sivov
Signed-off-by: Nikolay Sivov 
---
 mingw-w64-headers/include/dwrite.h | 22 +-
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/mingw-w64-headers/include/dwrite.h 
b/mingw-w64-headers/include/dwrite.h
index fa83d561..f3968bea 100644
--- a/mingw-w64-headers/include/dwrite.h
+++ b/mingw-w64-headers/include/dwrite.h
@@ -8,13 +8,6 @@
 
 #define DWRITEAPI DECLSPEC_IMPORT
 
-#ifdef __MINGW_USE_BROKEN_INTERFACE
-#define __MINGW_POISON_NAME(__IFACE) __IFACE
-#else
-#define __MINGW_POISON_NAME(__IFACE)\
-  
__IFACE##_layout_has_not_been_verified_and_its_declaration_is_most_likely_incorrect
-#endif
-
 #include 
 
 #ifndef DWRITE_DECLARE_INTERFACE
@@ -1426,7 +1419,7 @@ DECLARE_INTERFACE_(IDWriteInlineObject,IUnknown)
 
 #undef  INTERFACE
 #define INTERFACE IDWriteLocalFontFileLoader
-DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
+DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IDWriteFontFileLoader)
 {
 BEGIN_INTERFACE
 
@@ -1437,10 +1430,13 @@ DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
 STDMETHOD_(ULONG, Release)(THIS) PURE;
 #endif
 
+/* IDWriteFontFileLoader methods */
+STDMETHOD(CreateStreamFromKey(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,IDWriteFontFileStream 
**fileStream) PURE;
+
 /* IDWriteLocalFontFileLoader methods */
-STDMETHOD_(HRESULT,GetFilePathLengthFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,UINT32 *filePathLength) 
PURE;
-STDMETHOD_(HRESULT,GetFilePathFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,WCHAR *filePath,UINT32 
filePathSize) PURE;
-STDMETHOD_(HRESULT,GetLastWriteTimeFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,FILETIME *lastWriteTime) 
PURE;
+STDMETHOD(GetFilePathLengthFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,UINT32 *filePathLength) 
PURE;
+STDMETHOD(GetFilePathFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,WCHAR *filePath,UINT32 
filePathSize) PURE;
+STDMETHOD(GetLastWriteTimeFromKey)(THIS_ const void 
*fontFileReferenceKey,UINT32 fontFileReferenceKeySize,FILETIME *lastWriteTime) 
PURE;
 
 END_INTERFACE
 };
@@ -1448,6 +1444,7 @@ DECLARE_INTERFACE_(IDWriteLocalFontFileLoader,IUnknown)
 #define IDWriteLocalFontFileLoader_QueryInterface(This,riid,ppvObject) 
(This)->lpVtbl->QueryInterface(This,riid,ppvObject)
 #define IDWriteLocalFontFileLoader_AddRef(This) (This)->lpVtbl->AddRef(This)
 #define IDWriteLocalFontFileLoader_Release(This) (This)->lpVtbl->Release(This)
+#define 
IDWriteLocalFontFileLoader_CreateStreamFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,fileStream)
 
(This)->lpVtbl->CreateStreamFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,fileStream)
 #define 
IDWriteLocalFontFileLoader_GetFilePathLengthFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePathLength)
 
(This)->lpVtbl->GetFilePathLengthFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePathLength)
 #define 
IDWriteLocalFontFileLoader_GetFilePathFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePath,filePathSize)
 
(This)->lpVtbl->GetFilePathFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,filePath,filePathSize)
 #define 
IDWriteLocalFontFileLoader_GetLastWriteTimeFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,lastWriteTime)
 
(This)->lpVtbl->GetLastWriteTimeFromKey(This,fontFileReferenceKey,fontFileReferenceKeySize,lastWriteTime)
@@ -2313,7 +2310,6 @@ __CRT_UUID_DECL(IDWriteTextLayout, 
0x53737037,0x6d14,0x410b,0x9b,0xfe,0x0b,0x18,
 __CRT_UUID_DECL(IDWriteFontFileEnumerator, 
0x72755049,0x5ff7,0x435d,0x83,0x48,0x4b,0xe9,0x7c,0xfa,0x6c,0x7c);
 __CRT_UUID_DECL(IDWriteFontCollectionLoader, 
0xcca920e4,0x52f0,0x492b,0xbf,0xa8,0x29,0xc7,0x2e,0xe0,0xa4,0x68);
 __CRT_UUID_DECL(IDWriteTypography, 
0x55f1112b,0x1dc2,0x4b3c,0x95,0x41,0xf4,0x68,0x94,0xed,0x85,0xb6);
-
-#define IDWriteLocalFontFileLoader 
__MINGW_POISON_NAME(IDWriteLocalFontFileLoader)
+__CRT_UUID_DECL(IDWriteLocalFontFileLoader,0xb2d9f3ec,0xc9fe,0x4a11,0xa2,0xec,0xd8,0x62,0x08,0xf7,0xc0,0xa2);
 
 #endif /* __INC_DWRITE__ */
-- 
2.18.0


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] Fix IDWriteTypography definition.

2018-08-31 Thread Nikolay Sivov
Signed-off-by: Nikolay Sivov 
---
 mingw-w64-headers/include/dwrite.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-headers/include/dwrite.h 
b/mingw-w64-headers/include/dwrite.h
index 45b37445..fa83d561 100644
--- a/mingw-w64-headers/include/dwrite.h
+++ b/mingw-w64-headers/include/dwrite.h
@@ -2259,9 +2259,9 @@ DECLARE_INTERFACE_(IDWriteTypography,IUnknown)
 #endif
 
 /* IDWriteTypography methods */
-STDMETHOD_(HRESULT,AddFontFeature)(THIS_ DWRITE_FONT_FEATURE  fontFeature) 
PURE;
-STDMETHOD_(HRESULT,GetFontFeature)(THIS_ UINT32  
fontFeatureIndex,DWRITE_FONT_FEATURE * fontFeature) PURE;
+STDMETHOD(AddFontFeature)(THIS_ DWRITE_FONT_FEATURE fontFeature) PURE;
 STDMETHOD_(UINT32,GetFontFeatureCount)(THIS) PURE;
+STDMETHOD(GetFontFeature)(THIS_ UINT32 fontFeatureIndex, 
DWRITE_FONT_FEATURE *fontFeature) PURE;
 
 END_INTERFACE
 };
@@ -2270,8 +2270,8 @@ DECLARE_INTERFACE_(IDWriteTypography,IUnknown)
 #define IDWriteTypography_AddRef(This) (This)->lpVtbl->AddRef(This)
 #define IDWriteTypography_Release(This) (This)->lpVtbl->Release(This)
 #define IDWriteTypography_AddFontFeature(This,fontFeature) 
(This)->lpVtbl->AddFontFeature(This,fontFeature)
-#define IDWriteTypography_GetFontFeature(This,fontFeatureIndex,fontFeature) 
(This)->lpVtbl->GetFontFeature(This,fontFeatureIndex,fontFeature)
 #define IDWriteTypography_GetFontFeatureCount() 
(This)->lpVtbl->GetFontFeatureCount(This)
+#define IDWriteTypography_GetFontFeature(This,fontFeatureIndex,fontFeature) 
(This)->lpVtbl->GetFontFeature(This,fontFeatureIndex,fontFeature)
 #endif /*COBJMACROS*/
 
 #ifdef __cplusplus
@@ -2312,8 +2312,8 @@ __CRT_UUID_DECL(IDWriteTextFormat, 
0x9c906818,0x31d7,0x4fd3,0xa1,0x51,0x7c,0x5e,
 __CRT_UUID_DECL(IDWriteTextLayout, 
0x53737037,0x6d14,0x410b,0x9b,0xfe,0x0b,0x18,0x2b,0xb7,0x09,0x61);
 __CRT_UUID_DECL(IDWriteFontFileEnumerator, 
0x72755049,0x5ff7,0x435d,0x83,0x48,0x4b,0xe9,0x7c,0xfa,0x6c,0x7c);
 __CRT_UUID_DECL(IDWriteFontCollectionLoader, 
0xcca920e4,0x52f0,0x492b,0xbf,0xa8,0x29,0xc7,0x2e,0xe0,0xa4,0x68);
+__CRT_UUID_DECL(IDWriteTypography, 
0x55f1112b,0x1dc2,0x4b3c,0x95,0x41,0xf4,0x68,0x94,0xed,0x85,0xb6);
 
 #define IDWriteLocalFontFileLoader 
__MINGW_POISON_NAME(IDWriteLocalFontFileLoader)
-#define IDWriteTypography __MINGW_POISON_NAME(IDWriteTypography)
 
 #endif /* __INC_DWRITE__ */
-- 
2.18.0


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public