[GDI32] -Add a public undocgdi.h file to keep the definitions for undocumented export...
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Wed, 3 May 2017 10:55:54 +0000 (10:55 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Wed, 3 May 2017 10:55:54 +0000 (10:55 +0000)
svn path=/trunk/; revision=74452

reactos/sdk/include/reactos/undocgdi.h [new file with mode: 0644]
reactos/win32ss/gdi/gdi32/include/precomp.h
reactos/win32ss/gdi/gdi32/misc/misc.c

diff --git a/reactos/sdk/include/reactos/undocgdi.h b/reactos/sdk/include/reactos/undocgdi.h
new file mode 100644 (file)
index 0000000..4a0ea8f
--- /dev/null
@@ -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
index c0fd9c2..3dae019 100644 (file)
@@ -56,4 +56,6 @@
 /* Deprecated NTGDI calls which shouldn't exist */
 #include <ntgdibad.h>
 
+#include <undocgdi.h>
+
 #endif /* _GDI32_PCH_ */
index 4039d47..95b2bf4 100644 (file)
@@ -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;