Removing old syscalls and updated related files. Old syscalls will be renamed for internal use.

svn path=/trunk/; revision=30603
This commit is contained in:
James Tabor
2007-11-20 19:56:57 +00:00
parent 5c489c528b
commit 48a2026e7a
13 changed files with 272 additions and 304 deletions
-50
View File
@@ -39,21 +39,6 @@ GetGraphicsMode(HDC hdc)
return NtGdiGetGraphicsMode(hdc);
}
/*
* @implemented
*
*/
int
STDCALL
GetROP2(HDC hdc)
{
/* FIXME do not use reactos own syscall for this,
* this hack need be remove
*/
return NtGdiGetROP2(hdc);
}
/*
* @implemented
*
@@ -92,18 +77,6 @@ SetDIBitsToDevice(
NULL);
}
/*
* @implemented
*
*/
int
STDCALL
SetBkMode(HDC hdc,
int iBkMode)
{
return NtGdiSetBkMode(hdc,iBkMode);
}
/*
* @implemented
*
@@ -139,29 +112,6 @@ GetStretchBltMode(HDC hdc)
return NtGdiGetStretchBltMode(hdc);
}
/*
* @implemented
*
*/
UINT
STDCALL
GetTextAlign(HDC hdc)
{
return NtGdiGetTextAlign(hdc);
}
/*
* @implemented
*
*/
COLORREF
STDCALL
GetTextColor(HDC hdc)
{
return NtGdiGetTextColor(hdc);
}
/*
* @implemented
*
-36
View File
@@ -113,18 +113,6 @@ SetRectRgn(HRGN hrgn,
return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect);
}
/*
* @unimplemented
*/
UINT
STDCALL
SetTextAlign(HDC hdc,
UINT fMode)
{
/* FIXME share memory */
return NtGdiSetTextAlign(hdc, fMode);
}
/*
* @unimplemented
*/
@@ -2338,30 +2326,6 @@ GdiConvertBitmapV5(
}
/*
* @implemented
*
*/
COLORREF
STDCALL
GetBkColor(HDC hdc)
{
/* FIXME some part are done in user mode */
return NtGdiGetBkColor(hdc);
}
/*
* @implemented
*
*/
int
STDCALL
GetBkMode(HDC hdc)
{
/* FIXME some part are done in user mode */
return NtGdiGetBkMode(hdc);
}
/*
* @implemented
*
+12
View File
@@ -204,6 +204,18 @@ PolyPatBlt(IN HDC hdc,
return NtGdiPolyPatBlt(hdc, rop4, pPoly,Count,Mode);
}
/*
* @implemented
*
*/
int
STDCALL
GetROP2(HDC hdc)
{
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return 0;
return Dc_Attr->jROP2;
}
/*
* @implemented
+56 -39
View File
@@ -823,53 +823,19 @@ SetDCPenColor(
}
}
return OldColor;
// return NtUserSetDCPenColor(hdc, crColor);
}
/*
* @implemented
*
*/
COLORREF
STDCALL
SetTextColor(
HDC hdc,
COLORREF crColor
)
GetBkColor(HDC hdc)
{
PDC_ATTR Dc_Attr;
COLORREF OldColor = CLR_INVALID;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return OldColor;
#if 0
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
{
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
return MFDRV_SetTextColor( hDC, crColor );
else
{
PLDC pLDC = Dc_Attr->pvLDC;
if ( !pLDC )
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (pLDC->iType == LDC_EMFLDC)
{
if return EMFDRV_SetTextColor( hDC, crColor );
}
}
}
#endif
OldColor = (COLORREF) Dc_Attr->ulForegroundClr;
Dc_Attr->ulForegroundClr = (ULONG) crColor;
if ( Dc_Attr->crForegroundClr != crColor )
{
Dc_Attr->ulDirty_ |= DIRTY_TEXT;
Dc_Attr->crForegroundClr = crColor;
}
return OldColor;
// return NtGdiSetTextColor(hdc, crColor);
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return 0;
return Dc_Attr->ulBackgroundClr;
}
/*
@@ -915,7 +881,58 @@ SetBkColor(
Dc_Attr->crBackgroundClr = crColor;
}
return OldColor;
// return NtGdiSetBkColor(hdc, crColor);
}
/*
* @implemented
*
*/
int
STDCALL
GetBkMode(HDC hdc)
{
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return 0;
return Dc_Attr->lBkMode;
}
/*
* @implemented
*
*/
int
STDCALL
SetBkMode(HDC hdc,
int iBkMode)
{
PDC_ATTR Dc_Attr;
INT OldMode = 0;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return OldMode;
#if 0
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
{
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
return MFDRV_SetBkMode( hdc, iBkMode )
else
{
PLDC pLDC = Dc_Attr->pvLDC;
if ( !pLDC )
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (pLDC->iType == LDC_EMFLDC)
{
if return EMFDRV_SetBkMode( hdc, iBkMode )
}
}
}
#endif
OldMode = Dc_Attr->lBkMode;
Dc_Attr->jBkMode = iBkMode; // Processed
Dc_Attr->lBkMode = iBkMode; // Raw
return OldMode;
}
/*
+113
View File
@@ -458,4 +458,117 @@ SetTextCharacterExtra(
// return GetAndSetDCDWord( hDC, GdiGetSetTextCharExtra, CharExtra, 0, 0, 0 );
}
/*
* @implemented
*
*/
UINT
STDCALL
GetTextAlign(HDC hdc)
{
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return 0;
return Dc_Attr->lTextAlign;
}
/*
* @implemented
*
*/
COLORREF
STDCALL
GetTextColor(HDC hdc)
{
PDC_ATTR Dc_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return 0;
return Dc_Attr->ulForegroundClr;
}
/*
* @unimplemented
*/
UINT
STDCALL
SetTextAlign(HDC hdc,
UINT fMode)
{
PDC_ATTR Dc_Attr;
INT OldMode = 0;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return OldMode;
#if 0
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
{
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
return MFDRV_SetTextAlign( hdc, fMode )
else
{
PLDC pLDC = Dc_Attr->pvLDC;
if ( !pLDC )
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (pLDC->iType == LDC_EMFLDC)
{
if return EMFDRV_SetTextAlign( hdc, fMode )
}
}
}
#endif
OldMode = Dc_Attr->lTextAlign;
Dc_Attr->lTextAlign = fMode; // Raw
Dc_Attr->flTextAlign = fMode & 0x1f;
return OldMode;
}
/*
* @implemented
*/
COLORREF
STDCALL
SetTextColor(
HDC hdc,
COLORREF crColor
)
{
PDC_ATTR Dc_Attr;
COLORREF OldColor = CLR_INVALID;
if (!GdiGetHandleUserData((HGDIOBJ) hdc, (PVOID) &Dc_Attr)) return OldColor;
#if 0
if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
{
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
return MFDRV_SetTextColor( hDC, crColor );
else
{
PLDC pLDC = Dc_Attr->pvLDC;
if ( !pLDC )
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (pLDC->iType == LDC_EMFLDC)
{
if return EMFDRV_SetTextColor( hDC, crColor );
}
}
}
#endif
OldColor = (COLORREF) Dc_Attr->ulForegroundClr;
Dc_Attr->ulForegroundClr = (ULONG) crColor;
if ( Dc_Attr->crForegroundClr != crColor )
{
Dc_Attr->ulDirty_ |= DIRTY_TEXT;
Dc_Attr->crForegroundClr = crColor;
}
return OldColor;
}
-64
View File
@@ -196,20 +196,6 @@ STDCALL
NtGdiGetAspectRatioFilterEx(HDC hDC,
LPSIZE AspectRatio);
/* Should be done in user-mode using shared GDI Objects. */
COLORREF STDCALL NtGdiGetBkColor(HDC hDC);
/* Should be done in user-mode using shared GDI Objects. */
INT STDCALL NtGdiGetBkMode(HDC hDC);
/* Use NtGdiGetCharABCWidthsW */
BOOL
STDCALL
NtGdiGetCharABCWidths(HDC hDC,
UINT FirstChar,
UINT LastChar,
LPABC abc);
/* Use NtGdiGetColorSpaceforBitmap. */
HCOLORSPACE
STDCALL
@@ -306,23 +292,14 @@ NtGdiGetPixelFormat(HDC hDC);
/* Should be done in user-mode using shared GDI Objects. */
INT STDCALL NtGdiGetPolyFillMode(HDC hDC);
/* Should be done in user-mode using shared GDI Objects. */
INT STDCALL NtGdiGetROP2(HDC hDC);
/* Should be done in user-mode using shared GDI Objects. */
INT STDCALL NtGdiGetStretchBltMode(HDC hDC);
/* Should be done in user-mode using shared GDI Objects. */
UINT STDCALL NtGdiGetTextAlign(HDC hDC);
/* Should be done in user-mode using shared GDI Objects. */
UINT
STDCALL
NtGdiGetTextCharset(HDC hDC);
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
COLORREF STDCALL NtGdiGetTextColor(HDC hDC);
/* Use NtGdiGetDCPoint with GdiGetViewPortExt */
BOOL STDCALL NtGdiGetViewportExtEx(HDC hDC, LPSIZE viewportExt);
@@ -404,12 +381,6 @@ NtGdiRemoveFontResource(LPCWSTR FileName);
/* Should be done in user-mode. */
HGDIOBJ STDCALL NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj);
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
COLORREF STDCALL NtGdiSetBkColor (HDC hDC, COLORREF Color);
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
INT STDCALL NtGdiSetBkMode(HDC hDC, INT backgroundMode);
/* Use SetDIBitsToDevice in gdi32. */
INT
STDCALL
@@ -454,21 +425,9 @@ NtGdiSetMapperFlags(HDC hDC,
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
INT STDCALL NtGdiSetPolyFillMode(HDC hDC, INT polyFillMode);
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
INT STDCALL NtGdiSetROP2(HDC hDC, INT ROPmode);
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
INT STDCALL NtGdiSetStretchBltMode(HDC hDC, INT stretchBltMode);
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
UINT
STDCALL
NtGdiSetTextAlign(HDC hDC,
UINT Mode);
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
COLORREF STDCALL NtGdiSetTextColor(HDC hDC, COLORREF color);
/* Needs to be done in user-mode. */
BOOL
STDCALL
@@ -536,29 +495,6 @@ NtGdiUpdateICMRegKey(DWORD Reserved,
LPWSTR Filename,
UINT Command);
/* All this Should be in user-mode, not NtUser calls. Especially not in GDI! */
DWORD
NTAPI
NtUserCallTwoParam(
DWORD Param1,
DWORD Param2,
DWORD Routine);
#define TWOPARAM_ROUTINE_SETDCPENCOLOR 0x45
#define TWOPARAM_ROUTINE_SETDCBRUSHCOLOR 0x46
#define TWOPARAM_ROUTINE_GETDCCOLOR 0x47
#define NtUserGetDCBrushColor(hbr) \
(COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_BRUSH, TWOPARAM_ROUTINE_GETDCCOLOR)
#define NtUserGetDCPenColor(hbr) \
(COLORREF)NtUserCallTwoParam((DWORD)(hbr), OBJ_PEN, TWOPARAM_ROUTINE_GETDCCOLOR)
#define NtUserSetDCBrushColor(hbr, crColor) \
(COLORREF)NtUserCallTwoParam((DWORD)(hbr), (DWORD)crColor, TWOPARAM_ROUTINE_SETDCBRUSHCOLOR)
#define NtUserSetDCPenColor(hbr, crColor) \
(COLORREF)NtUserCallTwoParam((DWORD)(hbr), (DWORD)crColor, TWOPARAM_ROUTINE_SETDCPENCOLOR)
#endif /* WIN32K_NTGDI_BAD_INCLUDED */
@@ -104,6 +104,15 @@ VOID FASTCALL IntGetWindowOrgEx(PDC dc, LPPOINT pt);
NTSTATUS STDCALL NtGdiFlushUserBatch(VOID);
COLORREF FASTCALL NtGdiSetBkColor (HDC hDC, COLORREF Color);
INT FASTCALL NtGdiSetBkMode(HDC hDC, INT backgroundMode);
COLORREF STDCALL NtGdiGetBkColor(HDC hDC);
INT STDCALL NtGdiGetBkMode(HDC hDC);
COLORREF FASTCALL NtGdiSetTextColor(HDC hDC, COLORREF color);
UINT FASTCALL NtGdiSetTextAlign(HDC hDC, UINT Mode);
UINT STDCALL NtGdiGetTextAlign(HDC hDC);
COLORREF STDCALL NtGdiGetTextColor(HDC hDC);
/* For Metafile and MetaEnhFile not in windows this struct taken from wine cvs 15/9-2006*/
typedef struct
{
@@ -164,12 +164,6 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
CONST PDEVMODEW InitData,
BOOL CreateAsIC);
COLORREF FASTCALL
IntGetDCColor(HDC hDC, ULONG Object);
COLORREF FASTCALL
IntSetDCColor(HDC hDC, ULONG Object, COLORREF Color);
/* Coord functions */
BOOL FASTCALL
@@ -485,18 +485,6 @@ NtUserCallTwoParam(
switch(Routine)
{
case TWOPARAM_ROUTINE_SETDCPENCOLOR:
{
RETURN( (DWORD)IntSetDCColor((HDC)Param1, OBJ_PEN, (COLORREF)Param2));
}
case TWOPARAM_ROUTINE_SETDCBRUSHCOLOR:
{
RETURN( (DWORD)IntSetDCColor((HDC)Param1, OBJ_BRUSH, (COLORREF)Param2));
}
case TWOPARAM_ROUTINE_GETDCCOLOR:
{
RETURN( (DWORD)IntGetDCColor((HDC)Param1, (ULONG)Param2));
}
case TWOPARAM_ROUTINE_GETWINDOWRGNBOX:
{
DWORD Ret;
+10 -37
View File
@@ -150,8 +150,11 @@ NtGdiCreateCompatibleDC(HDC hDC)
NewDC->PalIndexed = OrigDC->PalIndexed;
NewDC->w.hPalette = OrigDC->w.hPalette;
nDc_Attr->crForegroundClr = oDc_Attr->crForegroundClr;
nDc_Attr->lTextAlign = oDc_Attr->lTextAlign;
nDc_Attr->ulForegroundClr = oDc_Attr->ulForegroundClr;
nDc_Attr->ulBackgroundClr = oDc_Attr->ulBackgroundClr;
nDc_Attr->lBkMode = oDc_Attr->lBkMode;
nDc_Attr->crForegroundClr = oDc_Attr->crForegroundClr;
nDc_Attr->crBackgroundClr = oDc_Attr->crBackgroundClr;
nDc_Attr->jBkMode = oDc_Attr->jBkMode;
nDc_Attr->jROP2 = oDc_Attr->jROP2;
@@ -1203,8 +1206,11 @@ IntGdiCopyToSaveState(PDC dc, PDC newdc)
nDc_Attr->jStretchBltMode = Dc_Attr->jStretchBltMode;
nDc_Attr->lRelAbs = Dc_Attr->lRelAbs;
nDc_Attr->jBkMode = Dc_Attr->jBkMode;
nDc_Attr->lBkMode = Dc_Attr->lBkMode;
nDc_Attr->crBackgroundClr = Dc_Attr->crBackgroundClr;
nDc_Attr->crForegroundClr = Dc_Attr->crForegroundClr;
nDc_Attr->ulBackgroundClr = Dc_Attr->ulBackgroundClr;
nDc_Attr->ulForegroundClr = Dc_Attr->ulForegroundClr;
nDc_Attr->ptlBrushOrigin = Dc_Attr->ptlBrushOrigin;
nDc_Attr->lTextAlign = Dc_Attr->lTextAlign;
nDc_Attr->lTextExtra = Dc_Attr->lTextExtra;
@@ -1273,6 +1279,9 @@ IntGdiCopyFromSaveState(PDC dc, PDC dcs, HDC hDC)
Dc_Attr->jBkMode = sDc_Attr->jBkMode;
Dc_Attr->crBackgroundClr = sDc_Attr->crBackgroundClr;
Dc_Attr->crForegroundClr = sDc_Attr->crForegroundClr;
Dc_Attr->lBkMode = sDc_Attr->lBkMode;
Dc_Attr->ulBackgroundClr = sDc_Attr->ulBackgroundClr;
Dc_Attr->ulForegroundClr = sDc_Attr->ulForegroundClr;
Dc_Attr->ptlBrushOrigin = sDc_Attr->ptlBrushOrigin;
Dc_Attr->lTextAlign = sDc_Attr->lTextAlign;
@@ -2579,42 +2588,6 @@ IntIsPrimarySurface(SURFOBJ *SurfObj)
return SurfObj->hsurf == PrimarySurface.Handle;
}
/*
* Returns the color of the brush or pen that is currently selected into the DC.
* This function is called from GetDCBrushColor() and GetDCPenColor()
*/
COLORREF FASTCALL
IntGetDCColor(HDC hDC, ULONG Object)
{
/*
* The previous implementation was completly incorrect. It modified the
* brush that was currently selected into the device context, but in fact
* the DC pen/brush color should be stored directly in the device context
* (at address 0x2C of the user mode DC object memory on Windows 2K/XP).
* The actual color is then used when DC_BRUSH/DC_PEN object is selected
* into the device context and BRUSHOBJ for drawing is composed (belongs
* to IntGdiInitBrushInstance in the current ReactOS implementation). Also
* the implementation should be moved to user mode GDI32.dll when UM
* mapped GDI objects will be implemented.
*/
DPRINT("WIN32K:IntGetDCColor is unimplemented\n");
return 0xFFFFFF; /* The default DC color. */
}
/*
* Changes the color of the brush or pen that is currently selected into the DC.
* This function is called from SetDCBrushColor() and SetDCPenColor()
*/
COLORREF FASTCALL
IntSetDCColor(HDC hDC, ULONG Object, COLORREF Color)
{
/* See the comment in IntGetDCColor. */
DPRINT("WIN32K:IntSetDCColor is unimplemented\n");
return CLR_INVALID;
}
#define SIZEOF_DEVMODEW_300 188
#define SIZEOF_DEVMODEW_400 212
#define SIZEOF_DEVMODEW_500 220
@@ -157,14 +157,13 @@ DC_GET_VAL_EX( GetWindowExtEx, szlWindowExt.cx, szlWindowExt.cy, SIZE, cx, cy )
DC_GET_VAL_EX( GetWindowOrgEx, ptlWindowOrg.x, ptlWindowOrg.y, POINT, x, y )
DC_GET_VAL_EX ( GetCurrentPositionEx, ptlCurrent.x, ptlCurrent.y, POINT, x, y )
DC_SET_MODE( NtGdiSetBkMode, jBkMode, TRANSPARENT, OPAQUE )
DC_SET_MODE( NtGdiSetPolyFillMode, jFillMode, ALTERNATE, WINDING )
DC_SET_MODE( NtGdiSetROP2, jROP2, R2_BLACK, R2_WHITE )
DC_SET_MODE( NtGdiSetStretchBltMode, jStretchBltMode, BLACKONWHITE, HALFTONE )
COLORREF STDCALL
COLORREF FASTCALL
NtGdiSetBkColor(HDC hDC, COLORREF color)
{
COLORREF oldColor;
@@ -181,9 +180,80 @@ NtGdiSetBkColor(HDC hDC, COLORREF color)
if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
oldColor = Dc_Attr->crBackgroundClr;
Dc_Attr->crBackgroundClr = color;
Dc_Attr->ulBackgroundClr = (ULONG)color;
Dc_Attr->ulDirty_ &= ~DIRTY_LINE; // Clear Flag if set.
hBrush = Dc_Attr->hbrush;
DC_UnlockDc(dc);
NtGdiSelectObject(hDC, hBrush);
return oldColor;
}
INT FASTCALL
NtGdiSetBkMode(HDC hDC, INT Mode)
{
COLORREF oldMode;
PDC dc;
PDC_ATTR Dc_Attr;
if (!(dc = DC_LockDc(hDC)))
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return CLR_INVALID;
}
Dc_Attr = dc->pDc_Attr;
if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
oldMode = Dc_Attr->lBkMode;
Dc_Attr->jBkMode = Mode;
Dc_Attr->lBkMode = Mode;
DC_UnlockDc(dc);
return oldMode;
}
UINT
FASTCALL
NtGdiSetTextAlign(HDC hDC,
UINT Mode)
{
UINT prevAlign;
DC *dc;
PDC_ATTR Dc_Attr;
dc = DC_LockDc(hDC);
if (!dc)
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return GDI_ERROR;
}
Dc_Attr = dc->pDc_Attr;
if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
prevAlign = Dc_Attr->lTextAlign;
Dc_Attr->lTextAlign = Mode;
DC_UnlockDc( dc );
return prevAlign;
}
COLORREF
FASTCALL
NtGdiSetTextColor(HDC hDC,
COLORREF color)
{
COLORREF oldColor;
PDC dc = DC_LockDc(hDC);
PDC_ATTR Dc_Attr;
HBRUSH hBrush;
if (!dc)
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return CLR_INVALID;
}
Dc_Attr = dc->pDc_Attr;
if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
oldColor = Dc_Attr->crForegroundClr;
Dc_Attr->crForegroundClr = color;
hBrush = Dc_Attr->hbrush;
DC_UnlockDc( dc );
NtGdiSelectObject(hDC, hBrush);
return oldColor;
}
@@ -4029,54 +4029,6 @@ NtGdiSetMapperFlags(HDC hDC,
return 0;
}
UINT
STDCALL
NtGdiSetTextAlign(HDC hDC,
UINT Mode)
{
UINT prevAlign;
DC *dc;
PDC_ATTR Dc_Attr;
dc = DC_LockDc(hDC);
if (!dc)
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return GDI_ERROR;
}
Dc_Attr = dc->pDc_Attr;
if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
prevAlign = Dc_Attr->lTextAlign;
Dc_Attr->lTextAlign = Mode;
DC_UnlockDc( dc );
return prevAlign;
}
COLORREF
STDCALL
NtGdiSetTextColor(HDC hDC,
COLORREF color)
{
COLORREF oldColor;
PDC dc = DC_LockDc(hDC);
PDC_ATTR Dc_Attr;
HBRUSH hBrush;
if (!dc)
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return CLR_INVALID;
}
Dc_Attr = dc->pDc_Attr;
if(!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
oldColor = Dc_Attr->crForegroundClr;
Dc_Attr->crForegroundClr = color;
hBrush = Dc_Attr->hbrush;
DC_UnlockDc( dc );
NtGdiSelectObject(hDC, hBrush);
return oldColor;
}
BOOL
STDCALL
@@ -679,18 +679,13 @@ NtGdiDrawStream 3
#
#ReactOS specify syscall
NtGdiSelectObject 2
NtGdiSetBkColor 2
NtGdiSetBkMode 2
NtGdiSetDIBits 7
NtGdiSetEnhMetaFileBits 2
NtGdiSetGraphicsMode 2
NtGdiSetICMProfile 2
NtGdiSetMapperFlags 2
NtGdiSetPolyFillMode 2
NtGdiSetROP2 2
NtGdiSetStretchBltMode 2
NtGdiSetTextAlign 2
NtGdiSetTextColor 2
NtGdiSetViewportExtEx 4
NtGdiSetViewportOrgEx 4
NtGdiSetWindowExtEx 4
@@ -744,8 +739,6 @@ NtGdiEnumICMProfiles 3
NtGdiExtTextOut 8
NtGdiGdiComment 3
NtGdiGetAspectRatioFilterEx 2
NtGdiGetBkColor 1
NtGdiGetBkMode 1
NtGdiGetColorSpace 1
NtGdiGetCurrentPositionEx 2
NtGdiGetEnhMetaFile 1
@@ -762,10 +755,7 @@ NtGdiGetLogColorSpace 3
NtGdiGetMapMode 1
NtGdiGetPixelFormat 1
NtGdiGetPolyFillMode 1
NtGdiGetROP2 1
NtGdiGetStretchBltMode 1
NtGdiGetTextAlign 1
NtGdiGetTextColor 1
NtGdiGetTextExtentPoint32 4
NtGdiMoveToEx 4
NtGdiOffsetViewportOrgEx 4