Changed 16-bit GDI Enum* functions to not use thunks, now that 16-bit

Winelib is no longer supported.
This commit is contained in:
Alexandre Julliard 2001-12-17 21:01:58 +00:00
parent 7d155d6706
commit ed29c905a8
8 changed files with 61 additions and 104 deletions

View File

@ -1,7 +1,8 @@
*.spec.c
*.spec.glue.s
Makefile
dispdib.spec.c
gdi.spec.c
gdi32.spec.c
printdrv.glue.c
thunk.glue.c
version.res
version16.res
wing.spec.c

View File

@ -15,7 +15,6 @@ C_SRCS = \
freetype.c \
gdi_main.c \
printdrv.c \
thunk.c \
wing.c
RC_SRCS= \
@ -24,7 +23,7 @@ RC_SRCS= \
RC_SRCS16= \
version16.rc
GLUE = printdrv.c thunk.c
GLUE = printdrv.c
EXTRA_OBJS = \
$(TOPOBJDIR)/graphics/graphics.o \

View File

@ -80,8 +80,8 @@ rsrc version16.res
67 pascal16 DPtoLP(word ptr s_word) DPtoLP16
68 pascal16 DeleteDC(word) DeleteDC16
69 pascal16 DeleteObject(word) DeleteObject16
70 pascal16 EnumFonts(word str segptr long) THUNK_EnumFonts16
71 pascal16 EnumObjects(word word segptr long) THUNK_EnumObjects16
70 pascal16 EnumFonts(word str segptr long) EnumFonts16
71 pascal16 EnumObjects(word word segptr long) EnumObjects16
72 pascal16 EqualRgn(word word) EqualRgn16
73 pascal16 ExcludeVisRect(word s_word s_word s_word s_word) ExcludeVisRect16
74 pascal GetBitmapBits(word long ptr) GetBitmapBits16
@ -175,7 +175,7 @@ rsrc version16.res
172 pascal16 SetRectRgn(word s_word s_word s_word s_word) SetRectRgn16
173 pascal16 GetClipRgn(word) GetClipRgn16
174 stub BLOAT # W2.0 (only ?) ROTFL ! ;-))
175 pascal16 EnumMetaFile(word word segptr long) THUNK_EnumMetaFile16
175 pascal16 EnumMetaFile(word word segptr long) EnumMetaFile16
176 pascal16 PlayMetaFileRecord(word ptr ptr word) PlayMetaFileRecord16
177 stub RCOS # W2.0 (only ?)
178 stub RSIN # W2.0 (only ?)
@ -259,7 +259,7 @@ rsrc version16.res
315 pascal EngineRealizeFontExt(long long long long) EngineRealizeFontExt16
316 stub EngineGetCharWidthStr
317 stub EngineGetGlyphBmpExt
330 pascal16 EnumFontFamilies(word str segptr long) THUNK_EnumFontFamilies16
330 pascal16 EnumFontFamilies(word str segptr long) EnumFontFamilies16
332 pascal16 GetKerningPairs(word word ptr) GetKerningPairs16
345 pascal16 GetTextAlign(word) GetTextAlign16
346 pascal16 SetTextAlign(word word) SetTextAlign16
@ -418,7 +418,7 @@ rsrc version16.res
610 pascal16 GdiSignalProc32(long long long word) GdiSignalProc
611 stub GetRandomRgn
612 pascal16 GetTextCharset(word) GetTextCharset16
613 pascal16 EnumFontFamiliesEx(word ptr segptr long long) THUNK_EnumFontFamiliesEx16
613 pascal16 EnumFontFamiliesEx(word ptr segptr long long) EnumFontFamiliesEx16
614 stub AddLpkToGDI
615 stub GetCharacterPlacement
616 pascal GetFontLanguageInfo(word) GetFontLanguageInfo16

View File

