From cf05fca87837ac3223c2f332c4023c3f7086eb7c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 14 Jul 2011 11:30:58 +0200 Subject: [PATCH] gdi32: Add driver entry points for GetImage and PutImage. --- dlls/gdi32/dibdrv/dc.c | 2 ++ dlls/gdi32/driver.c | 14 ++++++++++++++ dlls/gdi32/enhmfdrv/init.c | 2 ++ dlls/gdi32/mfdrv/init.c | 2 ++ dlls/wineps.drv/init.c | 2 ++ dlls/winex11.drv/init.c | 2 ++ include/wine/gdi_driver.h | 11 +++++++++++ 7 files changed, 35 insertions(+) diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 89246d828d1..3ec44d1d2b2 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -469,6 +469,7 @@ const DC_FUNCTIONS dib_driver = NULL, /* pGetDeviceCaps */ NULL, /* pGetDeviceGammaRamp */ NULL, /* pGetICMProfile */ + NULL, /* pGetImage */ NULL, /* pGetNearestColor */ NULL, /* pGetPixel */ NULL, /* pGetPixelFormat */ @@ -494,6 +495,7 @@ const DC_FUNCTIONS dib_driver = NULL, /* pPolygon */ NULL, /* pPolyline */ NULL, /* pPolylineTo */ + NULL, /* pPutImage */ NULL, /* pRealizeDefaultPalette */ NULL, /* pRealizePalette */ dibdrv_Rectangle, /* pRectangle */ diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 04db5e0db10..6cdf35d7040 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -347,6 +347,12 @@ static BOOL nulldrv_GetICMProfile( PHYSDEV dev, LPDWORD size, LPWSTR filename ) return FALSE; } +static DWORD nulldrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, + struct gdi_image_bits *bits, const RECT *rect ) +{ + return ERROR_NOT_SUPPORTED; +} + static COLORREF nulldrv_GetPixel( PHYSDEV dev, INT x, INT y ) { return 0; @@ -421,6 +427,12 @@ static BOOL nulldrv_Polyline( PHYSDEV dev, const POINT *points, INT count ) return TRUE; } +static DWORD nulldrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, + const struct gdi_image_bits *bits, const RECT *rect, DWORD rop ) +{ + return ERROR_SUCCESS; +} + static UINT nulldrv_RealizeDefaultPalette( PHYSDEV dev ) { return 0; @@ -701,6 +713,7 @@ const DC_FUNCTIONS null_driver = nulldrv_GetDeviceCaps, /* pGetDeviceCaps */ nulldrv_GetDeviceGammaRamp, /* pGetDeviceGammaRamp */ nulldrv_GetICMProfile, /* pGetICMProfile */ + nulldrv_GetImage, /* pGetImage */ nulldrv_GetNearestColor, /* pGetNearestColor */ nulldrv_GetPixel, /* pGetPixel */ nulldrv_GetPixelFormat, /* pGetPixelFormat */ @@ -726,6 +739,7 @@ const DC_FUNCTIONS null_driver = nulldrv_Polygon, /* pPolygon */ nulldrv_Polyline, /* pPolyline */ nulldrv_PolylineTo, /* pPolylineTo */ + nulldrv_PutImage, /* pPutImage */ nulldrv_RealizeDefaultPalette, /* pRealizeDefaultPalette */ nulldrv_RealizePalette, /* pRealizePalette */ nulldrv_Rectangle, /* pRectangle */ diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 49202663d16..e7cbf2ebca1 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -77,6 +77,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs = EMFDRV_GetDeviceCaps, /* pGetDeviceCaps */ NULL, /* pGetDeviceGammaRamp */ NULL, /* pGetICMProfile */ + NULL, /* pGetImage */ NULL, /* pGetNearestColor */ NULL, /* pGetPixel */ NULL, /* pGetPixelFormat */ @@ -102,6 +103,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs = EMFDRV_Polygon, /* pPolygon */ EMFDRV_Polyline, /* pPolyline */ NULL, /* pPolylineTo */ + NULL, /* pPutImage */ NULL, /* pRealizeDefaultPalette */ NULL, /* pRealizePalette */ EMFDRV_Rectangle, /* pRectangle */ diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c index ae791c20b3f..4685470cc14 100644 --- a/dlls/gdi32/mfdrv/init.c +++ b/dlls/gdi32/mfdrv/init.c @@ -121,6 +121,7 @@ static const DC_FUNCTIONS MFDRV_Funcs = MFDRV_GetDeviceCaps, /* pGetDeviceCaps */ NULL, /* pGetDeviceGammaRamp */ NULL, /* pGetICMProfile */ + NULL, /* pGetImage */ NULL, /* pGetNearestColor */ NULL, /* pGetPixel */ NULL, /* pGetPixelFormat */ @@ -146,6 +147,7 @@ static const DC_FUNCTIONS MFDRV_Funcs = MFDRV_Polygon, /* pPolygon */ MFDRV_Polyline, /* pPolyline */ NULL, /* pPolylineTo */ + NULL, /* pPutImage */ NULL, /* pRealizeDefaultPalette */ MFDRV_RealizePalette, /* pRealizePalette */ MFDRV_Rectangle, /* pRectangle */ diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index ca80f4ed9f4..84d4b456780 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -843,6 +843,7 @@ static const struct gdi_dc_funcs psdrv_funcs = PSDRV_GetDeviceCaps, /* pGetDeviceCaps */ NULL, /* pGetDeviceGammaRamp */ NULL, /* pGetICMProfile */ + NULL, /* pGetImage */ NULL, /* pGetNearestColor */ NULL, /* pGetPixel */ NULL, /* pGetPixelFormat */ @@ -868,6 +869,7 @@ static const struct gdi_dc_funcs psdrv_funcs = PSDRV_Polygon, /* pPolygon */ PSDRV_Polyline, /* pPolyline */ NULL, /* pPolylineTo */ + NULL, /* pPutImage */ NULL, /* pRealizeDefaultPalette */ NULL, /* pRealizePalette */ PSDRV_Rectangle, /* pRectangle */ diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index f86c17cb530..d1800d4e623 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -486,6 +486,7 @@ static const struct gdi_dc_funcs x11drv_funcs = X11DRV_GetDeviceCaps, /* pGetDeviceCaps */ X11DRV_GetDeviceGammaRamp, /* pGetDeviceGammaRamp */ X11DRV_GetICMProfile, /* pGetICMProfile */ + NULL, /* pGetImage */ X11DRV_GetNearestColor, /* pGetNearestColor */ X11DRV_GetPixel, /* pGetPixel */ X11DRV_GetPixelFormat, /* pGetPixelFormat */ @@ -511,6 +512,7 @@ static const struct gdi_dc_funcs x11drv_funcs = X11DRV_Polygon, /* pPolygon */ X11DRV_Polyline, /* pPolyline */ NULL, /* pPolylineTo */ + NULL, /* pPutImage */ X11DRV_RealizeDefaultPalette, /* pRealizeDefaultPalette */ X11DRV_RealizePalette, /* pRealizePalette */ X11DRV_Rectangle, /* pRectangle */ diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index d8040ac8f06..811cf809c98 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -44,6 +44,15 @@ struct bitblt_coords DWORD layout; /* DC layout */ }; +struct gdi_image_bits +{ + void *ptr; /* pointer to the bits */ + unsigned int offset; /* x offset of first requested pixel */ + BOOL is_copy; /* whether this is a copy of the bits that can be modified */ + void (*free)(struct gdi_image_bits *); /* callback for freeing the bits */ + void *param; /* extra parameter for callback private use */ +}; + struct gdi_dc_funcs { INT (*pAbortDoc)(PHYSDEV); @@ -87,6 +96,7 @@ struct gdi_dc_funcs INT (*pGetDeviceCaps)(PHYSDEV,INT); BOOL (*pGetDeviceGammaRamp)(PHYSDEV,LPVOID); BOOL (*pGetICMProfile)(PHYSDEV,LPDWORD,LPWSTR); + DWORD (*pGetImage)(PHYSDEV,HBITMAP,BITMAPINFO*,struct gdi_image_bits*,const RECT*); COLORREF (*pGetNearestColor)(PHYSDEV,COLORREF); COLORREF (*pGetPixel)(PHYSDEV,INT,INT); INT (*pGetPixelFormat)(PHYSDEV); @@ -112,6 +122,7 @@ struct gdi_dc_funcs BOOL (*pPolygon)(PHYSDEV,const POINT*,INT); BOOL (*pPolyline)(PHYSDEV,const POINT*,INT); BOOL (*pPolylineTo)(PHYSDEV,const POINT*,INT); + DWORD (*pPutImage)(PHYSDEV,HBITMAP,BITMAPINFO*,const struct gdi_image_bits*,const RECT*,DWORD); UINT (*pRealizeDefaultPalette)(PHYSDEV); UINT (*pRealizePalette)(PHYSDEV,HPALETTE,BOOL); BOOL (*pRectangle)(PHYSDEV,INT,INT,INT,INT);