Commit c99c022a authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Fixed mismatches between the Wine headers and the Microsoft headers.

parent 6637654b
...@@ -269,7 +269,6 @@ typedef struct ...@@ -269,7 +269,6 @@ typedef struct
typedef BOOL16 (CALLBACK *DCHOOKPROC)(HDC16,WORD,DWORD,LPARAM); typedef BOOL16 (CALLBACK *DCHOOKPROC)(HDC16,WORD,DWORD,LPARAM);
typedef INT16 (CALLBACK *FONTENUMPROC16)(SEGPTR,SEGPTR,UINT16,LPARAM); typedef INT16 (CALLBACK *FONTENUMPROC16)(SEGPTR,SEGPTR,UINT16,LPARAM);
typedef INT16 (CALLBACK *FONTENUMPROCEX16)(SEGPTR,SEGPTR,UINT16,LPARAM);
typedef VOID (CALLBACK *LINEDDAPROC16)(INT16,INT16,LPARAM); typedef VOID (CALLBACK *LINEDDAPROC16)(INT16,INT16,LPARAM);
typedef INT16 (CALLBACK *GOBJENUMPROC16)(SEGPTR,LPARAM); typedef INT16 (CALLBACK *GOBJENUMPROC16)(SEGPTR,LPARAM);
...@@ -417,7 +416,7 @@ INT16 WINAPI EndPage16(HDC16); ...@@ -417,7 +416,7 @@ INT16 WINAPI EndPage16(HDC16);
BOOL16 WINAPI EndPath16(HDC16); BOOL16 WINAPI EndPath16(HDC16);
INT16 WINAPI EndSpoolPage16(HPJOB16); INT16 WINAPI EndSpoolPage16(HPJOB16);
INT16 WINAPI EnumFontFamilies16(HDC16,LPCSTR,FONTENUMPROC16,LPARAM); INT16 WINAPI EnumFontFamilies16(HDC16,LPCSTR,FONTENUMPROC16,LPARAM);
INT16 WINAPI EnumFontFamiliesEx16(HDC16,LPLOGFONT16,FONTENUMPROCEX16,LPARAM,DWORD); INT16 WINAPI EnumFontFamiliesEx16(HDC16,LPLOGFONT16,FONTENUMPROC16,LPARAM,DWORD);
INT16 WINAPI EnumFonts16(HDC16,LPCSTR,FONTENUMPROC16,LPARAM); INT16 WINAPI EnumFonts16(HDC16,LPCSTR,FONTENUMPROC16,LPARAM);
BOOL16 WINAPI EnumMetaFile16(HDC16,HMETAFILE16,MFENUMPROC16,LPARAM); BOOL16 WINAPI EnumMetaFile16(HDC16,HMETAFILE16,MFENUMPROC16,LPARAM);
INT16 WINAPI EnumObjects16(HDC16,INT16,GOBJENUMPROC16,LPARAM); INT16 WINAPI EnumObjects16(HDC16,INT16,GOBJENUMPROC16,LPARAM);
......
...@@ -1166,22 +1166,36 @@ typedef struct ...@@ -1166,22 +1166,36 @@ typedef struct
DECL_WINELIB_TYPE_AW(NEWTEXTMETRICEX) DECL_WINELIB_TYPE_AW(NEWTEXTMETRICEX)
typedef int (CALLBACK *OLDFONTENUMPROCA)(const LOGFONTA*,const TEXTMETRICA*, #if defined(STRICT) || defined(__WINE__)
DWORD,LPARAM);
typedef int (CALLBACK *OLDFONTENUMPROCW)(const LOGFONTW*,const TEXTMETRICW*, #if !defined(NOTEXTMETRIC)
DWORD,LPARAM); typedef int (CALLBACK *OLDFONTENUMPROCA)(const LOGFONTA *, const TEXTMETRICA *, DWORD, LPARAM);
typedef int (CALLBACK *OLDFONTENUMPROCW)(const LOGFONTW *, const TEXTMETRICW *, DWORD, LPARAM);
#else /* !defined(NOTEXTMETRIC) */
typedef int (CALLBACK *OLDFONTENUMPROCA)(const LOGFONTA *, const VOID *, DWORD, LPARAM);
typedef int (CALLBACK *OLDFONTENUMPROCW)(const LOGFONTW *, const VOID *, DWORD, LPARAM);
#endif /* !defined(NOTEXTMETRIC) */
DECL_WINELIB_TYPE_AW(OLDFONTENUMPROC) DECL_WINELIB_TYPE_AW(OLDFONTENUMPROC)
typedef OLDFONTENUMPROCA FONTENUMPROCA; typedef OLDFONTENUMPROCA FONTENUMPROCA;
typedef OLDFONTENUMPROCW FONTENUMPROCW; typedef OLDFONTENUMPROCW FONTENUMPROCW;
DECL_WINELIB_TYPE_AW(FONTENUMPROC) DECL_WINELIB_TYPE_AW(FONTENUMPROC)
typedef int (CALLBACK *FONTENUMPROCEXA)(LPENUMLOGFONTEXA,NEWTEXTMETRICEXA *,DWORD,LPARAM); typedef INT (CALLBACK *GOBJENUMPROC)(LPVOID, LPARAM);
typedef int (CALLBACK *FONTENUMPROCEXW)(LPENUMLOGFONTEXW,NEWTEXTMETRICEXW *,DWORD,LPARAM); typedef VOID (CALLBACK *LINEDDAPROC)(INT, INT, LPARAM);
DECL_WINELIB_TYPE_AW(FONTENUMPROCEX)
typedef INT (CALLBACK *GOBJENUMPROC)(LPVOID,LPARAM); #else /* defined(STRICT) || defined(__WINE__) */
typedef VOID (CALLBACK *LINEDDAPROC)(INT,INT,LPARAM);
typedef FARPROC OLDFONTENUMPROC;
typedef FARPROC FONTENUMPROCA;
typedef FARPROC FONTENUMPROCW;
DECL_WINELIB_TYPE_AW(FONTENUMPROC)
typedef FARPROC GOBJENUMPROC;
typedef FARPROC LINEDDAPROC;
#endif /* defined(STRICT) || defined(__WINE__) */
/* tmPitchAndFamily bits */ /* tmPitchAndFamily bits */
#define TMPF_FIXED_PITCH 1 /* means variable pitch */ #define TMPF_FIXED_PITCH 1 /* means variable pitch */
...@@ -3168,8 +3182,8 @@ BOOL WINAPI EnumEnhMetaFile(HDC,HENHMETAFILE,ENHMFENUMPROC,LPVOID,const REC ...@@ -3168,8 +3182,8 @@ BOOL WINAPI EnumEnhMetaFile(HDC,HENHMETAFILE,ENHMFENUMPROC,LPVOID,const REC
INT WINAPI EnumFontFamiliesA(HDC,LPCSTR,FONTENUMPROCA,LPARAM); INT WINAPI EnumFontFamiliesA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
INT WINAPI EnumFontFamiliesW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM); INT WINAPI EnumFontFamiliesW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
#define EnumFontFamilies WINELIB_NAME_AW(EnumFontFamilies) #define EnumFontFamilies WINELIB_NAME_AW(EnumFontFamilies)
INT WINAPI EnumFontFamiliesExA(HDC,LPLOGFONTA,FONTENUMPROCEXA,LPARAM,DWORD); INT WINAPI EnumFontFamiliesExA(HDC,LPLOGFONTA,FONTENUMPROCA,LPARAM,DWORD);
INT WINAPI EnumFontFamiliesExW(HDC,LPLOGFONTW,FONTENUMPROCEXW,LPARAM,DWORD); INT WINAPI EnumFontFamiliesExW(HDC,LPLOGFONTW,FONTENUMPROCW,LPARAM,DWORD);
#define EnumFontFamiliesEx WINELIB_NAME_AW(EnumFontFamiliesEx) #define EnumFontFamiliesEx WINELIB_NAME_AW(EnumFontFamiliesEx)
INT WINAPI EnumFontsA(HDC,LPCSTR,FONTENUMPROCA,LPARAM); INT WINAPI EnumFontsA(HDC,LPCSTR,FONTENUMPROCA,LPARAM);
INT WINAPI EnumFontsW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM); INT WINAPI EnumFontsW(HDC,LPCWSTR,FONTENUMPROCW,LPARAM);
......
...@@ -219,29 +219,6 @@ typedef struct ...@@ -219,29 +219,6 @@ typedef struct
WORD internal_charset; WORD internal_charset;
} fontMatch; } fontMatch;
typedef struct
{
LPLOGFONT16 lpLogFontParam;
FONTENUMPROC16 lpEnumFunc;
LPARAM lpData;
LPNEWTEXTMETRICEX16 lpTextMetric;
LPENUMLOGFONTEX16 lpLogFont;
SEGPTR segTextMetric;
SEGPTR segLogFont;
} fontEnum16;
typedef struct
{
LPLOGFONTW lpLogFontParam;
FONTENUMPROCEXW lpEnumFunc;
LPARAM lpData;
NEWTEXTMETRICEXW *lpTextMetric;
LPENUMLOGFONTEXW lpLogFont;
DWORD dwFlags;
} fontEnum32;
extern fontObject* XFONT_GetFontObject( X_PHYSFONT pFont ); extern fontObject* XFONT_GetFontObject( X_PHYSFONT pFont );
extern XFontStruct* XFONT_GetFontStruct( X_PHYSFONT pFont ); extern XFontStruct* XFONT_GetFontStruct( X_PHYSFONT pFont );
extern LPIFONTINFO16 XFONT_GetFontInfo( X_PHYSFONT pFont ); extern LPIFONTINFO16 XFONT_GetFontInfo( X_PHYSFONT pFont );
......
...@@ -63,7 +63,7 @@ typedef struct ...@@ -63,7 +63,7 @@ typedef struct
typedef struct typedef struct
{ {
LPLOGFONT16 lpLogFontParam; LPLOGFONT16 lpLogFontParam;
FONTENUMPROCEX16 lpEnumFunc; FONTENUMPROC16 lpEnumFunc;
LPARAM lpData; LPARAM lpData;
LPNEWTEXTMETRICEX16 lpTextMetric; LPNEWTEXTMETRICEX16 lpTextMetric;
...@@ -78,7 +78,7 @@ typedef struct ...@@ -78,7 +78,7 @@ typedef struct
typedef struct typedef struct
{ {
LPLOGFONTW lpLogFontParam; LPLOGFONTW lpLogFontParam;
FONTENUMPROCEXW lpEnumFunc; FONTENUMPROCW lpEnumFunc;
LPARAM lpData; LPARAM lpData;
DWORD dwFlags; DWORD dwFlags;
HDC hdc; HDC hdc;
...@@ -132,7 +132,7 @@ static CHARSETINFO FONT_tci[MAXTCIINDEX] = { ...@@ -132,7 +132,7 @@ static CHARSETINFO FONT_tci[MAXTCIINDEX] = {
}; };
/* ### start build ### */ /* ### start build ### */
extern WORD CALLBACK FONT_CallTo16_word_llwl(FONTENUMPROCEX16,LONG,LONG,WORD,LONG); extern WORD CALLBACK FONT_CallTo16_word_llwl(FONTENUMPROC16,LONG,LONG,WORD,LONG);
/* ### stop build ### */ /* ### stop build ### */
/*********************************************************************** /***********************************************************************
...@@ -564,7 +564,7 @@ static INT FONT_EnumInstance( LPENUMLOGFONTEXW plf, NEWTEXTMETRICEXW *ptm, ...@@ -564,7 +564,7 @@ static INT FONT_EnumInstance( LPENUMLOGFONTEXW plf, NEWTEXTMETRICEXW *ptm,
} }
GDI_ReleaseObj( pfe->hdc ); /* release the GDI lock */ GDI_ReleaseObj( pfe->hdc ); /* release the GDI lock */
ret = pfe->lpEnumFunc( plf, ptm, fType, pfe->lpData ); ret = pfe->lpEnumFunc( &plf->elfLogFont, (TEXTMETRICW *)ptm, fType, pfe->lpData );
/* get the lock again and make sure the DC is still valid */ /* get the lock again and make sure the DC is still valid */
dc = DC_GetDCPtr( pfe->hdc ); dc = DC_GetDCPtr( pfe->hdc );
...@@ -582,7 +582,7 @@ static INT FONT_EnumInstance( LPENUMLOGFONTEXW plf, NEWTEXTMETRICEXW *ptm, ...@@ -582,7 +582,7 @@ static INT FONT_EnumInstance( LPENUMLOGFONTEXW plf, NEWTEXTMETRICEXW *ptm,
* EnumFontFamiliesEx (GDI.613) * EnumFontFamiliesEx (GDI.613)
*/ */
INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf, INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
FONTENUMPROCEX16 efproc, LPARAM lParam, FONTENUMPROC16 efproc, LPARAM lParam,
DWORD dwFlags) DWORD dwFlags)
{ {
fontEnum16 fe16; fontEnum16 fe16;
...@@ -622,7 +622,7 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf, ...@@ -622,7 +622,7 @@ INT16 WINAPI EnumFontFamiliesEx16( HDC16 hDC, LPLOGFONT16 plf,
* FONT_EnumFontFamiliesEx * FONT_EnumFontFamiliesEx
*/ */
static INT FONT_EnumFontFamiliesEx( HDC hDC, LPLOGFONTW plf, static INT FONT_EnumFontFamiliesEx( HDC hDC, LPLOGFONTW plf,
FONTENUMPROCEXW efproc, FONTENUMPROCW efproc,
LPARAM lParam, DWORD dwUnicode) LPARAM lParam, DWORD dwUnicode)
{ {
INT ret = 1, ret2; INT ret = 1, ret2;
...@@ -667,7 +667,7 @@ static INT FONT_EnumFontFamiliesEx( HDC hDC, LPLOGFONTW plf, ...@@ -667,7 +667,7 @@ static INT FONT_EnumFontFamiliesEx( HDC hDC, LPLOGFONTW plf,
* EnumFontFamiliesExW (GDI32.@) * EnumFontFamiliesExW (GDI32.@)
*/ */
INT WINAPI EnumFontFamiliesExW( HDC hDC, LPLOGFONTW plf, INT WINAPI EnumFontFamiliesExW( HDC hDC, LPLOGFONTW plf,
FONTENUMPROCEXW efproc, FONTENUMPROCW efproc,
LPARAM lParam, DWORD dwFlags ) LPARAM lParam, DWORD dwFlags )
{ {
return FONT_EnumFontFamiliesEx( hDC, plf, efproc, lParam, ENUM_UNICODE ); return FONT_EnumFontFamiliesEx( hDC, plf, efproc, lParam, ENUM_UNICODE );
...@@ -677,14 +677,13 @@ INT WINAPI EnumFontFamiliesExW( HDC hDC, LPLOGFONTW plf, ...@@ -677,14 +677,13 @@ INT WINAPI EnumFontFamiliesExW( HDC hDC, LPLOGFONTW plf,
* EnumFontFamiliesExA (GDI32.@) * EnumFontFamiliesExA (GDI32.@)
*/ */
INT WINAPI EnumFontFamiliesExA( HDC hDC, LPLOGFONTA plf, INT WINAPI EnumFontFamiliesExA( HDC hDC, LPLOGFONTA plf,
FONTENUMPROCEXA efproc, FONTENUMPROCA efproc,
LPARAM lParam, DWORD dwFlags) LPARAM lParam, DWORD dwFlags)
{ {
LOGFONTW lfW; LOGFONTW lfW;
FONT_LogFontAToW( plf, &lfW ); FONT_LogFontAToW( plf, &lfW );
return FONT_EnumFontFamiliesEx( hDC, &lfW, return FONT_EnumFontFamiliesEx( hDC, &lfW, (FONTENUMPROCW)efproc, lParam, 0);
(FONTENUMPROCEXW)efproc, lParam, 0);
} }
/*********************************************************************** /***********************************************************************
...@@ -714,7 +713,7 @@ INT WINAPI EnumFontFamiliesA( HDC hDC, LPCSTR lpFamily, ...@@ -714,7 +713,7 @@ INT WINAPI EnumFontFamiliesA( HDC hDC, LPCSTR lpFamily,
if( lpFamily ) lstrcpynA( lf.lfFaceName, lpFamily, LF_FACESIZE ); if( lpFamily ) lstrcpynA( lf.lfFaceName, lpFamily, LF_FACESIZE );
else lf.lfFaceName[0] = lf.lfFaceName[1] = '\0'; else lf.lfFaceName[0] = lf.lfFaceName[1] = '\0';
return EnumFontFamiliesExA( hDC, &lf, (FONTENUMPROCEXA)efproc, lpData, 0 ); return EnumFontFamiliesExA( hDC, &lf, efproc, lpData, 0 );
} }
/*********************************************************************** /***********************************************************************
...@@ -729,7 +728,7 @@ INT WINAPI EnumFontFamiliesW( HDC hDC, LPCWSTR lpFamily, ...@@ -729,7 +728,7 @@ INT WINAPI EnumFontFamiliesW( HDC hDC, LPCWSTR lpFamily,
if( lpFamily ) lstrcpynW( lf.lfFaceName, lpFamily, LF_FACESIZE ); if( lpFamily ) lstrcpynW( lf.lfFaceName, lpFamily, LF_FACESIZE );
else lf.lfFaceName[0] = 0; else lf.lfFaceName[0] = 0;
return EnumFontFamiliesExW( hDC, &lf, (FONTENUMPROCEXW)efproc, lpData, 0 ); return EnumFontFamiliesExW( hDC, &lf, efproc, lpData, 0 );
} }
/*********************************************************************** /***********************************************************************
...@@ -738,7 +737,7 @@ INT WINAPI EnumFontFamiliesW( HDC hDC, LPCWSTR lpFamily, ...@@ -738,7 +737,7 @@ INT WINAPI EnumFontFamiliesW( HDC hDC, LPCWSTR lpFamily,
INT16 WINAPI EnumFonts16( HDC16 hDC, LPCSTR lpName, FONTENUMPROC16 efproc, INT16 WINAPI EnumFonts16( HDC16 hDC, LPCSTR lpName, FONTENUMPROC16 efproc,
LPARAM lpData ) LPARAM lpData )
{ {
return EnumFontFamilies16( hDC, lpName, (FONTENUMPROCEX16)efproc, lpData ); return EnumFontFamilies16( hDC, lpName, efproc, lpData );
} }
/*********************************************************************** /***********************************************************************
......
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