@ -1,85 +0,0 @@
/*
* GDI 16-bit thunks
*
* Copyright 1996, 1997 Alexandre Julliard
* Copyright 1998 Ulrich Weigand
*/
#include "windef.h"
#include "wingdi.h"
#include "wine/wingdi16.h"
#include "callback.h"
/* ### start build ### */
extern WORD CALLBACK THUNK_CallTo16_word_ll (FARPROC16,LONG,LONG);
extern WORD CALLBACK THUNK_CallTo16_word_llwl (FARPROC16,LONG,LONG,WORD,LONG);
extern WORD CALLBACK THUNK_CallTo16_word_wllwl(FARPROC16,WORD,LONG,LONG,WORD,LONG);
extern WORD CALLBACK THUNK_CallTo16_word_wwl (FARPROC16,WORD,WORD,LONG);
/* ### stop build ### */
/***********************************************************************
* EnumObjects (GDI.71)
*/
INT16 WINAPI THUNK_EnumObjects16( HDC16 hdc, INT16 nObjType,
GOBJENUMPROC16 func, LPARAM lParam )
{
DECL_THUNK( thunk, func, THUNK_CallTo16_word_ll );
return EnumObjects16( hdc, nObjType, (GOBJENUMPROC16)&thunk, lParam );
}
/*************************************************************************
* EnumFonts (GDI.70)
*/
INT16 WINAPI THUNK_EnumFonts16( HDC16 hdc, LPCSTR lpFaceName,
FONTENUMPROC16 func, LPARAM lParam )
{
DECL_THUNK( thunk, func, THUNK_CallTo16_word_llwl );
return EnumFonts16( hdc, lpFaceName, (FONTENUMPROC16)&thunk, lParam );
}
/******************************************************************
* EnumMetaFile (GDI.175)
*/
BOOL16 WINAPI THUNK_EnumMetaFile16( HDC16 hdc, HMETAFILE16 hmf,
MFENUMPROC16 func, LPARAM lParam )
{
DECL_THUNK( thunk, func, THUNK_CallTo16_word_wllwl );
return EnumMetaFile16( hdc, hmf, (MFENUMPROC16)&thunk, lParam );
}
/*************************************************************************
* EnumFontFamilies (GDI.330)
*/
INT16 WINAPI THUNK_EnumFontFamilies16( HDC16 hdc, LPCSTR lpszFamily,
FONTENUMPROC16 func, LPARAM lParam )
{
DECL_THUNK( thunk, func, THUNK_CallTo16_word_llwl );
return EnumFontFamilies16(hdc, lpszFamily, (FONTENUMPROC16)&thunk, lParam);
}
/*************************************************************************
* EnumFontFamiliesEx (GDI.613)
*/
INT16 WINAPI THUNK_EnumFontFamiliesEx16( HDC16 hdc, LPLOGFONT16 lpLF,
FONTENUMPROCEX16 func, LPARAM lParam,
DWORD reserved )
{
DECL_THUNK( thunk, func, THUNK_CallTo16_word_llwl );
return EnumFontFamiliesEx16( hdc, lpLF, (FONTENUMPROCEX16)&thunk,
lParam, reserved );
}
/**********************************************************************
* LineDDA (GDI.100)
*/
void WINAPI LineDDA16( INT16 nXStart, INT16 nYStart, INT16 nXEnd,
INT16 nYEnd, LINEDDAPROC16 func, LPARAM lParam )
{
DECL_THUNK( thunk, func, THUNK_CallTo16_word_wwl );
LineDDA( nXStart, nYStart, nXEnd, nYEnd, (LINEDDAPROC)&thunk, lParam );
}

View File

