New FONT_GetObject32W(), GetObject32W().

This commit is contained in:
Juergen Schmied 1998-10-23 13:27:36 +00:00 committed by Alexandre Julliard
parent 8e26b5837d
commit cba848847b
3 changed files with 55 additions and 9 deletions

View File

@ -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 );

View File

@ -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;
}
/***********************************************************************

View File

@ -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)
@ -536,14 +577,6 @@ DWORD WINAPI GetObjectType( HANDLE32 handle )
return result;
}
/***********************************************************************
* GetObject32W (GDI32.206)
*/
INT32 WINAPI GetObject32W( HANDLE32 handle, INT32 count, LPVOID buffer )
{
return GetObject32A( handle, count, buffer );
}
/***********************************************************************
* GetCurrentObject (GDI32.166)
*/