From aa500d266f0ee1efa6c3b6af824ce1931704b5be Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 18 Feb 2008 17:50:35 +0100 Subject: [PATCH] gdi32: Get rid of the 16-bit GetObject functions. --- dlls/gdi32/bitmap.c | 48 ---------------------------------------- dlls/gdi32/brush.c | 19 ---------------- dlls/gdi32/dc.c | 1 - dlls/gdi32/font.c | 17 -------------- dlls/gdi32/gdi_private.h | 1 - dlls/gdi32/palette.c | 1 - dlls/gdi32/pen.c | 25 --------------------- dlls/gdi32/region.c | 1 - 8 files changed, 113 deletions(-) diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c index c46892014f..94061f8c68 100644 --- a/dlls/gdi32/bitmap.c +++ b/dlls/gdi32/bitmap.c @@ -34,14 +34,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(bitmap); static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc ); -static INT BITMAP_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static INT BITMAP_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static BOOL BITMAP_DeleteObject( HGDIOBJ handle, void *obj ); static const struct gdi_obj_funcs bitmap_funcs = { BITMAP_SelectObject, /* pSelectObject */ - BITMAP_GetObject16, /* pGetObject16 */ BITMAP_GetObject, /* pGetObjectA */ BITMAP_GetObject, /* pGetObjectW */ NULL, /* pUnrealizeObject */ @@ -667,52 +665,6 @@ static BOOL BITMAP_DeleteObject( HGDIOBJ handle, void *obj ) } -/*********************************************************************** - * BITMAP_GetObject16 - */ -static INT BITMAP_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ) -{ - BITMAPOBJ *bmp = obj; - - if (bmp->dib) - { - if ( count <= sizeof(BITMAP16) ) - { - BITMAP *bmp32 = &bmp->dib->dsBm; - BITMAP16 bmp16; - bmp16.bmType = bmp32->bmType; - bmp16.bmWidth = bmp32->bmWidth; - bmp16.bmHeight = bmp32->bmHeight; - bmp16.bmWidthBytes = bmp32->bmWidthBytes; - bmp16.bmPlanes = bmp32->bmPlanes; - bmp16.bmBitsPixel = bmp32->bmBitsPixel; - bmp16.bmBits = (SEGPTR)0; - memcpy( buffer, &bmp16, count ); - return count; - } - else - { - FIXME("not implemented for DIBs: count %d\n", count); - return 0; - } - } - else - { - BITMAP16 bmp16; - bmp16.bmType = bmp->bitmap.bmType; - bmp16.bmWidth = bmp->bitmap.bmWidth; - bmp16.bmHeight = bmp->bitmap.bmHeight; - bmp16.bmWidthBytes = bmp->bitmap.bmWidthBytes; - bmp16.bmPlanes = bmp->bitmap.bmPlanes; - bmp16.bmBitsPixel = bmp->bitmap.bmBitsPixel; - bmp16.bmBits = (SEGPTR)0; - if (count < sizeof(bmp16)) return 0; - memcpy( buffer, &bmp16, sizeof(bmp16) ); - return sizeof(bmp16); - } -} - - /*********************************************************************** * BITMAP_GetObject */ diff --git a/dlls/gdi32/brush.c b/dlls/gdi32/brush.c index 95da9b1c77..0a6b652b70 100644 --- a/dlls/gdi32/brush.c +++ b/dlls/gdi32/brush.c @@ -43,14 +43,12 @@ typedef struct #define NB_HATCH_STYLES 6 static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc ); -static INT BRUSH_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static INT BRUSH_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static BOOL BRUSH_DeleteObject( HGDIOBJ handle, void *obj ); static const struct gdi_obj_funcs brush_funcs = { BRUSH_SelectObject, /* pSelectObject */ - BRUSH_GetObject16, /* pGetObject16 */ BRUSH_GetObject, /* pGetObjectA */ BRUSH_GetObject, /* pGetObjectW */ NULL, /* pUnrealizeObject */ @@ -424,23 +422,6 @@ static BOOL BRUSH_DeleteObject( HGDIOBJ handle, void *obj ) } -/*********************************************************************** - * BRUSH_GetObject16 - */ -static INT BRUSH_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ) -{ - BRUSHOBJ *brush = obj; - LOGBRUSH16 logbrush; - - logbrush.lbStyle = brush->logbrush.lbStyle; - logbrush.lbColor = brush->logbrush.lbColor; - logbrush.lbHatch = brush->logbrush.lbHatch; - if (count > sizeof(logbrush)) count = sizeof(logbrush); - memcpy( buffer, &logbrush, count ); - return count; -} - - /*********************************************************************** * BRUSH_GetObject */ diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 3678791148..3c3f4cebc7 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -44,7 +44,6 @@ static BOOL DC_DeleteObject( HGDIOBJ handle, void *obj ); static const struct gdi_obj_funcs dc_funcs = { NULL, /* pSelectObject */ - NULL, /* pGetObject16 */ NULL, /* pGetObjectA */ NULL, /* pGetObjectW */ NULL, /* pUnrealizeObject */ diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 3624e9748b..86b3003d73 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -87,7 +87,6 @@ static inline INT INTERNAL_YWSTODS(DC *dc, INT height) } static HGDIOBJ FONT_SelectObject( HGDIOBJ handle, HDC hdc ); -static INT FONT_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static INT FONT_GetObjectA( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static INT FONT_GetObjectW( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static BOOL FONT_DeleteObject( HGDIOBJ handle, void *obj ); @@ -95,7 +94,6 @@ static BOOL FONT_DeleteObject( HGDIOBJ handle, void *obj ); static const struct gdi_obj_funcs font_funcs = { FONT_SelectObject, /* pSelectObject */ - FONT_GetObject16, /* pGetObject16 */ FONT_GetObjectA, /* pGetObjectA */ FONT_GetObjectW, /* pGetObjectW */ NULL, /* pUnrealizeObject */ @@ -616,21 +614,6 @@ static HGDIOBJ FONT_SelectObject( HGDIOBJ handle, HDC hdc ) } -/*********************************************************************** - * FONT_GetObject16 - */ -static INT FONT_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ) -{ - FONTOBJ *font = obj; - LOGFONT16 lf16; - - FONT_LogFontWTo16( &font->logfont, &lf16 ); - - if (count > sizeof(LOGFONT16)) count = sizeof(LOGFONT16); - memcpy( buffer, &lf16, count ); - return count; -} - /*********************************************************************** * FONT_GetObjectA */ diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 51932b065f..dc66a0c4f6 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -72,7 +72,6 @@ typedef struct { struct gdi_obj_funcs { HGDIOBJ (*pSelectObject)( HGDIOBJ handle, HDC hdc ); - INT (*pGetObject16)( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); INT (*pGetObjectA)( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); INT (*pGetObjectW)( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); BOOL (*pUnrealizeObject)( HGDIOBJ handle, void *obj ); diff --git a/dlls/gdi32/palette.c b/dlls/gdi32/palette.c index b55a6f822a..ddf597e47b 100644 --- a/dlls/gdi32/palette.c +++ b/dlls/gdi32/palette.c @@ -52,7 +52,6 @@ static BOOL PALETTE_DeleteObject( HGDIOBJ handle, void *obj ); static const struct gdi_obj_funcs palette_funcs = { NULL, /* pSelectObject */ - PALETTE_GetObject, /* pGetObject16 */ PALETTE_GetObject, /* pGetObjectA */ PALETTE_GetObject, /* pGetObjectW */ PALETTE_UnrealizeObject, /* pUnrealizeObject */ diff --git a/dlls/gdi32/pen.c b/dlls/gdi32/pen.c index 971dadd5a2..81fcc1d553 100644 --- a/dlls/gdi32/pen.c +++ b/dlls/gdi32/pen.c @@ -28,7 +28,6 @@ #include "windef.h" #include "winbase.h" #include "wingdi.h" -#include "wine/wingdi16.h" #include "gdi_private.h" #include "wine/debug.h" @@ -43,13 +42,11 @@ typedef struct static HGDIOBJ PEN_SelectObject( HGDIOBJ handle, HDC hdc ); -static INT PEN_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static INT PEN_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ); static const struct gdi_obj_funcs pen_funcs = { PEN_SelectObject, /* pSelectObject */ - PEN_GetObject16, /* pGetObject16 */ PEN_GetObject, /* pGetObjectA */ PEN_GetObject, /* pGetObjectW */ NULL, /* pUnrealizeObject */ @@ -247,28 +244,6 @@ static HGDIOBJ PEN_SelectObject( HGDIOBJ handle, HDC hdc ) } -/*********************************************************************** - * PEN_GetObject16 - */ -static INT PEN_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buffer ) -{ - PENOBJ *pen = obj; - LOGPEN16 *logpen; - - if (!buffer) return sizeof(LOGPEN16); - - if (count < sizeof(LOGPEN16)) return 0; - - logpen = buffer; - logpen->lopnStyle = pen->logpen.elpPenStyle; - logpen->lopnColor = pen->logpen.elpColor; - logpen->lopnWidth.x = pen->logpen.elpWidth; - logpen->lopnWidth.y = 0; - - return sizeof(LOGPEN16); -} - - /*********************************************************************** * PEN_GetObject */ diff --git a/dlls/gdi32/region.c b/dlls/gdi32/region.c index b06727d2a9..64948400fa 100644 --- a/dlls/gdi32/region.c +++ b/dlls/gdi32/region.c @@ -126,7 +126,6 @@ static BOOL REGION_DeleteObject( HGDIOBJ handle, void *obj ); static const struct gdi_obj_funcs region_funcs = { REGION_SelectObject, /* pSelectObject */ - NULL, /* pGetObject16 */ NULL, /* pGetObjectA */ NULL, /* pGetObjectW */ NULL, /* pUnrealizeObject */