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(
@ -1477,12 +1450,12 @@ EnumEnhMetaFile(
} }
UINT UINT
STDCALL STDCALL
GetEnhMetaFileBits( GetEnhMetaFileBits(
HENHMETAFILE a0, HENHMETAFILE a0,
UINT a1, UINT a1,
LPBYTE a2 LPBYTE a2
) )
{ {
@ -1491,9 +1464,9 @@ GetEnhMetaFileBits(
} }
UINT UINT
STDCALL STDCALL
GetEnhMetaFileHeader( GetEnhMetaFileHeader(
HENHMETAFILE a0, HENHMETAFILE a0,
UINT a1, UINT a1,
@ -1505,9 +1478,9 @@ GetEnhMetaFileHeader(
} }
UINT UINT
STDCALL STDCALL
GetEnhMetaFilePaletteEntries( GetEnhMetaFilePaletteEntries(
HENHMETAFILE a0, HENHMETAFILE a0,
UINT a1, UINT a1,
@ -1519,9 +1492,9 @@ GetEnhMetaFilePaletteEntries(
} }
UINT UINT
STDCALL STDCALL
GetEnhMetaFilePixelFormat( GetEnhMetaFilePixelFormat(
HENHMETAFILE a0, HENHMETAFILE a0,
DWORD a1, DWORD a1,
@ -1533,14 +1506,14 @@ GetEnhMetaFilePixelFormat(
} }
UINT UINT
STDCALL STDCALL
GetWinMetaFileBits( GetWinMetaFileBits(
HENHMETAFILE a0, HENHMETAFILE a0,
UINT a1, UINT a1,
LPBYTE a2, LPBYTE a2,
INT a3, INT a3,
HDC a4 HDC a4
) )
{ {
@ -1549,12 +1522,12 @@ GetWinMetaFileBits(
} }
BOOL BOOL
STDCALL STDCALL
PlayEnhMetaFile( PlayEnhMetaFile(
HDC a0, HDC a0,
HENHMETAFILE a1, HENHMETAFILE a1,
CONST RECT *a2 CONST RECT *a2
) )
{ {
@ -1563,13 +1536,13 @@ PlayEnhMetaFile(
} }
BOOL BOOL
STDCALL STDCALL
PlayEnhMetaFileRecord( PlayEnhMetaFileRecord(
HDC a0, HDC a0,
LPHANDLETABLE a1, LPHANDLETABLE a1,
CONST ENHMETARECORD *a2, CONST ENHMETARECORD *a2,
UINT a3 UINT a3
) )
{ {
@ -1578,11 +1551,11 @@ PlayEnhMetaFileRecord(
} }
HENHMETAFILE HENHMETAFILE
STDCALL STDCALL
SetEnhMetaFileBits( SetEnhMetaFileBits(
UINT a0, UINT a0,
CONST BYTE *a1 CONST BYTE *a1
) )
{ {
@ -1591,13 +1564,13 @@ SetEnhMetaFileBits(
} }
HENHMETAFILE HENHMETAFILE
STDCALL STDCALL
SetWinMetaFileBits( SetWinMetaFileBits(
UINT a0, UINT a0,
CONST BYTE *a1, CONST BYTE *a1,
HDC a2, HDC a2,
// CONST METAFILEPICT *a3 // CONST METAFILEPICT *a3
PVOID a3 PVOID a3
) )
@ -1607,12 +1580,12 @@ SetWinMetaFileBits(
} }
BOOL BOOL
STDCALL STDCALL
GdiComment( GdiComment(
HDC a0, HDC a0,
UINT a1, UINT a1,
CONST BYTE *a2 CONST BYTE *a2
) )
{ {
@ -1621,15 +1594,15 @@ GdiComment(
} }
BOOL BOOL
STDCALL STDCALL
AngleArc( AngleArc(
HDC hdc, HDC hdc,
int a1, int a1,
int a2, int a2,
DWORD a3, DWORD a3,
FLOAT a4, FLOAT a4,
FLOAT a5 FLOAT a5
) )
{ {
@ -1638,13 +1611,13 @@ AngleArc(
} }
BOOL BOOL
STDCALL STDCALL
PolyPolyline( PolyPolyline(
HDC hdc, HDC hdc,
CONST POINT *a1, CONST POINT *a1,
CONST DWORD *a2, CONST DWORD *a2,
DWORD a3 DWORD a3
) )
{ {
@ -1653,9 +1626,9 @@ PolyPolyline(
} }
BOOL BOOL
STDCALL STDCALL
GetWorldTransform( GetWorldTransform(
HDC hdc, HDC hdc,
LPXFORM a1 LPXFORM a1
@ -1666,11 +1639,11 @@ GetWorldTransform(
} }
BOOL BOOL
STDCALL STDCALL
SetWorldTransform( SetWorldTransform(
HDC a0, HDC a0,
CONST XFORM *a1 CONST XFORM *a1
) )
{ {
@ -1679,12 +1652,12 @@ SetWorldTransform(
} }
BOOL BOOL
STDCALL STDCALL
ModifyWorldTransform( ModifyWorldTransform(
HDC a0, HDC a0,
CONST XFORM *a1, CONST XFORM *a1,
DWORD a2 DWORD a2
) )
{ {
@ -1693,12 +1666,12 @@ ModifyWorldTransform(
} }
BOOL BOOL
STDCALL STDCALL
CombineTransform( CombineTransform(
LPXFORM a0, LPXFORM a0,
CONST XFORM *a1, CONST XFORM *a1,
CONST XFORM *a2 CONST XFORM *a2
) )
{ {
@ -1707,13 +1680,13 @@ CombineTransform(
} }
UINT UINT
STDCALL STDCALL
GetDIBColorTable( GetDIBColorTable(
HDC hdc, HDC hdc,
UINT a1, UINT a1,
UINT a2, UINT a2,
RGBQUAD *a3 RGBQUAD *a3
) )
{ {
@ -1722,13 +1695,13 @@ GetDIBColorTable(
} }
UINT UINT
STDCALL STDCALL
SetDIBColorTable( SetDIBColorTable(
HDC hdc, HDC hdc,
UINT a1, UINT a1,
UINT a2, UINT a2,
CONST RGBQUAD *a3 CONST RGBQUAD *a3
) )
{ {
@ -1737,11 +1710,11 @@ SetDIBColorTable(
} }
BOOL BOOL
STDCALL STDCALL
SetColorAdjustment( SetColorAdjustment(
HDC hdc, HDC hdc,
CONST COLORADJUSTMENT *a1 CONST COLORADJUSTMENT *a1
) )
{ {
@ -1750,11 +1723,11 @@ SetColorAdjustment(
} }
BOOL BOOL
STDCALL STDCALL
GetColorAdjustment( GetColorAdjustment(
HDC hdc, HDC hdc,
LPCOLORADJUSTMENT a1 LPCOLORADJUSTMENT a1
) )
{ {
@ -1763,9 +1736,9 @@ GetColorAdjustment(
} }
HPALETTE HPALETTE
STDCALL STDCALL
CreateHalftonePalette( CreateHalftonePalette(
HDC hdc HDC hdc
) )
@ -1776,8 +1749,8 @@ CreateHalftonePalette(
int int
STDCALL STDCALL
EndDoc( EndDoc(
HDC hdc HDC hdc
) )
@ -1787,9 +1760,9 @@ EndDoc(
} }
int int
STDCALL STDCALL
StartPage( StartPage(
HDC hdc HDC hdc
) )
@ -1799,9 +1772,9 @@ StartPage(
} }
int int
STDCALL STDCALL
EndPage( EndPage(
HDC hdc HDC hdc
) )
@ -1811,9 +1784,9 @@ EndPage(
} }
int int
STDCALL STDCALL
AbortDoc( AbortDoc(
HDC hdc HDC hdc
) )
@ -1823,11 +1796,11 @@ AbortDoc(
} }
int int
STDCALL STDCALL
SetAbortProc( SetAbortProc(
HDC hdc, HDC hdc,
ABORTPROC a1 ABORTPROC a1
) )
{ {
@ -1836,9 +1809,9 @@ SetAbortProc(
} }
BOOL BOOL
STDCALL STDCALL
AbortPath( AbortPath(
HDC hdc HDC hdc
) )
@ -1848,18 +1821,18 @@ AbortPath(
} }
BOOL BOOL
STDCALL STDCALL
ArcTo( ArcTo(
HDC hdc, HDC hdc,
int a1, int a1,
int a2, int a2,
int a3, int a3,
int a4, int a4,
int a5, int a5,
int a6, int a6,
int a7, int a7,
int a8 int a8
) )
{ {
@ -1868,9 +1841,9 @@ ArcTo(
} }
BOOL BOOL
STDCALL STDCALL
BeginPath( BeginPath(
HDC hdc HDC hdc
) )
@ -1880,9 +1853,9 @@ BeginPath(
} }
BOOL BOOL
STDCALL STDCALL
CloseFigure( CloseFigure(
HDC hdc HDC hdc
) )
@ -1892,9 +1865,9 @@ CloseFigure(
} }
BOOL BOOL
STDCALL STDCALL
EndPath( EndPath(
HDC hdc HDC hdc
) )
@ -1904,9 +1877,9 @@ EndPath(
} }
BOOL BOOL
STDCALL STDCALL
FillPath( FillPath(
HDC hdc HDC hdc
) )
@ -1916,9 +1889,9 @@ FillPath(
} }
BOOL BOOL
STDCALL STDCALL
FlattenPath( FlattenPath(
HDC hdc HDC hdc
) )
@ -1928,13 +1901,13 @@ FlattenPath(
} }
int int
STDCALL STDCALL
GetPath( GetPath(
HDC hdc, HDC hdc,
LPPOINT a1, LPPOINT a1,
LPBYTE a2, LPBYTE a2,
int a3 int a3
) )
{ {
@ -1943,9 +1916,9 @@ GetPath(
} }
HRGN HRGN
STDCALL STDCALL
PathToRegion( PathToRegion(
HDC hdc HDC hdc
) )
@ -1955,13 +1928,13 @@ PathToRegion(
} }
BOOL BOOL
STDCALL STDCALL
PolyDraw( PolyDraw(
HDC hdc, HDC hdc,
CONST POINT *a1, CONST POINT *a1,
CONST BYTE *a2, CONST BYTE *a2,
int a3 int a3
) )
{ {
@ -1970,11 +1943,11 @@ PolyDraw(
} }
BOOL BOOL
STDCALL STDCALL
SelectClipPath( SelectClipPath(
HDC hdc, HDC hdc,
int a1 int a1
) )
{ {
@ -1983,11 +1956,11 @@ SelectClipPath(
} }
int int
STDCALL STDCALL
SetArcDirection( SetArcDirection(
HDC hdc, HDC hdc,
int a1 int a1
) )
{ {
@ -1996,12 +1969,12 @@ SetArcDirection(
} }
BOOL BOOL
STDCALL STDCALL
SetMiterLimit( SetMiterLimit(
HDC hdc, HDC hdc,
FLOAT a1, FLOAT a1,
PFLOAT a2 PFLOAT a2
) )
{ {
@ -2010,9 +1983,9 @@ SetMiterLimit(
} }
BOOL BOOL
STDCALL STDCALL
StrokeAndFillPath( StrokeAndFillPath(
HDC hdc HDC hdc
) )
@ -2022,9 +1995,9 @@ StrokeAndFillPath(
} }
BOOL BOOL
STDCALL STDCALL
StrokePath( StrokePath(
HDC hdc HDC hdc
) )
@ -2034,9 +2007,9 @@ StrokePath(
} }
BOOL BOOL
STDCALL STDCALL
WidenPath( WidenPath(
HDC hdc HDC hdc
) )
@ -2046,14 +2019,14 @@ WidenPath(
} }
HPEN HPEN
STDCALL STDCALL
ExtCreatePen( ExtCreatePen(
DWORD a0, DWORD a0,
DWORD a1, DWORD a1,
CONST LOGBRUSH *a2, CONST LOGBRUSH *a2,
DWORD a3, DWORD a3,
CONST DWORD *a4 CONST DWORD *a4
) )
{ {
@ -2062,11 +2035,11 @@ ExtCreatePen(
} }
BOOL BOOL
STDCALL STDCALL
GetMiterLimit( GetMiterLimit(
HDC hdc, HDC hdc,
PFLOAT a1 PFLOAT a1
) )
{ {
@ -2075,9 +2048,9 @@ GetMiterLimit(
} }
int int
STDCALL STDCALL
GetArcDirection( GetArcDirection(
HDC hdc HDC hdc
) )
@ -2087,7 +2060,7 @@ GetArcDirection(
} }
HRGN HRGN
STDCALL STDCALL
CreatePolygonRgn( CreatePolygonRgn(
@ -2683,7 +2656,7 @@ wglSwapLayerBuffers(
} }
/* === AFTER THIS POINT I GUESS... ========= /* === AFTER THIS POINT I GUESS... =========
* (based on stack size in Norlander's .def) * (based on stack size in Norlander's .def)
* === WHERE ARE THEY DEFINED? ============= * === WHERE ARE THEY DEFINED? =============
*/ */

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);
pen->logpen.lopnColor = XLATEOBJ_iXlate(XlateObj, pen->logpen.lopnColor); if( pen ){
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;