Implemented a couple of stubbed functions. Added several pointer checks.

svn path=/trunk/; revision=4074
This commit is contained in:
Eugene Ingerman 2003-01-25 23:09:40 +00:00
parent 6a14e674e4
commit 2e3e5c7bd3
3 changed files with 225 additions and 226 deletions

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.12 2002/09/08 10:22:40 chorns Exp $ /* $Id: stubs.c,v 1.13 2003/01/25 23:09:40 ei Exp $
* *
* reactos/lib/gdi32/misc/stubs.c * reactos/lib/gdi32/misc/stubs.c
* *
@ -1050,19 +1050,6 @@ RestoreDC(
} }
UINT
STDCALL
RealizePalette(
HDC a0
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
BOOL BOOL
STDCALL STDCALL
RoundRect( RoundRect(
@ -1145,20 +1132,6 @@ SetMetaRgn(
HPALETTE
STDCALL
SelectPalette(
HDC a0,
HPALETTE a1,
BOOL a2
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
COLORREF COLORREF
STDCALL STDCALL
SetBkColor( SetBkColor(

View file

@ -175,3 +175,26 @@ DeleteObject(
{ {
return W32kDeleteObject(a0); return W32kDeleteObject(a0);
} }
HPALETTE
STDCALL
SelectPalette(
HDC a0,
HPALETTE a1,
BOOL a2
)
{
return W32kSelectPalette( a0, a1,a2 );
}
UINT
STDCALL
RealizePalette(
HDC a0
)
{
return W32kRealizePalette( a0 );
}

View file

@ -1,4 +1,4 @@
/* $Id: dc.c,v 1.44 2003/01/19 01:01:00 ei Exp $ /* $Id: dc.c,v 1.45 2003/01/25 23:09:40 ei Exp $
* *
* DC.C - Device context functions * DC.C - Device context functions
* *
@ -957,7 +957,9 @@ HGDIOBJ STDCALL W32kSelectObject(HDC hDC, HGDIOBJ hGDIObj)
if( PalGDI ){ if( PalGDI ){
XlateObj = (PXLATEOBJ)EngCreateXlate(PalGDI->Mode, PAL_RGB, dc->w.hPalette, NULL); XlateObj = (PXLATEOBJ)EngCreateXlate(PalGDI->Mode, PAL_RGB, dc->w.hPalette, NULL);
pen = GDIOBJ_LockObj(dc->w.hPen, GO_PEN_MAGIC); pen = GDIOBJ_LockObj(dc->w.hPen, GO_PEN_MAGIC);
if( pen ){
pen->logpen.lopnColor = XLATEOBJ_iXlate(XlateObj, pen->logpen.lopnColor); pen->logpen.lopnColor = XLATEOBJ_iXlate(XlateObj, pen->logpen.lopnColor);
}
GDIOBJ_UnlockObj( dc->w.hPen, GO_PEN_MAGIC); GDIOBJ_UnlockObj( dc->w.hPen, GO_PEN_MAGIC);
} }
break; break;
@ -970,8 +972,9 @@ HGDIOBJ STDCALL W32kSelectObject(HDC hDC, HGDIOBJ hGDIObj)
if( PalGDI ){ if( PalGDI ){
XlateObj = (PXLATEOBJ)EngCreateXlate(PalGDI->Mode, PAL_RGB, dc->w.hPalette, NULL); XlateObj = (PXLATEOBJ)EngCreateXlate(PalGDI->Mode, PAL_RGB, dc->w.hPalette, NULL);
brush = GDIOBJ_LockObj(dc->w.hBrush, GO_BRUSH_MAGIC); brush = GDIOBJ_LockObj(dc->w.hBrush, GO_BRUSH_MAGIC);
brush->iSolidColor = XLATEOBJ_iXlate(XlateObj, if( brush ){
brush->logbrush.lbColor); brush->iSolidColor = XLATEOBJ_iXlate(XlateObj, brush->logbrush.lbColor);
}
GDIOBJ_UnlockObj( dc->w.hBrush, GO_BRUSH_MAGIC); GDIOBJ_UnlockObj( dc->w.hBrush, GO_BRUSH_MAGIC);
} }
break; break;