@ -87,6 +87,10 @@ static CHARSETINFO FONT_tci[MAXTCIINDEX] = {
{ DEFAULT_CHARSET, 0, FS(0)},
};
/* ### start build ### */
extern WORD CALLBACK FONT_CallTo16_word_llwl(FONTENUMPROCEX16,LONG,LONG,WORD,LONG);
/* ### stop build ### */
/***********************************************************************
* LOGFONT conversion functions.
*/
@ -630,8 +634,9 @@ static INT FONT_EnumInstance16( LPENUMLOGFONTEXW plf, LPNEWTEXTMETRICEXW ptm,
{
FONT_EnumLogFontExWTo16(plf, pfe->lpLogFont);
FONT_NewTextMetricExWTo16(ptm, pfe->lpTextMetric);
return pfe->lpEnumFunc( pfe->segLogFont, pfe->segTextMetric,
(UINT16)fType, (LPARAM)(pfe->lpData) );
return FONT_CallTo16_word_llwl( pfe->lpEnumFunc, pfe->segLogFont, pfe->segTextMetric,
(UINT16)fType, (LPARAM)pfe->lpData );
}
#undef pfe
return 1;
@ -787,7 +792,7 @@ INT16 WINAPI EnumFontFamilies16( HDC16 hDC, LPCSTR lpFamily,
if( lpFamily ) lstrcpynA( lf.lfFaceName, lpFamily, LF_FACESIZE );
else lf.lfFaceName[0] = '\0';
return EnumFontFamiliesEx16( hDC, &lf, (FONTENUMPROCEX16)efproc, lpData, 0 );
return EnumFontFamiliesEx16( hDC, &lf, efproc, lpData, 0 );
}
/***********************************************************************

View File

@ -29,6 +29,9 @@
DEFAULT_DEBUG_CHANNEL(gdi);
/* ### start build ### */
extern WORD CALLBACK GDI_CallTo16_word_ll(GOBJENUMPROC16,LONG,LONG);
/* ### stop build ### */
/***********************************************************************
* GDI stock objects
@ -886,7 +889,7 @@ INT16 WINAPI EnumObjects16( HDC16 hdc, INT16 nObjType,
pen->lopnWidth.x = 1;
pen->lopnWidth.y = 0;
pen->lopnColor = solid_colors[i];
retval = lpEnumFunc( SEGPTR_GET(pen), lParam );
retval = GDI_CallTo16_word_ll( lpEnumFunc, SEGPTR_GET(pen), lParam );
TRACE("solid pen %08lx, ret=%d\n",
solid_colors[i], retval);
if (!retval) break;
@ -902,7 +905,7 @@ INT16 WINAPI EnumObjects16( HDC16 hdc, INT16 nObjType,
brush->lbStyle = BS_SOLID;
brush->lbColor = solid_colors[i];
brush->lbHatch = 0;
retval = lpEnumFunc( SEGPTR_GET(brush), lParam );
retval = GDI_CallTo16_word_ll( lpEnumFunc, SEGPTR_GET(brush), lParam );
TRACE("solid brush %08lx, ret=%d\n",
solid_colors[i], retval);
if (!retval) break;
@ -914,7 +917,7 @@ INT16 WINAPI EnumObjects16( HDC16 hdc, INT16 nObjType,
brush->lbStyle = BS_HATCHED;
brush->lbColor = RGB(0,0,0);
brush->lbHatch = i;
retval = lpEnumFunc( SEGPTR_GET(brush), lParam );
retval = GDI_CallTo16_word_ll( lpEnumFunc, SEGPTR_GET(brush), lParam );
TRACE("hatched brush %d, ret=%d\n",
i, retval);
if (!retval) break;

View File

@ -9,6 +9,22 @@
#include "wingdi.h"
#include "wine/wingdi16.h"
/* ### start build ### */
extern WORD CALLBACK DDA_CallTo16_word_wwl(LINEDDAPROC16,WORD,WORD,LONG);
/* ### stop build ### */
struct linedda16_info
{
LINEDDAPROC16 proc;
LPARAM param;
};
static void CALLBACK DDA_callback( INT x, INT y, LPARAM param )
{
const struct linedda16_info *info = (struct linedda16_info *)param;
DDA_CallTo16_word_wwl( info->proc, x, y, info->param );
}
/**********************************************************************
* LineDDA (GDI32.@)
@ -55,3 +71,16 @@ BOOL WINAPI LineDDA(INT nXStart, INT nYStart, INT nXEnd, INT nYEnd,
}
return TRUE;
}
/**********************************************************************
* LineDDA (GDI.100)
*/
void WINAPI LineDDA16( INT16 nXStart, INT16 nYStart, INT16 nXEnd,
INT16 nYEnd, LINEDDAPROC16 proc, LPARAM lParam )
{
struct linedda16_info info;
info.proc = proc;
info.param = lParam;
LineDDA( nXStart, nYStart, nXEnd, nYEnd, DDA_callback, (LPARAM)&info );
}

View File

@ -58,6 +58,10 @@ typedef struct
#define MFHEADERSIZE (sizeof(METAHEADER))
#define MFVERSION 0x300
/* ### start build ### */
extern WORD CALLBACK MF_CallTo16_word_wllwl(MFENUMPROC16,WORD,LONG,LONG,WORD,LONG);
/* ### stop build ### */
/******************************************************************
* MF_AddHandle
*
@ -614,9 +618,10 @@ BOOL16 WINAPI EnumMetaFile16( HDC16 hdc, HMETAFILE16 hmf,
while (offset < (mh->mtSize * 2))
{
mr = (METARECORD *)((char *)mh + offset);
if (!lpEnumFunc( hdc, (HANDLETABLE16 *)spht,
(METARECORD *)MAKESEGPTR( seg + (HIWORD(offset) << __AHSHIFT), LOWORD(offset) ),
mh->mtNoObjects, (LONG)lpData ))
if (!MF_CallTo16_word_wllwl( lpEnumFunc, hdc, spht,
MAKESEGPTR( seg + (HIWORD(offset) << __AHSHIFT), LOWORD(offset) ),
mh->mtNoObjects, (LONG)lpData ))
{
result = FALSE;
break;