Commit aa500d26 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Get rid of the 16-bit GetObject functions.

parent a306af0c
......@@ -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 */
......@@ -668,52 +666,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
*/
static INT BITMAP_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer )
......
......@@ -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 */
......@@ -425,23 +423,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
*/
static INT BRUSH_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer )
......
......@@ -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 */
......
......@@ -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 */
......@@ -617,21 +615,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
*/
static INT FONT_GetObjectA( HGDIOBJ handle, void *obj, INT count, LPVOID buffer )
......
......@@ -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 );
......
......@@ -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 */
......
......@@ -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 */
......@@ -248,28 +245,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
*/
static INT PEN_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer )
......
......@@ -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 */
......
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