Commit cba84884 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

New FONT_GetObject32W(), GetObject32W().

parent 8e26b583
......@@ -58,7 +58,7 @@ typedef struct {
extern BOOL32 FONT_Init( UINT16* pTextCaps );
extern INT16 FONT_GetObject16( FONTOBJ * font, INT16 count, LPSTR buffer );
extern INT32 FONT_GetObject32A( FONTOBJ * font, INT32 count, LPSTR buffer );
extern INT32 FONT_GetObject32W( FONTOBJ * font, INT32 count, LPSTR buffer );
extern void FONT_LogFont32ATo16( const LOGFONT32A* font32, LPLOGFONT16 font16 );
extern void FONT_LogFont32WTo16( const LOGFONT32W* font32, LPLOGFONT16 font16 );
extern void FONT_LogFont16To32A( const LPLOGFONT16 font16, LPLOGFONT32A font32 );
......
......@@ -343,6 +343,19 @@ INT32 FONT_GetObject32A( FONTOBJ *font, INT32 count, LPSTR buffer )
memcpy( buffer, &fnt32, count );
return count;
}
/***********************************************************************
* FONT_GetObject32W
*/
INT32 FONT_GetObject32W( FONTOBJ *font, INT32 count, LPSTR buffer )
{
LOGFONT32W fnt32;
FONT_LogFont16To32W( &font->logfont, &fnt32 );
if (count > sizeof(fnt32)) count = sizeof(fnt32);
memcpy( buffer, &fnt32, count );
return count;
}
/***********************************************************************
......
......@@ -478,6 +478,47 @@ INT32 WINAPI GetObject32A( HANDLE32 handle, INT32 count, LPVOID buffer )
GDI_HEAP_UNLOCK( handle );
return result;
}
/***********************************************************************
* GetObject32W (GDI32.206)
*/
INT32 WINAPI GetObject32W( HANDLE32 handle, INT32 count, LPVOID buffer )
{
GDIOBJHDR * ptr = NULL;
INT32 result = 0;
TRACE(gdi, "%08x %d %p\n", handle, count, buffer );
if (!count) return 0;
if ((handle >= FIRST_STOCK_HANDLE) && (handle <= LAST_STOCK_HANDLE))
ptr = StockObjects[handle - FIRST_STOCK_HANDLE];
else
ptr = (GDIOBJHDR *) GDI_HEAP_LOCK( handle );
if (!ptr) return 0;
switch(ptr->wMagic)
{
case PEN_MAGIC:
result = PEN_GetObject32( (PENOBJ *)ptr, count, buffer );
break;
case BRUSH_MAGIC:
result = BRUSH_GetObject32( (BRUSHOBJ *)ptr, count, buffer );
break;
case BITMAP_MAGIC:
result = BITMAP_GetObject32( (BITMAPOBJ *)ptr, count, buffer );
break;
case FONT_MAGIC:
result = FONT_GetObject32W( (FONTOBJ *)ptr, count, buffer );
break;
case PALETTE_MAGIC:
result = PALETTE_GetObject( (PALETTEOBJ *)ptr, count, buffer );
break;
default:
FIXME(gdi, "Magic %04x not implemented\n",
ptr->wMagic );
break;
}
GDI_HEAP_UNLOCK( handle );
return result;
}
/***********************************************************************
* GetObjectType (GDI32.205)
......@@ -537,14 +578,6 @@ DWORD WINAPI GetObjectType( HANDLE32 handle )
}
/***********************************************************************
* GetObject32W (GDI32.206)
*/
INT32 WINAPI GetObject32W( HANDLE32 handle, INT32 count, LPVOID buffer )
{
return GetObject32A( handle, count, buffer );
}
/***********************************************************************
* GetCurrentObject (GDI32.166)
*/
HANDLE32 WINAPI GetCurrentObject(HDC32 hdc,UINT32 type)
......
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