mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 08:55:19 +00:00
[NtGdi]
- Add more function for NtUser. svn path=/trunk/; revision=68608
This commit is contained in:
parent
08d0aae07e
commit
05ef43979f
6 changed files with 148 additions and 1 deletions
|
@ -894,6 +894,38 @@ IntGdiSetMapMode(
|
|||
return iPrevMapMode;
|
||||
}
|
||||
|
||||
BOOL
|
||||
FASTCALL
|
||||
GreSetViewportOrgEx(
|
||||
HDC hDC,
|
||||
int X,
|
||||
int Y,
|
||||
LPPOINT Point)
|
||||
{
|
||||
PDC dc;
|
||||
PDC_ATTR pdcattr;
|
||||
|
||||
dc = DC_LockDc(hDC);
|
||||
if (!dc)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
pdcattr = dc->pdcattr;
|
||||
|
||||
if (Point)
|
||||
{
|
||||
Point->x = pdcattr->ptlViewportOrg.x;
|
||||
Point->y = pdcattr->ptlViewportOrg.y;
|
||||
}
|
||||
|
||||
pdcattr->ptlViewportOrg.x = X;
|
||||
pdcattr->ptlViewportOrg.y = Y;
|
||||
pdcattr->flXform |= PAGE_XLATE_CHANGED;
|
||||
|
||||
DC_UnlockDc(dc);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
APIENTRY
|
||||
|
@ -1238,6 +1270,89 @@ DC_vGetAspectRatioFilter(PDC pDC, LPSIZE AspectRatio)
|
|||
}
|
||||
}
|
||||
|
||||
BOOL APIENTRY
|
||||
GreGetDCPoint(
|
||||
HDC hDC,
|
||||
UINT iPoint,
|
||||
PPOINTL Point)
|
||||
{
|
||||
BOOL Ret = TRUE;
|
||||
DC *pdc;
|
||||
SIZE Size;
|
||||
PSIZEL pszlViewportExt;
|
||||
|
||||
if (!Point)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pdc = DC_LockDc(hDC);
|
||||
if (!pdc)
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch (iPoint)
|
||||
{
|
||||
case GdiGetViewPortExt:
|
||||
pszlViewportExt = DC_pszlViewportExt(pdc);
|
||||
Point->x = pszlViewportExt->cx;
|
||||
Point->y = pszlViewportExt->cy;
|
||||
break;
|
||||
|
||||
case GdiGetWindowExt:
|
||||
Point->x = pdc->pdcattr->szlWindowExt.cx;
|
||||
Point->y = pdc->pdcattr->szlWindowExt.cy;
|
||||
break;
|
||||
|
||||
case GdiGetViewPortOrg:
|
||||
*Point = pdc->pdcattr->ptlViewportOrg;
|
||||
break;
|
||||
|
||||
case GdiGetWindowOrg:
|
||||
*Point = pdc->pdcattr->ptlWindowOrg;
|
||||
break;
|
||||
|
||||
case GdiGetDCOrg:
|
||||
*Point = pdc->ptlDCOrig;
|
||||
break;
|
||||
|
||||
case GdiGetAspectRatioFilter:
|
||||
DC_vGetAspectRatioFilter(pdc, &Size);
|
||||
Point->x = Size.cx;
|
||||
Point->y = Size.cy;
|
||||
break;
|
||||
|
||||
default:
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
Ret = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
DC_UnlockDc(pdc);
|
||||
return Ret;
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
GreGetWindowExtEx(
|
||||
_In_ HDC hdc,
|
||||
_Out_ LPSIZE lpSize)
|
||||
{
|
||||
return GreGetDCPoint(hdc, GdiGetWindowExt, (PPOINTL)lpSize);
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
GreGetViewportExtEx(
|
||||
_In_ HDC hdc,
|
||||
_Out_ LPSIZE lpSize)
|
||||
{
|
||||
return GreGetDCPoint(hdc, GdiGetViewPortExt, (PPOINTL)lpSize);
|
||||
}
|
||||
|
||||
BOOL APIENTRY
|
||||
NtGdiGetDCPoint(
|
||||
HDC hDC,
|
||||
|
|
|
@ -156,3 +156,7 @@ VOID FASTCALL IntMirrorWindowOrg(PDC);
|
|||
int APIENTRY IntGdiSetMapMode(PDC, int);
|
||||
BOOL FASTCALL GreLPtoDP(HDC, LPPOINT, INT);
|
||||
BOOL FASTCALL GreDPtoLP(HDC, LPPOINT, INT);
|
||||
BOOL APIENTRY GreGetDCPoint(HDC,UINT,PPOINTL);
|
||||
BOOL WINAPI GreGetWindowExtEx( _In_ HDC hdc, _Out_ LPSIZE lpSize);
|
||||
BOOL WINAPI GreGetViewportExtEx( _In_ HDC hdc, _Out_ LPSIZE lpSize);
|
||||
BOOL FASTCALL GreSetViewportOrgEx(HDC,int,int,LPPOINT);
|
||||
|
|
|
@ -181,7 +181,7 @@ int FASTCALL GreGetMapMode(HDC);
|
|||
COLORREF FASTCALL GreGetTextColor(HDC);
|
||||
COLORREF FASTCALL IntSetDCBrushColor(HDC,COLORREF);
|
||||
COLORREF FASTCALL IntSetDCPenColor(HDC,COLORREF);
|
||||
|
||||
int FASTCALL GreGetGraphicsMode(HDC);
|
||||
|
||||
INIT_FUNCTION NTSTATUS NTAPI InitDcImpl(VOID);
|
||||
PPDEVOBJ FASTCALL IntEnumHDev(VOID);
|
||||
|
|
|
@ -241,6 +241,21 @@ GreSetStretchBltMode(HDC hDC, int iStretchMode)
|
|||
return oSMode;
|
||||
}
|
||||
|
||||
int FASTCALL
|
||||
GreGetGraphicsMode(HDC hdc)
|
||||
{
|
||||
PDC dc;
|
||||
int GraphicsMode;
|
||||
if (!(dc = DC_LockDc(hdc)))
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||
return CLR_INVALID;
|
||||
}
|
||||
GraphicsMode = dc->pdcattr->iGraphicsMode;;
|
||||
DC_UnlockDc(dc);
|
||||
return GraphicsMode;
|
||||
}
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
DCU_SetDcUndeletable(HDC hDC)
|
||||
|
|
|
@ -146,6 +146,18 @@ GreGetTextExtentExW(
|
|||
return Result;
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
GreGetTextMetricsW(
|
||||
_In_ HDC hdc,
|
||||
_Out_ LPTEXTMETRICW lptm)
|
||||
{
|
||||
TMW_INTERNAL tmwi;
|
||||
if (!ftGdiGetTextMetricsW(hdc, &tmwi)) return FALSE;
|
||||
*lptm = tmwi.TextMetric;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
DWORD
|
||||
APIENTRY
|
||||
NtGdiGetCharSet(HDC hDC)
|
||||
|
|
|
@ -132,6 +132,7 @@ BOOL FASTCALL GreGetTextExtentW(HDC,LPWSTR,INT,LPSIZE,UINT);
|
|||
BOOL FASTCALL GreGetTextExtentExW(HDC,LPWSTR,ULONG,ULONG,PULONG,PULONG,LPSIZE,FLONG);
|
||||
BOOL FASTCALL GreTextOutW(HDC,int,int,LPCWSTR,int);
|
||||
HFONT FASTCALL GreCreateFontIndirectW( LOGFONTW * );
|
||||
BOOL WINAPI GreGetTextMetricsW( _In_ HDC hdc, _Out_ LPTEXTMETRICW lptm);
|
||||
|
||||
#define IntLockProcessPrivateFonts(W32Process) \
|
||||
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(&W32Process->PrivateFontListLock)
|
||||
|
|
Loading…
Reference in a new issue