2009-07-08 21:53:35 +00:00
|
|
|
/*
|
2009-03-23 03:43:11 +00:00
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* PURPOSE: Functions for creation and destruction of DCs
|
|
|
|
* FILE: subsystem/win32/win32k/objects/dcobjs.c
|
|
|
|
* PROGRAMER: Timo Kreuzer (timo.kreuzer@rectos.org)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <w32k.h>
|
|
|
|
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
DC_vUpdateFillBrush(PDC pdc)
|
|
|
|
{
|
|
|
|
PDC_ATTR pdcattr = pdc->pdcattr;
|
|
|
|
PBRUSH pbrFill;
|
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Check if the brush handle has changed */
|
|
|
|
if (pdcattr->hbrush != pdc->dclevel.pbrFill->BaseObject.hHmgr)
|
|
|
|
{
|
|
|
|
/* Try to lock the new brush */
|
|
|
|
pbrFill = BRUSH_ShareLockBrush(pdcattr->hbrush);
|
|
|
|
if (pbrFill)
|
2009-03-23 03:43:11 +00:00
|
|
|
{
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Unlock old brush, set new brush */
|
|
|
|
BRUSH_ShareUnlockBrush(pdc->dclevel.pbrFill);
|
|
|
|
pdc->dclevel.pbrFill = pbrFill;
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-04-05 23:51:27 +00:00
|
|
|
/* Mark eboFill as dirty */
|
|
|
|
pdcattr->ulDirty_ |= DIRTY_FILL;
|
2009-03-26 00:56:46 +00:00
|
|
|
}
|
|
|
|
else
|
2009-03-23 03:43:11 +00:00
|
|
|
{
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Invalid brush handle, restore old one */
|
|
|
|
pdcattr->hbrush = pdc->dclevel.pbrFill->BaseObject.hHmgr;
|
2009-03-23 03:43:11 +00:00
|
|
|
}
|
2009-03-26 00:56:46 +00:00
|
|
|
}
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-04-05 23:51:27 +00:00
|
|
|
/* Check if the EBRUSHOBJ needs update */
|
|
|
|
if (pdcattr->ulDirty_ & DIRTY_FILL)
|
|
|
|
{
|
2009-08-04 20:37:10 +00:00
|
|
|
/* Update eboFill */
|
|
|
|
EBRUSHOBJ_vUpdate(&pdc->eboFill, pdc->dclevel.pbrFill, pdc);
|
2009-04-05 23:51:27 +00:00
|
|
|
}
|
2009-03-29 02:15:37 +00:00
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Check for DC brush */
|
|
|
|
if (pdcattr->hbrush == StockObjects[DC_BRUSH])
|
|
|
|
{
|
2009-08-04 20:37:10 +00:00
|
|
|
/* ROS HACK, should use surf xlate */
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Update the eboFill's solid color */
|
2009-08-04 20:37:10 +00:00
|
|
|
EBRUSHOBJ_vSetSolidBrushColor(&pdc->eboFill, pdcattr->crPenClr);
|
2009-07-30 21:12:06 +00:00
|
|
|
}
|
2009-07-08 21:53:35 +00:00
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Clear flags */
|
|
|
|
pdcattr->ulDirty_ &= ~(DIRTY_FILL | DC_BRUSH_DIRTY);
|
2009-03-23 03:43:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
DC_vUpdateLineBrush(PDC pdc)
|
|
|
|
{
|
|
|
|
PDC_ATTR pdcattr = pdc->pdcattr;
|
|
|
|
PBRUSH pbrLine;
|
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Check if the pen handle has changed */
|
|
|
|
if (pdcattr->hpen != pdc->dclevel.pbrLine->BaseObject.hHmgr)
|
|
|
|
{
|
|
|
|
/* Try to lock the new pen */
|
2009-04-01 01:49:18 +00:00
|
|
|
pbrLine = PEN_ShareLockPen(pdcattr->hpen);
|
2009-03-26 00:56:46 +00:00
|
|
|
if (pbrLine)
|
2009-03-23 03:43:11 +00:00
|
|
|
{
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Unlock old brush, set new brush */
|
|
|
|
BRUSH_ShareUnlockBrush(pdc->dclevel.pbrLine);
|
|
|
|
pdc->dclevel.pbrLine = pbrLine;
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-04-05 23:51:27 +00:00
|
|
|
/* Mark eboLine as dirty */
|
|
|
|
pdcattr->ulDirty_ |= DIRTY_LINE;
|
2009-03-26 00:56:46 +00:00
|
|
|
}
|
|
|
|
else
|
2009-03-23 03:43:11 +00:00
|
|
|
{
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Invalid pen handle, restore old one */
|
|
|
|
pdcattr->hpen = pdc->dclevel.pbrLine->BaseObject.hHmgr;
|
2009-03-23 03:43:11 +00:00
|
|
|
}
|
2009-03-26 00:56:46 +00:00
|
|
|
}
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-04-05 23:51:27 +00:00
|
|
|
/* Check if the EBRUSHOBJ needs update */
|
|
|
|
if (pdcattr->ulDirty_ & DIRTY_LINE)
|
|
|
|
{
|
2009-08-04 20:37:10 +00:00
|
|
|
/* Update eboLine */
|
|
|
|
EBRUSHOBJ_vUpdate(&pdc->eboLine, pdc->dclevel.pbrLine, pdc);
|
2009-04-05 23:51:27 +00:00
|
|
|
}
|
2009-03-29 02:15:37 +00:00
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Check for DC pen */
|
|
|
|
if (pdcattr->hpen == StockObjects[DC_PEN])
|
|
|
|
{
|
|
|
|
/* Update the eboLine's solid color */
|
2009-08-04 20:37:10 +00:00
|
|
|
EBRUSHOBJ_vSetSolidBrushColor(&pdc->eboLine, pdcattr->crPenClr);
|
2009-07-30 21:12:06 +00:00
|
|
|
}
|
2009-07-08 21:53:35 +00:00
|
|
|
|
2009-03-26 03:41:57 +00:00
|
|
|
/* Clear flags */
|
|
|
|
pdcattr->ulDirty_ &= ~(DIRTY_LINE | DC_PEN_DIRTY);
|
2009-03-23 03:43:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
DC_vUpdateTextBrush(PDC pdc)
|
|
|
|
{
|
|
|
|
PDC_ATTR pdcattr = pdc->pdcattr;
|
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Update the eboText's solid color */
|
2009-08-04 20:37:10 +00:00
|
|
|
EBRUSHOBJ_vSetSolidBrushColor(&pdc->eboText, pdcattr->crForegroundClr);
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Clear flag */
|
|
|
|
pdcattr->ulDirty_ &= ~DIRTY_TEXT;
|
2009-03-23 03:43:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
DC_vUpdateBackgroundBrush(PDC pdc)
|
|
|
|
{
|
|
|
|
PDC_ATTR pdcattr = pdc->pdcattr;
|
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Update the eboBackground's solid color */
|
2009-08-04 20:37:10 +00:00
|
|
|
EBRUSHOBJ_vSetSolidBrushColor(&pdc->eboBackground, pdcattr->crBackgroundClr);
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/* Clear flag */
|
|
|
|
pdcattr->ulDirty_ &= ~DIRTY_BACKGROUND;
|
2009-03-23 03:43:11 +00:00
|
|
|
}
|
|
|
|
|
2009-07-10 23:44:05 +00:00
|
|
|
HPALETTE
|
|
|
|
FASTCALL
|
2009-03-25 22:14:20 +00:00
|
|
|
GdiSelectPalette(
|
|
|
|
HDC hDC,
|
|
|
|
HPALETTE hpal,
|
|
|
|
BOOL ForceBackground)
|
|
|
|
{
|
|
|
|
PDC pdc;
|
|
|
|
HPALETTE oldPal = NULL;
|
2009-04-09 22:28:54 +00:00
|
|
|
PPALETTE ppal;
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-03-25 22:14:20 +00:00
|
|
|
// FIXME: mark the palette as a [fore\back]ground pal
|
|
|
|
pdc = DC_LockDc(hDC);
|
|
|
|
if (!pdc)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-03-25 22:14:20 +00:00
|
|
|
/* Check if this is a valid palette handle */
|
2009-07-15 21:06:40 +00:00
|
|
|
ppal = PALETTE_ShareLockPalette(hpal);
|
2009-03-25 22:14:20 +00:00
|
|
|
if (!ppal)
|
|
|
|
{
|
|
|
|
DC_UnlockDc(pdc);
|
|
|
|
return NULL;
|
|
|
|
}
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-03-25 22:14:20 +00:00
|
|
|
/* Is this a valid palette for this depth? */
|
2010-04-12 18:44:36 +00:00
|
|
|
if ((BitsPerFormat(pdc->dclevel.pSurface->SurfObj.iBitmapFormat) <= 8
|
|
|
|
&& ppal->Mode == PAL_INDEXED) ||
|
|
|
|
(BitsPerFormat(pdc->dclevel.pSurface->SurfObj.iBitmapFormat) > 8))
|
2009-03-25 22:14:20 +00:00
|
|
|
{
|
2009-04-05 23:51:27 +00:00
|
|
|
/* Get old palette, set new one */
|
2009-03-25 22:14:20 +00:00
|
|
|
oldPal = pdc->dclevel.hpal;
|
|
|
|
pdc->dclevel.hpal = hpal;
|
2009-07-15 21:06:40 +00:00
|
|
|
DC_vSelectPalette(pdc, ppal);
|
2009-04-05 23:51:27 +00:00
|
|
|
|
|
|
|
/* Mark the brushes invalid */
|
|
|
|
pdc->pdcattr->ulDirty_ |= DIRTY_FILL | DIRTY_LINE |
|
|
|
|
DIRTY_BACKGROUND | DIRTY_TEXT;
|
2009-03-25 22:14:20 +00:00
|
|
|
}
|
|
|
|
|
2009-07-15 21:06:40 +00:00
|
|
|
PALETTE_ShareUnlockPalette(ppal);
|
2009-03-25 22:14:20 +00:00
|
|
|
DC_UnlockDc(pdc);
|
|
|
|
|
|
|
|
return oldPal;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
HBRUSH
|
|
|
|
APIENTRY
|
|
|
|
NtGdiSelectBrush(
|
|
|
|
IN HDC hDC,
|
|
|
|
IN HBRUSH hBrush)
|
2009-03-23 03:43:11 +00:00
|
|
|
{
|
2009-03-25 22:14:20 +00:00
|
|
|
PDC pDC;
|
|
|
|
HBRUSH hOrgBrush;
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-03-25 22:14:20 +00:00
|
|
|
if (hDC == NULL || hBrush == NULL) return NULL;
|
|
|
|
|
|
|
|
pDC = DC_LockDc(hDC);
|
|
|
|
if (!pDC)
|
2009-03-23 03:43:11 +00:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2009-04-08 18:10:33 +00:00
|
|
|
/* Simply return the user mode value, without checking */
|
2009-04-01 01:49:18 +00:00
|
|
|
hOrgBrush = pDC->pdcattr->hbrush;
|
|
|
|
pDC->pdcattr->hbrush = hBrush;
|
|
|
|
DC_vUpdateFillBrush(pDC);
|
2009-03-25 22:14:20 +00:00
|
|
|
|
|
|
|
DC_UnlockDc(pDC);
|
|
|
|
|
|
|
|
return hOrgBrush;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
HPEN
|
|
|
|
APIENTRY
|
|
|
|
NtGdiSelectPen(
|
|
|
|
IN HDC hDC,
|
|
|
|
IN HPEN hPen)
|
|
|
|
{
|
|
|
|
PDC pDC;
|
|
|
|
HPEN hOrgPen;
|
|
|
|
|
|
|
|
if (hDC == NULL || hPen == NULL) return NULL;
|
|
|
|
|
|
|
|
pDC = DC_LockDc(hDC);
|
|
|
|
if (!pDC)
|
2009-03-23 03:43:11 +00:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2009-04-08 18:10:33 +00:00
|
|
|
/* Simply return the user mode value, without checking */
|
2009-04-01 01:49:18 +00:00
|
|
|
hOrgPen = pDC->pdcattr->hpen;
|
|
|
|
pDC->pdcattr->hpen = hPen;
|
|
|
|
DC_vUpdateLineBrush(pDC);
|
2009-03-25 22:14:20 +00:00
|
|
|
|
|
|
|
DC_UnlockDc(pDC);
|
|
|
|
|
|
|
|
return hOrgPen;
|
|
|
|
}
|
|
|
|
|
2009-03-26 00:56:46 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
HBITMAP
|
|
|
|
APIENTRY
|
|
|
|
NtGdiSelectBitmap(
|
|
|
|
IN HDC hDC,
|
|
|
|
IN HBITMAP hBmp)
|
|
|
|
{
|
|
|
|
PDC pDC;
|
|
|
|
PDC_ATTR pdcattr;
|
|
|
|
HBITMAP hOrgBmp;
|
|
|
|
PSURFACE psurfBmp, psurfOld;
|
|
|
|
HRGN hVisRgn;
|
|
|
|
|
|
|
|
if (hDC == NULL || hBmp == NULL) return NULL;
|
|
|
|
|
|
|
|
pDC = DC_LockDc(hDC);
|
|
|
|
if (!pDC)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
pdcattr = pDC->pdcattr;
|
|
|
|
|
|
|
|
/* must be memory dc to select bitmap */
|
|
|
|
if (pDC->dctype != DC_TYPE_MEMORY)
|
|
|
|
{
|
|
|
|
DC_UnlockDc(pDC);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
psurfBmp = SURFACE_LockSurface(hBmp);
|
|
|
|
if (!psurfBmp)
|
|
|
|
{
|
|
|
|
DC_UnlockDc(pDC);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Get the handle for the old bitmap */
|
|
|
|
psurfOld = pDC->dclevel.pSurface;
|
|
|
|
hOrgBmp = psurfOld ? psurfOld->BaseObject.hHmgr : NULL;
|
|
|
|
|
|
|
|
/* Release the old bitmap, reference the new */
|
|
|
|
DC_vSelectSurface(pDC, psurfBmp);
|
|
|
|
|
|
|
|
// If Info DC this is zero and pSurface is moved to DC->pSurfInfo.
|
|
|
|
psurfBmp->hDC = hDC;
|
|
|
|
|
|
|
|
/* FIXME; improve by using a region without a handle and selecting it */
|
2010-01-21 13:18:33 +00:00
|
|
|
hVisRgn = IntSysCreateRectRgn( 0,
|
|
|
|
0,
|
|
|
|
psurfBmp->SurfObj.sizlBitmap.cx,
|
|
|
|
psurfBmp->SurfObj.sizlBitmap.cy);
|
2009-03-26 00:56:46 +00:00
|
|
|
|
|
|
|
/* Release the exclusive lock */
|
|
|
|
SURFACE_UnlockSurface(psurfBmp);
|
|
|
|
|
2009-04-05 23:51:27 +00:00
|
|
|
/* Mark the brushes invalid */
|
|
|
|
pdcattr->ulDirty_ |= DIRTY_FILL | DIRTY_LINE;
|
2009-03-26 00:56:46 +00:00
|
|
|
|
|
|
|
DC_UnlockDc(pDC);
|
|
|
|
|
|
|
|
if (hVisRgn)
|
|
|
|
{
|
|
|
|
GdiSelectVisRgn(hDC, hVisRgn);
|
2010-01-21 13:18:33 +00:00
|
|
|
REGION_FreeRgnByHandle(hVisRgn);
|
2009-03-26 00:56:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return hOrgBmp;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-03-25 22:14:20 +00:00
|
|
|
BOOL
|
|
|
|
APIENTRY
|
|
|
|
NtGdiSelectClipPath(
|
|
|
|
HDC hDC,
|
|
|
|
int Mode)
|
|
|
|
{
|
|
|
|
HRGN hrgnPath;
|
|
|
|
PPATH pPath;
|
|
|
|
BOOL success = FALSE;
|
|
|
|
PDC_ATTR pdcattr;
|
|
|
|
PDC pdc;
|
2009-07-08 21:53:35 +00:00
|
|
|
|
2009-03-25 22:14:20 +00:00
|
|
|
pdc = DC_LockDc(hDC);
|
|
|
|
if (!pdc)
|
|
|
|
{
|
|
|
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
pdcattr = pdc->pdcattr;
|
|
|
|
|
|
|
|
pPath = PATH_LockPath(pdc->dclevel.hPath);
|
|
|
|
if (!pPath)
|
2009-03-23 03:43:11 +00:00
|
|
|
{
|
2009-03-25 22:14:20 +00:00
|
|
|
DC_UnlockDc(pdc);
|
|
|
|
return FALSE;
|
2009-03-23 03:43:11 +00:00
|
|
|
}
|
2009-03-25 22:14:20 +00:00
|
|
|
|
|
|
|
/* Check that path is closed */
|
|
|
|
if (pPath->state != PATH_Closed)
|
2009-03-23 03:43:11 +00:00
|
|
|
{
|
2009-03-25 22:14:20 +00:00
|
|
|
SetLastWin32Error(ERROR_CAN_NOT_COMPLETE);
|
2010-03-28 00:51:25 +00:00
|
|
|
DC_UnlockDc(pdc);
|
2009-03-25 22:14:20 +00:00
|
|
|
return FALSE;
|
2009-03-23 03:43:11 +00:00
|
|
|
}
|
|
|
|
|
2009-03-25 22:14:20 +00:00
|
|
|
/* Construct a region from the path */
|
|
|
|
else if (PATH_PathToRegion(pPath, pdcattr->jFillMode, &hrgnPath))
|
|
|
|
{
|
|
|
|
success = GdiExtSelectClipRgn(pdc, hrgnPath, Mode) != ERROR;
|
|
|
|
GreDeleteObject( hrgnPath );
|
2009-03-23 03:43:11 +00:00
|
|
|
|
2009-03-25 22:14:20 +00:00
|
|
|
/* Empty the path */
|
|
|
|
if (success)
|
|
|
|
PATH_EmptyPath(pPath);
|
|
|
|
|
|
|
|
/* FIXME: Should this function delete the path even if it failed? */
|
|
|
|
}
|
|
|
|
|
|
|
|
PATH_UnlockPath(pPath);
|
|
|
|
DC_UnlockDc(pdc);
|
|
|
|
|
|
|
|
return success;
|
2009-03-23 03:43:11 +00:00
|
|
|
}
|
2009-03-25 22:14:20 +00:00
|
|
|
|
|
|
|
HANDLE
|
|
|
|
APIENTRY
|
|
|
|
NtGdiGetDCObject(HDC hDC, INT ObjectType)
|
|
|
|
{
|
|
|
|
HGDIOBJ SelObject;
|
|
|
|
DC *pdc;
|
|
|
|
PDC_ATTR pdcattr;
|
|
|
|
|
|
|
|
/* From Wine: GetCurrentObject does not SetLastError() on a null object */
|
|
|
|
if(!hDC) return NULL;
|
|
|
|
|
|
|
|
if(!(pdc = DC_LockDc(hDC)))
|
|
|
|
{
|
|
|
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
pdcattr = pdc->pdcattr;
|
|
|
|
|
2009-04-08 18:10:33 +00:00
|
|
|
if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY))
|
|
|
|
DC_vUpdateFillBrush(pdc);
|
2009-03-25 22:14:20 +00:00
|
|
|
|
2009-04-08 18:10:33 +00:00
|
|
|
if (pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
|
|
|
|
DC_vUpdateLineBrush(pdc);
|
2009-03-25 22:14:20 +00:00
|
|
|
|
|
|
|
switch(ObjectType)
|
|
|
|
{
|
|
|
|
case GDI_OBJECT_TYPE_EXTPEN:
|
|
|
|
case GDI_OBJECT_TYPE_PEN:
|
|
|
|
SelObject = pdcattr->hpen;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDI_OBJECT_TYPE_BRUSH:
|
|
|
|
SelObject = pdcattr->hbrush;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDI_OBJECT_TYPE_PALETTE:
|
|
|
|
SelObject = pdc->dclevel.hpal;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDI_OBJECT_TYPE_FONT:
|
|
|
|
SelObject = pdcattr->hlfntNew;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDI_OBJECT_TYPE_BITMAP:
|
2009-04-14 20:50:02 +00:00
|
|
|
{
|
|
|
|
SURFACE *psurf = pdc->dclevel.pSurface;
|
|
|
|
SelObject = psurf ? psurf->BaseObject.hHmgr : NULL;
|
2009-03-25 22:14:20 +00:00
|
|
|
break;
|
2009-04-14 20:50:02 +00:00
|
|
|
}
|
2009-03-25 22:14:20 +00:00
|
|
|
|
|
|
|
case GDI_OBJECT_TYPE_COLORSPACE:
|
|
|
|
DPRINT1("FIXME: NtGdiGetCurrentObject() ObjectType OBJ_COLORSPACE not supported yet!\n");
|
|
|
|
// SelObject = dc->dclevel.pColorSpace.BaseObject.hHmgr; ?
|
|
|
|
SelObject = NULL;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
SelObject = NULL;
|
|
|
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
DC_UnlockDc(pdc);
|
|
|
|
return SelObject;
|
|
|
|
}
|
|
|
|
|
|
|
|
ULONG
|
|
|
|
APIENTRY
|
|
|
|
NtGdiEnumObjects(
|
|
|
|
IN HDC hdc,
|
|
|
|
IN INT iObjectType,
|
|
|
|
IN ULONG cjBuf,
|
|
|
|
OUT OPTIONAL PVOID pvBuf)
|
|
|
|
{
|
|
|
|
UNIMPLEMENTED;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|