From a5cc32eb3633fc7b3105035ee9b041e6ad36e0bc Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Wed, 3 May 2017 10:55:54 +0000 Subject: [PATCH] [GDI32] -Add a public undocgdi.h file to keep the definitions for undocumented exports. For now it only contains GdiDrawStream. svn path=/trunk/; revision=74452 --- reactos/sdk/include/reactos/undocgdi.h | 33 +++++++++++++++++++++ reactos/win32ss/gdi/gdi32/include/precomp.h | 2 ++ reactos/win32ss/gdi/gdi32/misc/misc.c | 28 +++-------------- 3 files changed, 39 insertions(+), 24 deletions(-) create mode 100644 reactos/sdk/include/reactos/undocgdi.h diff --git a/reactos/sdk/include/reactos/undocgdi.h b/reactos/sdk/include/reactos/undocgdi.h new file mode 100644 index 00000000000..4a0ea8f5d50 --- /dev/null +++ b/reactos/sdk/include/reactos/undocgdi.h @@ -0,0 +1,33 @@ + +#ifndef _UNDOCGDI_H +#define _UNDOCGDI_H + +#define DS_TILE 0x2 +#define DS_TRANSPARENTALPHA 0x4 +#define DS_TRANSPARENTCLR 0x8 +#define DS_TRUESIZE 0x20 + +typedef struct GDI_DRAW_STREAM_TAG +{ + DWORD signature; // must be 0x44727753;//"Swrd" + DWORD reserved; // must be 0 + HDC hDC; // handle to the device object of windiw to draw. + RECT rcDest; // desination rect of dc to draw. + DWORD unknown1; // must be 1. + HBITMAP hImage; + DWORD unknown2; // must be 9. + RECT rcClip; + RECT rcSrc; // source rect of bitmap to draw. + DWORD drawOption; // DS_ flags + DWORD leftSizingMargin; + DWORD rightSizingMargin; + DWORD topSizingMargin; + DWORD bottomSizingMargin; + DWORD crTransparent; // transparent color. +} GDI_DRAW_STREAM, *PGDI_DRAW_STREAM; + +BOOL +WINAPI +GdiDrawStream(HDC dc, ULONG l, PGDI_DRAW_STREAM pDS); + +#endif \ No newline at end of file diff --git a/reactos/win32ss/gdi/gdi32/include/precomp.h b/reactos/win32ss/gdi/gdi32/include/precomp.h index c0fd9c2b997..3dae019a846 100644 --- a/reactos/win32ss/gdi/gdi32/include/precomp.h +++ b/reactos/win32ss/gdi/gdi32/include/precomp.h @@ -56,4 +56,6 @@ /* Deprecated NTGDI calls which shouldn't exist */ #include +#include + #endif /* _GDI32_PCH_ */ diff --git a/reactos/win32ss/gdi/gdi32/misc/misc.c b/reactos/win32ss/gdi/gdi32/misc/misc.c index 4039d47a488..95b2bf4c316 100644 --- a/reactos/win32ss/gdi/gdi32/misc/misc.c +++ b/reactos/win32ss/gdi/gdi32/misc/misc.c @@ -283,26 +283,6 @@ typedef struct _MARGINS { int cyBottomHeight; } MARGINS, *PMARGINS; -typedef struct GDI_DRAW_STREAM_TAG -{ - DWORD signature; // must be 0x44727753;//"Swrd" - DWORD reserved; // must be 0 - HDC hDC; // handle to the device object of windiw to draw. - RECT rcDest; // desination rect of window to draw. - DWORD unknown1; // must be 1. - HBITMAP hImage; - DWORD unknown2; // must be 9. - RECT rcClip; // desination rect of window to draw. - RECT rcSrc; // source rect of bitmap to draw. - DWORD drawOption; // 0x2 is tile instead of stretch. 0x4 is transparent. 0x20 is true size - DWORD leftSizingMargin; - DWORD rightSizingMargin; - DWORD topSizingMargin; - DWORD bottomSizingMargin; - DWORD crTransparent; // transparent color. - -} GDI_DRAW_STREAM, *PGDI_DRAW_STREAM; - enum SIZINGTYPE { ST_TRUESIZE = 0, ST_STRETCH = 1, @@ -683,16 +663,16 @@ GdiDrawStream(HDC dc, ULONG l, PGDI_DRAW_STREAM pDS) INT transparent = 0; int sizingtype; - if (pDS->drawOption & 0x4) + if (pDS->drawOption & DS_TRANSPARENTALPHA) transparent = ALPHABLEND_FULL; - else if (pDS->drawOption & 0x8) + else if (pDS->drawOption & DS_TRANSPARENTCLR) transparent = ALPHABLEND_BINARY; else transparent = ALPHABLEND_NONE; - if (pDS->drawOption & 0x2) + if (pDS->drawOption & DS_TILE) sizingtype = ST_TILE; - else if (pDS->drawOption & 0x20) + else if (pDS->drawOption & DS_TRUESIZE) sizingtype = ST_TRUESIZE; else sizingtype = ST_STRETCH;