From 7757f4ee7ee9cf56ee8fb3619bc80892ebe89e80 Mon Sep 17 00:00:00 2001 From: Jacek Caban <jacek@codeweavers.com> Date: Wed, 6 Oct 2021 16:20:26 +0200 Subject: [PATCH] gdi32: Use __wine_ prefix for Wine ntgdi extensions. Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> --- dlls/gdi32/brush.c | 5 ++++- dlls/gdi32/dc.c | 4 ++-- dlls/gdi32/emfdc.c | 4 ++-- dlls/gdi32/font.c | 5 ++++- dlls/gdi32/gdi_private.h | 7 ------- dlls/gdi32/gdiobj.c | 6 +++--- dlls/gdi32/icm.c | 4 ++-- dlls/gdi32/metadc.c | 4 ++-- dlls/gdi32/text.c | 2 +- dlls/gdi32/win32u_private.h | 6 ------ dlls/gdi32/wrappers.c | 6 +++--- include/ntgdi.h | 8 ++++++++ 12 files changed, 31 insertions(+), 30 deletions(-) diff --git a/dlls/gdi32/brush.c b/dlls/gdi32/brush.c index 5a218980f31..f9b718b4d2e 100644 --- a/dlls/gdi32/brush.c +++ b/dlls/gdi32/brush.c @@ -144,7 +144,10 @@ void free_brush_pattern( struct brush_pattern *pattern ) free( pattern->info ); } -BOOL CDECL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage ) +/********************************************************************** + * __wine_get_brush_bitmap_info (win32u.@) + */ +BOOL CDECL __wine_get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage ) { BRUSHOBJ *brush; BOOL ret = FALSE; diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index a64522f34af..0d7d82f9aa6 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -1333,9 +1333,9 @@ DWORD WINAPI NtGdiSetLayout( HDC hdc, LONG wox, DWORD layout ) } /********************************************************************** - * get_icm_profile (win32u.@) + * __wine_get_icm_profile (win32u.@) */ -BOOL CDECL get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename ) +BOOL CDECL __wine_get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename ) { PHYSDEV physdev; DC *dc; diff --git a/dlls/gdi32/emfdc.c b/dlls/gdi32/emfdc.c index a1c7eb74fd5..981849a9e86 100644 --- a/dlls/gdi32/emfdc.c +++ b/dlls/gdi32/emfdc.c @@ -270,7 +270,7 @@ static DWORD emfdc_create_brush( struct emf *emf, HBRUSH brush ) DWORD info_size; UINT usage; - if (!get_brush_bitmap_info( brush, info, NULL, &usage )) break; + if (!__wine_get_brush_bitmap_info( brush, info, NULL, &usage )) break; info_size = get_dib_info_size( info, usage ); emr = HeapAlloc( GetProcessHeap(), 0, @@ -311,7 +311,7 @@ static DWORD emfdc_create_brush( struct emf *emf, HBRUSH brush ) if (info->bmiHeader.biClrUsed == 1 << info->bmiHeader.biBitCount) info->bmiHeader.biClrUsed = 0; memcpy( (BYTE *)emr + emr->offBmi, info, emr->cbBmi ); - get_brush_bitmap_info( brush, NULL, (char *)emr + emr->offBits, NULL ); + __wine_get_brush_bitmap_info( brush, NULL, (char *)emr + emr->offBits, NULL ); if (!emfdc_record( emf, &emr->emr )) index = 0; HeapFree( GetProcessHeap(), 0, emr ); diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 3c5911785fd..e35aeefe61f 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -5904,7 +5904,10 @@ DWORD WINAPI NtGdiGetGlyphOutline( HDC hdc, UINT ch, UINT format, GLYPHMETRICS * } -BOOL CDECL get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm ) +/********************************************************************** + * __wine_get_file_outline_text_metric (win32u.@) + */ +BOOL CDECL __wine_get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm ) { struct gdi_font *font = NULL; diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 45bd5431a23..79f1975d96f 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -279,13 +279,6 @@ extern BOOL EMFDC_WidenPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN; extern HENHMETAFILE EMF_Create_HENHMETAFILE( ENHMETAHEADER *emh, DWORD filesize, BOOL on_disk ) DECLSPEC_HIDDEN; -extern BOOL CDECL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, - UINT *usage ) DECLSPEC_HIDDEN; -extern BOOL CDECL get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, - WCHAR *filename ) DECLSPEC_HIDDEN; -extern BOOL CDECL get_file_outline_text_metric( const WCHAR *path, - OUTLINETEXTMETRICW *otm ) DECLSPEC_HIDDEN; - static inline int get_dib_stride( int width, int bpp ) { return ((width * bpp + 31) >> 3) & ~3; diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index ff7ee2cacda..149262c0b44 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -1241,9 +1241,9 @@ static struct unix_funcs unix_funcs = SetDCHook, SetDIBits, SetHookFlags, - get_brush_bitmap_info, - get_file_outline_text_metric, - get_icm_profile, + __wine_get_brush_bitmap_info, + __wine_get_file_outline_text_metric, + __wine_get_icm_profile, __wine_get_vulkan_driver, __wine_get_wgl_driver, __wine_make_gdi_object_system, diff --git a/dlls/gdi32/icm.c b/dlls/gdi32/icm.c index 63377a9ab88..d36c5135521 100644 --- a/dlls/gdi32/icm.c +++ b/dlls/gdi32/icm.c @@ -74,7 +74,7 @@ INT WINAPI EnumICMProfilesW(HDC hdc, ICMENUMPROCW func, LPARAM lparam) TRACE( "%p, %p, 0x%08lx\n", hdc, func, lparam ); if (!func) return -1; - if (!get_icm_profile( hdc, FALSE, &size, profile )) return -1; + if (!__wine_get_icm_profile( hdc, FALSE, &size, profile )) return -1; /* FIXME: support multiple profiles */ return func( profile, lparam ); } @@ -131,7 +131,7 @@ BOOL WINAPI GetICMProfileW(HDC hdc, LPDWORD size, LPWSTR filename) { TRACE("%p, %p, %p\n", hdc, size, filename); - return get_icm_profile( hdc, TRUE, size, filename ); + return __wine_get_icm_profile( hdc, TRUE, size, filename ); } /********************************************************************** diff --git a/dlls/gdi32/metadc.c b/dlls/gdi32/metadc.c index 6b93dab63ce..d2260f6702e 100644 --- a/dlls/gdi32/metadc.c +++ b/dlls/gdi32/metadc.c @@ -547,7 +547,7 @@ static INT16 metadc_create_brush( struct metadc *metadc, HBRUSH brush ) DWORD info_size; UINT usage; - if (!get_brush_bitmap_info( brush, src_info, NULL, &usage )) goto done; + if (!__wine_get_brush_bitmap_info( brush, src_info, NULL, &usage )) goto done; info_size = get_dib_info_size( src_info, usage ); size = FIELD_OFFSET( METARECORD, rdParm[2] ) + @@ -559,7 +559,7 @@ static INT16 metadc_create_brush( struct metadc *metadc, HBRUSH brush ) mr->rdParm[0] = logbrush.lbStyle; mr->rdParm[1] = usage; dst_info = (BITMAPINFO *)(mr->rdParm + 2); - get_brush_bitmap_info( brush, dst_info, (char *)dst_info + info_size, NULL ); + __wine_get_brush_bitmap_info( brush, dst_info, (char *)dst_info + info_size, NULL ); if (dst_info->bmiHeader.biClrUsed == 1 << dst_info->bmiHeader.biBitCount) dst_info->bmiHeader.biClrUsed = 0; break; diff --git a/dlls/gdi32/text.c b/dlls/gdi32/text.c index 91d8facbccf..b6bec086d75 100644 --- a/dlls/gdi32/text.c +++ b/dlls/gdi32/text.c @@ -2682,7 +2682,7 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD hidden, const WCHAR *resource_fil if (!RtlDosPathNameToNtPathName_U( path, &nt_name, NULL, NULL )) goto done; } else if (!RtlDosPathNameToNtPathName_U( font_file, &nt_name, NULL, NULL )) goto done; - ret = get_file_outline_text_metric( nt_name.Buffer, &otm ); + ret = __wine_get_file_outline_text_metric( nt_name.Buffer, &otm ); RtlFreeUnicodeString( &nt_name ); if (!ret) goto done; if (!(otm.otmTextMetrics.tmPitchAndFamily & TMPF_TRUETYPE)) goto done; diff --git a/dlls/gdi32/win32u_private.h b/dlls/gdi32/win32u_private.h index f867c556bff..3c1f0444986 100644 --- a/dlls/gdi32/win32u_private.h +++ b/dlls/gdi32/win32u_private.h @@ -296,12 +296,6 @@ struct unix_funcs UINT WINAPI GDIRealizePalette( HDC hdc ); HPALETTE WINAPI GDISelectPalette( HDC hdc, HPALETTE hpal, WORD wBkg ); -extern BOOL CDECL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, - UINT *usage ) DECLSPEC_HIDDEN; -extern BOOL CDECL get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, - WCHAR *filename ) DECLSPEC_HIDDEN; -extern BOOL CDECL get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm ); - BOOL wrappers_init(void) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/wrappers.c b/dlls/gdi32/wrappers.c index f37fbd57b0d..01a1ff5dc47 100644 --- a/dlls/gdi32/wrappers.c +++ b/dlls/gdi32/wrappers.c @@ -980,7 +980,7 @@ WORD WINAPI SetHookFlags( HDC hdc, WORD flags ) return unix_funcs->pSetHookFlags( hdc, flags ); } -BOOL CDECL get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename ) +BOOL CDECL __wine_get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename ) { return unix_funcs->get_icm_profile( hdc, allow_default, size, filename ); } @@ -996,12 +996,12 @@ void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect, return unix_funcs->set_visible_region( hdc, hrgn, vis_rect, device_rect, surface ); } -BOOL CDECL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage ) +BOOL CDECL __wine_get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage ) { return unix_funcs->get_brush_bitmap_info( handle, info, bits, usage ); } -BOOL CDECL get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm ) +BOOL CDECL __wine_get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm ) { return unix_funcs->get_file_outline_text_metric( path, otm ); } diff --git a/include/ntgdi.h b/include/ntgdi.h index 05fe0191f39..4ea5549c223 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -448,4 +448,12 @@ NTSTATUS WINAPI NtGdiDdDDIQueryStatistics( D3DKMT_QUERYSTATISTICS *stats ); NTSTATUS WINAPI NtGdiDdDDISetQueuedLimit( D3DKMT_SETQUEUEDLIMIT *desc ); NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *desc ); +/* Wine extensions */ +extern BOOL CDECL __wine_get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, + UINT *usage ); +extern BOOL CDECL __wine_get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, + WCHAR *filename ); +extern BOOL CDECL __wine_get_file_outline_text_metric( const WCHAR *path, + OUTLINETEXTMETRICW *otm ); + #endif /* _NTGDI_ */ -- GitLab