win32u: Don't use WINAPI for the font enumeration function.

This commit is contained in:
Alexandre Julliard 2023-05-31 13:05:09 +02:00
parent ea958228d9
commit a315420d31
4 changed files with 10 additions and 9 deletions

View file

@ -114,7 +114,7 @@ static INT nulldrv_EndPage( PHYSDEV dev )
return 0;
}
static BOOL nulldrv_EnumFonts( PHYSDEV dev, LOGFONTW *logfont, FONTENUMPROCW proc, LPARAM lParam )
static BOOL nulldrv_EnumFonts( PHYSDEV dev, LOGFONTW *logfont, font_enum_proc proc, LPARAM lParam )
{
return TRUE;
}

View file

@ -3453,7 +3453,7 @@ static BOOL face_matches( const WCHAR *family_name, struct gdi_font_face *face,
}
static BOOL enum_face_charsets( const struct gdi_font_family *family, struct gdi_font_face *face,
struct enum_charset *list, DWORD count, FONTENUMPROCW proc, LPARAM lparam,
struct enum_charset *list, DWORD count, font_enum_proc proc, LPARAM lparam,
const WCHAR *subst )
{
ENUMLOGFONTEXW elf;
@ -3517,7 +3517,7 @@ static BOOL enum_face_charsets( const struct gdi_font_family *family, struct gdi
/*************************************************************
* font_EnumFonts
*/
static BOOL font_EnumFonts( PHYSDEV dev, LOGFONTW *lf, FONTENUMPROCW proc, LPARAM lparam )
static BOOL font_EnumFonts( PHYSDEV dev, LOGFONTW *lf, font_enum_proc proc, LPARAM lparam )
{
struct gdi_font_family *family;
struct gdi_font_face *face;
@ -5207,8 +5207,7 @@ struct font_enum
ULONG charset;
};
static INT WINAPI font_enum_proc( const LOGFONTW *lf, const TEXTMETRICW *tm,
DWORD type, LPARAM lp )
static INT enum_fonts( const LOGFONTW *lf, const TEXTMETRICW *tm, DWORD type, LPARAM lp )
{
struct font_enum *fe = (struct font_enum *)lp;
@ -5251,7 +5250,7 @@ BOOL WINAPI NtGdiEnumFonts( HDC hdc, ULONG type, ULONG win32_compat, ULONG face_
fe.charset = charset;
physdev = GET_DC_PHYSDEV( dc, pEnumFonts );
ret = physdev->funcs->pEnumFonts( physdev, &lf, font_enum_proc, (LPARAM)&fe );
ret = physdev->funcs->pEnumFonts( physdev, &lf, enum_fonts, (LPARAM)&fe );
if (ret && buf) ret = fe.count <= fe.size;
*count = fe.count * sizeof(*fe.buf);

View file

@ -1222,7 +1222,7 @@ static UINT get_font_metric(const struct font_data *font,
return DEVICE_FONTTYPE;
}
static BOOL enum_fonts(PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc, LPARAM lp)
static BOOL enum_fonts(PHYSDEV dev, LPLOGFONTW plf, font_enum_proc proc, LPARAM lp)
{
PSDRV_PDEVICE *pdev = get_psdrv_dev(dev);
PHYSDEV next = GET_NEXT_PHYSDEV(dev, pEnumFonts);

View file

@ -71,6 +71,8 @@ struct brush_pattern
UINT usage; /* color usage for DIB info */
};
typedef int (*font_enum_proc)(const LOGFONTW *, const TEXTMETRICW *, DWORD, LPARAM);
struct gdi_dc_funcs
{
INT (*pAbortDoc)(PHYSDEV);
@ -91,7 +93,7 @@ struct gdi_dc_funcs
INT (*pEndDoc)(PHYSDEV);
INT (*pEndPage)(PHYSDEV);
BOOL (*pEndPath)(PHYSDEV);
BOOL (*pEnumFonts)(PHYSDEV,LPLOGFONTW,FONTENUMPROCW,LPARAM);
BOOL (*pEnumFonts)(PHYSDEV,LPLOGFONTW,font_enum_proc,LPARAM);
INT (*pExtEscape)(PHYSDEV,INT,INT,LPCVOID,INT,LPVOID);
BOOL (*pExtFloodFill)(PHYSDEV,INT,INT,COLORREF,UINT);
BOOL (*pExtTextOut)(PHYSDEV,INT,INT,UINT,const RECT*,LPCWSTR,UINT,const INT*);
@ -173,7 +175,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 82
#define WINE_GDI_DRIVER_VERSION 83
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */
#define GDI_PRIORITY_FONT_DRV 100 /* any font driver */