Commit 806d0c4f authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Add null driver entry points for the pixel format functions.

parent d1db4c85
......@@ -323,6 +323,11 @@ static BOOL CDECL nulldrv_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bo
return TRUE;
}
static INT CDECL nulldrv_ChoosePixelFormat( PHYSDEV dev, const PIXELFORMATDESCRIPTOR *descr )
{
return 0;
}
static BOOL CDECL nulldrv_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
{
......@@ -334,6 +339,12 @@ static BOOL CDECL nulldrv_DeleteObject( PHYSDEV dev, HGDIOBJ obj )
return TRUE;
}
static INT CDECL nulldrv_DescribePixelFormat( PHYSDEV dev, INT format,
UINT size, PIXELFORMATDESCRIPTOR * descr )
{
return 0;
}
static DWORD CDECL nulldrv_DeviceCapabilities( LPSTR buffer, LPCSTR device, LPCSTR port,
WORD cap, LPSTR output, DEVMODEA *devmode )
{
......@@ -382,6 +393,11 @@ static COLORREF CDECL nulldrv_GetPixel( PHYSDEV dev, INT x, INT y )
return 0;
}
static INT CDECL nulldrv_GetPixelFormat( PHYSDEV dev )
{
return 0;
}
static BOOL CDECL nulldrv_LineTo( PHYSDEV dev, INT x, INT y )
{
return TRUE;
......@@ -505,6 +521,11 @@ static COLORREF CDECL nulldrv_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF colo
return color;
}
static BOOL CDECL nulldrv_SetPixelFormat( PHYSDEV dev, INT format, const PIXELFORMATDESCRIPTOR *descr )
{
return FALSE;
}
static INT CDECL nulldrv_SetPolyFillMode( PHYSDEV dev, INT mode )
{
return mode;
......@@ -555,6 +576,11 @@ static INT CDECL nulldrv_StartPage( PHYSDEV dev )
return 1;
}
static BOOL CDECL nulldrv_SwapBuffers( PHYSDEV dev )
{
return TRUE;
}
static BOOL CDECL nulldrv_wglCopyContext( HGLRC ctx_src, HGLRC ctx_dst, UINT mask )
{
return FALSE;
......@@ -626,7 +652,7 @@ const DC_FUNCTIONS null_driver =
nulldrv_ArcTo, /* pArcTo */
NULL, /* pBeginPath */
NULL, /* pBitBlt */
NULL, /* pChoosePixelFormat */
nulldrv_ChoosePixelFormat, /* pChoosePixelFormat */
nulldrv_Chord, /* pChord */
NULL, /* pCloseFigure */
NULL, /* pCreateBitmap */
......@@ -635,7 +661,7 @@ const DC_FUNCTIONS null_driver =
NULL, /* pDeleteBitmap */
NULL, /* pDeleteDC */
nulldrv_DeleteObject, /* pDeleteObject */
NULL, /* pDescribePixelFormat */
nulldrv_DescribePixelFormat, /* pDescribePixelFormat */
nulldrv_DeviceCapabilities, /* pDeviceCapabilities */
nulldrv_Ellipse, /* pEllipse */
nulldrv_EndDoc, /* pEndDoc */
......@@ -662,7 +688,7 @@ const DC_FUNCTIONS null_driver =
NULL, /* pGetICMProfile */
NULL, /* pGetNearestColor */
nulldrv_GetPixel, /* pGetPixel */
NULL, /* pGetPixelFormat */
nulldrv_GetPixelFormat, /* pGetPixelFormat */
NULL, /* pGetSystemPaletteEntries */
NULL, /* pGetTextExtentExPoint */
NULL, /* pGetTextMetrics */
......@@ -715,7 +741,7 @@ const DC_FUNCTIONS null_driver =
nulldrv_SetMapMode, /* pSetMapMode */
nulldrv_SetMapperFlags, /* pSetMapperFlags */
nulldrv_SetPixel, /* pSetPixel */
NULL, /* pSetPixelFormat */
nulldrv_SetPixelFormat, /* pSetPixelFormat */
nulldrv_SetPolyFillMode, /* pSetPolyFillMode */
nulldrv_SetROP2, /* pSetROP2 */
nulldrv_SetRelAbs, /* pSetRelAbs */
......@@ -735,7 +761,7 @@ const DC_FUNCTIONS null_driver =
NULL, /* pStretchDIBits */
NULL, /* pStrokeAndFillPath */
NULL, /* pStrokePath */
NULL, /* pSwapBuffers */
nulldrv_SwapBuffers, /* pSwapBuffers */
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
nulldrv_wglCopyContext, /* pwglCopyContext */
......
......@@ -545,12 +545,12 @@ INT WINAPI ChoosePixelFormat( HDC hdc, const PIXELFORMATDESCRIPTOR* ppfd )
TRACE("(%p,%p)\n",hdc,ppfd);
if (!dc) return 0;
if (!dc->funcs->pChoosePixelFormat) FIXME(" :stub\n");
else ret = dc->funcs->pChoosePixelFormat(dc->physDev,ppfd);
if (dc)
{
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pChoosePixelFormat );
ret = physdev->funcs->pChoosePixelFormat( physdev, ppfd );
release_dc_ptr( dc );
}
return ret;
}
......@@ -576,13 +576,13 @@ BOOL WINAPI SetPixelFormat( HDC hdc, INT iPixelFormat,
TRACE("(%p,%d,%p)\n",hdc,iPixelFormat,ppfd);
if (!dc) return 0;
if (dc)
{
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetPixelFormat );
update_dc( dc );
if (!dc->funcs->pSetPixelFormat) FIXME(" :stub\n");
else bRet = dc->funcs->pSetPixelFormat(dc->physDev,iPixelFormat,ppfd);
bRet = physdev->funcs->pSetPixelFormat( physdev, iPixelFormat, ppfd );
release_dc_ptr( dc );
}
return bRet;
}
......@@ -605,13 +605,13 @@ INT WINAPI GetPixelFormat( HDC hdc )
TRACE("(%p)\n",hdc);
if (!dc) return 0;
if (dc)
{
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pGetPixelFormat );
update_dc( dc );
if (!dc->funcs->pGetPixelFormat) FIXME(" :stub\n");
else ret = dc->funcs->pGetPixelFormat(dc->physDev);
ret = physdev->funcs->pGetPixelFormat( physdev );
release_dc_ptr( dc );
}
return ret;
}
......@@ -638,19 +638,13 @@ INT WINAPI DescribePixelFormat( HDC hdc, INT iPixelFormat, UINT nBytes,
TRACE("(%p,%d,%d,%p): stub\n",hdc,iPixelFormat,nBytes,ppfd);
if (!dc) return 0;
update_dc( dc );
if (!dc->funcs->pDescribePixelFormat)
if (dc)
{
FIXME(" :stub\n");
ppfd->nSize = nBytes;
ppfd->nVersion = 1;
ret = 3;
}
else ret = dc->funcs->pDescribePixelFormat(dc->physDev,iPixelFormat,nBytes,ppfd);
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pDescribePixelFormat );
update_dc( dc );
ret = physdev->funcs->pDescribePixelFormat( physdev, iPixelFormat, nBytes, ppfd );
release_dc_ptr( dc );
}
return ret;
}
......@@ -673,17 +667,13 @@ BOOL WINAPI SwapBuffers( HDC hdc )
TRACE("(%p)\n",hdc);
if (!dc) return TRUE;
update_dc( dc );
if (!dc->funcs->pSwapBuffers)
if (dc)
{
FIXME(" :stub\n");
bRet = TRUE;
}
else bRet = dc->funcs->pSwapBuffers(dc->physDev);
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSwapBuffers );
update_dc( dc );
bRet = physdev->funcs->pSwapBuffers( physdev );
release_dc_ptr( dc );
}
return bRet;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment