Commit 9a8de13d authored by Alexandre Julliard's avatar Alexandre Julliard

Split out some 16-bit GDI code.

parent 0ccb9fea
......@@ -44,7 +44,6 @@ C_SRCS = \
enhmfdrv/mapping.c \
enhmfdrv/objects.c \
freetype.c \
gdi16.c \
gdi_main.c \
mfdrv/bitblt.c \
mfdrv/dc.c \
......@@ -59,11 +58,12 @@ C_SRCS = \
win16drv/init.c \
win16drv/objects.c \
win16drv/prtdrv.c \
win16drv/text.c \
wing.c
win16drv/text.c
C_SRCS16 = \
bidi16.c
bidi16.c \
gdi16.c \
wing.c
RC_SRCS = version.rc
RC_SRCS16 = version16.rc
......
......@@ -800,6 +800,19 @@ HRGN16 WINAPI CreateEllipticRgnIndirect16( const RECT16 *rect )
/***********************************************************************
* CreateFont (GDI.56)
*/
HFONT16 WINAPI CreateFont16(INT16 height, INT16 width, INT16 esc, INT16 orient,
INT16 weight, BYTE italic, BYTE underline,
BYTE strikeout, BYTE charset, BYTE outpres,
BYTE clippres, BYTE quality, BYTE pitch,
LPCSTR name )
{
return HFONT_16( CreateFontA( height, width, esc, orient, weight, italic, underline,
strikeout, charset, outpres, clippres, quality, pitch, name ));
}
/***********************************************************************
* CreateFontIndirect (GDI.57)
*/
HFONT16 WINAPI CreateFontIndirect16( const LOGFONT16 *plf16 )
......
......@@ -418,13 +418,10 @@ init MAIN_GdiInit
#
@ stdcall CloseJob16(long) CloseJob16
@ stdcall CloseMetaFile16(long) CloseMetaFile16
@ stdcall CreateMetaFile16(str) CreateMetaFile16
@ stdcall DeleteMetaFile16(long) DeleteMetaFile16
@ stdcall DrvGetPrinterData16(str str ptr ptr long ptr) DrvGetPrinterData16
@ stdcall DrvSetPrinterData16(str str long ptr long) DrvSetPrinterData16
@ stdcall ExcludeVisRect16(long long long long long) ExcludeVisRect16
@ stdcall GDIRealizePalette16(long) GDIRealizePalette16
@ stdcall GDISelectPalette16(long long long) GDISelectPalette16
@ stdcall GetDCState16(long) GetDCState16
@ stdcall InquireVisRgn16(long) InquireVisRgn16
@ stdcall IntersectVisRect16(long long long long long) IntersectVisRect16
......
......@@ -2234,7 +2234,7 @@ HGLOBAL16 WINAPI OleMetaFilePictFromIconAndLabel16(
) {
METAFILEPICT16 *mf;
HGLOBAL16 hmf;
HDC16 hdc;
HDC hdc;
FIXME("(%04x, '%s', '%s', %d): incorrect metrics, please try to correct them !\n\n\n", hIcon, lpszLabel, lpszSourceFile, iIconIndex);
......@@ -2249,15 +2249,15 @@ HGLOBAL16 WINAPI OleMetaFilePictFromIconAndLabel16(
return (HGLOBAL)NULL;
}
hdc = CreateMetaFile16(NULL);
DrawIcon(HDC_32(hdc), 0, 0, HICON_32(hIcon)); /* FIXME */
TextOutA(HDC_32(hdc), 0, 0, lpszLabel, 1); /* FIXME */
hdc = CreateMetaFileA(NULL);
DrawIcon(hdc, 0, 0, HICON_32(hIcon)); /* FIXME */
TextOutA(hdc, 0, 0, lpszLabel, 1); /* FIXME */
hmf = GlobalAlloc16(0, sizeof(METAFILEPICT16));
mf = (METAFILEPICT16 *)GlobalLock16(hmf);
mf->mm = MM_ANISOTROPIC;
mf->xExt = 20; /* FIXME: bogus */
mf->yExt = 20; /* dito */
mf->hMF = CloseMetaFile16(hdc);
mf->hMF = CloseMetaFile16(HDC_16(hdc));
return hmf;
}
......
......@@ -21,6 +21,7 @@
#include <stdlib.h>
#include "windef.h"
#include "wingdi.h"
#include "wownt32.h"
#include "wine/winuser16.h"
#include "gdi.h"
#include "wine/debug.h"
......@@ -131,7 +132,7 @@ INT16 WINAPI SelectVisRgn16( HDC16 hdc, HRGN16 hrgn )
dc->flags &= ~DC_DIRTY;
retval = CombineRgn16( dc->hVisRgn, hrgn, 0, RGN_COPY );
retval = CombineRgn( dc->hVisRgn, HRGN_32(hrgn), 0, RGN_COPY );
CLIPPING_UpdateGCRegion( dc );
GDI_ReleaseObj( hdc );
return retval;
......
......@@ -340,39 +340,6 @@ HFONT WINAPI CreateFontIndirectW( const LOGFONTW *plf )
return hFont;
}
/***********************************************************************
* CreateFont (GDI.56)
*/
HFONT16 WINAPI CreateFont16(INT16 height, INT16 width, INT16 esc, INT16 orient,
INT16 weight, BYTE italic, BYTE underline,
BYTE strikeout, BYTE charset, BYTE outpres,
BYTE clippres, BYTE quality, BYTE pitch,
LPCSTR name )
{
LOGFONT16 logfont;
logfont.lfHeight = height;
logfont.lfWidth = width;
logfont.lfEscapement = esc;
logfont.lfOrientation = orient;
logfont.lfWeight = weight;
logfont.lfItalic = italic;
logfont.lfUnderline = underline;
logfont.lfStrikeOut = strikeout;
logfont.lfCharSet = charset;
logfont.lfOutPrecision = outpres;
logfont.lfClipPrecision = clippres;
logfont.lfQuality = quality;
logfont.lfPitchAndFamily = pitch;
if (name)
lstrcpynA(logfont.lfFaceName,name,sizeof(logfont.lfFaceName));
else
logfont.lfFaceName[0] = '\0';
return CreateFontIndirect16( &logfont );
}
/*************************************************************************
* CreateFontA (GDI32.@)
*/
......
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