Author: jimtabor
Date: Sun Apr 13 11:41:19 2014
New Revision: 62735
URL:
http://svn.reactos.org/svn/reactos?rev=62735&view=rev
Log:
[Win32k]
- Add two more Gdi32 counterparts for Win32k and fix the others.
Modified:
trunk/reactos/win32ss/gdi/ntgdi/coord.h
trunk/reactos/win32ss/gdi/ntgdi/dcutil.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/coord.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/coord.h?…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/coord.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/coord.h [iso-8859-1] Sun Apr 13 11:41:19 2014
@@ -150,4 +150,5 @@
VOID FASTCALL IntMirrorWindowOrg(PDC);
int APIENTRY IntGdiSetMapMode(PDC, int);
-
+BOOL FASTCALL GreLPtoDP(HDC, LPPOINT, INT);
+BOOL FASTCALL GreDPtoLP(HDC, LPPOINT, INT);
Modified: trunk/reactos/win32ss/gdi/ntgdi/dcutil.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dcutil.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dcutil.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dcutil.c [iso-8859-1] Sun Apr 13 11:41:19 2014
@@ -3,40 +3,77 @@
#define NDEBUG
#include <debug.h>
+BOOL FASTCALL
+GreDPtoLP(HDC hdc, LPPOINT lpPoints, INT nCount)
+{
+ PDC dc;
+ if (!(dc = DC_LockDc(hdc)))
+ {
+ EngSetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+ IntDPtoLP(dc, lpPoints, nCount);
+ DC_UnlockDc(dc);
+ return TRUE;
+}
+
+BOOL FASTCALL
+GreLPtoDP(HDC hdc, LPPOINT lpPoints, INT nCount)
+{
+ PDC dc;
+ if (!(dc = DC_LockDc(hdc)))
+ {
+ EngSetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+ IntLPtoDP(dc, lpPoints, nCount);
+ DC_UnlockDc(dc);
+ return TRUE;
+}
+
int FASTCALL
GreGetBkMode(HDC hdc)
{
PDC dc;
+ LONG lBkMode;
if (!(dc = DC_LockDc(hdc)))
{
EngSetLastError(ERROR_INVALID_HANDLE);
return CLR_INVALID;
}
- return dc->pdcattr->lBkMode;
+ lBkMode = dc->pdcattr->lBkMode;
+ DC_UnlockDc(dc);
+ return lBkMode;
}
int FASTCALL
GreGetMapMode(HDC hdc)
{
PDC dc;
+ INT iMapMode;
if (!(dc = DC_LockDc(hdc)))
{
EngSetLastError(ERROR_INVALID_HANDLE);
return CLR_INVALID;
}
- return dc->pdcattr->iMapMode;
+ iMapMode = dc->pdcattr->iMapMode;
+ DC_UnlockDc(dc);
+ return iMapMode;
}
COLORREF FASTCALL
GreGetTextColor(HDC hdc)
{
PDC dc;
+ ULONG ulForegroundClr;
if (!(dc = DC_LockDc(hdc)))
{
EngSetLastError(ERROR_INVALID_HANDLE);
return CLR_INVALID;
}
- return dc->pdcattr->ulForegroundClr;
+ ulForegroundClr = dc->pdcattr->ulForegroundClr;
+ DC_UnlockDc(dc);
+ return ulForegroundClr;
}
COLORREF FASTCALL
@@ -153,6 +190,7 @@
dc->pdcattr->crBrushClr = crColor;
}
}
+ DC_UnlockDc(dc);
return OldColor;
}
@@ -175,7 +213,7 @@
dc->pdcattr->ulDirty_ |= DIRTY_LINE;
dc->pdcattr->crPenClr = crColor;
}
-
+ DC_UnlockDc(dc);
return OldColor;
}
@@ -199,6 +237,7 @@
pdcattr->jStretchBltMode = iStretchMode;
}
+ DC_UnlockDc(pdc);
return oSMode;
}