Hi,

Sorry it took so long to reply. It was stuck in my TODO pile.

On 2021-10-14 17:21, LIU Hao wrote:
在 2021-10-13 15:41, Steve Lhomme 写道:
Hi,

I just noticed this code was merged and then reverted.


It was an accident to push it. We concluded that there were issues with this patch.

One of those errors was:

   ```
  mingw-w64-headers/include/dcomp.h:23:19: error: unknown type name 'IDCompositionSurface'; did you mean 'IDCompositionSurfaceVtbl'?
      23 | #define INTERFACE IDCompositionSurface
         |                   ^~~~~~~~~~~~~~~~~~~~
   ```

IDCompositionSurface was not modified by the patch that was reverted:
https://github.com/mirror/mingw-w64/commit/586baa17bb41dd78addd8cbb6415cfd24d24e925

So that can't be the reason to revert the change.

+DECLARE_INTERFACE_IID_(IDCompositionSaturationEffect, IDCompositionFilterEffect, "A08DEBDA-3258-4FA4-9F16-9174D3FE93B1")
+{
+#if defined(_MSC_VER) && defined(__cplusplus)
+    STDMETHOD(SetSaturation)(THIS_ float ratio) PURE;
+    STDMETHOD(SetSaturation)(THIS_ IDCompositionAnimation* animation) PURE;
+#else
+    STDMETHOD(SetSaturation)(THIS_ IDCompositionAnimation* animation) PURE;
+    STDMETHOD(SetSaturation)(THIS_ float ratio ) PURE;
+#endif
+};

I have had some discussion with Jacek on IRC. The second block here, which declares two overloaded methods, doesn't seem to compile as C.

What is the compilation error ?

This is exactly the same that already exist in this file for IDCompositionTranslateTransform, IDCompositionScaleTransform, IDCompositionRotateTransform, IDCompositionSkewTransform, etc.


Other than the error above, if we compile this header as C, this struct would have two distinct fields with the name `SetSaturation`, which would be invalid.

That is not possible. dcomp.h can only be included by C++ code. It is not an IDL file and is not compiled with C compatibility. This is the same for the Microsoft version [1]. There is no COBJMACROS and things like that. There's also no .idl associated.

[1] https://github.com/microsoft/win32metadata/blob/4656cf4a75aaff953b0730ac5955ab6aea2b4cc6/generation/WinSDK/RecompiledIdlHeaders/um/dcomp.h

(To work around this issue, some wine headers rename one of them by suffixing an underscore.)


--
Best regards,
LIU Hao



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

Reply via email to