Nikolay Sivov nsivov@codeweavers.com writes:
@@ -29,9 +29,17 @@ cpp_quote("#endif")
cpp_quote("#ifndef _GDIPLUSHEADERS_H") typedef BYTE EncoderParameters; +cpp_quote("#endif")
+/* Wine does not define GDI+ class wrappers */ +cpp_quote("#if defined(__WINESRC__) || !defined(_GDIPLUSHEADERS_H)") typedef BYTE Image; cpp_quote("#endif")
We don't have C++ code in the Wine source, so I don't see why you'd need that.
On 07.02.2017 17:44, Alexandre Julliard wrote:
Nikolay Sivov nsivov@codeweavers.com writes:
@@ -29,9 +29,17 @@ cpp_quote("#endif")
cpp_quote("#ifndef _GDIPLUSHEADERS_H") typedef BYTE EncoderParameters; +cpp_quote("#endif")
+/* Wine does not define GDI+ class wrappers */ +cpp_quote("#if defined(__WINESRC__) || !defined(_GDIPLUSHEADERS_H)") typedef BYTE Image; cpp_quote("#endif")
We don't have C++ code in the Wine source, so I don't see why you'd need that.
We do have some class definitions in gdiplus headers, like in gdiplusimaging.h. My motivation was to have a header compatible with SDK one in terms of these include guards. I understand that it won't be possible to use Image class in its C++ form from shell32, luckily I had no need for that to fix the bug.
Do you mean it's enough to typedef Image to BYTE uncoditionaly?
Nikolay Sivov bunglehead@gmail.com writes:
On 07.02.2017 17:44, Alexandre Julliard wrote:
Nikolay Sivov nsivov@codeweavers.com writes:
@@ -29,9 +29,17 @@ cpp_quote("#endif")
cpp_quote("#ifndef _GDIPLUSHEADERS_H") typedef BYTE EncoderParameters; +cpp_quote("#endif")
+/* Wine does not define GDI+ class wrappers */ +cpp_quote("#if defined(__WINESRC__) || !defined(_GDIPLUSHEADERS_H)") typedef BYTE Image; cpp_quote("#endif")
We don't have C++ code in the Wine source, so I don't see why you'd need that.
We do have some class definitions in gdiplus headers, like in gdiplusimaging.h. My motivation was to have a header compatible with SDK one in terms of these include guards. I understand that it won't be possible to use Image class in its C++ form from shell32, luckily I had no need for that to fix the bug.
Do you mean it's enough to typedef Image to BYTE uncoditionaly?
I mean the existing ifndef _GDIPLUSHEADERS_H should be enough, because gdiplusheaders.h is a C++ header that can't be used from C code.
On 07.02.2017 18:20, Alexandre Julliard wrote:
Nikolay Sivov bunglehead@gmail.com writes:
On 07.02.2017 17:44, Alexandre Julliard wrote:
Nikolay Sivov nsivov@codeweavers.com writes:
@@ -29,9 +29,17 @@ cpp_quote("#endif")
cpp_quote("#ifndef _GDIPLUSHEADERS_H") typedef BYTE EncoderParameters; +cpp_quote("#endif")
+/* Wine does not define GDI+ class wrappers */ +cpp_quote("#if defined(__WINESRC__) || !defined(_GDIPLUSHEADERS_H)") typedef BYTE Image; cpp_quote("#endif")
We don't have C++ code in the Wine source, so I don't see why you'd need that.
We do have some class definitions in gdiplus headers, like in gdiplusimaging.h. My motivation was to have a header compatible with SDK one in terms of these include guards. I understand that it won't be possible to use Image class in its C++ form from shell32, luckily I had no need for that to fix the bug.
Do you mean it's enough to typedef Image to BYTE uncoditionaly?
I mean the existing ifndef _GDIPLUSHEADERS_H should be enough, because gdiplusheaders.h is a C++ header that can't be used from C code.
This won't work for EncoderParameters, that we define for C code too as a bare structure, while SDK only has it as a class. So it's probably already not very compatible. I guess I can change first guard to _GDIPLUSIMAGING_H, that will work for both SDK and Wine, and keep second as is.
Nikolay Sivov bunglehead@gmail.com writes:
On 07.02.2017 18:20, Alexandre Julliard wrote:
Nikolay Sivov bunglehead@gmail.com writes:
On 07.02.2017 17:44, Alexandre Julliard wrote:
Nikolay Sivov nsivov@codeweavers.com writes:
@@ -29,9 +29,17 @@ cpp_quote("#endif")
cpp_quote("#ifndef _GDIPLUSHEADERS_H") typedef BYTE EncoderParameters; +cpp_quote("#endif")
+/* Wine does not define GDI+ class wrappers */ +cpp_quote("#if defined(__WINESRC__) || !defined(_GDIPLUSHEADERS_H)") typedef BYTE Image; cpp_quote("#endif")
We don't have C++ code in the Wine source, so I don't see why you'd need that.
We do have some class definitions in gdiplus headers, like in gdiplusimaging.h. My motivation was to have a header compatible with SDK one in terms of these include guards. I understand that it won't be possible to use Image class in its C++ form from shell32, luckily I had no need for that to fix the bug.
Do you mean it's enough to typedef Image to BYTE uncoditionaly?
I mean the existing ifndef _GDIPLUSHEADERS_H should be enough, because gdiplusheaders.h is a C++ header that can't be used from C code.
This won't work for EncoderParameters, that we define for C code too as a bare structure, while SDK only has it as a class. So it's probably already not very compatible. I guess I can change first guard to _GDIPLUSIMAGING_H, that will work for both SDK and Wine, and keep second as is.
That sounds more correct. We can't be 100% compatible, but I don't think we should be using __WINESRC__ to fix such issues; the workarounds we apply should also be available to Winelib apps.