Update SetMetaRgn, UpdateColors, ResizePalette and add support for windows client info gdi.

svn path=/trunk/; revision=31679
This commit is contained in:
James Tabor 2008-01-09 04:15:42 +00:00
parent 01761273fd
commit 025c424479
4 changed files with 72 additions and 58 deletions

View file

@ -184,18 +184,6 @@ GetBoundsRect(
} }
/*
* @implemented
*/
int
STDCALL
GetMetaRgn(HDC hdc,
HRGN hrgn)
{
return NtGdiGetRandomRgn(hdc,hrgn,2);
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -213,7 +201,6 @@ GetMetaFileBitsEx(
} }
/* /*
* @unimplemented * @unimplemented
*/ */
@ -243,35 +230,6 @@ PlayMetaFile(
return FALSE; return FALSE;
} }
/*
* @unimplemented
*/
BOOL
STDCALL
ResizePalette(
HPALETTE a0,
UINT a1
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
int
STDCALL
SetMetaRgn(
HDC hdc
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* /*
* @implemented * @implemented
*/ */
@ -316,21 +274,6 @@ SetMetaFileBitsEx(
return 0; return 0;
} }
/*
* @unimplemented
*/
BOOL
STDCALL
UpdateColors(
HDC hdc
)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */

View file

@ -89,6 +89,18 @@ RealizePalette(HDC hDC) /* [in] Handle of device context */
return UserRealizePalette(hDC); return UserRealizePalette(hDC);
} }
/*
* @implemented
*/
BOOL
STDCALL
ResizePalette(
HPALETTE hPalette,
UINT nEntries
)
{
return NtGdiResizePalette(hPalette, nEntries);
}
/* /*
* @implemented * @implemented
@ -110,4 +122,17 @@ SetDIBColorTable(HDC hDC,
return retValue; return retValue;
} }
/*
* @implemented
*/
BOOL
STDCALL
UpdateColors(
HDC hdc
)
{
((PW32CLIENTINFO)NtCurrentTeb()->Win32ClientInfo)->cSpins = 0;
return NtGdiUpdateColors(hdc);
}
/* EOF */ /* EOF */

View file

@ -240,6 +240,17 @@ GetClipRgn(
return Ret; return Ret;
} }
/*
* @implemented
*/
int
STDCALL
GetMetaRgn(HDC hdc,
HRGN hrgn)
{
return NtGdiGetRandomRgn(hdc,hrgn,2);
}
/* /*
* @implemented * @implemented
*/ */
@ -313,3 +324,28 @@ SetRectRgn(HRGN hrgn,
#endif #endif
} }
/*
* @implemented
*/
int
STDCALL
SetMetaRgn( HDC hDC )
{
if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_DC)
return NtGdiSetMetaRgn(hDC);
#if 0
PLDC pLDC = GdiGetLDC(hDC);
if ( pLDC && GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_METADC )
{
if (pLDC->iType == LDC_EMFLDC || EMFDRV_SetMetaRgn(hDC))
{
return NtGdiSetMetaRgn(hDC);
}
else
SetLastError(ERROR_INVALID_HANDLE);
}
#endif
return 0;
}

View file

@ -357,6 +357,16 @@ typedef struct _PATRECT
RECT r; RECT r;
HBRUSH hBrush; HBRUSH hBrush;
} PATRECT, * PPATRECT; } PATRECT, * PPATRECT;
typedef struct _W32CLIENTINFO
{
ULONG CI_flags;
ULONG cSpins;
ULONG ulWindowsVersion;
ULONG ulAppCompatFlags;
ULONG ulAppCompatFlags2;
ULONG W32ClientInfo[57];
} W32CLIENTINFO, *PW32CLIENTINFO;
#endif #endif
typedef struct _GDIBSPPATBLT typedef struct _GDIBSPPATBLT