win32u: Use syscall interface for some palette functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
21009822a3
commit
fe96d12a89
|
@ -1077,9 +1077,7 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiCreateCompatibleBitmap,
|
||||
NtGdiCreateCompatibleDC,
|
||||
NtGdiCreateDIBitmapInternal,
|
||||
NtGdiCreateHalftonePalette,
|
||||
NtGdiCreateMetafileDC,
|
||||
NtGdiCreatePaletteInternal,
|
||||
NtGdiCreatePen,
|
||||
NtGdiDdDDICheckVidPnExclusiveOwnership,
|
||||
NtGdiDdDDICloseAdapter,
|
||||
|
@ -1127,7 +1125,6 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiGetGlyphOutline,
|
||||
NtGdiGetKerningPairs,
|
||||
NtGdiGetNearestColor,
|
||||
NtGdiGetNearestPaletteIndex,
|
||||
NtGdiGetOutlineTextMetricsInternalW,
|
||||
NtGdiGetPath,
|
||||
NtGdiGetPixel,
|
||||
|
@ -1135,7 +1132,6 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiGetRasterizerCaps,
|
||||
NtGdiGetRealizationInfo,
|
||||
NtGdiGetSpoolMessage,
|
||||
NtGdiGetSystemPaletteUse,
|
||||
NtGdiGetTextCharsetInfo,
|
||||
NtGdiGetTextExtentExW,
|
||||
NtGdiGetTextFaceW,
|
||||
|
@ -1173,7 +1169,6 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiSetDIBitsToDeviceInternal,
|
||||
NtGdiSetDeviceGammaRamp,
|
||||
NtGdiSetLayout,
|
||||
NtGdiSetMagicColors,
|
||||
NtGdiSetPixel,
|
||||
NtGdiSetSystemPaletteUse,
|
||||
NtGdiStartDoc,
|
||||
|
|
|
@ -42,7 +42,9 @@ static void * const syscalls[] =
|
|||
NtGdiCreateDIBBrush,
|
||||
NtGdiCreateDIBSection,
|
||||
NtGdiCreateEllipticRgn,
|
||||
NtGdiCreateHalftonePalette,
|
||||
NtGdiCreateHatchBrushInternal,
|
||||
NtGdiCreatePaletteInternal,
|
||||
NtGdiCreatePatternBrushInternal,
|
||||
NtGdiCreateRectRgn,
|
||||
NtGdiCreateRoundRectRgn,
|
||||
|
@ -60,8 +62,10 @@ static void * const syscalls[] =
|
|||
NtGdiGetDCObject,
|
||||
NtGdiGetFontFileData,
|
||||
NtGdiGetFontFileInfo,
|
||||
NtGdiGetNearestPaletteIndex,
|
||||
NtGdiGetRegionData,
|
||||
NtGdiGetRgnBox,
|
||||
NtGdiGetSystemPaletteUse,
|
||||
NtGdiGetTransform,
|
||||
NtGdiHfontCreate,
|
||||
NtGdiOffsetRgn,
|
||||
|
@ -74,6 +78,7 @@ static void * const syscalls[] =
|
|||
NtGdiSetBitmapDimension,
|
||||
NtGdiSetBrushOrg,
|
||||
NtGdiSetColorAdjustment,
|
||||
NtGdiSetMagicColors,
|
||||
NtGdiSetMetaRgn,
|
||||
NtGdiSetPixelFormat,
|
||||
NtGdiSetRectRgn,
|
||||
|
|
|
@ -151,12 +151,12 @@
|
|||
@ stdcall -syscall NtGdiCreateDIBSection(long long long ptr long long long long ptr)
|
||||
@ stdcall NtGdiCreateDIBitmapInternal(long long long long ptr ptr long long long long long)
|
||||
@ stdcall -syscall NtGdiCreateEllipticRgn(long long long long)
|
||||
@ stdcall NtGdiCreateHalftonePalette(long)
|
||||
@ stdcall -syscall NtGdiCreateHalftonePalette(long)
|
||||
@ stdcall -syscall NtGdiCreateHatchBrushInternal(long long long)
|
||||
@ stdcall NtGdiCreateMetafileDC(long)
|
||||
@ stub NtGdiCreateOPMProtectedOutput
|
||||
@ stub NtGdiCreateOPMProtectedOutputs
|
||||
@ stdcall NtGdiCreatePaletteInternal(ptr long)
|
||||
@ stdcall -syscall NtGdiCreatePaletteInternal(ptr long)
|
||||
@ stdcall -syscall NtGdiCreatePatternBrushInternal(long long long)
|
||||
@ stdcall NtGdiCreatePen(long long long long)
|
||||
@ stdcall -syscall NtGdiCreateRectRgn(long long long long)
|
||||
|
@ -491,7 +491,7 @@
|
|||
@ stub NtGdiGetMiterLimit
|
||||
@ stub NtGdiGetMonitorID
|
||||
@ stdcall NtGdiGetNearestColor(long long)
|
||||
@ stdcall NtGdiGetNearestPaletteIndex(long long)
|
||||
@ stdcall -syscall NtGdiGetNearestPaletteIndex(long long)
|
||||
@ stub NtGdiGetNumberOfPhysicalMonitors
|
||||
@ stub NtGdiGetOPMInformation
|
||||
@ stub NtGdiGetOPMRandomNumber
|
||||
|
@ -514,7 +514,7 @@
|
|||
@ stub NtGdiGetStats
|
||||
@ stub NtGdiGetStringBitmapW
|
||||
@ stub NtGdiGetSuggestedOPMProtectedOutputArraySize
|
||||
@ stdcall NtGdiGetSystemPaletteUse(long)
|
||||
@ stdcall -syscall NtGdiGetSystemPaletteUse(long)
|
||||
@ stdcall NtGdiGetTextCharsetInfo(long ptr long)
|
||||
@ stub NtGdiGetTextExtent
|
||||
@ stdcall NtGdiGetTextExtentExW(long wstr long long ptr ptr ptr long)
|
||||
|
@ -604,7 +604,7 @@
|
|||
@ stub NtGdiSetIcmMode
|
||||
@ stdcall NtGdiSetLayout(long long long)
|
||||
@ stub NtGdiSetLinkedUFIs
|
||||
@ stdcall NtGdiSetMagicColors(long long long)
|
||||
@ stdcall -syscall NtGdiSetMagicColors(long long long)
|
||||
@ stdcall -syscall NtGdiSetMetaRgn(long)
|
||||
@ stub NtGdiSetMiterLimit
|
||||
@ stub NtGdiSetOPMSigningKeyAndSequenceNumbers
|
||||
|
|
|
@ -62,9 +62,7 @@ struct unix_funcs
|
|||
const void *bits, const BITMAPINFO *data,
|
||||
UINT coloruse, UINT max_info, UINT max_bits,
|
||||
ULONG flags, HANDLE xform );
|
||||
HPALETTE (WINAPI *pNtGdiCreateHalftonePalette)( HDC hdc );
|
||||
HDC (WINAPI *pNtGdiCreateMetafileDC)( HDC hdc );
|
||||
HPALETTE (WINAPI *pNtGdiCreatePaletteInternal)( const LOGPALETTE *palette, UINT count );
|
||||
HPEN (WINAPI *pNtGdiCreatePen)( INT style, INT width, COLORREF color, HBRUSH brush );
|
||||
NTSTATUS (WINAPI *pNtGdiDdDDICheckVidPnExclusiveOwnership)( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc );
|
||||
NTSTATUS (WINAPI *pNtGdiDdDDICloseAdapter)( const D3DKMT_CLOSEADAPTER *desc );
|
||||
|
@ -126,7 +124,6 @@ struct unix_funcs
|
|||
BOOL ignore_rotation );
|
||||
DWORD (WINAPI *pNtGdiGetKerningPairs)( HDC hdc, DWORD count, KERNINGPAIR *kern_pair );
|
||||
COLORREF (WINAPI *pNtGdiGetNearestColor)( HDC hdc, COLORREF color );
|
||||
UINT (WINAPI *pNtGdiGetNearestPaletteIndex)( HPALETTE hpalette, COLORREF color );
|
||||
UINT (WINAPI *pNtGdiGetOutlineTextMetricsInternalW)( HDC hdc, UINT cbData,
|
||||
OUTLINETEXTMETRICW *otm, ULONG opts );
|
||||
INT (WINAPI *pNtGdiGetPath)( HDC hdc, POINT *points, BYTE *types, INT size );
|
||||
|
@ -135,7 +132,6 @@ struct unix_funcs
|
|||
BOOL (WINAPI *pNtGdiGetRasterizerCaps)( RASTERIZER_STATUS *status, UINT size );
|
||||
BOOL (WINAPI *pNtGdiGetRealizationInfo)( HDC hdc, struct font_realization_info *info );
|
||||
DWORD (WINAPI *pNtGdiGetSpoolMessage)( void *ptr1, DWORD data2, void *ptr3, DWORD data4 );
|
||||
UINT (WINAPI *pNtGdiGetSystemPaletteUse)( HDC hdc );
|
||||
UINT (WINAPI *pNtGdiGetTextCharsetInfo)( HDC hdc, FONTSIGNATURE *fs, DWORD flags );
|
||||
BOOL (WINAPI *pNtGdiGetTextExtentExW)( HDC hdc, const WCHAR *str, INT count, INT max_ext,
|
||||
INT *nfit, INT *dxs, SIZE *size, UINT flags );
|
||||
|
@ -190,7 +186,6 @@ struct unix_funcs
|
|||
BOOL xform_coords, HANDLE xform );
|
||||
BOOL (WINAPI *pNtGdiSetDeviceGammaRamp)( HDC hdc, void *ptr );
|
||||
DWORD (WINAPI *pNtGdiSetLayout)( HDC hdc, LONG wox, DWORD layout );
|
||||
BOOL (WINAPI *pNtGdiSetMagicColors)( HDC hdc, DWORD magic, ULONG index );
|
||||
COLORREF (WINAPI *pNtGdiSetPixel)( HDC hdc, INT x, INT y, COLORREF color );
|
||||
UINT (WINAPI *pNtGdiSetSystemPaletteUse)( HDC hdc, UINT use );
|
||||
INT (WINAPI *pNtGdiStartDoc)( HDC hdc, const DOCINFOW *doc, BOOL *banding, INT job );
|
||||
|
|
|
@ -100,21 +100,11 @@ HBITMAP WINAPI NtGdiCreateDIBitmapInternal( HDC hdc, INT width, INT height, DWOR
|
|||
coloruse, max_info, max_bits, flags, xform );
|
||||
}
|
||||
|
||||
HPALETTE WINAPI NtGdiCreateHalftonePalette( HDC hdc )
|
||||
{
|
||||
return unix_funcs->pNtGdiCreateHalftonePalette( hdc );
|
||||
}
|
||||
|
||||
HDC WINAPI NtGdiCreateMetafileDC( HDC hdc )
|
||||
{
|
||||
return unix_funcs->pNtGdiCreateMetafileDC( hdc );
|
||||
}
|
||||
|
||||
HPALETTE WINAPI NtGdiCreatePaletteInternal( const LOGPALETTE *palette, UINT count )
|
||||
{
|
||||
return unix_funcs->pNtGdiCreatePaletteInternal( palette, count );
|
||||
}
|
||||
|
||||
HPEN WINAPI NtGdiCreatePen( INT style, INT width, COLORREF color, HBRUSH brush )
|
||||
{
|
||||
return unix_funcs->pNtGdiCreatePen( style, width, color, brush );
|
||||
|
@ -303,11 +293,6 @@ COLORREF WINAPI NtGdiGetNearestColor( HDC hdc, COLORREF color )
|
|||
return unix_funcs->pNtGdiGetNearestColor( hdc, color );
|
||||
}
|
||||
|
||||
UINT WINAPI NtGdiGetNearestPaletteIndex( HPALETTE hpalette, COLORREF color )
|
||||
{
|
||||
return unix_funcs->pNtGdiGetNearestPaletteIndex( hpalette, color );
|
||||
}
|
||||
|
||||
UINT WINAPI NtGdiGetOutlineTextMetricsInternalW( HDC hdc, UINT cbData,
|
||||
OUTLINETEXTMETRICW *otm, ULONG opts )
|
||||
{
|
||||
|
@ -344,11 +329,6 @@ DWORD WINAPI NtGdiGetSpoolMessage( void *ptr1, DWORD data2, void *ptr3, DWORD da
|
|||
return unix_funcs->pNtGdiGetSpoolMessage( ptr1, data2, ptr3, data4 );
|
||||
}
|
||||
|
||||
UINT WINAPI NtGdiGetSystemPaletteUse( HDC hdc )
|
||||
{
|
||||
return unix_funcs->pNtGdiGetSystemPaletteUse( hdc );
|
||||
}
|
||||
|
||||
UINT WINAPI NtGdiGetTextCharsetInfo( HDC hdc, FONTSIGNATURE *fs, DWORD flags )
|
||||
{
|
||||
return unix_funcs->pNtGdiGetTextCharsetInfo( hdc, fs, flags );
|
||||
|
@ -556,11 +536,6 @@ DWORD WINAPI NtGdiSetLayout( HDC hdc, LONG wox, DWORD layout )
|
|||
return unix_funcs->pNtGdiSetLayout( hdc, wox, layout );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtGdiSetMagicColors( HDC hdc, DWORD magic, ULONG index )
|
||||
{
|
||||
return unix_funcs->pNtGdiSetMagicColors( hdc, magic, index );
|
||||
}
|
||||
|
||||
COLORREF WINAPI NtGdiSetPixel( HDC hdc, INT x, INT y, COLORREF color )
|
||||
{
|
||||
return unix_funcs->pNtGdiSetPixel( hdc, x, y, color );
|
||||
|
|
|
@ -472,6 +472,45 @@ NTSTATUS WINAPI wow64_NtGdiTransformPoints( UINT *args )
|
|||
return NtGdiTransformPoints( hdc, points_in, points_out, count, mode );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiCreatePaletteInternal( UINT *args )
|
||||
{
|
||||
const LOGPALETTE *palette = get_ptr( &args );
|
||||
UINT count = get_ulong( &args );
|
||||
|
||||
return HandleToUlong( NtGdiCreatePaletteInternal( palette, count ));
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiCreateHalftonePalette( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
|
||||
return HandleToUlong( NtGdiCreateHalftonePalette( hdc ));
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiGetNearestPaletteIndex( UINT *args )
|
||||
{
|
||||
HPALETTE hpalette = get_handle( &args );
|
||||
COLORREF color = get_ulong( &args );
|
||||
|
||||
return NtGdiGetNearestPaletteIndex( hpalette, color );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiGetSystemPaletteUse( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
|
||||
return NtGdiGetSystemPaletteUse( hdc );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiSetMagicColors( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
DWORD magic = get_ulong( &args );
|
||||
ULONG index = get_ulong( &args );
|
||||
|
||||
return NtGdiSetMagicColors( hdc, magic, index );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiFlush( UINT *args )
|
||||
{
|
||||
return NtGdiFlush();
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
SYSCALL_ENTRY( NtGdiCreateDIBBrush ) \
|
||||
SYSCALL_ENTRY( NtGdiCreateDIBSection ) \
|
||||
SYSCALL_ENTRY( NtGdiCreateEllipticRgn ) \
|
||||
SYSCALL_ENTRY( NtGdiCreateHalftonePalette ) \
|
||||
SYSCALL_ENTRY( NtGdiCreateHatchBrushInternal ) \
|
||||
SYSCALL_ENTRY( NtGdiCreatePaletteInternal ) \
|
||||
SYSCALL_ENTRY( NtGdiCreatePatternBrushInternal ) \
|
||||
SYSCALL_ENTRY( NtGdiCreateRectRgn ) \
|
||||
SYSCALL_ENTRY( NtGdiCreateRoundRectRgn ) \
|
||||
|
@ -48,8 +50,10 @@
|
|||
SYSCALL_ENTRY( NtGdiGetDCObject ) \
|
||||
SYSCALL_ENTRY( NtGdiGetFontFileData ) \
|
||||
SYSCALL_ENTRY( NtGdiGetFontFileInfo ) \
|
||||
SYSCALL_ENTRY( NtGdiGetNearestPaletteIndex ) \
|
||||
SYSCALL_ENTRY( NtGdiGetRegionData ) \
|
||||
SYSCALL_ENTRY( NtGdiGetRgnBox ) \
|
||||
SYSCALL_ENTRY( NtGdiGetSystemPaletteUse ) \
|
||||
SYSCALL_ENTRY( NtGdiGetTransform ) \
|
||||
SYSCALL_ENTRY( NtGdiHfontCreate ) \
|
||||
SYSCALL_ENTRY( NtGdiOffsetRgn ) \
|
||||
|
@ -62,6 +66,7 @@
|
|||
SYSCALL_ENTRY( NtGdiSetBitmapDimension ) \
|
||||
SYSCALL_ENTRY( NtGdiSetBrushOrg ) \
|
||||
SYSCALL_ENTRY( NtGdiSetColorAdjustment ) \
|
||||
SYSCALL_ENTRY( NtGdiSetMagicColors ) \
|
||||
SYSCALL_ENTRY( NtGdiSetMetaRgn ) \
|
||||
SYSCALL_ENTRY( NtGdiSetPixelFormat ) \
|
||||
SYSCALL_ENTRY( NtGdiSetRectRgn ) \
|
||||
|
|
Loading…
Reference in New Issue