From f57c1b77dd5b9e56e6e103d632f26c0ddea6009b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 26 Jul 2010 15:36:01 +0200 Subject: [PATCH] gdi32: Get rid of the GetDCOrgEx driver entry point, GDI can implement this itself now. --- dlls/gdi32/clipping.c | 7 ++----- dlls/gdi32/dc.c | 5 ++--- dlls/gdi32/driver.c | 1 - dlls/gdi32/enhmfdrv/init.c | 1 - dlls/gdi32/gdi_private.h | 1 - dlls/gdi32/mfdrv/init.c | 1 - dlls/winex11.drv/graphics.c | 10 ---------- dlls/winex11.drv/winex11.drv.spec | 1 - dlls/winex11.drv/x11drv.h | 1 - 9 files changed, 4 insertions(+), 24 deletions(-) diff --git a/dlls/gdi32/clipping.c b/dlls/gdi32/clipping.c index 142c520a1d..dfbc0caf99 100644 --- a/dlls/gdi32/clipping.c +++ b/dlls/gdi32/clipping.c @@ -463,11 +463,8 @@ INT WINAPI GetRandomRgn(HDC hDC, HRGN hRgn, INT iCode) /* On Windows NT/2000, the SYSRGN returned is in screen coordinates */ if (iCode == SYSRGN && !(GetVersion() & 0x80000000)) - { - POINT org; - GetDCOrgEx( hDC, &org ); - OffsetRgn( hRgn, org.x, org.y ); - } + OffsetRgn( hRgn, dc->vis_rect.left, dc->vis_rect.top ); + return (rgn != 0); } diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 738e42efb0..d122aae4fc 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -1068,9 +1068,8 @@ BOOL WINAPI GetDCOrgEx( HDC hDC, LPPOINT lpp ) if (!lpp) return FALSE; if (!(dc = get_dc_ptr( hDC ))) return FALSE; - - lpp->x = lpp->y = 0; - if (dc->funcs->pGetDCOrgEx) dc->funcs->pGetDCOrgEx( dc->physDev, lpp ); + lpp->x = dc->vis_rect.left; + lpp->y = dc->vis_rect.top; release_dc_ptr( dc ); return TRUE; } diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index e6713ea208..65eb048ab3 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -109,7 +109,6 @@ static struct graphics_driver *create_driver( HMODULE module ) GET_FUNC(GdiComment); GET_FUNC(GetBitmapBits); GET_FUNC(GetCharWidth); - GET_FUNC(GetDCOrgEx); GET_FUNC(GetDIBColorTable); GET_FUNC(GetDIBits); GET_FUNC(GetDeviceCaps); diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 115bb3935b..7e1c9b82ec 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -71,7 +71,6 @@ static const DC_FUNCTIONS EMFDRV_Funcs = EMFDRV_GdiComment, /* pGdiComment */ NULL, /* pGetBitmapBits */ NULL, /* pGetCharWidth */ - NULL, /* pGetDCOrgEx */ NULL, /* pGetDIBColorTable */ NULL, /* pGetDIBits */ EMFDRV_GetDeviceCaps, /* pGetDeviceCaps */ diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 8ac78ef25d..e09cf2b448 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -113,7 +113,6 @@ typedef struct tagDC_FUNCS BOOL (CDECL *pGdiComment)(PHYSDEV,UINT,CONST BYTE*); LONG (CDECL *pGetBitmapBits)(HBITMAP,void*,LONG); BOOL (CDECL *pGetCharWidth)(PHYSDEV,UINT,UINT,LPINT); - BOOL (CDECL *pGetDCOrgEx)(PHYSDEV,LPPOINT); UINT (CDECL *pGetDIBColorTable)(PHYSDEV,UINT,UINT,RGBQUAD*); INT (CDECL *pGetDIBits)(PHYSDEV,HBITMAP,UINT,UINT,LPVOID,BITMAPINFO*,UINT); INT (CDECL *pGetDeviceCaps)(PHYSDEV,INT); diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c index f515bcf88d..810bd27696 100644 --- a/dlls/gdi32/mfdrv/init.c +++ b/dlls/gdi32/mfdrv/init.c @@ -69,7 +69,6 @@ static const DC_FUNCTIONS MFDRV_Funcs = NULL, /* pGdiComment */ NULL, /* pGetBitmapBits */ NULL, /* pGetCharWidth */ - NULL, /* pGetDCOrgEx */ NULL, /* pGetDIBColorTable */ NULL, /* pGetDIBits */ MFDRV_GetDeviceCaps, /* pGetDeviceCaps */ diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index 53cbab40f6..9cb509a940 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -1466,16 +1466,6 @@ X11DRV_SetTextColor( X11DRV_PDEVICE *physDev, COLORREF color ) return color; } -/*********************************************************************** - * GetDCOrgEx (X11DRV.@) - */ -BOOL CDECL X11DRV_GetDCOrgEx( X11DRV_PDEVICE *physDev, LPPOINT lpp ) -{ - lpp->x = physDev->dc_rect.left + physDev->drawable_rect.left; - lpp->y = physDev->dc_rect.top + physDev->drawable_rect.top; - return TRUE; -} - static unsigned char *get_icm_profile( unsigned long *size ) { diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index ab61f54802..ffd90add7d 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -17,7 +17,6 @@ @ cdecl ExtTextOut(ptr long long long ptr ptr long ptr) X11DRV_ExtTextOut @ cdecl GetBitmapBits(long ptr long) X11DRV_GetBitmapBits @ cdecl GetCharWidth(ptr long long ptr) X11DRV_GetCharWidth -@ cdecl GetDCOrgEx(ptr ptr) X11DRV_GetDCOrgEx @ cdecl GetDIBits(ptr long long long ptr ptr long) X11DRV_GetDIBits @ cdecl GetDeviceCaps(ptr long) X11DRV_GetDeviceCaps @ cdecl GetDeviceGammaRamp(ptr ptr) X11DRV_GetDeviceGammaRamp diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 1cd610d50a..b8362faeb6 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -193,7 +193,6 @@ extern BOOL CDECL X11DRV_EnumDeviceFonts( X11DRV_PDEVICE *physDev, LPLOGFONTW pl extern LONG CDECL X11DRV_GetBitmapBits( HBITMAP hbitmap, void *bits, LONG count ); extern BOOL CDECL X11DRV_GetCharWidth( X11DRV_PDEVICE *physDev, UINT firstChar, UINT lastChar, LPINT buffer ); -extern BOOL CDECL X11DRV_GetDCOrgEx( X11DRV_PDEVICE *physDev, LPPOINT lpp ); extern BOOL CDECL X11DRV_GetTextExtentExPoint( X11DRV_PDEVICE *physDev, LPCWSTR str, INT count, INT maxExt, LPINT lpnFit, LPINT alpDx, LPSIZE size ); extern BOOL CDECL X11DRV_GetTextMetrics(X11DRV_PDEVICE *physDev, TEXTMETRICW *metrics);