Commit 1c4b5c40 authored by Alexandre Julliard's avatar Alexandre Julliard

Moved a large number of 16-bit functions to a separate gdi16.c file.

parent 331bf3d7
......@@ -42,6 +42,7 @@ C_SRCS = \
enhmfdrv/mapping.c \
enhmfdrv/objects.c \
freetype.c \
gdi16.c \
gdi_main.c \
mfdrv/bitblt.c \
mfdrv/dc.c \
......
......@@ -122,14 +122,3 @@ LONG WINAPI GetHDCCharSet16(void) { FIXME("stub (no prototype)\n"); return 0; }
* BiDiLayoutEx (GDI.573)
*/
LONG WINAPI BiDiLayoutEx16(void) { FIXME("stub (no prototype)\n"); return 0; }
/***********************************************************************
* SetLayout (GDI.1000)
*
* Sets left->right or right->left text layout flags of a dc.
*/
BOOL16 WINAPI SetLayout16( HDC16 hdc, DWORD layout )
{
FIXME( "( %04hx, %08lx ): No BiDi16\n", hdc, layout );
return SetLayout( hdc, layout );
}
......@@ -202,13 +202,13 @@ HFONT EMFDRV_SelectFont( PHYSDEV dev, HFONT hFont )
goto found;
}
}
if (!(index = EMFDRV_CreateFontIndirect(dev, hFont ))) return GDI_ERROR;
if (!(index = EMFDRV_CreateFontIndirect(dev, hFont ))) return HGDI_ERROR;
found:
emr.emr.iType = EMR_SELECTOBJECT;
emr.emr.nSize = sizeof(emr);
emr.ihObject = index;
if(!EMFDRV_WriteRecord( dev, &emr.emr ))
return GDI_ERROR;
return HGDI_ERROR;
return 0;
}
......
......@@ -23,24 +23,19 @@ rsrc version16.res
20 pascal MoveTo(word s_word s_word) MoveTo16
21 pascal16 ExcludeClipRect(word s_word s_word s_word s_word) ExcludeClipRect16
22 pascal16 IntersectClipRect(word s_word s_word s_word s_word) IntersectClipRect16
23 pascal16 Arc(word s_word s_word s_word s_word s_word s_word s_word s_word)
Arc16
23 pascal16 Arc(word s_word s_word s_word s_word s_word s_word s_word s_word) Arc16
24 pascal16 Ellipse(word s_word s_word s_word s_word) Ellipse16
25 pascal16 FloodFill(word s_word s_word long) FloodFill16
26 pascal16 Pie(word s_word s_word s_word s_word s_word s_word s_word s_word)
Pie16
26 pascal16 Pie(word s_word s_word s_word s_word s_word s_word s_word s_word) Pie16
27 pascal16 Rectangle(word s_word s_word s_word s_word) Rectangle16
28 pascal16 RoundRect(word s_word s_word s_word s_word s_word s_word)
RoundRect16
28 pascal16 RoundRect(word s_word s_word s_word s_word s_word s_word) RoundRect16
29 pascal16 PatBlt(word s_word s_word s_word s_word long) PatBlt16
30 pascal16 SaveDC(word) SaveDC16
31 pascal SetPixel(word s_word s_word long) SetPixel16
32 pascal16 OffsetClipRgn(word s_word s_word) OffsetClipRgn16
33 pascal16 TextOut(word s_word s_word str word) TextOut16
34 pascal16 BitBlt( word s_word s_word s_word s_word word s_word s_word long)
BitBlt16
35 pascal16 StretchBlt(word s_word s_word s_word s_word word s_word s_word
s_word s_word long) StretchBlt16
34 pascal16 BitBlt( word s_word s_word s_word s_word word s_word s_word long) BitBlt16
35 pascal16 StretchBlt(word s_word s_word s_word s_word word s_word s_word s_word s_word long) StretchBlt16
36 pascal16 Polygon (word ptr word) Polygon16
37 pascal16 Polyline (word ptr word) Polyline16
38 pascal Escape(word word word segptr ptr) Escape16
......@@ -61,8 +56,7 @@ rsrc version16.res
53 pascal16 CreateDC(str str str ptr) CreateDC16
54 pascal16 CreateEllipticRgn(s_word s_word s_word s_word) CreateEllipticRgn16
55 pascal16 CreateEllipticRgnIndirect(ptr) CreateEllipticRgnIndirect16
56 pascal16 CreateFont(s_word s_word s_word s_word s_word word word word
word word word word word str) CreateFont16
56 pascal16 CreateFont(s_word s_word s_word s_word s_word word word word word word word word word str) CreateFont16
57 pascal16 CreateFontIndirect(ptr) CreateFontIndirect16
58 pascal16 CreateHatchBrush(word long) CreateHatchBrush16
#59 ??? (not even in W1.1, W2.0)
......@@ -104,8 +98,7 @@ rsrc version16.res
95 pascal GetViewportOrg(word) GetViewportOrg16
96 pascal GetWindowExt(word) GetWindowExt16
97 pascal GetWindowOrg(word) GetWindowOrg16
98 pascal16 IntersectVisRect(word s_word s_word s_word s_word)
IntersectVisRect16
98 pascal16 IntersectVisRect(word s_word s_word s_word s_word) IntersectVisRect16
99 pascal16 LPtoDP(word ptr s_word) LPtoDP16
100 pascal16 LineDDA(s_word s_word s_word s_word segptr long) LineDDA16
101 pascal16 OffsetRgn(word s_word s_word) OffsetRgn16
......@@ -185,7 +178,7 @@ rsrc version16.res
186 stub DELETEABOVELINEFONTS # W2.0 (only ?)
188 stub GetTextExtentEx
190 pascal16 SetDCHook(word segptr long) SetDCHook16
191 pascal GetDCHook(word ptr) GetDCHook
191 pascal GetDCHook(word ptr) GetDCHook16
192 pascal16 SetHookFlags(word word) SetHookFlags16
193 pascal16 SetBoundsRect(word ptr word) SetBoundsRect16
194 pascal16 GetBoundsRect(word ptr word) GetBoundsRect16
......@@ -260,8 +253,7 @@ rsrc version16.res
345 pascal16 GetTextAlign(word) GetTextAlign16
346 pascal16 SetTextAlign(word word) SetTextAlign16
347 stub MFDRAWTEXT # W2.0 (only ?)
348 pascal16 Chord(word s_word s_word s_word s_word s_word s_word
s_word s_word) Chord16
348 pascal16 Chord(word s_word s_word s_word s_word s_word s_word s_word s_word) Chord16
349 pascal SetMapperFlags(word long) SetMapperFlags16
350 pascal16 GetCharWidth(word word word ptr) GetCharWidth16
351 pascal16 ExtTextOut(word s_word s_word word ptr str word ptr) ExtTextOut16
......@@ -303,15 +295,12 @@ rsrc version16.res
410 pascal16 IsValidMetaFile (word) IsValidMetaFile16
411 pascal16 GetCurLogFont(word) GetCurLogFont16
412 pascal16 IsDCCurrentPalette(word) IsDCCurrentPalette16
439 pascal16 StretchDIBits (word s_word s_word s_word s_word s_word s_word
s_word s_word ptr ptr word long) StretchDIBits16
439 pascal16 StretchDIBits (word s_word s_word s_word s_word s_word s_word s_word s_word ptr ptr word long) StretchDIBits16
440 pascal16 SetDIBits(word word word word ptr ptr word) SetDIBits16
441 pascal16 GetDIBits(word word word word ptr ptr word) GetDIBits16
442 pascal16 CreateDIBitmap(word ptr long ptr ptr word) CreateDIBitmap16
443 pascal16 SetDIBitsToDevice(word s_word s_word s_word s_word s_word s_word
word word ptr ptr word) SetDIBitsToDevice16
444 pascal16 CreateRoundRectRgn(s_word s_word s_word s_word s_word s_word)
CreateRoundRectRgn16
443 pascal16 SetDIBitsToDevice(word s_word s_word s_word s_word s_word s_word word word ptr ptr word) SetDIBitsToDevice16
444 pascal16 CreateRoundRectRgn(s_word s_word s_word s_word s_word s_word) CreateRoundRectRgn16
445 pascal16 CreateDIBPatternBrush(word word) CreateDIBPatternBrush16
449 stub DEVICECOLORMATCH
450 pascal16 PolyPolygon(word ptr ptr word) PolyPolygon16
......@@ -341,10 +330,8 @@ rsrc version16.res
481 pascal16 SetWindowExtEx(word s_word s_word ptr) SetWindowExtEx16
482 pascal16 SetWindowOrgEx(word s_word s_word ptr) SetWindowOrgEx16
483 pascal16 MoveToEx(word s_word s_word ptr) MoveToEx16
484 pascal16 ScaleViewportExtEx(word s_word s_word s_word s_word ptr)
ScaleViewportExtEx16
485 pascal16 ScaleWindowExtEx(word s_word s_word s_word s_word ptr)
ScaleWindowExtEx16
484 pascal16 ScaleViewportExtEx(word s_word s_word s_word s_word ptr) ScaleViewportExtEx16
485 pascal16 ScaleWindowExtEx(word s_word s_word s_word s_word ptr) ScaleWindowExtEx16
486 pascal16 GetAspectRatioFilterEx(word ptr) GetAspectRatioFilterEx16
489 pascal16 CreateDIBSection(word ptr word ptr long long) CreateDIBSection16
490 stub CloseEnhMetafile
......
/*
* GDI 16-bit functions
*
* Copyright 2002 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "winbase.h"
#include "wingdi.h"
#include "wine/wingdi16.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gdi);
#define HGDIOBJ_32(handle16) ((HGDIOBJ)(ULONG_PTR)(handle16))
#define HGDIOBJ_16(handle32) ((HGDIOBJ16)(ULONG_PTR)(handle32))
#define HDC_32(hdc16) ((HDC)HGDIOBJ_32(hdc16))
#define HRGN_32(hrgn16) ((HRGN)HGDIOBJ_32(hrgn16))
#define HBRUSH_32(hbrush16) ((HBRUSH)HGDIOBJ_32(hbrush16))
#define HBITMAP_32(hbitmap16) ((HBITMAP)HGDIOBJ_32(hbitmap16))
#define HPALETTE_32(hpalette16) ((HPALETTE)HGDIOBJ_32(hpalette16))
#define HDC_16(hdc) ((HDC16)HGDIOBJ_16(hdc))
#define HPEN_16(hpen) ((HPEN16)HGDIOBJ_16(hpen))
#define HRGN_16(hrgn) ((HRGN16)HGDIOBJ_16(hrgn))
#define HFONT_16(hfont) ((HFONT16)HGDIOBJ_16(hfont))
#define HBRUSH_16(hbrush) ((HBRUSH16)HGDIOBJ_16(hbrush))
#define HBITMAP_16(hbitmap) ((HBITMAP16)HGDIOBJ_16(hbitmap))
#define HPALETTE_16(hpalette) ((HPALETTE16)HGDIOBJ_16(hpalette))
/* convert a LOGFONT16 to a LOGFONTW */
static void logfont_16_to_W( const LOGFONT16 *font16, LPLOGFONTW font32 )
{
font32->lfHeight = font16->lfHeight;
font32->lfWidth = font16->lfWidth;
font32->lfEscapement = font16->lfEscapement;
font32->lfOrientation = font16->lfOrientation;
font32->lfWeight = font16->lfWeight;
font32->lfItalic = font16->lfItalic;
font32->lfUnderline = font16->lfUnderline;
font32->lfStrikeOut = font16->lfStrikeOut;
font32->lfCharSet = font16->lfCharSet;
font32->lfOutPrecision = font16->lfOutPrecision;
font32->lfClipPrecision = font16->lfClipPrecision;
font32->lfQuality = font16->lfQuality;
font32->lfPitchAndFamily = font16->lfPitchAndFamily;
MultiByteToWideChar( CP_ACP, 0, font16->lfFaceName, -1, font32->lfFaceName, LF_FACESIZE );
font32->lfFaceName[LF_FACESIZE-1] = 0;
}
/***********************************************************************
* SetBkColor (GDI.1)
*/
COLORREF WINAPI SetBkColor16( HDC16 hdc, COLORREF color )
{
return SetBkColor( HDC_32(hdc), color );
}
/***********************************************************************
* SetBkMode (GDI.2)
*/
INT16 WINAPI SetBkMode16( HDC16 hdc, INT16 mode )
{
return SetBkMode( HDC_32(hdc), mode );
}
/***********************************************************************
* SetMapMode (GDI.3)
*/
INT16 WINAPI SetMapMode16( HDC16 hdc, INT16 mode )
{
return SetMapMode( HDC_32(hdc), mode );
}
/***********************************************************************
* SetROP2 (GDI.4)
*/
INT16 WINAPI SetROP216( HDC16 hdc, INT16 mode )
{
return SetROP2( HDC_32(hdc), mode );
}
/***********************************************************************
* SetRelAbs (GDI.5)
*/
INT16 WINAPI SetRelAbs16( HDC16 hdc, INT16 mode )
{
return SetRelAbs( HDC_32(hdc), mode );
}
/***********************************************************************
* SetPolyFillMode (GDI.6)
*/
INT16 WINAPI SetPolyFillMode16( HDC16 hdc, INT16 mode )
{
return SetPolyFillMode( HDC_32(hdc), mode );
}
/***********************************************************************
* SetStretchBltMode (GDI.7)
*/
INT16 WINAPI SetStretchBltMode16( HDC16 hdc, INT16 mode )
{
return SetStretchBltMode( HDC_32(hdc), mode );
}
/***********************************************************************
* SetTextCharacterExtra (GDI.8)
*/
INT16 WINAPI SetTextCharacterExtra16( HDC16 hdc, INT16 extra )
{
return SetTextCharacterExtra( HDC_32(hdc), extra );
}
/***********************************************************************
* SetTextColor (GDI.9)
*/
COLORREF WINAPI SetTextColor16( HDC16 hdc, COLORREF color )
{
return SetTextColor( HDC_32(hdc), color );
}
/***********************************************************************
* SetTextJustification (GDI.10)
*/
INT16 WINAPI SetTextJustification16( HDC16 hdc, INT16 extra, INT16 breaks )
{
return SetTextJustification( HDC_32(hdc), extra, breaks );
}
/***********************************************************************
* SetWindowOrg (GDI.11)
*/
DWORD WINAPI SetWindowOrg16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!SetWindowOrgEx( HDC_32(hdc), x, y, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* SetWindowExt (GDI.12)
*/
DWORD WINAPI SetWindowExt16( HDC16 hdc, INT16 x, INT16 y )
{
SIZE size;
if (!SetWindowExtEx( HDC_32(hdc), x, y, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* SetViewportOrg (GDI.13)
*/
DWORD WINAPI SetViewportOrg16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!SetViewportOrgEx( HDC_32(hdc), x, y, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* SetViewportExt (GDI.14)
*/
DWORD WINAPI SetViewportExt16( HDC16 hdc, INT16 x, INT16 y )
{
SIZE size;
if (!SetViewportExtEx( HDC_32(hdc), x, y, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* OffsetWindowOrg (GDI.15)
*/
DWORD WINAPI OffsetWindowOrg16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!OffsetWindowOrgEx( HDC_32(hdc), x, y, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* ScaleWindowExt (GDI.16)
*/
DWORD WINAPI ScaleWindowExt16( HDC16 hdc, INT16 xNum, INT16 xDenom,
INT16 yNum, INT16 yDenom )
{
SIZE size;
if (!ScaleWindowExtEx( HDC_32(hdc), xNum, xDenom, yNum, yDenom, &size ))
return FALSE;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* OffsetViewportOrg (GDI.17)
*/
DWORD WINAPI OffsetViewportOrg16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!OffsetViewportOrgEx( HDC_32(hdc), x, y, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* ScaleViewportExt (GDI.18)
*/
DWORD WINAPI ScaleViewportExt16( HDC16 hdc, INT16 xNum, INT16 xDenom,
INT16 yNum, INT16 yDenom )
{
SIZE size;
if (!ScaleViewportExtEx( HDC_32(hdc), xNum, xDenom, yNum, yDenom, &size ))
return FALSE;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* LineTo (GDI.19)
*/
BOOL16 WINAPI LineTo16( HDC16 hdc, INT16 x, INT16 y )
{
return LineTo( HDC_32(hdc), x, y );
}
/***********************************************************************
* MoveTo (GDI.20)
*/
DWORD WINAPI MoveTo16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!MoveToEx( HDC_32(hdc), x, y, &pt )) return 0;
return MAKELONG(pt.x,pt.y);
}
/***********************************************************************
* ExcludeClipRect (GDI.21)
*/
INT16 WINAPI ExcludeClipRect16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
return ExcludeClipRect( HDC_32(hdc), left, top, right, bottom );
}
/***********************************************************************
* IntersectClipRect (GDI.22)
*/
INT16 WINAPI IntersectClipRect16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
return IntersectClipRect( HDC_32(hdc), left, top, right, bottom );
}
/***********************************************************************
* Arc (GDI.23)
*/
BOOL16 WINAPI Arc16( HDC16 hdc, INT16 left, INT16 top, INT16 right,
INT16 bottom, INT16 xstart, INT16 ystart,
INT16 xend, INT16 yend )
{
return Arc( HDC_32(hdc), left, top, right, bottom, xstart, ystart, xend, yend );
}
/***********************************************************************
* Ellipse (GDI.24)
*/
BOOL16 WINAPI Ellipse16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
return Ellipse( HDC_32(hdc), left, top, right, bottom );
}
/**********************************************************************
* FloodFill (GDI.25)
*/
BOOL16 WINAPI FloodFill16( HDC16 hdc, INT16 x, INT16 y, COLORREF color )
{
return ExtFloodFill( HDC_32(hdc), x, y, color, FLOODFILLBORDER );
}
/***********************************************************************
* Pie (GDI.26)
*/
BOOL16 WINAPI Pie16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom, INT16 xstart, INT16 ystart,
INT16 xend, INT16 yend )
{
return Pie( HDC_32(hdc), left, top, right, bottom, xstart, ystart, xend, yend );
}
/***********************************************************************
* Rectangle (GDI.27)
*/
BOOL16 WINAPI Rectangle16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
return Rectangle( HDC_32(hdc), left, top, right, bottom );
}
/***********************************************************************
* RoundRect (GDI.28)
*/
BOOL16 WINAPI RoundRect16( HDC16 hdc, INT16 left, INT16 top, INT16 right,
INT16 bottom, INT16 ell_width, INT16 ell_height )
{
return RoundRect( HDC_32(hdc), left, top, right, bottom, ell_width, ell_height );
}
/***********************************************************************
* PatBlt (GDI.29)
*/
BOOL16 WINAPI PatBlt16( HDC16 hdc, INT16 left, INT16 top,
INT16 width, INT16 height, DWORD rop)
{
return PatBlt( HDC_32(hdc), left, top, width, height, rop );
}
/***********************************************************************
* SaveDC (GDI.30)
*/
INT16 WINAPI SaveDC16( HDC16 hdc )
{
return SaveDC( HDC_32(hdc) );
}
/***********************************************************************
* SetPixel (GDI.31)
*/
COLORREF WINAPI SetPixel16( HDC16 hdc, INT16 x, INT16 y, COLORREF color )
{
return SetPixel( HDC_32(hdc), x, y, color );
}
/***********************************************************************
* OffsetClipRgn (GDI.32)
*/
INT16 WINAPI OffsetClipRgn16( HDC16 hdc, INT16 x, INT16 y )
{
return OffsetClipRgn( HDC_32(hdc), x, y );
}
/***********************************************************************
* TextOut (GDI.33)
*/
BOOL16 WINAPI TextOut16( HDC16 hdc, INT16 x, INT16 y, LPCSTR str, INT16 count )
{
return TextOutA( HDC_32(hdc), x, y, str, count );
}
/***********************************************************************
* BitBlt (GDI.34)
*/
BOOL16 WINAPI BitBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst, INT16 width,
INT16 height, HDC16 hdcSrc, INT16 xSrc, INT16 ySrc,
DWORD rop )
{
return BitBlt( HDC_32(hdcDst), xDst, yDst, width, height, HDC_32(hdcSrc), xSrc, ySrc, rop );
}
/***********************************************************************
* StretchBlt (GDI.35)
*/
BOOL16 WINAPI StretchBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst,
INT16 widthDst, INT16 heightDst,
HDC16 hdcSrc, INT16 xSrc, INT16 ySrc,
INT16 widthSrc, INT16 heightSrc, DWORD rop )
{
return StretchBlt( HDC_32(hdcDst), xDst, yDst, widthDst, heightDst,
HDC_32(hdcSrc), xSrc, ySrc, widthSrc, heightSrc, rop );
}
/**********************************************************************
* Polygon (GDI.36)
*/
BOOL16 WINAPI Polygon16( HDC16 hdc, const POINT16* pt, INT16 count )
{
register int i;
BOOL ret;
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
count*sizeof(POINT) );
if (!pt32) return FALSE;
for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
ret = Polygon(HDC_32(hdc),pt32,count);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/**********************************************************************
* Polyline (GDI.37)
*/
BOOL16 WINAPI Polyline16( HDC16 hdc, const POINT16* pt, INT16 count )
{
register int i;
BOOL16 ret;
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
count*sizeof(POINT) );
if (!pt32) return FALSE;
for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
ret = Polyline(HDC_32(hdc),pt32,count);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/***********************************************************************
* Escape (GDI.38)
*/
INT16 WINAPI Escape16( HDC16 hdc, INT16 escape, INT16 in_count, SEGPTR in_data, LPVOID out_data )
{
INT ret;
switch(escape)
{
/* Escape(hdc,CLIP_TO_PATH,LPINT16,NULL) */
/* Escape(hdc,DRAFTMODE,LPINT16,NULL) */
/* Escape(hdc,ENUMPAPERBINS,LPINT16,LPSTR); */
/* Escape(hdc,EPSPRINTING,LPINT16,NULL) */
/* Escape(hdc,EXT_DEVICE_CAPS,LPINT16,LPDWORD) */
/* Escape(hdc,GETCOLORTABLE,LPINT16,LPDWORD) */
/* Escape(hdc,MOUSETRAILS,LPINT16,NULL) */
/* Escape(hdc,POSTSCRIPT_IGNORE,LPINT16,NULL) */
/* Escape(hdc,QUERYESCSUPPORT,LPINT16,NULL) */
/* Escape(hdc,SET_ARC_DIRECTION,LPINT16,NULL) */
/* Escape(hdc,SET_POLY_MODE,LPINT16,NULL) */
/* Escape(hdc,SET_SCREEN_ANGLE,LPINT16,NULL) */
/* Escape(hdc,SET_SPREAD,LPINT16,NULL) */
case CLIP_TO_PATH:
case DRAFTMODE:
case ENUMPAPERBINS:
case EPSPRINTING:
case EXT_DEVICE_CAPS:
case GETCOLORTABLE:
case MOUSETRAILS:
case POSTSCRIPT_IGNORE:
case QUERYESCSUPPORT:
case SET_ARC_DIRECTION:
case SET_POLY_MODE:
case SET_SCREEN_ANGLE:
case SET_SPREAD:
{
INT16 *ptr = MapSL(in_data);
INT data = *ptr;
return Escape( HDC_32(hdc), escape, sizeof(data), (LPCSTR)&data, out_data );
}
/* Escape(hdc,ENABLEDUPLEX,LPUINT16,NULL) */
case ENABLEDUPLEX:
{
UINT16 *ptr = MapSL(in_data);
UINT data = *ptr;
return Escape( HDC_32(hdc), escape, sizeof(data), (LPCSTR)&data, NULL );
}
/* Escape(hdc,GETPHYSPAGESIZE,NULL,LPPOINT16) */
/* Escape(hdc,GETPRINTINGOFFSET,NULL,LPPOINT16) */
/* Escape(hdc,GETSCALINGFACTOR,NULL,LPPOINT16) */
case GETPHYSPAGESIZE:
case GETPRINTINGOFFSET:
case GETSCALINGFACTOR:
{
POINT16 *ptr = out_data;
POINT pt32;
ret = Escape( HDC_32(hdc), escape, 0, NULL, &pt32 );
ptr->x = pt32.x;
ptr->y = pt32.y;
return ret;
}
/* Escape(hdc,ENABLEPAIRKERNING,LPINT16,LPINT16); */
/* Escape(hdc,ENABLERELATIVEWIDTHS,LPINT16,LPINT16); */
/* Escape(hdc,SETCOPYCOUNT,LPINT16,LPINT16) */
/* Escape(hdc,SETKERNTRACK,LPINT16,LPINT16) */
/* Escape(hdc,SETLINECAP,LPINT16,LPINT16) */
/* Escape(hdc,SETLINEJOIN,LPINT16,LPINT16) */
/* Escape(hdc,SETMITERLIMIT,LPINT16,LPINT16) */
case ENABLEPAIRKERNING:
case ENABLERELATIVEWIDTHS:
case SETCOPYCOUNT:
case SETKERNTRACK:
case SETLINECAP:
case SETLINEJOIN:
case SETMITERLIMIT:
{
INT16 *new = MapSL(in_data);
INT16 *old = out_data;
INT out, in = *new;
ret = Escape( HDC_32(hdc), escape, sizeof(in), (LPCSTR)&in, &out );
*old = out;
return ret;
}
/* Escape(hdc,SETABORTPROC,ABORTPROC,NULL); */
case SETABORTPROC:
return SetAbortProc16( hdc, (ABORTPROC16)in_data );
/* Escape(hdc,STARTDOC,LPSTR,LPDOCINFO16);
* lpvOutData is actually a pointer to the DocInfo structure and used as
* a second input parameter */
case STARTDOC:
if (out_data)
{
ret = StartDoc16( hdc, out_data );
if (ret > 0) ret = StartPage( HDC_32(hdc) );
return ret;
}
return Escape( HDC_32(hdc), escape, in_count, MapSL(in_data), NULL );
/* Escape(hdc,SET_BOUNDS,LPRECT16,NULL); */
/* Escape(hdc,SET_CLIP_BOX,LPRECT16,NULL); */
case SET_BOUNDS:
case SET_CLIP_BOX:
{
RECT16 *rc16 = MapSL(in_data);
RECT rc;
rc.left = rc16->left;
rc.top = rc16->top;
rc.right = rc16->right;
rc.bottom = rc16->bottom;
return Escape( HDC_32(hdc), escape, sizeof(rc), (LPCSTR)&rc, NULL );
}
/* Escape(hdc,NEXTBAND,NULL,LPRECT16); */
case NEXTBAND:
{
RECT rc;
RECT16 *rc16 = out_data;
ret = Escape( HDC_32(hdc), escape, 0, NULL, &rc );
rc16->left = rc.left;
rc16->top = rc.top;
rc16->right = rc.right;
rc16->bottom = rc.bottom;
return ret;
}
/* Escape(hdc,ABORTDOC,NULL,NULL); */
/* Escape(hdc,BANDINFO,BANDINFOSTRUCT*,BANDINFOSTRUCT*); */
/* Escape(hdc,BEGIN_PATH,NULL,NULL); */
/* Escape(hdc,DRAWPATTERNRECT,PRECT_STRUCT*,NULL); */
/* Escape(hdc,ENDDOC,NULL,NULL); */
/* Escape(hdc,END_PATH,PATHINFO,NULL); */
/* Escape(hdc,EXTTEXTOUT,EXTTEXT_STRUCT*,NULL); */
/* Escape(hdc,FLUSHOUTPUT,NULL,NULL); */
/* Escape(hdc,GETFACENAME,NULL,LPSTR); */
/* Escape(hdc,GETPAIRKERNTABLE,NULL,KERNPAIR*); */
/* Escape(hdc,GETSETPAPERBINS,BinInfo*,BinInfo*); */
/* Escape(hdc,GETSETPRINTORIENT,ORIENT*,NULL); */
/* Escape(hdc,GETSETSCREENPARAMS,SCREENPARAMS*,SCREENPARAMS*); */
/* Escape(hdc,GETTECHNOLOGY,NULL,LPSTR); */
/* Escape(hdc,GETTRACKKERNTABLE,NULL,KERNTRACK*); */
/* Escape(hdc,MFCOMMENT,LPSTR,NULL); */
/* Escape(hdc,NEWFRAME,NULL,NULL); */
/* Escape(hdc,PASSTHROUGH,LPSTR,NULL); */
/* Escape(hdc,RESTORE_CTM,NULL,NULL); */
/* Escape(hdc,SAVE_CTM,NULL,NULL); */
/* Escape(hdc,SETALLJUSTVALUES,EXTTEXTDATA*,NULL); */
/* Escape(hdc,SETCOLORTABLE,COLORTABLE_STRUCT*,LPDWORD); */
/* Escape(hdc,SET_BACKGROUND_COLOR,LPDWORD,LPDWORD); */
/* Escape(hdc,TRANSFORM_CTM,LPSTR,NULL); */
case ABORTDOC:
case BANDINFO:
case BEGIN_PATH:
case DRAWPATTERNRECT:
case ENDDOC:
case END_PATH:
case EXTTEXTOUT:
case FLUSHOUTPUT:
case GETFACENAME:
case GETPAIRKERNTABLE:
case GETSETPAPERBINS:
case GETSETPRINTORIENT:
case GETSETSCREENPARAMS:
case GETTECHNOLOGY:
case GETTRACKKERNTABLE:
case MFCOMMENT:
case NEWFRAME:
case PASSTHROUGH:
case RESTORE_CTM:
case SAVE_CTM:
case SETALLJUSTVALUES:
case SETCOLORTABLE:
case SET_BACKGROUND_COLOR:
case TRANSFORM_CTM:
/* pass it unmodified to the 32-bit function */
return Escape( HDC_32(hdc), escape, in_count, MapSL(in_data), out_data );
/* Escape(hdc,ENUMPAPERMETRICS,LPINT16,LPRECT16); */
/* Escape(hdc,GETEXTENDEDTEXTMETRICS,LPUINT16,EXTTEXTMETRIC*); */
/* Escape(hdc,GETEXTENTTABLE,LPSTR,LPINT16); */
/* Escape(hdc,GETSETPAPERMETRICS,LPRECT16,LPRECT16); */
/* Escape(hdc,GETVECTORBRUSHSIZE,LPLOGBRUSH16,LPPOINT16); */
/* Escape(hdc,GETVECTORPENSIZE,LPLOGPEN16,LPPOINT16); */
case ENUMPAPERMETRICS:
case GETEXTENDEDTEXTMETRICS:
case GETEXTENTTABLE:
case GETSETPAPERMETRICS:
case GETVECTORBRUSHSIZE:
case GETVECTORPENSIZE:
default:
FIXME("unknown/unsupported 16-bit escape %x (%d,%p,%p\n",
escape, in_count, MapSL(in_data), out_data );
return Escape( HDC_32(hdc), escape, in_count, MapSL(in_data), out_data );
}
}
/***********************************************************************
* RestoreDC (GDI.39)
*/
BOOL16 WINAPI RestoreDC16( HDC16 hdc, INT16 level )
{
return RestoreDC( HDC_32(hdc), level );
}
/***********************************************************************
* FillRgn (GDI.40)
*/
BOOL16 WINAPI FillRgn16( HDC16 hdc, HRGN16 hrgn, HBRUSH16 hbrush )
{
return FillRgn( HDC_32(hdc), HRGN_32(hrgn), HBRUSH_32(hbrush) );
}
/***********************************************************************
* FrameRgn (GDI.41)
*/
BOOL16 WINAPI FrameRgn16( HDC16 hdc, HRGN16 hrgn, HBRUSH16 hbrush,
INT16 nWidth, INT16 nHeight )
{
return FrameRgn( HDC_32(hdc), HRGN_32(hrgn), HBRUSH_32(hbrush), nWidth, nHeight );
}
/***********************************************************************
* InvertRgn (GDI.42)
*/
BOOL16 WINAPI InvertRgn16( HDC16 hdc, HRGN16 hrgn )
{
return InvertRgn( HDC_32(hdc), HRGN_32(hrgn) );
}
/***********************************************************************
* PaintRgn (GDI.43)
*/
BOOL16 WINAPI PaintRgn16( HDC16 hdc, HRGN16 hrgn )
{
return PaintRgn( HDC_32(hdc), HRGN_32(hrgn) );
}
/***********************************************************************
* SelectClipRgn (GDI.44)
*/
INT16 WINAPI SelectClipRgn16( HDC16 hdc, HRGN16 hrgn )
{
return SelectClipRgn( HDC_32(hdc), HRGN_32(hrgn) );
}
/***********************************************************************
* SelectObject (GDI.45)
*/
HGDIOBJ16 WINAPI SelectObject16( HDC16 hdc, HGDIOBJ16 handle )
{
return HGDIOBJ_16( SelectObject( HDC_32(hdc), HGDIOBJ_32(handle) ) );
}
/***********************************************************************
* CombineRgn (GDI.47)
*/
INT16 WINAPI CombineRgn16(HRGN16 hDest, HRGN16 hSrc1, HRGN16 hSrc2, INT16 mode)
{
return CombineRgn( HRGN_32(hDest), HRGN_32(hSrc1), HRGN_32(hSrc2), mode );
}
/***********************************************************************
* CreateBitmap (GDI.48)
*/
HBITMAP16 WINAPI CreateBitmap16( INT16 width, INT16 height, UINT16 planes,
UINT16 bpp, LPCVOID bits )
{
return HBITMAP_16( CreateBitmap( width, height, planes, bpp, bits ) );
}
/***********************************************************************
* CreateBitmapIndirect (GDI.49)
*/
HBITMAP16 WINAPI CreateBitmapIndirect16( const BITMAP16 * bmp )
{
return CreateBitmap16( bmp->bmWidth, bmp->bmHeight, bmp->bmPlanes,
bmp->bmBitsPixel, MapSL( bmp->bmBits ) );
}
/***********************************************************************
* CreateCompatibleBitmap (GDI.51)
*/
HBITMAP16 WINAPI CreateCompatibleBitmap16( HDC16 hdc, INT16 width, INT16 height )
{
return HBITMAP_16( CreateCompatibleBitmap( HDC_32(hdc), width, height ) );
}
/***********************************************************************
* CreateCompatibleDC (GDI.52)
*/
HDC16 WINAPI CreateCompatibleDC16( HDC16 hdc )
{
return HDC_16( CreateCompatibleDC( HDC_32(hdc) ) );
}
/***********************************************************************
* CreateDC (GDI.53)
*/
HDC16 WINAPI CreateDC16( LPCSTR driver, LPCSTR device, LPCSTR output,
const DEVMODEA *initData )
{
return HDC_16( CreateDCA( driver, device, output, initData ) );
}
/***********************************************************************
* CreateEllipticRgn (GDI.54)
*/
HRGN16 WINAPI CreateEllipticRgn16( INT16 left, INT16 top, INT16 right, INT16 bottom )
{
return HRGN_16( CreateEllipticRgn( left, top, right, bottom ) );
}
/***********************************************************************
* CreateEllipticRgnIndirect (GDI.55)
*/
HRGN16 WINAPI CreateEllipticRgnIndirect16( const RECT16 *rect )
{
return HRGN_16( CreateEllipticRgn( rect->left, rect->top, rect->right, rect->bottom ) );
}
/***********************************************************************
* CreateFontIndirect (GDI.57)
*/
HFONT16 WINAPI CreateFontIndirect16( const LOGFONT16 *plf16 )
{
HFONT ret;
if (plf16)
{
LOGFONTW lfW;
logfont_16_to_W( plf16, &lfW );
ret = CreateFontIndirectW( &lfW );
}
else ret = CreateFontIndirectW( NULL );
return HFONT_16(ret);
}
/***********************************************************************
* CreateHatchBrush (GDI.58)
*/
HBRUSH16 WINAPI CreateHatchBrush16( INT16 style, COLORREF color )
{
return HBRUSH_16( CreateHatchBrush( style, color ) );
}
/***********************************************************************
* CreatePatternBrush (GDI.60)
*/
HBRUSH16 WINAPI CreatePatternBrush16( HBITMAP16 hbitmap )
{
return HBRUSH_16( CreatePatternBrush( HBITMAP_32(hbitmap) ));
}
/***********************************************************************
* CreatePen (GDI.61)
*/
HPEN16 WINAPI CreatePen16( INT16 style, INT16 width, COLORREF color )
{
LOGPEN logpen;
logpen.lopnStyle = style;
logpen.lopnWidth.x = width;
logpen.lopnWidth.y = 0;
logpen.lopnColor = color;
return HPEN_16( CreatePenIndirect( &logpen ) );
}
/***********************************************************************
* CreatePenIndirect (GDI.62)
*/
HPEN16 WINAPI CreatePenIndirect16( const LOGPEN16 * pen )
{
LOGPEN logpen;
if (pen->lopnStyle > PS_INSIDEFRAME) return 0;
logpen.lopnStyle = pen->lopnStyle;
logpen.lopnWidth.x = pen->lopnWidth.x;
logpen.lopnWidth.y = pen->lopnWidth.y;
logpen.lopnColor = pen->lopnColor;
return HPEN_16( CreatePenIndirect( &logpen ) );
}
/***********************************************************************
* CreatePolygonRgn (GDI.63)
*/
HRGN16 WINAPI CreatePolygonRgn16( const POINT16 * points, INT16 count, INT16 mode )
{
return CreatePolyPolygonRgn16( points, &count, 1, mode );
}
/***********************************************************************
* CreateRectRgn (GDI.64)
*
* NOTE: cf. SetRectRgn16
*/
HRGN16 WINAPI CreateRectRgn16( INT16 left, INT16 top, INT16 right, INT16 bottom )
{
HRGN hrgn;
if (left < right) hrgn = CreateRectRgn( left, top, right, bottom );
else hrgn = CreateRectRgn( 0, 0, 0, 0 );
return HRGN_16(hrgn);
}
/***********************************************************************
* CreateRectRgnIndirect (GDI.65)
*/
HRGN16 WINAPI CreateRectRgnIndirect16( const RECT16* rect )
{
return CreateRectRgn16( rect->left, rect->top, rect->right, rect->bottom );
}
/***********************************************************************
* CreateSolidBrush (GDI.66)
*/
HBRUSH16 WINAPI CreateSolidBrush16( COLORREF color )
{
return HBRUSH_16( CreateSolidBrush( color ) );
}
/***********************************************************************
* DeleteDC (GDI.68)
*/
BOOL16 WINAPI DeleteDC16( HDC16 hdc )
{
return DeleteDC( HDC_32(hdc) );
}
/***********************************************************************
* DeleteObject (GDI.69)
* SysDeleteObject (GDI.605)
*/
BOOL16 WINAPI DeleteObject16( HGDIOBJ16 obj )
{
return DeleteObject( HGDIOBJ_32(obj) );
}
/***********************************************************************
* EqualRgn (GDI.72)
*/
BOOL16 WINAPI EqualRgn16( HRGN16 rgn1, HRGN16 rgn2 )
{
return EqualRgn( HRGN_32(rgn1), HRGN_32(rgn2) );
}
/***********************************************************************
* GetBitmapBits (GDI.74)
*/
LONG WINAPI GetBitmapBits16( HBITMAP16 hbitmap, LONG count, LPVOID buffer )
{
return GetBitmapBits( HBITMAP_32(hbitmap), count, buffer );
}
/***********************************************************************
* GetBkColor (GDI.75)
*/
COLORREF WINAPI GetBkColor16( HDC16 hdc )
{
return GetBkColor( HDC_32(hdc) );
}
/***********************************************************************
* GetBkMode (GDI.76)
*/
INT16 WINAPI GetBkMode16( HDC16 hdc )
{
return GetBkMode( HDC_32(hdc) );
}
/***********************************************************************
* GetClipBox (GDI.77)
*/
INT16 WINAPI GetClipBox16( HDC16 hdc, LPRECT16 rect )
{
RECT rect32;
INT ret = GetClipBox( HDC_32(hdc), &rect32 );
if (ret != ERROR)
{
rect->left = rect32.left;
rect->top = rect32.top;
rect->right = rect32.right;
rect->bottom = rect32.bottom;
}
return ret;
}
/***********************************************************************
* GetCurrentPosition (GDI.78)
*/
DWORD WINAPI GetCurrentPosition16( HDC16 hdc )
{
POINT pt32;
if (!GetCurrentPositionEx( HDC_32(hdc), &pt32 )) return 0;
return MAKELONG( pt32.x, pt32.y );
}
/***********************************************************************
* GetDCOrg (GDI.79)
*/
DWORD WINAPI GetDCOrg16( HDC16 hdc )
{
POINT pt;
if (GetDCOrgEx( HDC_32(hdc), &pt )) return MAKELONG( pt.x, pt.y );
return 0;
}
/***********************************************************************
* GetDeviceCaps (GDI.80)
*/
INT16 WINAPI GetDeviceCaps16( HDC16 hdc, INT16 cap )
{
INT16 ret = GetDeviceCaps( HDC_32(hdc), cap );
/* some apps don't expect -1 and think it's a B&W screen */
if ((cap == NUMCOLORS) && (ret == -1)) ret = 2048;
return ret;
}
/***********************************************************************
* GetMapMode (GDI.81)
*/
INT16 WINAPI GetMapMode16( HDC16 hdc )
{
return GetMapMode( HDC_32(hdc) );
}
/***********************************************************************
* GetPixel (GDI.83)
*/
COLORREF WINAPI GetPixel16( HDC16 hdc, INT16 x, INT16 y )
{
return GetPixel( HDC_32(hdc), x, y );
}
/***********************************************************************
* GetPolyFillMode (GDI.84)
*/
INT16 WINAPI GetPolyFillMode16( HDC16 hdc )
{
return GetPolyFillMode( HDC_32(hdc) );
}
/***********************************************************************
* GetROP2 (GDI.85)
*/
INT16 WINAPI GetROP216( HDC16 hdc )
{
return GetROP2( HDC_32(hdc) );
}
/***********************************************************************
* GetRelAbs (GDI.86)
*/
INT16 WINAPI GetRelAbs16( HDC16 hdc )
{
return GetRelAbs( HDC_32(hdc), 0 );
}
/***********************************************************************
* GetStockObject (GDI.87)
*/
HGDIOBJ16 WINAPI GetStockObject16( INT16 obj )
{
return HGDIOBJ_16( GetStockObject( obj ) );
}
/***********************************************************************
* GetStretchBltMode (GDI.88)
*/
INT16 WINAPI GetStretchBltMode16( HDC16 hdc )
{
return GetStretchBltMode( HDC_32(hdc) );
}
/***********************************************************************
* GetTextCharacterExtra (GDI.89)
*/
INT16 WINAPI GetTextCharacterExtra16( HDC16 hdc )
{
return GetTextCharacterExtra( HDC_32(hdc) );
}
/***********************************************************************
* GetTextColor (GDI.90)
*/
COLORREF WINAPI GetTextColor16( HDC16 hdc )
{
return GetTextColor( HDC_32(hdc) );
}
/***********************************************************************
* GetTextExtent (GDI.91)
*/
DWORD WINAPI GetTextExtent16( HDC16 hdc, LPCSTR str, INT16 count )
{
SIZE size;
if (!GetTextExtentPoint32A( HDC_32(hdc), str, count, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* GetTextFace (GDI.92)
*/
INT16 WINAPI GetTextFace16( HDC16 hdc, INT16 count, LPSTR name )
{
return GetTextFaceA( HDC_32(hdc), count, name );
}
/***********************************************************************
* GetTextMetrics (GDI.93)
*/
BOOL16 WINAPI GetTextMetrics16( HDC16 hdc, TEXTMETRIC16 *tm )
{
TEXTMETRICW tm32;
if (!GetTextMetricsW( HDC_32(hdc), &tm32 )) return FALSE;
tm->tmHeight = tm32.tmHeight;
tm->tmAscent = tm32.tmAscent;
tm->tmDescent = tm32.tmDescent;
tm->tmInternalLeading = tm32.tmInternalLeading;
tm->tmExternalLeading = tm32.tmExternalLeading;
tm->tmAveCharWidth = tm32.tmAveCharWidth;
tm->tmMaxCharWidth = tm32.tmMaxCharWidth;
tm->tmWeight = tm32.tmWeight;
tm->tmOverhang = tm32.tmOverhang;
tm->tmDigitizedAspectX = tm32.tmDigitizedAspectX;
tm->tmDigitizedAspectY = tm32.tmDigitizedAspectY;
tm->tmFirstChar = tm32.tmFirstChar;
tm->tmLastChar = tm32.tmLastChar;
tm->tmDefaultChar = tm32.tmDefaultChar;
tm->tmBreakChar = tm32.tmBreakChar;
tm->tmItalic = tm32.tmItalic;
tm->tmUnderlined = tm32.tmUnderlined;
tm->tmStruckOut = tm32.tmStruckOut;
tm->tmPitchAndFamily = tm32.tmPitchAndFamily;
tm->tmCharSet = tm32.tmCharSet;
return TRUE;
}
/***********************************************************************
* GetViewportExt (GDI.94)
*/
DWORD WINAPI GetViewportExt16( HDC16 hdc )
{
SIZE size;
if (!GetViewportExtEx( HDC_32(hdc), &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* GetViewportOrg (GDI.95)
*/
DWORD WINAPI GetViewportOrg16( HDC16 hdc )
{
POINT pt;
if (!GetViewportOrgEx( HDC_32(hdc), &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* GetWindowExt (GDI.96)
*/
DWORD WINAPI GetWindowExt16( HDC16 hdc )
{
SIZE size;
if (!GetWindowExtEx( HDC_32(hdc), &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* GetWindowOrg (GDI.97)
*/
DWORD WINAPI GetWindowOrg16( HDC16 hdc )
{
POINT pt;
if (!GetWindowOrgEx( HDC_32(hdc), &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* OffsetRgn (GDI.101)
*/
INT16 WINAPI OffsetRgn16( HRGN16 hrgn, INT16 x, INT16 y )
{
return OffsetRgn( HRGN_32(hrgn), x, y );
}
/***********************************************************************
* PtVisible (GDI.103)
*/
BOOL16 WINAPI PtVisible16( HDC16 hdc, INT16 x, INT16 y )
{
return PtVisible( HDC_32(hdc), x, y );
}
/***********************************************************************
* SetBitmapBits (GDI.106)
*/
LONG WINAPI SetBitmapBits16( HBITMAP16 hbitmap, LONG count, LPCVOID buffer )
{
return SetBitmapBits( HBITMAP_32(hbitmap), count, buffer );
}
/***********************************************************************
* AddFontResource (GDI.119)
*/
INT16 WINAPI AddFontResource16( LPCSTR filename )
{
return AddFontResourceA( filename );
}
/***********************************************************************
* Death (GDI.121)
*
* Disables GDI, switches back to text mode.
* We don't have to do anything here,
* just let console support handle everything
*/
void WINAPI Death16(HDC16 hdc)
{
MESSAGE("Death(%04x) called. Application enters text mode...\n", hdc);
}
/***********************************************************************
* Resurrection (GDI.122)
*
* Restores GDI functionality
*/
void WINAPI Resurrection16(HDC16 hdc,
WORD w1, WORD w2, WORD w3, WORD w4, WORD w5, WORD w6)
{
MESSAGE("Resurrection(%04x, %04x, %04x, %04x, %04x, %04x, %04x) called. Application left text mode.\n",
hdc, w1, w2, w3, w4, w5, w6);
}
/**********************************************************************
* CreateMetaFile (GDI.125)
*/
HDC16 WINAPI CreateMetaFile16( LPCSTR filename )
{
return HDC_16( CreateMetaFileA( filename ) );
}
/***********************************************************************
* MulDiv (GDI.128)
*/
INT16 WINAPI MulDiv16( INT16 nMultiplicand, INT16 nMultiplier, INT16 nDivisor)
{
INT ret;
if (!nDivisor) return -32768;
/* We want to deal with a positive divisor to simplify the logic. */
if (nDivisor < 0)
{
nMultiplicand = - nMultiplicand;
nDivisor = -nDivisor;
}
/* If the result is positive, we "add" to round. else,
* we subtract to round. */
if ( ( (nMultiplicand < 0) && (nMultiplier < 0) ) ||
( (nMultiplicand >= 0) && (nMultiplier >= 0) ) )
ret = (((int)nMultiplicand * nMultiplier) + (nDivisor/2)) / nDivisor;
else
ret = (((int)nMultiplicand * nMultiplier) - (nDivisor/2)) / nDivisor;
if ((ret > 32767) || (ret < -32767)) return -32768;
return (INT16) ret;
}
/***********************************************************************
* GetRgnBox (GDI.134)
*/
INT16 WINAPI GetRgnBox16( HRGN16 hrgn, LPRECT16 rect )
{
RECT r;
INT16 ret = GetRgnBox( HRGN_32(hrgn), &r );
CONV_RECT32TO16( &r, rect );
return ret;
}
/***********************************************************************
* RemoveFontResource (GDI.136)
*/
BOOL16 WINAPI RemoveFontResource16( LPCSTR str )
{
return RemoveFontResourceA(str);
}
/***********************************************************************
* SetBrushOrg (GDI.148)
*/
DWORD WINAPI SetBrushOrg16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!SetBrushOrgEx( HDC_32(hdc), x, y, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* GetBrushOrg (GDI.149)
*/
DWORD WINAPI GetBrushOrg16( HDC16 hdc )
{
POINT pt;
if (!GetBrushOrgEx( HDC_32(hdc), &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* UnrealizeObject (GDI.150)
*/
BOOL16 WINAPI UnrealizeObject16( HGDIOBJ16 obj )
{
return UnrealizeObject( HGDIOBJ_32(obj) );
}
/***********************************************************************
* CreateIC (GDI.153)
*/
HDC16 WINAPI CreateIC16( LPCSTR driver, LPCSTR device, LPCSTR output,
const DEVMODEA* initData )
{
return HDC_16( CreateICA( driver, device, output, initData ) );
}
/***********************************************************************
* GetNearestColor (GDI.154)
*/
COLORREF WINAPI GetNearestColor16( HDC16 hdc, COLORREF color )
{
return GetNearestColor( HDC_32(hdc), color );
}
/***********************************************************************
* CreateDiscardableBitmap (GDI.156)
*/
HBITMAP16 WINAPI CreateDiscardableBitmap16( HDC16 hdc, INT16 width, INT16 height )
{
return HBITMAP_16( CreateDiscardableBitmap( HDC_32(hdc), width, height ) );
}
/***********************************************************************
* PtInRegion (GDI.161)
*/
BOOL16 WINAPI PtInRegion16( HRGN16 hrgn, INT16 x, INT16 y )
{
return PtInRegion( HRGN_32(hrgn), x, y );
}
/***********************************************************************
* GetBitmapDimension (GDI.162)
*/
DWORD WINAPI GetBitmapDimension16( HBITMAP16 hbitmap )
{
SIZE16 size;
if (!GetBitmapDimensionEx16( hbitmap, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* SetBitmapDimension (GDI.163)
*/
DWORD WINAPI SetBitmapDimension16( HBITMAP16 hbitmap, INT16 x, INT16 y )
{
SIZE16 size;
if (!SetBitmapDimensionEx16( hbitmap, x, y, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* SetRectRgn (GDI.172)
*
* NOTE: Win 3.1 sets region to empty if left > right
*/
void WINAPI SetRectRgn16( HRGN16 hrgn, INT16 left, INT16 top, INT16 right, INT16 bottom )
{
if (left < right) SetRectRgn( HRGN_32(hrgn), left, top, right, bottom );
else SetRectRgn( HRGN_32(hrgn), 0, 0, 0, 0 );
}
/***********************************************************************
* GetCharABCWidths (GDI.307)
*/
BOOL16 WINAPI GetCharABCWidths16( HDC16 hdc, UINT16 firstChar, UINT16 lastChar, LPABC16 abc )
{
BOOL ret;
UINT i;
LPABC abc32 = HeapAlloc( GetProcessHeap(), 0, sizeof(ABC) * (lastChar - firstChar + 1) );
if ((ret = GetCharABCWidthsA( HDC_32(hdc), firstChar, lastChar, abc32 )))
{
for (i = firstChar; i <= lastChar; i++)
{
abc[i-firstChar].abcA = abc32[i-firstChar].abcA;
abc[i-firstChar].abcB = abc32[i-firstChar].abcB;
abc[i-firstChar].abcC = abc32[i-firstChar].abcC;
}
}
HeapFree( GetProcessHeap(), 0, abc32 );
return ret;
}
/***********************************************************************
* CreateScalableFontResource (GDI.310)
*/
BOOL16 WINAPI CreateScalableFontResource16( UINT16 fHidden, LPCSTR lpszResourceFile,
LPCSTR fontFile, LPCSTR path )
{
return CreateScalableFontResourceA( fHidden, lpszResourceFile, fontFile, path );
}
/*************************************************************************
* GetFontData (GDI.311)
*
*/
DWORD WINAPI GetFontData16( HDC16 hdc, DWORD table, DWORD offset, LPVOID buffer, DWORD count )
{
return GetFontData( HDC_32(hdc), table, offset, buffer, count );
}
/*************************************************************************
* GetRasterizerCaps (GDI.313)
*/
BOOL16 WINAPI GetRasterizerCaps16( LPRASTERIZER_STATUS lprs, UINT16 cbNumBytes )
{
return GetRasterizerCaps( lprs, cbNumBytes );
}
/*************************************************************************
* GetKerningPairs (GDI.332)
*
*/
INT16 WINAPI GetKerningPairs16( HDC16 hdc, INT16 count, LPKERNINGPAIR16 pairs )
{
KERNINGPAIR *pairs32;
INT i, ret;
if (!count) return 0;
if (!(pairs32 = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*pairs32) ))) return 0;
if ((ret = GetKerningPairsA( HDC_32(hdc), count, pairs32 )))
{
for (i = 0; i < ret; i++)
{
pairs->wFirst = pairs32->wFirst;
pairs->wSecond = pairs32->wSecond;
pairs->iKernAmount = pairs32->iKernAmount;
}
}
HeapFree( GetProcessHeap(), 0, pairs32 );
return ret;
}
/***********************************************************************
* GetTextAlign (GDI.345)
*/
UINT16 WINAPI GetTextAlign16( HDC16 hdc )
{
return GetTextAlign( HDC_32(hdc) );
}
/***********************************************************************
* SetTextAlign (GDI.346)
*/
UINT16 WINAPI SetTextAlign16( HDC16 hdc, UINT16 align )
{
return SetTextAlign( HDC_32(hdc), align );
}
/***********************************************************************
* Chord (GDI.348)
*/
BOOL16 WINAPI Chord16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom, INT16 xstart, INT16 ystart,
INT16 xend, INT16 yend )
{
return Chord( HDC_32(hdc), left, top, right, bottom, xstart, ystart, xend, yend );
}
/***********************************************************************
* SetMapperFlags (GDI.349)
*/
DWORD WINAPI SetMapperFlags16( HDC16 hdc, DWORD flags )
{
return SetMapperFlags( HDC_32(hdc), flags );
}
/***********************************************************************
* GetCharWidth (GDI.350)
*/
BOOL16 WINAPI GetCharWidth16( HDC16 hdc, UINT16 firstChar, UINT16 lastChar, LPINT16 buffer )
{
BOOL retVal = FALSE;
if( firstChar != lastChar )
{
LPINT buf32 = HeapAlloc(GetProcessHeap(), 0, sizeof(INT)*(1 + (lastChar - firstChar)));
if( buf32 )
{
LPINT obuf32 = buf32;
int i;
retVal = GetCharWidth32A( HDC_32(hdc), firstChar, lastChar, buf32);
if (retVal)
{
for (i = firstChar; i <= lastChar; i++) *buffer++ = *buf32++;
}
HeapFree(GetProcessHeap(), 0, obuf32);
}
}
else /* happens quite often to warrant a special treatment */
{
INT chWidth;
retVal = GetCharWidth32A( HDC_32(hdc), firstChar, lastChar, &chWidth );
*buffer = chWidth;
}
return retVal;
}
/***********************************************************************
* ExtTextOut (GDI.351)
*/
BOOL16 WINAPI ExtTextOut16( HDC16 hdc, INT16 x, INT16 y, UINT16 flags,
const RECT16 *lprect, LPCSTR str, UINT16 count,
const INT16 *lpDx )
{
BOOL ret;
int i;
RECT rect32;
LPINT lpdx32 = NULL;
if (lpDx) {
lpdx32 = (LPINT)HeapAlloc( GetProcessHeap(),0, sizeof(INT)*count );
if(lpdx32 == NULL) return FALSE;
for (i=count;i--;) lpdx32[i]=lpDx[i];
}
if (lprect) CONV_RECT16TO32(lprect,&rect32);
ret = ExtTextOutA(HDC_32(hdc),x,y,flags,lprect?&rect32:NULL,str,count,lpdx32);
if (lpdx32) HeapFree( GetProcessHeap(), 0, lpdx32 );
return ret;
}
/***********************************************************************
* CreatePalette (GDI.360)
*/
HPALETTE16 WINAPI CreatePalette16( const LOGPALETTE* palette )
{
return HPALETTE_16( CreatePalette( palette ) );
}
/***********************************************************************
* GetPaletteEntries (GDI.363)
*/
UINT16 WINAPI GetPaletteEntries16( HPALETTE16 hpalette, UINT16 start,
UINT16 count, LPPALETTEENTRY entries )
{
return GetPaletteEntries( HPALETTE_32(hpalette), start, count, entries );
}
/***********************************************************************
* SetPaletteEntries (GDI.364)
*/
UINT16 WINAPI SetPaletteEntries16( HPALETTE16 hpalette, UINT16 start,
UINT16 count, const PALETTEENTRY *entries )
{
return SetPaletteEntries( HPALETTE_32(hpalette), start, count, entries );
}
/**********************************************************************
* UpdateColors (GDI.366)
*/
INT16 WINAPI UpdateColors16( HDC16 hdc )
{
UpdateColors( HDC_32(hdc) );
return TRUE;
}
/***********************************************************************
* AnimatePalette (GDI.367)
*/
void WINAPI AnimatePalette16( HPALETTE16 hpalette, UINT16 StartIndex,
UINT16 NumEntries, const PALETTEENTRY* PaletteColors)
{
AnimatePalette( HPALETTE_32(hpalette), StartIndex, NumEntries, PaletteColors );
}
/***********************************************************************
* ResizePalette (GDI.368)
*/
BOOL16 WINAPI ResizePalette16( HPALETTE16 hpalette, UINT16 cEntries )
{
return ResizePalette( HPALETTE_32(hpalette), cEntries );
}
/***********************************************************************
* GetNearestPaletteIndex (GDI.370)
*/
UINT16 WINAPI GetNearestPaletteIndex16( HPALETTE16 hpalette, COLORREF color )
{
return GetNearestPaletteIndex( HPALETTE_32(hpalette), color );
}
/**********************************************************************
* ExtFloodFill (GDI.372)
*/
BOOL16 WINAPI ExtFloodFill16( HDC16 hdc, INT16 x, INT16 y, COLORREF color,
UINT16 fillType )
{
return ExtFloodFill( HDC_32(hdc), x, y, color, fillType );
}
/***********************************************************************
* SetSystemPaletteUse (GDI.373)
*/
UINT16 WINAPI SetSystemPaletteUse16( HDC16 hdc, UINT16 use )
{
return SetSystemPaletteUse( HDC_32(hdc), use );
}
/***********************************************************************
* GetSystemPaletteUse (GDI.374)
*/
UINT16 WINAPI GetSystemPaletteUse16( HDC16 hdc )
{
return GetSystemPaletteUse( HDC_32(hdc) );
}
/***********************************************************************
* GetSystemPaletteEntries (GDI.375)
*/
UINT16 WINAPI GetSystemPaletteEntries16( HDC16 hdc, UINT16 start, UINT16 count,
LPPALETTEENTRY entries )
{
return GetSystemPaletteEntries( HDC_32(hdc), start, count, entries );
}
/***********************************************************************
* ResetDC (GDI.376)
*/
HDC16 WINAPI ResetDC16( HDC16 hdc, const DEVMODEA *devmode )
{
return HDC_16( ResetDCA(HDC_32(hdc), devmode) );
}
/******************************************************************
* StartDoc (GDI.377)
*/
INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
{
DOCINFOA docA;
docA.cbSize = lpdoc->cbSize;
docA.lpszDocName = MapSL(lpdoc->lpszDocName);
docA.lpszOutput = MapSL(lpdoc->lpszOutput);
if(lpdoc->cbSize > offsetof(DOCINFO16,lpszDatatype))
docA.lpszDatatype = MapSL(lpdoc->lpszDatatype);
else
docA.lpszDatatype = NULL;
if(lpdoc->cbSize > offsetof(DOCINFO16,fwType))
docA.fwType = lpdoc->fwType;
else
docA.fwType = 0;
return StartDocA( HDC_32(hdc), &docA );
}
/******************************************************************
* EndDoc (GDI.378)
*/
INT16 WINAPI EndDoc16( HDC16 hdc )
{
return EndDoc( HDC_32(hdc) );
}
/******************************************************************
* StartPage (GDI.379)
*/
INT16 WINAPI StartPage16( HDC16 hdc )
{
return StartPage( HDC_32(hdc) );
}
/******************************************************************
* EndPage (GDI.380)
*/
INT16 WINAPI EndPage16( HDC16 hdc )
{
return EndPage( HDC_32(hdc) );
}
/******************************************************************************
* AbortDoc (GDI.382)
*/
INT16 WINAPI AbortDoc16( HDC16 hdc )
{
return AbortDoc( HDC_32(hdc) );
}
/***********************************************************************
* FastWindowFrame (GDI.400)
*/
BOOL16 WINAPI FastWindowFrame16( HDC16 hdc, const RECT16 *rect,
INT16 width, INT16 height, DWORD rop )
{
HDC hdc32 = HDC_32(hdc);
HBRUSH hbrush = SelectObject( hdc32, GetStockObject( GRAY_BRUSH ) );
PatBlt( hdc32, rect->left, rect->top,
rect->right - rect->left - width, height, rop );
PatBlt( hdc32, rect->left, rect->top + height, width,
rect->bottom - rect->top - height, rop );
PatBlt( hdc32, rect->left + width, rect->bottom - 1,
rect->right - rect->left - width, -height, rop );
PatBlt( hdc32, rect->right - 1, rect->top, -width,
rect->bottom - rect->top - height, rop );
SelectObject( hdc32, hbrush );
return TRUE;
}
/***********************************************************************
* CreateUserBitmap (GDI.407)
*/
HBITMAP16 WINAPI CreateUserBitmap16( INT16 width, INT16 height, UINT16 planes,
UINT16 bpp, LPCVOID bits )
{
return CreateBitmap16( width, height, planes, bpp, bits );
}
/***********************************************************************
* CreateUserDiscardableBitmap (GDI.409)
*/
HBITMAP16 WINAPI CreateUserDiscardableBitmap16( WORD dummy, INT16 width, INT16 height )
{
HDC hdc = CreateDCA( "DISPLAY", NULL, NULL, NULL );
HBITMAP ret = CreateCompatibleBitmap( hdc, width, height );
DeleteDC( hdc );
return HBITMAP_16(ret);
}
/***********************************************************************
* GetCurLogFont (GDI.411)
*/
HFONT16 WINAPI GetCurLogFont16( HDC16 hdc )
{
return HFONT_16( GetCurrentObject( HDC_32(hdc), OBJ_FONT ) );
}
/***********************************************************************
* StretchDIBits (GDI.439)
*/
INT16 WINAPI StretchDIBits16( HDC16 hdc, INT16 xDst, INT16 yDst, INT16 widthDst,
INT16 heightDst, INT16 xSrc, INT16 ySrc, INT16 widthSrc,
INT16 heightSrc, const VOID *bits,
const BITMAPINFO *info, UINT16 wUsage, DWORD dwRop )
{
return StretchDIBits( HDC_32(hdc), xDst, yDst, widthDst, heightDst,
xSrc, ySrc, widthSrc, heightSrc, bits,
info, wUsage, dwRop );
}
/***********************************************************************
* SetDIBits (GDI.440)
*/
INT16 WINAPI SetDIBits16( HDC16 hdc, HBITMAP16 hbitmap, UINT16 startscan,
UINT16 lines, LPCVOID bits, const BITMAPINFO *info,
UINT16 coloruse )
{
return SetDIBits( HDC_32(hdc), HBITMAP_32(hbitmap), startscan, lines, bits, info, coloruse );
}
/***********************************************************************
* GetDIBits (GDI.441)
*/
INT16 WINAPI GetDIBits16( HDC16 hdc, HBITMAP16 hbitmap, UINT16 startscan,
UINT16 lines, LPVOID bits, BITMAPINFO * info,
UINT16 coloruse )
{
return GetDIBits( HDC_32(hdc), HBITMAP_32(hbitmap), startscan, lines, bits, info, coloruse );
}
/***********************************************************************
* CreateDIBitmap (GDI.442)
*/
HBITMAP16 WINAPI CreateDIBitmap16( HDC16 hdc, const BITMAPINFOHEADER * header,
DWORD init, LPCVOID bits, const BITMAPINFO * data,
UINT16 coloruse )
{
return HBITMAP_16( CreateDIBitmap( HDC_32(hdc), header, init, bits, data, coloruse ) );
}
/***********************************************************************
* SetDIBitsToDevice (GDI.443)
*/
INT16 WINAPI SetDIBitsToDevice16( HDC16 hdc, INT16 xDest, INT16 yDest, INT16 cx,
INT16 cy, INT16 xSrc, INT16 ySrc, UINT16 startscan,
UINT16 lines, LPCVOID bits, const BITMAPINFO *info,
UINT16 coloruse )
{
return SetDIBitsToDevice( HDC_32(hdc), xDest, yDest, cx, cy, xSrc, ySrc,
startscan, lines, bits, info, coloruse );
}
/***********************************************************************
* CreateRoundRectRgn (GDI.444)
*
* If either ellipse dimension is zero we call CreateRectRgn16 for its
* `special' behaviour. -ve ellipse dimensions can result in GPFs under win3.1
* we just let CreateRoundRectRgn convert them to +ve values.
*/
HRGN16 WINAPI CreateRoundRectRgn16( INT16 left, INT16 top, INT16 right, INT16 bottom,
INT16 ellipse_width, INT16 ellipse_height )
{
if( ellipse_width == 0 || ellipse_height == 0 )
return CreateRectRgn16( left, top, right, bottom );
else
return HRGN_16( CreateRoundRectRgn( left, top, right, bottom,
ellipse_width, ellipse_height ));
}
/**********************************************************************
* PolyPolygon (GDI.450)
*/
BOOL16 WINAPI PolyPolygon16( HDC16 hdc, const POINT16* pt, const INT16* counts,
UINT16 polygons )
{
int i,nrpts;
LPPOINT pt32;
LPINT counts32;
BOOL16 ret;
nrpts=0;
for (i=polygons;i--;)
nrpts+=counts[i];
pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0, sizeof(POINT)*nrpts);
if(pt32 == NULL) return FALSE;
for (i=nrpts;i--;)
CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
counts32 = (LPINT)HeapAlloc( GetProcessHeap(), 0, polygons*sizeof(INT) );
if(counts32 == NULL) {
HeapFree( GetProcessHeap(), 0, pt32 );
return FALSE;
}
for (i=polygons;i--;) counts32[i]=counts[i];
ret = PolyPolygon(HDC_32(hdc),pt32,counts32,polygons);
HeapFree( GetProcessHeap(), 0, counts32 );
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/***********************************************************************
* CreatePolyPolygonRgn (GDI.451)
*/
HRGN16 WINAPI CreatePolyPolygonRgn16( const POINT16 *points,
const INT16 *count, INT16 nbpolygons, INT16 mode )
{
HRGN hrgn;
int i, npts = 0;
INT *count32;
POINT *points32;
for (i = 0; i < nbpolygons; i++) npts += count[i];
points32 = HeapAlloc( GetProcessHeap(), 0, npts * sizeof(POINT) );
for (i = 0; i < npts; i++) CONV_POINT16TO32( &(points[i]), &(points32[i]) );
count32 = HeapAlloc( GetProcessHeap(), 0, nbpolygons * sizeof(INT) );
for (i = 0; i < nbpolygons; i++) count32[i] = count[i];
hrgn = CreatePolyPolygonRgn( points32, count32, nbpolygons, mode );
HeapFree( GetProcessHeap(), 0, count32 );
HeapFree( GetProcessHeap(), 0, points32 );
return HRGN_16(hrgn);
}
/***********************************************************************
* SetObjectOwner (GDI.461)
*/
void WINAPI SetObjectOwner16( HGDIOBJ16 handle, HANDLE16 owner )
{
/* Nothing to do */
}
/***********************************************************************
* RectVisible (GDI.465)
* RectVisibleOld (GDI.104)
*/
BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect16 )
{
RECT rect;
CONV_RECT16TO32( rect16, &rect );
return RectVisible( HDC_32(hdc), &rect );
}
/***********************************************************************
* RectInRegion (GDI.466)
* RectInRegionOld (GDI.181)
*/
BOOL16 WINAPI RectInRegion16( HRGN16 hrgn, const RECT16 *rect )
{
RECT r32;
CONV_RECT16TO32(rect, &r32);
return RectInRegion( HRGN_32(hrgn), &r32 );
}
/***********************************************************************
* GetBitmapDimensionEx (GDI.468)
*/
BOOL16 WINAPI GetBitmapDimensionEx16( HBITMAP16 hbitmap, LPSIZE16 size )
{
SIZE size32;
BOOL ret = GetBitmapDimensionEx( HBITMAP_32(hbitmap), &size32 );
if (ret)
{
size->cx = size32.cx;
size->cy = size32.cy;
}
return ret;
}
/***********************************************************************
* GetBrushOrgEx (GDI.469)
*/
BOOL16 WINAPI GetBrushOrgEx16( HDC16 hdc, LPPOINT16 pt )
{
POINT pt32;
if (!GetBrushOrgEx( HDC_32(hdc), &pt32 )) return FALSE;
pt->x = pt32.x;
pt->y = pt32.y;
return TRUE;
}
/***********************************************************************
* GetCurrentPositionEx (GDI.470)
*/
BOOL16 WINAPI GetCurrentPositionEx16( HDC16 hdc, LPPOINT16 pt )
{
POINT pt32;
if (!GetCurrentPositionEx( HDC_32(hdc), &pt32 )) return FALSE;
pt->x = pt32.x;
pt->y = pt32.y;
return TRUE;
}
/***********************************************************************
* GetTextExtentPoint (GDI.471)
*
* FIXME: Should this have a bug for compatibility?
* Original Windows versions of GetTextExtentPoint{A,W} have documented
* bugs (-> MSDN KB q147647.txt).
*/
BOOL16 WINAPI GetTextExtentPoint16( HDC16 hdc, LPCSTR str, INT16 count, LPSIZE16 size )
{
SIZE size32;
BOOL ret = GetTextExtentPoint32A( HDC_32(hdc), str, count, &size32 );
if (ret)
{
size->cx = size32.cx;
size->cy = size32.cy;
}
return ret;
}
/***********************************************************************
* GetViewportExtEx (GDI.472)
*/
BOOL16 WINAPI GetViewportExtEx16( HDC16 hdc, LPSIZE16 size )
{
SIZE size32;
if (!GetViewportExtEx( HDC_32(hdc), &size32 )) return FALSE;
size->cx = size32.cx;
size->cy = size32.cy;
return TRUE;
}
/***********************************************************************
* GetViewportOrgEx (GDI.473)
*/
BOOL16 WINAPI GetViewportOrgEx16( HDC16 hdc, LPPOINT16 pt )
{
POINT pt32;
if (!GetViewportOrgEx( HDC_32(hdc), &pt32 )) return FALSE;
pt->x = pt32.x;
pt->y = pt32.y;
return TRUE;
}
/***********************************************************************
* GetWindowExtEx (GDI.474)
*/
BOOL16 WINAPI GetWindowExtEx16( HDC16 hdc, LPSIZE16 size )
{
SIZE size32;
if (!GetWindowExtEx( HDC_32(hdc), &size32 )) return FALSE;
size->cx = size32.cx;
size->cy = size32.cy;
return TRUE;
}
/***********************************************************************
* GetWindowOrgEx (GDI.475)
*/
BOOL16 WINAPI GetWindowOrgEx16( HDC16 hdc, LPPOINT16 pt )
{
POINT pt32;
if (!GetWindowOrgEx( HDC_32(hdc), &pt32 )) return FALSE;
pt->x = pt32.x;
pt->y = pt32.y;
return TRUE;
}
/***********************************************************************
* OffsetViewportOrgEx (GDI.476)
*/
BOOL16 WINAPI OffsetViewportOrgEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt)
{
POINT pt32;
BOOL16 ret = OffsetViewportOrgEx( HDC_32(hdc), x, y, &pt32 );
if (pt) CONV_POINT32TO16( &pt32, pt );
return ret;
}
/***********************************************************************
* OffsetWindowOrgEx (GDI.477)
*/
BOOL16 WINAPI OffsetWindowOrgEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
{
POINT pt32;
BOOL16 ret = OffsetWindowOrgEx( HDC_32(hdc), x, y, &pt32 );
if (pt) CONV_POINT32TO16( &pt32, pt );
return ret;
}
/***********************************************************************
* SetBitmapDimensionEx (GDI.478)
*/
BOOL16 WINAPI SetBitmapDimensionEx16( HBITMAP16 hbitmap, INT16 x, INT16 y, LPSIZE16 prevSize )
{
SIZE size32;
BOOL ret = SetBitmapDimensionEx( HBITMAP_32(hbitmap), x, y, &size32 );
if (ret && prevSize)
{
prevSize->cx = size32.cx;
prevSize->cy = size32.cy;
}
return ret;
}
/***********************************************************************
* SetViewportExtEx (GDI.479)
*/
BOOL16 WINAPI SetViewportExtEx16( HDC16 hdc, INT16 x, INT16 y, LPSIZE16 size )
{
SIZE size32;
BOOL16 ret = SetViewportExtEx( HDC_32(hdc), x, y, &size32 );
if (size) { size->cx = size32.cx; size->cy = size32.cy; }
return ret;
}
/***********************************************************************
* SetViewportOrgEx (GDI.480)
*/
BOOL16 WINAPI SetViewportOrgEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
{
POINT pt32;
BOOL16 ret = SetViewportOrgEx( HDC_32(hdc), x, y, &pt32 );
if (pt) CONV_POINT32TO16( &pt32, pt );
return ret;
}
/***********************************************************************
* SetWindowExtEx (GDI.481)
*/
BOOL16 WINAPI SetWindowExtEx16( HDC16 hdc, INT16 x, INT16 y, LPSIZE16 size )
{
SIZE size32;
BOOL16 ret = SetWindowExtEx( HDC_32(hdc), x, y, &size32 );
if (size) { size->cx = size32.cx; size->cy = size32.cy; }
return ret;
}
/***********************************************************************
* SetWindowOrgEx (GDI.482)
*/
BOOL16 WINAPI SetWindowOrgEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
{
POINT pt32;
BOOL16 ret = SetWindowOrgEx( HDC_32(hdc), x, y, &pt32 );
if (pt) CONV_POINT32TO16( &pt32, pt );
return ret;
}
/***********************************************************************
* MoveToEx (GDI.483)
*/
BOOL16 WINAPI MoveToEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
{
POINT pt32;
if (!MoveToEx( HDC_32(hdc), x, y, &pt32 )) return FALSE;
if (pt) CONV_POINT32TO16( &pt32, pt );
return TRUE;
}
/***********************************************************************
* ScaleViewportExtEx (GDI.484)
*/
BOOL16 WINAPI ScaleViewportExtEx16( HDC16 hdc, INT16 xNum, INT16 xDenom,
INT16 yNum, INT16 yDenom, LPSIZE16 size )
{
SIZE size32;
BOOL16 ret = ScaleViewportExtEx( HDC_32(hdc), xNum, xDenom, yNum, yDenom,
&size32 );
if (size) { size->cx = size32.cx; size->cy = size32.cy; }
return ret;
}
/***********************************************************************
* ScaleWindowExtEx (GDI.485)
*/
BOOL16 WINAPI ScaleWindowExtEx16( HDC16 hdc, INT16 xNum, INT16 xDenom,
INT16 yNum, INT16 yDenom, LPSIZE16 size )
{
SIZE size32;
BOOL16 ret = ScaleWindowExtEx( HDC_32(hdc), xNum, xDenom, yNum, yDenom,
&size32 );
if (size) { size->cx = size32.cx; size->cy = size32.cy; }
return ret;
}
/******************************************************************************
* PolyBezier (GDI.502)
*/
BOOL16 WINAPI PolyBezier16( HDC16 hdc, const POINT16* lppt, INT16 cPoints )
{
int i;
BOOL16 ret;
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
cPoints*sizeof(POINT) );
if(!pt32) return FALSE;
for (i=cPoints;i--;) CONV_POINT16TO32(&(lppt[i]),&(pt32[i]));
ret= PolyBezier(HDC_32(hdc), pt32, cPoints);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/******************************************************************************
* PolyBezierTo (GDI.503)
*/
BOOL16 WINAPI PolyBezierTo16( HDC16 hdc, const POINT16* lppt, INT16 cPoints )
{
int i;
BOOL16 ret;
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
cPoints*sizeof(POINT) );
if(!pt32) return FALSE;
for (i=cPoints;i--;) CONV_POINT16TO32(&(lppt[i]),&(pt32[i]));
ret= PolyBezierTo(HDC_32(hdc), pt32, cPoints);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/******************************************************************************
* ExtSelectClipRgn (GDI.508)
*/
INT16 WINAPI ExtSelectClipRgn16( HDC16 hdc, HRGN16 hrgn, INT16 fnMode )
{
return ExtSelectClipRgn( HDC_32(hdc), HRGN_32(hrgn), fnMode);
}
/***********************************************************************
* AbortPath (GDI.511)
*/
BOOL16 WINAPI AbortPath16(HDC16 hdc)
{
return AbortPath( HDC_32(hdc) );
}
/***********************************************************************
* BeginPath (GDI.512)
*/
BOOL16 WINAPI BeginPath16(HDC16 hdc)
{
return BeginPath( HDC_32(hdc) );
}
/***********************************************************************
* CloseFigure (GDI.513)
*/
BOOL16 WINAPI CloseFigure16(HDC16 hdc)
{
return CloseFigure( HDC_32(hdc) );
}
/***********************************************************************
* EndPath (GDI.514)
*/
BOOL16 WINAPI EndPath16(HDC16 hdc)
{
return EndPath( HDC_32(hdc) );
}
/***********************************************************************
* FillPath (GDI.515)
*/
BOOL16 WINAPI FillPath16(HDC16 hdc)
{
return FillPath( HDC_32(hdc) );
}
/*******************************************************************
* FlattenPath (GDI.516)
*/
BOOL16 WINAPI FlattenPath16(HDC16 hdc)
{
return FlattenPath( HDC_32(hdc) );
}
/***********************************************************************
* GetPath (GDI.517)
*/
INT16 WINAPI GetPath16(HDC16 hdc, LPPOINT16 pPoints, LPBYTE pTypes, INT16 nSize)
{
FIXME("(%d,%p,%p): stub\n",hdc,pPoints,pTypes);
return 0;
}
/***********************************************************************
* PathToRegion (GDI.518)
*/
HRGN16 WINAPI PathToRegion16(HDC16 hdc)
{
return HRGN_16( PathToRegion( HDC_32(hdc) ));
}
/***********************************************************************
* SelectClipPath (GDI.519)
*/
BOOL16 WINAPI SelectClipPath16(HDC16 hdc, INT16 iMode)
{
return SelectClipPath( HDC_32(hdc), iMode );
}
/*******************************************************************
* StrokeAndFillPath (GDI.520)
*/
BOOL16 WINAPI StrokeAndFillPath16(HDC16 hdc)
{
return StrokeAndFillPath( HDC_32(hdc) );
}
/*******************************************************************
* StrokePath (GDI.521)
*/
BOOL16 WINAPI StrokePath16(HDC16 hdc)
{
return StrokePath( HDC_32(hdc) );
}
/*******************************************************************
* WidenPath (GDI.522)
*/
BOOL16 WINAPI WidenPath16(HDC16 hdc)
{
return WidenPath( HDC_32(hdc) );
}
/***********************************************************************
* GetArcDirection (GDI.524)
*/
INT16 WINAPI GetArcDirection16( HDC16 hdc )
{
return GetArcDirection( HDC_32(hdc) );
}
/***********************************************************************
* SetArcDirection (GDI.525)
*/
INT16 WINAPI SetArcDirection16( HDC16 hdc, INT16 nDirection )
{
return SetArcDirection( HDC_32(hdc), (INT)nDirection );
}
/***********************************************************************
* CreateHalftonePalette (GDI.529)
*/
HPALETTE16 WINAPI CreateHalftonePalette16( HDC16 hdc )
{
return HPALETTE_16( CreateHalftonePalette( HDC_32(hdc) ));
}
/***********************************************************************
* SetDIBColorTable (GDI.602)
*/
UINT16 WINAPI SetDIBColorTable16( HDC16 hdc, UINT16 startpos, UINT16 entries, RGBQUAD *colors )
{
return SetDIBColorTable( HDC_32(hdc), startpos, entries, colors );
}
/***********************************************************************
* GetDIBColorTable (GDI.603)
*/
UINT16 WINAPI GetDIBColorTable16( HDC16 hdc, UINT16 startpos, UINT16 entries, RGBQUAD *colors )
{
return GetDIBColorTable( HDC_32(hdc), startpos, entries, colors );
}
/***********************************************************************
* GetRegionData (GDI.607)
*
* FIXME: is LPRGNDATA the same in Win16 and Win32 ?
*/
DWORD WINAPI GetRegionData16( HRGN16 hrgn, DWORD count, LPRGNDATA rgndata )
{
return GetRegionData( HRGN_32(hrgn), count, rgndata );
}
/***********************************************************************
* GetTextCharset (GDI.612)
*/
UINT16 WINAPI GetTextCharset16( HDC16 hdc )
{
return GetTextCharset( HDC_32(hdc) );
}
/*************************************************************************
* GetFontLanguageInfo (GDI.616)
*/
DWORD WINAPI GetFontLanguageInfo16( HDC16 hdc )
{
return GetFontLanguageInfo( HDC_32(hdc) );
}
/***********************************************************************
* SetLayout (GDI.1000)
*
* Sets left->right or right->left text layout flags of a dc.
*/
BOOL16 WINAPI SetLayout16( HDC16 hdc, DWORD layout )
{
return SetLayout( HDC_32(hdc), layout );
}
......@@ -46,11 +46,11 @@ BOOL MFDRV_BitBlt( PHYSDEV devDst, INT xDst, INT yDst, INT width, INT height,
BOOL ret;
DWORD len;
METARECORD *mr;
BITMAP16 BM;
BITMAP BM;
METAFILEDRV_PDEVICE *physDevSrc = (METAFILEDRV_PDEVICE *)devSrc;
DC *dcSrc = physDevSrc->dc;
GetObject16(dcSrc->hBitmap, sizeof(BITMAP16), &BM);
GetObjectA(dcSrc->hBitmap, sizeof(BITMAP), &BM);
len = sizeof(METARECORD) + 12 * sizeof(INT16) + BM.bmWidthBytes * BM.bmHeight;
if (!(mr = HeapAlloc(GetProcessHeap(), 0, len)))
return FALSE;
......@@ -98,14 +98,14 @@ BOOL MFDRV_StretchBlt( PHYSDEV devDst, INT xDst, INT yDst, INT widthDst,
BOOL ret;
DWORD len;
METARECORD *mr;
BITMAP16 BM;
BITMAP BM;
METAFILEDRV_PDEVICE *physDevSrc = (METAFILEDRV_PDEVICE *)devSrc;
DC *dcSrc = physDevSrc->dc;
#ifdef STRETCH_VIA_DIB
LPBITMAPINFOHEADER lpBMI;
WORD nBPP;
#endif
GetObject16(dcSrc->hBitmap, sizeof(BITMAP16), &BM);
GetObjectA(dcSrc->hBitmap, sizeof(BITMAP), &BM);
#ifdef STRETCH_VIA_DIB
nBPP = BM.bmPlanes * BM.bmBitsPixel;
len = sizeof(METARECORD) + 10 * sizeof(INT16)
......@@ -247,5 +247,3 @@ INT MFDRV_SetDIBitsToDevice( PHYSDEV dev, INT xDst, INT yDst, DWORD cx,
HeapFree( GetProcessHeap(), 0, mr );
return lines;
}
......@@ -202,9 +202,9 @@ static BOOL MFDRV_DeleteDC( PHYSDEV dev )
return TRUE;
}
/**********************************************************************
* CreateMetaFile (GDI.125)
* CreateMetaFile16 (GDI32.@)
* CreateMetaFileA (GDI32.@)
*
* Create a new DC and associate it with a metafile. Pass a filename
* to create a disk-based metafile, NULL to create a memory metafile.
......@@ -212,9 +212,7 @@ static BOOL MFDRV_DeleteDC( PHYSDEV dev )
* RETURNS
* A handle to the metafile DC if successful, NULL on failure.
*/
HDC16 WINAPI CreateMetaFile16(
LPCSTR filename /* [in] Filename of disk metafile */
)
HDC WINAPI CreateMetaFileA( LPCSTR filename ) /* [in] Filename of disk metafile */
{
HDC ret;
DC *dc;
......@@ -254,16 +252,6 @@ HDC16 WINAPI CreateMetaFile16(
}
/**********************************************************************
* CreateMetaFileA (GDI32.@)
*/
HDC WINAPI CreateMetaFileA(
LPCSTR filename /* [in] Filename of disk metafile */
)
{
return CreateMetaFile16( filename );
}
/**********************************************************************
* CreateMetaFileW (GDI32.@)
*/
HDC WINAPI CreateMetaFileW(LPCWSTR filename)
......
......@@ -197,7 +197,7 @@ HFONT MFDRV_SelectFont( PHYSDEV dev, HFONT hfont )
if (!GetObject16( hfont, sizeof(lf16), &lf16 )) return GDI_ERROR;
if (MFDRV_CreateFontIndirect(dev, hfont, &lf16)) return 0;
return GDI_ERROR;
return HGDI_ERROR;
}
/******************************************************************
......
......@@ -49,30 +49,6 @@ static char DefaultDevMode[] = "Default DevMode";
static char PrinterDriverData[] = "PrinterDriverData";
static char Printers[] = "System\\CurrentControlSet\\Control\\Print\\Printers\\";
/******************************************************************
* StartDoc [GDI.377]
*
*/
INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
{
DOCINFOA docA;
docA.cbSize = lpdoc->cbSize;
docA.lpszDocName = MapSL(lpdoc->lpszDocName);
docA.lpszOutput = MapSL(lpdoc->lpszOutput);
if(lpdoc->cbSize >= 14)
docA.lpszDatatype = MapSL(lpdoc->lpszDatatype);
else
docA.lpszDatatype = NULL;
if(lpdoc->cbSize >= 18)
docA.fwType = lpdoc->fwType;
else
docA.fwType = 0;
return StartDocA(hdc, &docA);
}
/******************************************************************
* StartDocA [GDI32.@]
......@@ -129,14 +105,6 @@ INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc)
return ret;
}
/******************************************************************
* EndDoc [GDI.378]
*
*/
INT16 WINAPI EndDoc16(HDC16 hdc)
{
return EndDoc(hdc);
}
/******************************************************************
* EndDoc [GDI32.@]
......@@ -153,14 +121,6 @@ INT WINAPI EndDoc(HDC hdc)
return ret;
}
/******************************************************************
* StartPage [GDI.379]
*
*/
INT16 WINAPI StartPage16(HDC16 hdc)
{
return StartPage(hdc);
}
/******************************************************************
* StartPage [GDI32.@]
......@@ -180,14 +140,6 @@ INT WINAPI StartPage(HDC hdc)
return ret;
}
/******************************************************************
* EndPage [GDI.380]
*
*/
INT16 WINAPI EndPage16( HDC16 hdc )
{
return EndPage(hdc);
}
/******************************************************************
* EndPage [GDI32.@]
......@@ -209,13 +161,6 @@ INT WINAPI EndPage(HDC hdc)
return ret;
}
/******************************************************************************
* AbortDoc [GDI.382]
*/
INT16 WINAPI AbortDoc16(HDC16 hdc)
{
return AbortDoc(hdc);
}
/******************************************************************************
* AbortDoc [GDI32.@]
......
......@@ -95,7 +95,7 @@ HFONT WIN16DRV_SelectFont( PHYSDEV dev, HFONT hfont)
int nSize;
if (!GetObject16( hfont, sizeof(physDev->lf), &physDev->lf ))
return GDI_ERROR;
return HGDI_ERROR;
TRACE("WIN16DRV_FONT_SelectObject %s h=%d\n",
debugstr_a(physDev->lf.lfFaceName), physDev->lf.lfHeight);
......@@ -258,4 +258,3 @@ WORD WINAPI EnumCallback16(LPENUMLOGFONT16 lpLogFont,
return (*(((WEPFC *)lpClientData)->proc))( &lfW, &tmW, wFontType,
((WEPFC *)lpClientData)->lp );
}
......@@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi);
HBITMAP WIN16DRV_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
{
FIXME("BITMAP not implemented\n");
return 1;
return (HBITMAP)1;
}
......
......@@ -25,16 +25,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(bitblt);
/***********************************************************************
* PatBlt (GDI.29)
*/
BOOL16 WINAPI PatBlt16( HDC16 hdc, INT16 left, INT16 top,
INT16 width, INT16 height, DWORD rop)
{
return PatBlt( hdc, left, top, width, height, rop );
}
/***********************************************************************
* PatBlt (GDI32.@)
*/
BOOL WINAPI PatBlt( HDC hdc, INT left, INT top,
......@@ -56,17 +46,6 @@ BOOL WINAPI PatBlt( HDC hdc, INT left, INT top,
/***********************************************************************
* BitBlt (GDI.34)
*/
BOOL16 WINAPI BitBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst, INT16 width,
INT16 height, HDC16 hdcSrc, INT16 xSrc, INT16 ySrc,
DWORD rop )
{
return BitBlt( hdcDst, xDst, yDst, width, height, hdcSrc, xSrc, ySrc, rop );
}
/***********************************************************************
* BitBlt (GDI32.@)
*/
BOOL WINAPI BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width,
......@@ -94,19 +73,6 @@ BOOL WINAPI BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width,
/***********************************************************************
* StretchBlt (GDI.35)
*/
BOOL16 WINAPI StretchBlt16( HDC16 hdcDst, INT16 xDst, INT16 yDst,
INT16 widthDst, INT16 heightDst,
HDC16 hdcSrc, INT16 xSrc, INT16 ySrc,
INT16 widthSrc, INT16 heightSrc, DWORD rop )
{
return StretchBlt( hdcDst, xDst, yDst, widthDst, heightDst,
hdcSrc, xSrc, ySrc, widthSrc, heightSrc, rop );
}
/***********************************************************************
* StretchBlt (GDI32.@)
*/
BOOL WINAPI StretchBlt( HDC hdcDst, INT xDst, INT yDst,
......@@ -143,27 +109,6 @@ BOOL WINAPI StretchBlt( HDC hdcDst, INT xDst, INT yDst,
/***********************************************************************
* FastWindowFrame (GDI.400)
*/
BOOL16 WINAPI FastWindowFrame16( HDC16 hdc, const RECT16 *rect,
INT16 width, INT16 height, DWORD rop )
{
HBRUSH hbrush = SelectObject( hdc, GetStockObject( GRAY_BRUSH ) );
PatBlt( hdc, rect->left, rect->top,
rect->right - rect->left - width, height, rop );
PatBlt( hdc, rect->left, rect->top + height, width,
rect->bottom - rect->top - height, rop );
PatBlt( hdc, rect->left + width, rect->bottom - 1,
rect->right - rect->left - width, -height, rop );
PatBlt( hdc, rect->right - 1, rect->top, -width,
rect->bottom - rect->top - height, rop );
SelectObject( hdc, hbrush );
return TRUE;
}
/***********************************************************************
* MaskBlt [GDI32.@]
*/
BOOL WINAPI MaskBlt(HDC hdcDest, INT nXDest, INT nYDest,
......@@ -188,4 +133,3 @@ BOOL WINAPI PlgBlt( HDC hdcDest, const POINT *lpPoint,
FIXME("PlgBlt, stub\n");
return 1;
}
......@@ -27,207 +27,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(driver);
/***********************************************************************
* Escape [GDI.38]
*/
INT16 WINAPI Escape16( HDC16 hdc, INT16 escape, INT16 in_count,
SEGPTR in_data, LPVOID out_data )
{
INT ret;
switch(escape)
{
/* Escape(hdc,CLIP_TO_PATH,LPINT16,NULL) */
/* Escape(hdc,DRAFTMODE,LPINT16,NULL) */
/* Escape(hdc,ENUMPAPERBINS,LPINT16,LPSTR); */
/* Escape(hdc,EPSPRINTING,LPINT16,NULL) */
/* Escape(hdc,EXT_DEVICE_CAPS,LPINT16,LPDWORD) */
/* Escape(hdc,GETCOLORTABLE,LPINT16,LPDWORD) */
/* Escape(hdc,MOUSETRAILS,LPINT16,NULL) */
/* Escape(hdc,POSTSCRIPT_IGNORE,LPINT16,NULL) */
/* Escape(hdc,QUERYESCSUPPORT,LPINT16,NULL) */
/* Escape(hdc,SET_ARC_DIRECTION,LPINT16,NULL) */
/* Escape(hdc,SET_POLY_MODE,LPINT16,NULL) */
/* Escape(hdc,SET_SCREEN_ANGLE,LPINT16,NULL) */
/* Escape(hdc,SET_SPREAD,LPINT16,NULL) */
case CLIP_TO_PATH:
case DRAFTMODE:
case ENUMPAPERBINS:
case EPSPRINTING:
case EXT_DEVICE_CAPS:
case GETCOLORTABLE:
case MOUSETRAILS:
case POSTSCRIPT_IGNORE:
case QUERYESCSUPPORT:
case SET_ARC_DIRECTION:
case SET_POLY_MODE:
case SET_SCREEN_ANGLE:
case SET_SPREAD:
{
INT16 *ptr = MapSL(in_data);
INT data = *ptr;
return Escape( hdc, escape, sizeof(data), (LPCSTR)&data, out_data );
}
/* Escape(hdc,ENABLEDUPLEX,LPUINT16,NULL) */
case ENABLEDUPLEX:
{
UINT16 *ptr = MapSL(in_data);
UINT data = *ptr;
return Escape( hdc, escape, sizeof(data), (LPCSTR)&data, NULL );
}
/* Escape(hdc,GETPHYSPAGESIZE,NULL,LPPOINT16) */
/* Escape(hdc,GETPRINTINGOFFSET,NULL,LPPOINT16) */
/* Escape(hdc,GETSCALINGFACTOR,NULL,LPPOINT16) */
case GETPHYSPAGESIZE:
case GETPRINTINGOFFSET:
case GETSCALINGFACTOR:
{
POINT16 *ptr = out_data;
POINT pt32;
ret = Escape( hdc, escape, 0, NULL, &pt32 );
ptr->x = pt32.x;
ptr->y = pt32.y;
return ret;
}
/* Escape(hdc,ENABLEPAIRKERNING,LPINT16,LPINT16); */
/* Escape(hdc,ENABLERELATIVEWIDTHS,LPINT16,LPINT16); */
/* Escape(hdc,SETCOPYCOUNT,LPINT16,LPINT16) */
/* Escape(hdc,SETKERNTRACK,LPINT16,LPINT16) */
/* Escape(hdc,SETLINECAP,LPINT16,LPINT16) */
/* Escape(hdc,SETLINEJOIN,LPINT16,LPINT16) */
/* Escape(hdc,SETMITERLIMIT,LPINT16,LPINT16) */
case ENABLEPAIRKERNING:
case ENABLERELATIVEWIDTHS:
case SETCOPYCOUNT:
case SETKERNTRACK:
case SETLINECAP:
case SETLINEJOIN:
case SETMITERLIMIT:
{
INT16 *new = MapSL(in_data);
INT16 *old = out_data;
INT out, in = *new;
ret = Escape( hdc, escape, sizeof(in), (LPCSTR)&in, &out );
*old = out;
return ret;
}
/* Escape(hdc,SETABORTPROC,ABORTPROC,NULL); */
case SETABORTPROC:
return SetAbortProc16( hdc, (ABORTPROC16)in_data );
/* Escape(hdc,STARTDOC,LPSTR,LPDOCINFO16);
* lpvOutData is actually a pointer to the DocInfo structure and used as
* a second input parameter */
case STARTDOC:
if (out_data)
{
ret = StartDoc16( hdc, out_data );
if (ret > 0) ret = StartPage( hdc );
return ret;
}
return Escape( hdc, escape, in_count, MapSL(in_data), NULL );
/* Escape(hdc,SET_BOUNDS,LPRECT16,NULL); */
/* Escape(hdc,SET_CLIP_BOX,LPRECT16,NULL); */
case SET_BOUNDS:
case SET_CLIP_BOX:
{
RECT16 *rc16 = MapSL(in_data);
RECT rc;
rc.left = rc16->left;
rc.top = rc16->top;
rc.right = rc16->right;
rc.bottom = rc16->bottom;
return Escape( hdc, escape, sizeof(rc), (LPCSTR)&rc, NULL );
}
/* Escape(hdc,NEXTBAND,NULL,LPRECT16); */
case NEXTBAND:
{
RECT rc;
RECT16 *rc16 = out_data;
ret = Escape( hdc, escape, 0, NULL, &rc );
rc16->left = rc.left;
rc16->top = rc.top;
rc16->right = rc.right;
rc16->bottom = rc.bottom;
return ret;
}
/* Escape(hdc,ABORTDOC,NULL,NULL); */
/* Escape(hdc,BANDINFO,BANDINFOSTRUCT*,BANDINFOSTRUCT*); */
/* Escape(hdc,BEGIN_PATH,NULL,NULL); */
/* Escape(hdc,DRAWPATTERNRECT,PRECT_STRUCT*,NULL); */
/* Escape(hdc,ENDDOC,NULL,NULL); */
/* Escape(hdc,END_PATH,PATHINFO,NULL); */
/* Escape(hdc,EXTTEXTOUT,EXTTEXT_STRUCT*,NULL); */
/* Escape(hdc,FLUSHOUTPUT,NULL,NULL); */
/* Escape(hdc,GETFACENAME,NULL,LPSTR); */
/* Escape(hdc,GETPAIRKERNTABLE,NULL,KERNPAIR*); */
/* Escape(hdc,GETSETPAPERBINS,BinInfo*,BinInfo*); */
/* Escape(hdc,GETSETPRINTORIENT,ORIENT*,NULL); */
/* Escape(hdc,GETSETSCREENPARAMS,SCREENPARAMS*,SCREENPARAMS*); */
/* Escape(hdc,GETTECHNOLOGY,NULL,LPSTR); */
/* Escape(hdc,GETTRACKKERNTABLE,NULL,KERNTRACK*); */
/* Escape(hdc,MFCOMMENT,LPSTR,NULL); */
/* Escape(hdc,NEWFRAME,NULL,NULL); */
/* Escape(hdc,PASSTHROUGH,LPSTR,NULL); */
/* Escape(hdc,RESTORE_CTM,NULL,NULL); */
/* Escape(hdc,SAVE_CTM,NULL,NULL); */
/* Escape(hdc,SETALLJUSTVALUES,EXTTEXTDATA*,NULL); */
/* Escape(hdc,SETCOLORTABLE,COLORTABLE_STRUCT*,LPDWORD); */
/* Escape(hdc,SET_BACKGROUND_COLOR,LPDWORD,LPDWORD); */
/* Escape(hdc,TRANSFORM_CTM,LPSTR,NULL); */
case ABORTDOC:
case BANDINFO:
case BEGIN_PATH:
case DRAWPATTERNRECT:
case ENDDOC:
case END_PATH:
case EXTTEXTOUT:
case FLUSHOUTPUT:
case GETFACENAME:
case GETPAIRKERNTABLE:
case GETSETPAPERBINS:
case GETSETPRINTORIENT:
case GETSETSCREENPARAMS:
case GETTECHNOLOGY:
case GETTRACKKERNTABLE:
case MFCOMMENT:
case NEWFRAME:
case PASSTHROUGH:
case RESTORE_CTM:
case SAVE_CTM:
case SETALLJUSTVALUES:
case SETCOLORTABLE:
case SET_BACKGROUND_COLOR:
case TRANSFORM_CTM:
/* pass it unmodified to the 32-bit function */
return Escape( hdc, escape, in_count, MapSL(in_data), out_data );
/* Escape(hdc,ENUMPAPERMETRICS,LPINT16,LPRECT16); */
/* Escape(hdc,GETEXTENDEDTEXTMETRICS,LPUINT16,EXTTEXTMETRIC*); */
/* Escape(hdc,GETEXTENTTABLE,LPSTR,LPINT16); */
/* Escape(hdc,GETSETPAPERMETRICS,LPRECT16,LPRECT16); */
/* Escape(hdc,GETVECTORBRUSHSIZE,LPLOGBRUSH16,LPPOINT16); */
/* Escape(hdc,GETVECTORPENSIZE,LPLOGPEN16,LPPOINT16); */
case ENUMPAPERMETRICS:
case GETEXTENDEDTEXTMETRICS:
case GETEXTENTTABLE:
case GETSETPAPERMETRICS:
case GETVECTORBRUSHSIZE:
case GETVECTORPENSIZE:
default:
FIXME("unknown/unsupported 16-bit escape %x (%d,%p,%p\n",
escape, in_count, MapSL(in_data), out_data );
return Escape( hdc, escape, in_count, MapSL(in_data), out_data );
}
}
/************************************************************************
* Escape [GDI32.@]
......
......@@ -140,15 +140,6 @@ BOOL WINAPI LPtoDP( HDC hdc, LPPOINT points, INT count )
/***********************************************************************
* SetMapMode (GDI.3)
*/
INT16 WINAPI SetMapMode16( HDC16 hdc, INT16 mode )
{
return SetMapMode( hdc, mode );
}
/***********************************************************************
* SetMapMode (GDI32.@)
*/
INT WINAPI SetMapMode( HDC hdc, INT mode )
......@@ -224,29 +215,6 @@ INT WINAPI SetMapMode( HDC hdc, INT mode )
/***********************************************************************
* SetViewportExt (GDI.14)
*/
DWORD WINAPI SetViewportExt16( HDC16 hdc, INT16 x, INT16 y )
{
SIZE size;
if (!SetViewportExtEx( hdc, x, y, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* SetViewportExtEx (GDI.479)
*/
BOOL16 WINAPI SetViewportExtEx16( HDC16 hdc, INT16 x, INT16 y, LPSIZE16 size )
{
SIZE size32;
BOOL16 ret = SetViewportExtEx( hdc, x, y, &size32 );
if (size) { size->cx = size32.cx; size->cy = size32.cy; }
return ret;
}
/***********************************************************************
* SetViewportExtEx (GDI32.@)
*/
BOOL WINAPI SetViewportExtEx( HDC hdc, INT x, INT y, LPSIZE size )
......@@ -282,29 +250,6 @@ BOOL WINAPI SetViewportExtEx( HDC hdc, INT x, INT y, LPSIZE size )
/***********************************************************************
* SetViewportOrg (GDI.13)
*/
DWORD WINAPI SetViewportOrg16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!SetViewportOrgEx( hdc, x, y, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* SetViewportOrgEx (GDI.480)
*/
BOOL16 WINAPI SetViewportOrgEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
{
POINT pt32;
BOOL16 ret = SetViewportOrgEx( hdc, x, y, &pt32 );
if (pt) CONV_POINT32TO16( &pt32, pt );
return ret;
}
/***********************************************************************
* SetViewportOrgEx (GDI32.@)
*/
BOOL WINAPI SetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
......@@ -331,29 +276,6 @@ BOOL WINAPI SetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
/***********************************************************************
* SetWindowExt (GDI.12)
*/
DWORD WINAPI SetWindowExt16( HDC16 hdc, INT16 x, INT16 y )
{
SIZE size;
if (!SetWindowExtEx( hdc, x, y, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* SetWindowExtEx (GDI.481)
*/
BOOL16 WINAPI SetWindowExtEx16( HDC16 hdc, INT16 x, INT16 y, LPSIZE16 size )
{
SIZE size32;
BOOL16 ret = SetWindowExtEx( hdc, x, y, &size32 );
if (size) { size->cx = size32.cx; size->cy = size32.cy; }
return ret;
}
/***********************************************************************
* SetWindowExtEx (GDI32.@)
*/
BOOL WINAPI SetWindowExtEx( HDC hdc, INT x, INT y, LPSIZE size )
......@@ -389,29 +311,6 @@ BOOL WINAPI SetWindowExtEx( HDC hdc, INT x, INT y, LPSIZE size )
/***********************************************************************
* SetWindowOrg (GDI.11)
*/
DWORD WINAPI SetWindowOrg16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!SetWindowOrgEx( hdc, x, y, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* SetWindowOrgEx (GDI.482)
*/
BOOL16 WINAPI SetWindowOrgEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
{
POINT pt32;
BOOL16 ret = SetWindowOrgEx( hdc, x, y, &pt32 );
if (pt) CONV_POINT32TO16( &pt32, pt );
return ret;
}
/***********************************************************************
* SetWindowOrgEx (GDI32.@)
*/
BOOL WINAPI SetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
......@@ -437,29 +336,6 @@ BOOL WINAPI SetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
/***********************************************************************
* OffsetViewportOrg (GDI.17)
*/
DWORD WINAPI OffsetViewportOrg16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!OffsetViewportOrgEx( hdc, x, y, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* OffsetViewportOrgEx (GDI.476)
*/
BOOL16 WINAPI OffsetViewportOrgEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt)
{
POINT pt32;
BOOL16 ret = OffsetViewportOrgEx( hdc, x, y, &pt32 );
if (pt) CONV_POINT32TO16( &pt32, pt );
return ret;
}
/***********************************************************************
* OffsetViewportOrgEx (GDI32.@)
*/
BOOL WINAPI OffsetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt)
......@@ -486,29 +362,6 @@ BOOL WINAPI OffsetViewportOrgEx( HDC hdc, INT x, INT y, LPPOINT pt)
/***********************************************************************
* OffsetWindowOrg (GDI.15)
*/
DWORD WINAPI OffsetWindowOrg16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!OffsetWindowOrgEx( hdc, x, y, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* OffsetWindowOrgEx (GDI.477)
*/
BOOL16 WINAPI OffsetWindowOrgEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
{
POINT pt32;
BOOL16 ret = OffsetWindowOrgEx( hdc, x, y, &pt32 );
if (pt) CONV_POINT32TO16( &pt32, pt );
return ret;
}
/***********************************************************************
* OffsetWindowOrgEx (GDI32.@)
*/
BOOL WINAPI OffsetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
......@@ -535,33 +388,6 @@ BOOL WINAPI OffsetWindowOrgEx( HDC hdc, INT x, INT y, LPPOINT pt )
/***********************************************************************
* ScaleViewportExt (GDI.18)
*/
DWORD WINAPI ScaleViewportExt16( HDC16 hdc, INT16 xNum, INT16 xDenom,
INT16 yNum, INT16 yDenom )
{
SIZE size;
if (!ScaleViewportExtEx( hdc, xNum, xDenom, yNum, yDenom, &size ))
return FALSE;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* ScaleViewportExtEx (GDI.484)
*/
BOOL16 WINAPI ScaleViewportExtEx16( HDC16 hdc, INT16 xNum, INT16 xDenom,
INT16 yNum, INT16 yDenom, LPSIZE16 size )
{
SIZE size32;
BOOL16 ret = ScaleViewportExtEx( hdc, xNum, xDenom, yNum, yDenom,
&size32 );
if (size) { size->cx = size32.cx; size->cy = size32.cy; }
return ret;
}
/***********************************************************************
* ScaleViewportExtEx (GDI32.@)
*/
BOOL WINAPI ScaleViewportExtEx( HDC hdc, INT xNum, INT xDenom,
......@@ -600,33 +426,6 @@ BOOL WINAPI ScaleViewportExtEx( HDC hdc, INT xNum, INT xDenom,
/***********************************************************************
* ScaleWindowExt (GDI.16)
*/
DWORD WINAPI ScaleWindowExt16( HDC16 hdc, INT16 xNum, INT16 xDenom,
INT16 yNum, INT16 yDenom )
{
SIZE size;
if (!ScaleWindowExtEx( hdc, xNum, xDenom, yNum, yDenom, &size ))
return FALSE;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* ScaleWindowExtEx (GDI.485)
*/
BOOL16 WINAPI ScaleWindowExtEx16( HDC16 hdc, INT16 xNum, INT16 xDenom,
INT16 yNum, INT16 yDenom, LPSIZE16 size )
{
SIZE size32;
BOOL16 ret = ScaleWindowExtEx( hdc, xNum, xDenom, yNum, yDenom,
&size32 );
if (size) { size->cx = size32.cx; size->cy = size32.cy; }
return ret;
}
/***********************************************************************
* ScaleWindowExtEx (GDI32.@)
*/
BOOL WINAPI ScaleWindowExtEx( HDC hdc, INT xNum, INT xDenom,
......
......@@ -35,15 +35,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi);
/***********************************************************************
* LineTo (GDI.19)
*/
BOOL16 WINAPI LineTo16( HDC16 hdc, INT16 x, INT16 y )
{
return LineTo( hdc, x, y );
}
/***********************************************************************
* LineTo (GDI32.@)
*/
BOOL WINAPI LineTo( HDC hdc, INT x, INT y )
......@@ -67,31 +58,6 @@ BOOL WINAPI LineTo( HDC hdc, INT x, INT y )
/***********************************************************************
* MoveTo (GDI.20)
*/
DWORD WINAPI MoveTo16( HDC16 hdc, INT16 x, INT16 y )
{
POINT pt;
if (!MoveToEx( (HDC)hdc, x, y, &pt )) return 0;
return MAKELONG(pt.x,pt.y);
}
/***********************************************************************
* MoveToEx (GDI.483)
*/
BOOL16 WINAPI MoveToEx16( HDC16 hdc, INT16 x, INT16 y, LPPOINT16 pt )
{
POINT pt32;
if (!MoveToEx( (HDC)hdc, (INT)x, (INT)y, &pt32 )) return FALSE;
if (pt) CONV_POINT32TO16( &pt32, pt );
return TRUE;
}
/***********************************************************************
* MoveToEx (GDI32.@)
*/
BOOL WINAPI MoveToEx( HDC hdc, INT x, INT y, LPPOINT pt )
......@@ -116,19 +82,6 @@ BOOL WINAPI MoveToEx( HDC hdc, INT x, INT y, LPPOINT pt )
/***********************************************************************
* Arc (GDI.23)
*/
BOOL16 WINAPI Arc16( HDC16 hdc, INT16 left, INT16 top, INT16 right,
INT16 bottom, INT16 xstart, INT16 ystart,
INT16 xend, INT16 yend )
{
return Arc( (HDC)hdc, (INT)left, (INT)top, (INT)right,
(INT)bottom, (INT)xstart, (INT)ystart, (INT)xend,
(INT)yend );
}
/***********************************************************************
* Arc (GDI32.@)
*/
BOOL WINAPI Arc( HDC hdc, INT left, INT top, INT right,
......@@ -187,18 +140,6 @@ BOOL WINAPI ArcTo( HDC hdc,
return result;
}
/***********************************************************************
* Pie (GDI.26)
*/
BOOL16 WINAPI Pie16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom, INT16 xstart, INT16 ystart,
INT16 xend, INT16 yend )
{
return Pie( (HDC)hdc, (INT)left, (INT)top, (INT)right,
(INT)bottom, (INT)xstart, (INT)ystart, (INT)xend,
(INT)yend );
}
/***********************************************************************
* Pie (GDI32.@)
......@@ -222,17 +163,6 @@ BOOL WINAPI Pie( HDC hdc, INT left, INT top,
/***********************************************************************
* Chord (GDI.348)
*/
BOOL16 WINAPI Chord16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom, INT16 xstart, INT16 ystart,
INT16 xend, INT16 yend )
{
return Chord( hdc, left, top, right, bottom, xstart, ystart, xend, yend );
}
/***********************************************************************
* Chord (GDI32.@)
*/
BOOL WINAPI Chord( HDC hdc, INT left, INT top,
......@@ -254,16 +184,6 @@ BOOL WINAPI Chord( HDC hdc, INT left, INT top,
/***********************************************************************
* Ellipse (GDI.24)
*/
BOOL16 WINAPI Ellipse16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
return Ellipse( hdc, left, top, right, bottom );
}
/***********************************************************************
* Ellipse (GDI32.@)
*/
BOOL WINAPI Ellipse( HDC hdc, INT left, INT top,
......@@ -284,16 +204,6 @@ BOOL WINAPI Ellipse( HDC hdc, INT left, INT top,
/***********************************************************************
* Rectangle (GDI.27)
*/
BOOL16 WINAPI Rectangle16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
return Rectangle( hdc, left, top, right, bottom );
}
/***********************************************************************
* Rectangle (GDI32.@)
*/
BOOL WINAPI Rectangle( HDC hdc, INT left, INT top,
......@@ -314,16 +224,6 @@ BOOL WINAPI Rectangle( HDC hdc, INT left, INT top,
/***********************************************************************
* RoundRect (GDI.28)
*/
BOOL16 WINAPI RoundRect16( HDC16 hdc, INT16 left, INT16 top, INT16 right,
INT16 bottom, INT16 ell_width, INT16 ell_height )
{
return RoundRect( hdc, left, top, right, bottom, ell_width, ell_height );
}
/***********************************************************************
* RoundRect (GDI32.@)
*/
BOOL WINAPI RoundRect( HDC hdc, INT left, INT top, INT right,
......@@ -344,15 +244,6 @@ BOOL WINAPI RoundRect( HDC hdc, INT left, INT top, INT right,
}
/***********************************************************************
* SetPixel (GDI.31)
*/
COLORREF WINAPI SetPixel16( HDC16 hdc, INT16 x, INT16 y, COLORREF color )
{
return SetPixel( hdc, x, y, color );
}
/***********************************************************************
* SetPixel (GDI32.@)
*/
COLORREF WINAPI SetPixel( HDC hdc, INT x, INT y, COLORREF color )
......@@ -387,15 +278,6 @@ BOOL WINAPI SetPixelV( HDC hdc, INT x, INT y, COLORREF color )
}
/***********************************************************************
* GetPixel (GDI.83)
*/
COLORREF WINAPI GetPixel16( HDC16 hdc, INT16 x, INT16 y )
{
return GetPixel( hdc, x, y );
}
/***********************************************************************
* GetPixel (GDI32.@)
*/
COLORREF WINAPI GetPixel( HDC hdc, INT x, INT y )
......@@ -571,15 +453,6 @@ BOOL WINAPI SwapBuffers( HDC hdc )
/***********************************************************************
* PaintRgn (GDI.43)
*/
BOOL16 WINAPI PaintRgn16( HDC16 hdc, HRGN16 hrgn )
{
return PaintRgn( hdc, hrgn );
}
/***********************************************************************
* PaintRgn (GDI32.@)
*/
BOOL WINAPI PaintRgn( HDC hdc, HRGN hrgn )
......@@ -596,15 +469,6 @@ BOOL WINAPI PaintRgn( HDC hdc, HRGN hrgn )
/***********************************************************************
* FillRgn (GDI.40)
*/
BOOL16 WINAPI FillRgn16( HDC16 hdc, HRGN16 hrgn, HBRUSH16 hbrush )
{
return FillRgn( hdc, hrgn, hbrush );
}
/***********************************************************************
* FillRgn (GDI32.@)
*/
BOOL WINAPI FillRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush )
......@@ -627,16 +491,6 @@ BOOL WINAPI FillRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush )
/***********************************************************************
* FrameRgn (GDI.41)
*/
BOOL16 WINAPI FrameRgn16( HDC16 hdc, HRGN16 hrgn, HBRUSH16 hbrush,
INT16 nWidth, INT16 nHeight )
{
return FrameRgn( hdc, hrgn, hbrush, nWidth, nHeight );
}
/***********************************************************************
* FrameRgn (GDI32.@)
*/
BOOL WINAPI FrameRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush,
......@@ -667,15 +521,6 @@ BOOL WINAPI FrameRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush,
/***********************************************************************
* InvertRgn (GDI.42)
*/
BOOL16 WINAPI InvertRgn16( HDC16 hdc, HRGN16 hrgn )
{
return InvertRgn( hdc, hrgn );
}
/***********************************************************************
* InvertRgn (GDI32.@)
*/
BOOL WINAPI InvertRgn( HDC hdc, HRGN hrgn )
......@@ -700,23 +545,6 @@ BOOL WINAPI InvertRgn( HDC hdc, HRGN hrgn )
return retval;
}
/**********************************************************************
* Polyline (GDI.37)
*/
BOOL16 WINAPI Polyline16( HDC16 hdc, const POINT16* pt, INT16 count )
{
register int i;
BOOL16 ret;
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
count*sizeof(POINT) );
if (!pt32) return FALSE;
for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
ret = Polyline(hdc,pt32,count);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/**********************************************************************
* Polyline (GDI32.@)
......@@ -770,23 +598,6 @@ BOOL WINAPI PolylineTo( HDC hdc, const POINT* pt, DWORD cCount )
return ret;
}
/**********************************************************************
* Polygon (GDI.36)
*/
BOOL16 WINAPI Polygon16( HDC16 hdc, const POINT16* pt, INT16 count )
{
register int i;
BOOL ret;
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
count*sizeof(POINT) );
if (!pt32) return FALSE;
for (i=count;i--;) CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
ret = Polygon(hdc,pt32,count);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/**********************************************************************
* Polygon (GDI32.@)
......@@ -806,37 +617,6 @@ BOOL WINAPI Polygon( HDC hdc, const POINT* pt, INT count )
/**********************************************************************
* PolyPolygon (GDI.450)
*/
BOOL16 WINAPI PolyPolygon16( HDC16 hdc, const POINT16* pt, const INT16* counts,
UINT16 polygons )
{
int i,nrpts;
LPPOINT pt32;
LPINT counts32;
BOOL16 ret;
nrpts=0;
for (i=polygons;i--;)
nrpts+=counts[i];
pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0, sizeof(POINT)*nrpts);
if(pt32 == NULL) return FALSE;
for (i=nrpts;i--;)
CONV_POINT16TO32(&(pt[i]),&(pt32[i]));
counts32 = (LPINT)HeapAlloc( GetProcessHeap(), 0, polygons*sizeof(INT) );
if(counts32 == NULL) {
HeapFree( GetProcessHeap(), 0, pt32 );
return FALSE;
}
for (i=polygons;i--;) counts32[i]=counts[i];
ret = PolyPolygon(hdc,pt32,counts32,polygons);
HeapFree( GetProcessHeap(), 0, counts32 );
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/**********************************************************************
* PolyPolygon (GDI32.@)
*/
BOOL WINAPI PolyPolygon( HDC hdc, const POINT* pt, const INT* counts,
......@@ -871,16 +651,6 @@ BOOL WINAPI PolyPolyline( HDC hdc, const POINT* pt, const DWORD* counts,
}
/**********************************************************************
* ExtFloodFill (GDI.372)
*/
BOOL16 WINAPI ExtFloodFill16( HDC16 hdc, INT16 x, INT16 y, COLORREF color,
UINT16 fillType )
{
return ExtFloodFill( hdc, x, y, color, fillType );
}
/**********************************************************************
* ExtFloodFill (GDI32.@)
*/
BOOL WINAPI ExtFloodFill( HDC hdc, INT x, INT y, COLORREF color,
......@@ -898,15 +668,6 @@ BOOL WINAPI ExtFloodFill( HDC hdc, INT x, INT y, COLORREF color,
/**********************************************************************
* FloodFill (GDI.25)
*/
BOOL16 WINAPI FloodFill16( HDC16 hdc, INT16 x, INT16 y, COLORREF color )
{
return ExtFloodFill( hdc, x, y, color, FLOODFILLBORDER );
}
/**********************************************************************
* FloodFill (GDI32.@)
*/
BOOL WINAPI FloodFill( HDC hdc, INT x, INT y, COLORREF color )
......@@ -916,38 +677,6 @@ BOOL WINAPI FloodFill( HDC hdc, INT x, INT y, COLORREF color )
/******************************************************************************
* PolyBezier [GDI.502]
*/
BOOL16 WINAPI PolyBezier16( HDC16 hDc, const POINT16* lppt, INT16 cPoints )
{
int i;
BOOL16 ret;
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
cPoints*sizeof(POINT) );
if(!pt32) return FALSE;
for (i=cPoints;i--;) CONV_POINT16TO32(&(lppt[i]),&(pt32[i]));
ret= PolyBezier(hDc, pt32, cPoints);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/******************************************************************************
* PolyBezierTo [GDI.503]
*/
BOOL16 WINAPI PolyBezierTo16( HDC16 hDc, const POINT16* lppt, INT16 cPoints )
{
int i;
BOOL16 ret;
LPPOINT pt32 = (LPPOINT)HeapAlloc( GetProcessHeap(), 0,
cPoints*sizeof(POINT) );
if(!pt32) return FALSE;
for (i=cPoints;i--;) CONV_POINT16TO32(&(lppt[i]),&(pt32[i]));
ret= PolyBezierTo(hDc, pt32, cPoints);
HeapFree( GetProcessHeap(), 0, pt32 );
return ret;
}
/******************************************************************************
* PolyBezier [GDI32.@]
* Draws one or more Bezier curves
*
......
......@@ -118,14 +118,6 @@ static inline void WINE_UNUSED INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)
dc->xformWorld2Vport.eDy;
}
/***********************************************************************
* BeginPath (GDI.512)
*/
BOOL16 WINAPI BeginPath16(HDC16 hdc)
{
return (BOOL16)BeginPath((HDC)hdc);
}
/***********************************************************************
* BeginPath (GDI32.@)
......@@ -158,15 +150,6 @@ BOOL WINAPI BeginPath(HDC hdc)
/***********************************************************************
* EndPath (GDI.514)
*/
BOOL16 WINAPI EndPath16(HDC16 hdc)
{
return (BOOL16)EndPath((HDC)hdc);
}
/***********************************************************************
* EndPath (GDI32.@)
*/
BOOL WINAPI EndPath(HDC hdc)
......@@ -194,15 +177,6 @@ BOOL WINAPI EndPath(HDC hdc)
}
/***********************************************************************
* AbortPath (GDI.511)
*/
BOOL16 WINAPI AbortPath16(HDC16 hdc)
{
return (BOOL16)AbortPath((HDC)hdc);
}
/******************************************************************************
* AbortPath [GDI32.@]
* Closes and discards paths from device context
......@@ -232,15 +206,6 @@ BOOL WINAPI AbortPath( HDC hdc )
/***********************************************************************
* CloseFigure (GDI.513)
*/
BOOL16 WINAPI CloseFigure16(HDC16 hdc)
{
return (BOOL16)CloseFigure((HDC)hdc);
}
/***********************************************************************
* CloseFigure (GDI32.@)
*
* FIXME: Check that SetLastError is being called correctly
......@@ -280,18 +245,6 @@ BOOL WINAPI CloseFigure(HDC hdc)
/***********************************************************************
* GetPath (GDI.517)
*/
INT16 WINAPI GetPath16(HDC16 hdc, LPPOINT16 pPoints, LPBYTE pTypes,
INT16 nSize)
{
FIXME("(%d,%p,%p): stub\n",hdc,pPoints,pTypes);
return 0;
}
/***********************************************************************
* GetPath (GDI32.@)
*/
INT WINAPI GetPath(HDC hdc, LPPOINT pPoints, LPBYTE pTypes,
......@@ -338,13 +291,6 @@ INT WINAPI GetPath(HDC hdc, LPPOINT pPoints, LPBYTE pTypes,
return ret;
}
/***********************************************************************
* PathToRegion (GDI.518)
*/
HRGN16 WINAPI PathToRegion16(HDC16 hdc)
{
return (HRGN16) PathToRegion((HDC) hdc);
}
/***********************************************************************
* PathToRegion (GDI32.@)
......@@ -362,7 +308,7 @@ HRGN WINAPI PathToRegion(HDC hdc)
DC *dc = DC_GetDCPtr( hdc );
/* Get pointer to path */
if(!dc) return -1;
if(!dc) return 0;
pPath = &dc->path;
......@@ -449,13 +395,6 @@ static BOOL PATH_FillPath(DC *dc, GdiPath *pPath)
return FALSE;
}
/***********************************************************************
* FillPath (GDI.515)
*/
BOOL16 WINAPI FillPath16(HDC16 hdc)
{
return (BOOL16) FillPath((HDC) hdc);
}
/***********************************************************************
* FillPath (GDI32.@)
......@@ -486,13 +425,6 @@ BOOL WINAPI FillPath(HDC hdc)
return bRet;
}
/***********************************************************************
* SelectClipPath (GDI.519)
*/
BOOL16 WINAPI SelectClipPath16(HDC16 hdc, INT16 iMode)
{
return (BOOL16) SelectClipPath((HDC) hdc, iMode);
}
/***********************************************************************
* SelectClipPath (GDI32.@)
......@@ -1466,15 +1398,6 @@ static void PATH_NormalizePoint(FLOAT_POINT corners[],
2.0 - 1.0;
}
/*******************************************************************
* FlattenPath [GDI.516]
*
*
*/
BOOL16 WINAPI FlattenPath16(HDC16 hdc)
{
return (BOOL16) FlattenPath((HDC) hdc);
}
/*******************************************************************
* FlattenPath [GDI32.@]
......@@ -1596,16 +1519,6 @@ static BOOL PATH_StrokePath(DC *dc, GdiPath *pPath)
/*******************************************************************
* StrokeAndFillPath [GDI.520]
*
*
*/
BOOL16 WINAPI StrokeAndFillPath16(HDC16 hdc)
{
return (BOOL16) StrokeAndFillPath((HDC) hdc);
}
/*******************************************************************
* StrokeAndFillPath [GDI32.@]
*
*
......@@ -1629,15 +1542,6 @@ BOOL WINAPI StrokeAndFillPath(HDC hdc)
return bRet;
}
/*******************************************************************
* StrokePath [GDI.521]
*
*
*/
BOOL16 WINAPI StrokePath16(HDC16 hdc)
{
return (BOOL16) StrokePath((HDC) hdc);
}
/*******************************************************************
* StrokePath [GDI32.@]
......@@ -1665,15 +1569,6 @@ BOOL WINAPI StrokePath(HDC hdc)
return bRet;
}
/*******************************************************************
* WidenPath [GDI.522]
*
*
*/
BOOL16 WINAPI WidenPath16(HDC16 hdc)
{
return (BOOL16) WidenPath((HDC) hdc);
}
/*******************************************************************
* WidenPath [GDI32.@]
......
......@@ -455,7 +455,7 @@ HRGN16 WINAPI GetClipRgn16(HDC16);
HFONT16 WINAPI GetCurLogFont16(HDC16);
DWORD WINAPI GetCurrentPosition16(HDC16);
BOOL16 WINAPI GetCurrentPositionEx16(HDC16,LPPOINT16);
DWORD WINAPI GetDCHook(HDC16,FARPROC16*);
DWORD WINAPI GetDCHook16(HDC16,FARPROC16*);
DWORD WINAPI GetDCOrg16(HDC16);
HDC16 WINAPI GetDCState16(HDC16);
INT16 WINAPI GetDeviceCaps16(HDC16,INT16);
......
......@@ -81,37 +81,6 @@ INT BITMAP_GetWidthBytes( INT bmWidth, INT bpp )
return -1;
}
/***********************************************************************
* CreateUserBitmap (GDI.407)
*/
HBITMAP16 WINAPI CreateUserBitmap16( INT16 width, INT16 height, UINT16 planes,
UINT16 bpp, LPCVOID bits )
{
return CreateBitmap16( width, height, planes, bpp, bits );
}
/***********************************************************************
* CreateUserDiscardableBitmap (GDI.409)
*/
HBITMAP16 WINAPI CreateUserDiscardableBitmap16( WORD dummy,
INT16 width, INT16 height )
{
HDC hdc = CreateDCA( "DISPLAY", NULL, NULL, NULL );
HBITMAP16 ret = CreateCompatibleBitmap16( hdc, width, height );
DeleteDC( hdc );
return ret;
}
/***********************************************************************
* CreateBitmap (GDI.48)
*/
HBITMAP16 WINAPI CreateBitmap16( INT16 width, INT16 height, UINT16 planes,
UINT16 bpp, LPCVOID bits )
{
return CreateBitmap( width, height, planes, bpp, bits );
}
/******************************************************************************
* CreateBitmap [GDI32.@] Creates a bitmap with the specified info
......@@ -182,15 +151,6 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
}
/***********************************************************************
* CreateCompatibleBitmap (GDI.51)
*/
HBITMAP16 WINAPI CreateCompatibleBitmap16(HDC16 hdc, INT16 width, INT16 height)
{
return CreateCompatibleBitmap( hdc, width, height );
}
/******************************************************************************
* CreateCompatibleBitmap [GDI32.@] Creates a bitmap compatible with the DC
*
......@@ -232,16 +192,6 @@ HBITMAP WINAPI CreateCompatibleBitmap( HDC hdc, INT width, INT height)
}
/***********************************************************************
* CreateBitmapIndirect (GDI.49)
*/
HBITMAP16 WINAPI CreateBitmapIndirect16( const BITMAP16 * bmp )
{
return CreateBitmap16( bmp->bmWidth, bmp->bmHeight, bmp->bmPlanes,
bmp->bmBitsPixel, MapSL( bmp->bmBits ) );
}
/******************************************************************************
* CreateBitmapIndirect [GDI32.@] Creates a bitmap with the specifies info
*
......@@ -258,15 +208,6 @@ HBITMAP WINAPI CreateBitmapIndirect(
/***********************************************************************
* GetBitmapBits (GDI.74)
*/
LONG WINAPI GetBitmapBits16( HBITMAP16 hbitmap, LONG count, LPVOID buffer )
{
return GetBitmapBits( hbitmap, count, buffer );
}
/***********************************************************************
* GetBitmapBits [GDI32.@] Copies bitmap bits of bitmap to buffer
*
* RETURNS
......@@ -338,15 +279,6 @@ LONG WINAPI GetBitmapBits(
}
/***********************************************************************
* SetBitmapBits (GDI.106)
*/
LONG WINAPI SetBitmapBits16( HBITMAP16 hbitmap, LONG count, LPCVOID buffer )
{
return SetBitmapBits( hbitmap, count, buffer );
}
/******************************************************************************
* SetBitmapBits [GDI32.@] Sets bits of color data for a bitmap
*
......@@ -644,16 +576,6 @@ static INT BITMAP_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer
}
/***********************************************************************
* CreateDiscardableBitmap (GDI.156)
*/
HBITMAP16 WINAPI CreateDiscardableBitmap16( HDC16 hdc, INT16 width,
INT16 height )
{
return CreateCompatibleBitmap16( hdc, width, height );
}
/******************************************************************************
* CreateDiscardableBitmap [GDI32.@] Creates a discardable bitmap
*
......@@ -670,23 +592,6 @@ HBITMAP WINAPI CreateDiscardableBitmap(
}
/***********************************************************************
* GetBitmapDimensionEx (GDI.468)
*
* NOTES
* Can this call GetBitmapDimensionEx?
*/
BOOL16 WINAPI GetBitmapDimensionEx16( HBITMAP16 hbitmap, LPSIZE16 size )
{
BITMAPOBJ * bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
if (!bmp) return FALSE;
size->cx = bmp->size.cx;
size->cy = bmp->size.cy;
GDI_ReleaseObj( hbitmap );
return TRUE;
}
/******************************************************************************
* GetBitmapDimensionEx [GDI32.@] Retrieves dimensions of a bitmap
*
......@@ -706,37 +611,6 @@ BOOL WINAPI GetBitmapDimensionEx(
}
/***********************************************************************
* GetBitmapDimension (GDI.162)
*/
DWORD WINAPI GetBitmapDimension16( HBITMAP16 hbitmap )
{
SIZE16 size;
if (!GetBitmapDimensionEx16( hbitmap, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* SetBitmapDimensionEx (GDI.478)
*/
BOOL16 WINAPI SetBitmapDimensionEx16( HBITMAP16 hbitmap, INT16 x, INT16 y,
LPSIZE16 prevSize )
{
BITMAPOBJ * bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
if (!bmp) return FALSE;
if (prevSize)
{
prevSize->cx = bmp->size.cx;
prevSize->cy = bmp->size.cy;
}
bmp->size.cx = x;
bmp->size.cy = y;
GDI_ReleaseObj( hbitmap );
return TRUE;
}
/******************************************************************************
* SetBitmapDimensionEx [GDI32.@] Assignes dimensions to a bitmap
*
......@@ -758,15 +632,3 @@ BOOL WINAPI SetBitmapDimensionEx(
GDI_ReleaseObj( hbitmap );
return TRUE;
}
/***********************************************************************
* SetBitmapDimension (GDI.163)
*/
DWORD WINAPI SetBitmapDimension16( HBITMAP16 hbitmap, INT16 x, INT16 y )
{
SIZE16 size;
if (!SetBitmapDimensionEx16( hbitmap, x, y, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
......@@ -198,15 +198,6 @@ HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
/***********************************************************************
* CreateHatchBrush (GDI.58)
*/
HBRUSH16 WINAPI CreateHatchBrush16( INT16 style, COLORREF color )
{
return CreateHatchBrush( style, color );
}
/***********************************************************************
* CreateHatchBrush (GDI32.@)
*/
HBRUSH WINAPI CreateHatchBrush( INT style, COLORREF color )
......@@ -224,15 +215,6 @@ HBRUSH WINAPI CreateHatchBrush( INT style, COLORREF color )
/***********************************************************************
* CreatePatternBrush (GDI.60)
*/
HBRUSH16 WINAPI CreatePatternBrush16( HBITMAP16 hbitmap )
{
return (HBRUSH16)CreatePatternBrush( hbitmap );
}
/***********************************************************************
* CreatePatternBrush (GDI32.@)
*/
HBRUSH WINAPI CreatePatternBrush( HBITMAP hbitmap )
......@@ -326,15 +308,6 @@ HBRUSH WINAPI CreateDIBPatternBrushPt(
/***********************************************************************
* CreateSolidBrush (GDI.66)
*/
HBRUSH16 WINAPI CreateSolidBrush16( COLORREF color )
{
return CreateSolidBrush( color );
}
/***********************************************************************
* CreateSolidBrush (GDI32.@)
*/
HBRUSH WINAPI CreateSolidBrush( COLORREF color )
......@@ -352,22 +325,6 @@ HBRUSH WINAPI CreateSolidBrush( COLORREF color )
/***********************************************************************
* SetBrushOrg (GDI.148)
*/
DWORD WINAPI SetBrushOrg16( HDC16 hdc, INT16 x, INT16 y )
{
DWORD retval;
DC *dc = DC_GetDCPtr( hdc );
if (!dc) return FALSE;
retval = dc->brushOrgX | (dc->brushOrgY << 16);
dc->brushOrgX = x;
dc->brushOrgY = y;
GDI_ReleaseObj( hdc );
return retval;
}
/***********************************************************************
* SetBrushOrgEx (GDI32.@)
*/
BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
......@@ -497,4 +454,3 @@ BOOL16 WINAPI SetSolidBrush16(HBRUSH16 hBrush, COLORREF newColor )
GDI_ReleaseObj( hBrush );
return res;
}
......@@ -55,15 +55,6 @@ void CLIPPING_UpdateGCRegion( DC * dc )
/***********************************************************************
* SelectClipRgn (GDI.44)
*/
INT16 WINAPI SelectClipRgn16( HDC16 hdc, HRGN16 hrgn )
{
return (INT16)SelectClipRgn( hdc, hrgn );
}
/***********************************************************************
* SelectClipRgn (GDI32.@)
*/
INT WINAPI SelectClipRgn( HDC hdc, HRGN hrgn )
......@@ -71,13 +62,6 @@ INT WINAPI SelectClipRgn( HDC hdc, HRGN hrgn )
return ExtSelectClipRgn( hdc, hrgn, RGN_COPY );
}
/******************************************************************************
* ExtSelectClipRgn [GDI.508]
*/
INT16 WINAPI ExtSelectClipRgn16( HDC16 hdc, HRGN16 hrgn, INT16 fnMode )
{
return (INT16) ExtSelectClipRgn((HDC) hdc, (HRGN) hrgn, fnMode);
}
/******************************************************************************
* ExtSelectClipRgn [GDI32.@]
......@@ -155,15 +139,6 @@ INT16 WINAPI SelectVisRgn16( HDC16 hdc, HRGN16 hrgn )
/***********************************************************************
* OffsetClipRgn (GDI.32)
*/
INT16 WINAPI OffsetClipRgn16( HDC16 hdc, INT16 x, INT16 y )
{
return (INT16)OffsetClipRgn( hdc, x, y );
}
/***********************************************************************
* OffsetClipRgn (GDI32.@)
*/
INT WINAPI OffsetClipRgn( HDC hdc, INT x, INT y )
......@@ -202,16 +177,6 @@ INT16 WINAPI OffsetVisRgn16( HDC16 hdc, INT16 x, INT16 y )
/***********************************************************************
* ExcludeClipRect (GDI.21)
*/
INT16 WINAPI ExcludeClipRect16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
return (INT16)ExcludeClipRect( hdc, left, top, right, bottom );
}
/***********************************************************************
* ExcludeClipRect (GDI32.@)
*/
INT WINAPI ExcludeClipRect( HDC hdc, INT left, INT top,
......@@ -254,20 +219,9 @@ INT WINAPI ExcludeClipRect( HDC hdc, INT left, INT top,
/***********************************************************************
* IntersectClipRect (GDI.22)
*/
INT16 WINAPI IntersectClipRect16( HDC16 hdc, INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
return (INT16)IntersectClipRect( hdc, left, top, right, bottom );
}
/***********************************************************************
* IntersectClipRect (GDI32.@)
*/
INT WINAPI IntersectClipRect( HDC hdc, INT left, INT top,
INT right, INT bottom )
INT WINAPI IntersectClipRect( HDC hdc, INT left, INT top, INT right, INT bottom )
{
INT ret;
DC *dc = DC_GetDCUpdate( hdc );
......@@ -375,15 +329,6 @@ INT16 WINAPI IntersectVisRect16( HDC16 hdc, INT16 left, INT16 top,
/***********************************************************************
* PtVisible (GDI.103)
*/
BOOL16 WINAPI PtVisible16( HDC16 hdc, INT16 x, INT16 y )
{
return PtVisible( hdc, x, y );
}
/***********************************************************************
* PtVisible (GDI32.@)
*/
BOOL WINAPI PtVisible( HDC hdc, INT x, INT y )
......@@ -408,18 +353,6 @@ BOOL WINAPI PtVisible( HDC hdc, INT x, INT y )
/***********************************************************************
* RectVisible (GDI.465)
* RectVisibleOld (GDI.104)
*/
BOOL16 WINAPI RectVisible16( HDC16 hdc, const RECT16* rect16 )
{
RECT rect;
CONV_RECT16TO32( rect16, &rect );
return RectVisible( hdc, &rect );
}
/***********************************************************************
* RectVisible (GDI32.@)
*/
BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
......@@ -443,22 +376,6 @@ BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
/***********************************************************************
* GetClipBox (GDI.77)
*/
INT16 WINAPI GetClipBox16( HDC16 hdc, LPRECT16 rect )
{
int ret;
DC *dc = DC_GetDCUpdate( hdc );
if (!dc) return ERROR;
ret = GetRgnBox16( dc->hGCClipRgn, rect );
DPtoLP16( hdc, (LPPOINT16)rect, 2 );
TRACE("%d,%d-%d,%d\n", rect->left,rect->top,rect->right,rect->bottom );
GDI_ReleaseObj( hdc );
return ret;
}
/***********************************************************************
* GetClipBox (GDI32.@)
*/
INT WINAPI GetClipBox( HDC hdc, LPRECT rect )
......
......@@ -440,15 +440,6 @@ void WINAPI SetDCState16( HDC16 hdc, HDC16 hdcs )
/***********************************************************************
* SaveDC (GDI.30)
*/
INT16 WINAPI SaveDC16( HDC16 hdc )
{
return (INT16)SaveDC( hdc );
}
/***********************************************************************
* SaveDC (GDI32.@)
*/
INT WINAPI SaveDC( HDC hdc )
......@@ -499,15 +490,6 @@ INT WINAPI SaveDC( HDC hdc )
/***********************************************************************
* RestoreDC (GDI.39)
*/
BOOL16 WINAPI RestoreDC16( HDC16 hdc, INT16 level )
{
return RestoreDC( hdc, level );
}
/***********************************************************************
* RestoreDC (GDI32.@)
*/
BOOL WINAPI RestoreDC( HDC hdc, INT level )
......@@ -567,15 +549,6 @@ BOOL WINAPI RestoreDC( HDC hdc, INT level )
/***********************************************************************
* CreateDC (GDI.53)
*/
HDC16 WINAPI CreateDC16( LPCSTR driver, LPCSTR device, LPCSTR output,
const DEVMODEA *initData )
{
return CreateDCA( driver, device, output, initData );
}
/***********************************************************************
* CreateDCA (GDI32.@)
*/
HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output,
......@@ -651,17 +624,6 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
/***********************************************************************
* CreateIC (GDI.153)
*/
HDC16 WINAPI CreateIC16( LPCSTR driver, LPCSTR device, LPCSTR output,
const DEVMODEA* initData )
{
/* Nothing special yet for ICs */
return CreateDC16( driver, device, output, initData );
}
/***********************************************************************
* CreateICA (GDI32.@)
*/
HDC WINAPI CreateICA( LPCSTR driver, LPCSTR device, LPCSTR output,
......@@ -684,15 +646,6 @@ HDC WINAPI CreateICW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
/***********************************************************************
* CreateCompatibleDC (GDI.52)
*/
HDC16 WINAPI CreateCompatibleDC16( HDC16 hdc )
{
return (HDC16)CreateCompatibleDC( hdc );
}
/***********************************************************************
* CreateCompatibleDC (GDI32.@)
*/
HDC WINAPI CreateCompatibleDC( HDC hdc )
......@@ -754,15 +707,6 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
/***********************************************************************
* DeleteDC (GDI.68)
*/
BOOL16 WINAPI DeleteDC16( HDC16 hdc )
{
return DeleteDC( hdc );
}
/***********************************************************************
* DeleteDC (GDI32.@)
*/
BOOL WINAPI DeleteDC( HDC hdc )
......@@ -826,15 +770,6 @@ BOOL WINAPI DeleteDC( HDC hdc )
/***********************************************************************
* ResetDC (GDI.376)
*/
HDC16 WINAPI ResetDC16( HDC16 hdc, const DEVMODEA *devmode )
{
return ResetDCA(hdc, devmode);
}
/***********************************************************************
* ResetDCA (GDI32.@)
*/
HDC WINAPI ResetDCA( HDC hdc, const DEVMODEA *devmode )
......@@ -861,18 +796,6 @@ HDC WINAPI ResetDCW( HDC hdc, const DEVMODEW *devmode )
/***********************************************************************
* GetDeviceCaps (GDI.80)
*/
INT16 WINAPI GetDeviceCaps16( HDC16 hdc, INT16 cap )
{
INT16 ret = GetDeviceCaps( hdc, cap );
/* some apps don't expect -1 and think it's a B&W screen */
if ((cap == NUMCOLORS) && (ret == -1)) ret = 2048;
return ret;
}
/***********************************************************************
* GetDeviceCaps (GDI32.@)
*/
INT WINAPI GetDeviceCaps( HDC hdc, INT cap )
......@@ -890,15 +813,6 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap )
/***********************************************************************
* SetBkColor (GDI.1)
*/
COLORREF WINAPI SetBkColor16( HDC16 hdc, COLORREF color )
{
return SetBkColor( hdc, color );
}
/***********************************************************************
* SetBkColor (GDI32.@)
*/
COLORREF WINAPI SetBkColor( HDC hdc, COLORREF color )
......@@ -924,15 +838,6 @@ COLORREF WINAPI SetBkColor( HDC hdc, COLORREF color )
/***********************************************************************
* SetTextColor (GDI.9)
*/
COLORREF WINAPI SetTextColor16( HDC16 hdc, COLORREF color )
{
return SetTextColor( hdc, color );
}
/***********************************************************************
* SetTextColor (GDI32.@)
*/
COLORREF WINAPI SetTextColor( HDC hdc, COLORREF color )
......@@ -956,14 +861,6 @@ COLORREF WINAPI SetTextColor( HDC hdc, COLORREF color )
return oldColor;
}
/***********************************************************************
* SetTextAlign (GDI.346)
*/
UINT16 WINAPI SetTextAlign16( HDC16 hdc, UINT16 align )
{
return SetTextAlign( hdc, align );
}
/***********************************************************************
* SetTextAlign (GDI32.@)
......@@ -1001,18 +898,6 @@ BOOL WINAPI GetDCOrgEx( HDC hDC, LPPOINT lpp )
/***********************************************************************
* GetDCOrg (GDI.79)
*/
DWORD WINAPI GetDCOrg16( HDC16 hdc )
{
POINT pt;
if( GetDCOrgEx( hdc, &pt) )
return MAKELONG( (WORD)pt.x, (WORD)pt.y );
return 0;
}
/***********************************************************************
* SetDCOrg (GDI.117)
*/
DWORD WINAPI SetDCOrg16( HDC16 hdc, INT16 x, INT16 y )
......@@ -1051,15 +936,6 @@ INT WINAPI SetGraphicsMode( HDC hdc, INT mode )
/***********************************************************************
* SetArcDirection (GDI.525)
*/
INT16 WINAPI SetArcDirection16( HDC16 hdc, INT16 nDirection )
{
return SetArcDirection( (HDC)hdc, (INT)nDirection );
}
/***********************************************************************
* SetArcDirection (GDI32.@)
*/
INT WINAPI SetArcDirection( HDC hdc, INT nDirection )
......@@ -1278,7 +1154,7 @@ BOOL16 WINAPI SetDCHook16( HDC16 hdc, FARPROC16 hookProc, DWORD dwHookData )
/***********************************************************************
* GetDCHook (GDI.191)
*/
DWORD WINAPI GetDCHook( HDC16 hdc, FARPROC16 *phookProc )
DWORD WINAPI GetDCHook16( HDC16 hdc, FARPROC16 *phookProc )
{
DC *dc = DC_GetDCPtr( hdc );
if (!dc) return 0;
......@@ -1458,29 +1334,6 @@ INT WINAPI GetRelAbs( HDC hdc, DWORD dwIgnore )
}
/***********************************************************************
* Death (GDI.121)
*
* Disables GDI, switches back to text mode.
* We don't have to do anything here,
* just let console support handle everything
*/
void WINAPI Death16(HDC16 hDC)
{
MESSAGE("Death(%04x) called. Application enters text mode...\n", hDC);
}
/***********************************************************************
* Resurrection (GDI.122)
*
* Restores GDI functionality
*/
void WINAPI Resurrection16(HDC16 hDC,
WORD w1, WORD w2, WORD w3, WORD w4, WORD w5, WORD w6)
{
MESSAGE("Resurrection(%04x, %04x, %04x, %04x, %04x, %04x, %04x) called. Application left text mode.\n", hDC, w1, w2, w3, w4, w5, w6);
}
/***********************************************************************
* GetLayout (GDI32.@)
*
* Gets left->right or right->left text layout flags of a dc.
......
......@@ -395,163 +395,7 @@ BOOL WINAPI GetWindowOrgEx( HDC hdc, LPPOINT pt )
}
/**** 16-bit functions ****/
/***********************************************************************
* SetBkMode (GDI.2)
*/
INT16 WINAPI SetBkMode16( HDC16 hdc, INT16 mode )
{
return SetBkMode( hdc, mode );
}
/***********************************************************************
* SetROP2 (GDI.4)
*/
INT16 WINAPI SetROP216( HDC16 hdc, INT16 mode )
{
return SetROP2( hdc, mode );
}
/***********************************************************************
* SetRelAbs (GDI.5)
*/
INT16 WINAPI SetRelAbs16( HDC16 hdc, INT16 mode )
{
return SetRelAbs( hdc, mode );
}
/***********************************************************************
* SetPolyFillMode (GDI.6)
*/
INT16 WINAPI SetPolyFillMode16( HDC16 hdc, INT16 mode )
{
return SetPolyFillMode( hdc, mode );
}
/***********************************************************************
* SetStretchBltMode (GDI.7)
*/
INT16 WINAPI SetStretchBltMode16( HDC16 hdc, INT16 mode )
{
return SetStretchBltMode( hdc, mode );
}
/***********************************************************************
* GetBkColor (GDI.75)
*/
COLORREF WINAPI GetBkColor16( HDC16 hdc )
{
return GetBkColor( hdc );
}
/***********************************************************************
* GetBkMode (GDI.76)
*/
INT16 WINAPI GetBkMode16( HDC16 hdc )
{
return GetBkMode( hdc );
}
/***********************************************************************
* GetCurrentPosition (GDI.78)
*/
DWORD WINAPI GetCurrentPosition16( HDC16 hdc )
{
POINT pt32;
if (!GetCurrentPositionEx( hdc, &pt32 )) return 0;
return MAKELONG( pt32.x, pt32.y );
}
/***********************************************************************
* GetMapMode (GDI.81)
*/
INT16 WINAPI GetMapMode16( HDC16 hdc )
{
return GetMapMode( hdc );
}
/***********************************************************************
* GetPolyFillMode (GDI.84)
*/
INT16 WINAPI GetPolyFillMode16( HDC16 hdc )
{
return GetPolyFillMode( hdc );
}
/***********************************************************************
* GetROP2 (GDI.85)
*/
INT16 WINAPI GetROP216( HDC16 hdc )
{
return GetROP2( hdc );
}
/***********************************************************************
* GetRelAbs (GDI.86)
*/
INT16 WINAPI GetRelAbs16( HDC16 hdc )
{
return GetRelAbs( hdc, 0 );
}
/***********************************************************************
* GetStretchBltMode (GDI.88)
*/
INT16 WINAPI GetStretchBltMode16( HDC16 hdc )
{
return GetStretchBltMode( hdc );
}
/***********************************************************************
* GetTextColor (GDI.90)
*/
COLORREF WINAPI GetTextColor16( HDC16 hdc )
{
return GetTextColor( hdc );
}
/***********************************************************************
* GetViewportExt (GDI.94)
*/
DWORD WINAPI GetViewportExt16( HDC16 hdc )
{
SIZE size;
if (!GetViewportExtEx( hdc, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* GetViewportOrg (GDI.95)
*/
DWORD WINAPI GetViewportOrg16( HDC16 hdc )
{
POINT pt;
if (!GetViewportOrgEx( hdc, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* GetWindowExt (GDI.96)
*/
DWORD WINAPI GetWindowExt16( HDC16 hdc )
{
SIZE size;
if (!GetWindowExtEx( hdc, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* GetWindowOrg (GDI.97)
*/
DWORD WINAPI GetWindowOrg16( HDC16 hdc )
{
POINT pt;
if (!GetWindowOrgEx( hdc, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/**** 16-bit functions ***/
/***********************************************************************
* InquireVisRgn (GDI.131)
......@@ -568,15 +412,6 @@ HRGN16 WINAPI InquireVisRgn16( HDC16 hdc )
return ret;
}
/***********************************************************************
* GetBrushOrg (GDI.149)
*/
DWORD WINAPI GetBrushOrg16( HDC16 hdc )
{
POINT pt;
if (!GetBrushOrgEx( hdc, &pt )) return 0;
return MAKELONG( pt.x, pt.y );
}
/***********************************************************************
* GetClipRgn (GDI.173)
......@@ -592,106 +427,3 @@ HRGN16 WINAPI GetClipRgn16( HDC16 hdc )
}
return ret;
}
/***********************************************************************
* GetTextAlign (GDI.345)
*/
UINT16 WINAPI GetTextAlign16( HDC16 hdc )
{
return GetTextAlign( hdc );
}
/***********************************************************************
* GetCurLogFont (GDI.411)
*/
HFONT16 WINAPI GetCurLogFont16( HDC16 hdc )
{
HFONT16 ret = 0;
DC * dc = DC_GetDCPtr( hdc );
if (dc)
{
ret = dc->hFont;
GDI_ReleaseObj( hdc );
}
return ret;
}
/***********************************************************************
* GetBrushOrgEx (GDI.469)
*/
BOOL16 WINAPI GetBrushOrgEx16( HDC16 hdc, LPPOINT16 pt )
{
POINT pt32;
if (!GetBrushOrgEx( hdc, &pt32 )) return FALSE;
pt->x = pt32.x;
pt->y = pt32.y;
return TRUE;
}
/***********************************************************************
* GetCurrentPositionEx (GDI.470)
*/
BOOL16 WINAPI GetCurrentPositionEx16( HDC16 hdc, LPPOINT16 pt )
{
POINT pt32;
if (!GetCurrentPositionEx( hdc, &pt32 )) return FALSE;
pt->x = pt32.x;
pt->y = pt32.y;
return TRUE;
}
/***********************************************************************
* GetViewportExtEx (GDI.472)
*/
BOOL16 WINAPI GetViewportExtEx16( HDC16 hdc, LPSIZE16 size )
{
SIZE size32;
if (!GetViewportExtEx( hdc, &size32 )) return FALSE;
size->cx = size32.cx;
size->cy = size32.cy;
return TRUE;
}
/***********************************************************************
* GetViewportOrgEx (GDI.473)
*/
BOOL16 WINAPI GetViewportOrgEx16( HDC16 hdc, LPPOINT16 pt )
{
POINT pt32;
if (!GetViewportOrgEx( hdc, &pt32 )) return FALSE;
pt->x = pt32.x;
pt->y = pt32.y;
return TRUE;
}
/***********************************************************************
* GetWindowExtEx (GDI.474)
*/
BOOL16 WINAPI GetWindowExtEx16( HDC16 hdc, LPSIZE16 size )
{
SIZE size32;
if (!GetWindowExtEx( hdc, &size32 )) return FALSE;
size->cx = size32.cx;
size->cy = size32.cy;
return TRUE;
}
/***********************************************************************
* GetWindowOrgEx (GDI.475)
*/
BOOL16 WINAPI GetWindowOrgEx16( HDC16 hdc, LPPOINT16 pt )
{
POINT pt32;
if (!GetWindowOrgEx( hdc, &pt32 )) return FALSE;
pt->x = pt32.x;
pt->y = pt32.y;
return TRUE;
}
/***********************************************************************
* GetArcDirection (GDI.524)
*/
INT16 WINAPI GetArcDirection16( HDC16 hdc )
{
return GetArcDirection( hdc );
}
......@@ -147,20 +147,6 @@ int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width,
/***********************************************************************
* StretchDIBits (GDI.439)
*/
INT16 WINAPI StretchDIBits16(HDC16 hdc, INT16 xDst, INT16 yDst, INT16 widthDst,
INT16 heightDst, INT16 xSrc, INT16 ySrc, INT16 widthSrc,
INT16 heightSrc, const VOID *bits,
const BITMAPINFO *info, UINT16 wUsage, DWORD dwRop )
{
return (INT16)StretchDIBits( hdc, xDst, yDst, widthDst, heightDst,
xSrc, ySrc, widthSrc, heightSrc, bits,
info, wUsage, dwRop );
}
/***********************************************************************
* StretchDIBits (GDI32.@)
*/
INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
......@@ -232,17 +218,6 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
}
/***********************************************************************
* SetDIBits (GDI.440)
*/
INT16 WINAPI SetDIBits16( HDC16 hdc, HBITMAP16 hbitmap, UINT16 startscan,
UINT16 lines, LPCVOID bits, const BITMAPINFO *info,
UINT16 coloruse )
{
return SetDIBits( hdc, hbitmap, startscan, lines, bits, info, coloruse );
}
/******************************************************************************
* SetDIBits [GDI32.@] Sets pixels in a bitmap using colors from DIB
*
......@@ -292,19 +267,6 @@ INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan,
/***********************************************************************
* SetDIBitsToDevice (GDI.443)
*/
INT16 WINAPI SetDIBitsToDevice16(HDC16 hdc, INT16 xDest, INT16 yDest, INT16 cx,
INT16 cy, INT16 xSrc, INT16 ySrc, UINT16 startscan,
UINT16 lines, LPCVOID bits, const BITMAPINFO *info,
UINT16 coloruse )
{
return SetDIBitsToDevice( hdc, xDest, yDest, cx, cy, xSrc, ySrc,
startscan, lines, bits, info, coloruse );
}
/***********************************************************************
* SetDIBitsToDevice (GDI32.@)
*/
INT WINAPI SetDIBitsToDevice(HDC hdc, INT xDest, INT yDest, DWORD cx,
......@@ -331,15 +293,6 @@ INT WINAPI SetDIBitsToDevice(HDC hdc, INT xDest, INT yDest, DWORD cx,
}
/***********************************************************************
* SetDIBColorTable (GDI.602)
*/
UINT16 WINAPI SetDIBColorTable16( HDC16 hdc, UINT16 startpos, UINT16 entries,
RGBQUAD *colors )
{
return SetDIBColorTable( hdc, startpos, entries, colors );
}
/***********************************************************************
* SetDIBColorTable (GDI32.@)
*/
UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *colors )
......@@ -356,14 +309,6 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *col
return result;
}
/***********************************************************************
* GetDIBColorTable (GDI.603)
*/
UINT16 WINAPI GetDIBColorTable16( HDC16 hdc, UINT16 startpos, UINT16 entries,
RGBQUAD *colors )
{
return GetDIBColorTable( hdc, startpos, entries, colors );
}
/***********************************************************************
* GetDIBColorTable (GDI32.@)
......@@ -433,16 +378,6 @@ static RGBQUAD DefLogPalette[20] = { /* Copy of Default Logical Palette */
{ 0xff, 0xff, 0xff, 0x00 }
};
/***********************************************************************
* GetDIBits (GDI.441)
*/
INT16 WINAPI GetDIBits16( HDC16 hdc, HBITMAP16 hbitmap, UINT16 startscan,
UINT16 lines, LPVOID bits, BITMAPINFO * info,
UINT16 coloruse )
{
return GetDIBits( hdc, hbitmap, startscan, lines, bits, info, coloruse );
}
/******************************************************************************
* GetDIBits [GDI32.@] Retrieves bits of bitmap and copies to buffer
......@@ -785,17 +720,6 @@ INT WINAPI GetDIBits(
/***********************************************************************
* CreateDIBitmap (GDI.442)
*/
HBITMAP16 WINAPI CreateDIBitmap16( HDC16 hdc, const BITMAPINFOHEADER * header,
DWORD init, LPCVOID bits, const BITMAPINFO * data,
UINT16 coloruse )
{
return CreateDIBitmap( hdc, header, init, bits, data, coloruse );
}
/***********************************************************************
* CreateDIBitmap (GDI32.@)
*/
HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header,
......
......@@ -454,22 +454,6 @@ void FONT_NewTextMetricEx16ToW(const NEWTEXTMETRICEX16 *ptm16, LPNEWTEXTMETRICEX
/***********************************************************************
* CreateFontIndirect (GDI.57)
*/
HFONT16 WINAPI CreateFontIndirect16( const LOGFONT16 *plf16 )
{
LOGFONTW lfW;
if(plf16) {
FONT_LogFont16ToW( plf16, &lfW );
return CreateFontIndirectW( &lfW );
} else {
return CreateFontIndirectW( NULL );
}
}
/***********************************************************************
* CreateFontIndirectA (GDI32.@)
*/
HFONT WINAPI CreateFontIndirectA( const LOGFONTA *plfA )
......@@ -973,15 +957,6 @@ INT WINAPI EnumFontsW( HDC hDC, LPCWSTR lpName, FONTENUMPROCW efproc,
/***********************************************************************
* GetTextCharacterExtra (GDI.89)
*/
INT16 WINAPI GetTextCharacterExtra16( HDC16 hdc )
{
return (INT16)GetTextCharacterExtra( hdc );
}
/***********************************************************************
* GetTextCharacterExtra (GDI32.@)
*/
INT WINAPI GetTextCharacterExtra( HDC hdc )
......@@ -997,15 +972,6 @@ INT WINAPI GetTextCharacterExtra( HDC hdc )
/***********************************************************************
* SetTextCharacterExtra (GDI.8)
*/
INT16 WINAPI SetTextCharacterExtra16( HDC16 hdc, INT16 extra )
{
return (INT16)SetTextCharacterExtra( hdc, extra );
}
/***********************************************************************
* SetTextCharacterExtra (GDI32.@)
*/
INT WINAPI SetTextCharacterExtra( HDC hdc, INT extra )
......@@ -1027,15 +993,6 @@ INT WINAPI SetTextCharacterExtra( HDC hdc, INT extra )
/***********************************************************************
* SetTextJustification (GDI.10)
*/
INT16 WINAPI SetTextJustification16( HDC16 hdc, INT16 extra, INT16 breaks )
{
return SetTextJustification( hdc, extra, breaks );
}
/***********************************************************************
* SetTextJustification (GDI32.@)
*/
BOOL WINAPI SetTextJustification( HDC hdc, INT extra, INT breaks )
......@@ -1068,14 +1025,6 @@ BOOL WINAPI SetTextJustification( HDC hdc, INT extra, INT breaks )
/***********************************************************************
* GetTextFace (GDI.92)
*/
INT16 WINAPI GetTextFace16( HDC16 hdc, INT16 count, LPSTR name )
{
return GetTextFaceA(hdc,count,name);
}
/***********************************************************************
* GetTextFaceA (GDI32.@)
*/
INT WINAPI GetTextFaceA( HDC hdc, INT count, LPSTR name )
......@@ -1122,37 +1071,6 @@ INT WINAPI GetTextFaceW( HDC hdc, INT count, LPWSTR name )
/***********************************************************************
* GetTextExtent (GDI.91)
*/
DWORD WINAPI GetTextExtent16( HDC16 hdc, LPCSTR str, INT16 count )
{
SIZE16 size;
if (!GetTextExtentPoint16( hdc, str, count, &size )) return 0;
return MAKELONG( size.cx, size.cy );
}
/***********************************************************************
* GetTextExtentPoint (GDI.471)
*
* FIXME: Should this have a bug for compatibility?
* Original Windows versions of GetTextExtentPoint{A,W} have documented
* bugs (-> MSDN KB q147647.txt).
*/
BOOL16 WINAPI GetTextExtentPoint16( HDC16 hdc, LPCSTR str, INT16 count,
LPSIZE16 size )
{
SIZE size32;
BOOL ret;
TRACE("%04x, %p (%s), %d, %p\n", hdc, str, debugstr_an(str, count), count, size);
ret = GetTextExtentPoint32A( hdc, str, count, &size32 );
size->cx = size32.cx;
size->cy = size32.cy;
return (BOOL16)ret;
}
/***********************************************************************
* GetTextExtentPoint32A (GDI32.@)
*/
BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count,
......@@ -1351,19 +1269,6 @@ done:
}
/***********************************************************************
* GetTextMetrics (GDI.93)
*/
BOOL16 WINAPI GetTextMetrics16( HDC16 hdc, TEXTMETRIC16 *metrics )
{
TEXTMETRICW tm32;
if (!GetTextMetricsW( (HDC)hdc, &tm32 )) return FALSE;
FONT_TextMetricWTo16( &tm32, metrics );
return TRUE;
}
/***********************************************************************
* GetTextMetricsA (GDI32.@)
*/
BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
......@@ -1637,42 +1542,6 @@ UINT WINAPI GetOutlineTextMetricsW(
/***********************************************************************
* GetCharWidth (GDI.350)
*/
BOOL16 WINAPI GetCharWidth16( HDC16 hdc, UINT16 firstChar, UINT16 lastChar,
LPINT16 buffer )
{
BOOL retVal = FALSE;
if( firstChar != lastChar )
{
LPINT buf32 = (LPINT)HeapAlloc(GetProcessHeap(), 0,
sizeof(INT)*(1 + (lastChar - firstChar)));
if( buf32 )
{
LPINT obuf32 = buf32;
int i;
retVal = GetCharWidth32A(hdc, firstChar, lastChar, buf32);
if (retVal)
{
for (i = firstChar; i <= lastChar; i++)
*buffer++ = *buf32++;
}
HeapFree(GetProcessHeap(), 0, obuf32);
}
}
else /* happens quite often to warrant a special treatment */
{
INT chWidth;
retVal = GetCharWidth32A(hdc, firstChar, lastChar, &chWidth );
*buffer = chWidth;
}
return retVal;
}
/***********************************************************************
* GetCharWidthW (GDI32.@)
* GetCharWidth32W (GDI32.@)
*/
......@@ -1744,15 +1613,6 @@ BOOL WINAPI GetCharWidth32A( HDC hdc, UINT firstChar, UINT lastChar,
/***********************************************************************
* SetMapperFlags (GDI.349)
*/
DWORD WINAPI SetMapperFlags16( HDC16 hDC, DWORD dwFlag )
{
return SetMapperFlags( hDC, dwFlag );
}
/***********************************************************************
* SetMapperFlags (GDI32.@)
*/
DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
......@@ -1786,29 +1646,6 @@ BOOL WINAPI GetAspectRatioFilterEx( HDC hdc, LPSIZE pAspectRatio )
return FALSE;
}
/***********************************************************************
* GetCharABCWidths (GDI.307)
*/
BOOL16 WINAPI GetCharABCWidths16( HDC16 hdc, UINT16 firstChar, UINT16 lastChar,
LPABC16 abc )
{
LPABC abc32 = HeapAlloc(GetProcessHeap(),0,sizeof(ABC)*(lastChar-firstChar+1));
int i;
if (!GetCharABCWidthsA( hdc, firstChar, lastChar, abc32 )) {
HeapFree(GetProcessHeap(),0,abc32);
return FALSE;
}
for (i=firstChar;i<=lastChar;i++) {
abc[i-firstChar].abcA = abc32[i-firstChar].abcA;
abc[i-firstChar].abcB = abc32[i-firstChar].abcB;
abc[i-firstChar].abcC = abc32[i-firstChar].abcC;
}
HeapFree(GetProcessHeap(),0,abc32);
return TRUE;
}
/***********************************************************************
* GetCharABCWidthsA (GDI32.@)
......@@ -1945,16 +1782,6 @@ DWORD WINAPI GetGlyphOutlineW( HDC hdc, UINT uChar, UINT fuFormat,
return ret;
}
/***********************************************************************
* CreateScalableFontResource (GDI.310)
*/
BOOL16 WINAPI CreateScalableFontResource16( UINT16 fHidden,
LPCSTR lpszResourceFile,
LPCSTR fontFile, LPCSTR path )
{
return CreateScalableFontResourceA( fHidden, lpszResourceFile,
fontFile, path );
}
/***********************************************************************
* CreateScalableFontResourceA (GDI32.@)
......@@ -1998,15 +1825,6 @@ BOOL WINAPI CreateScalableFontResourceW( DWORD fHidden,
/*************************************************************************
* GetRasterizerCaps (GDI.313)
*/
BOOL16 WINAPI GetRasterizerCaps16( LPRASTERIZER_STATUS lprs, UINT16 cbNumBytes)
{
return GetRasterizerCaps( lprs, cbNumBytes );
}
/*************************************************************************
* GetRasterizerCaps (GDI32.@)
*/
BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
......@@ -2019,31 +1837,9 @@ BOOL WINAPI GetRasterizerCaps( LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
/*************************************************************************
* GetKerningPairs (GDI.332)
*
*/
INT16 WINAPI GetKerningPairs16( HDC16 hDC, INT16 cPairs,
LPKERNINGPAIR16 lpKerningPairs )
{
/* At this time kerning is ignored (set to 0) */
int i;
FIXME("(%x,%d,%p): almost empty stub!\n", hDC, cPairs, lpKerningPairs);
if (lpKerningPairs)
for (i = 0; i < cPairs; i++)
lpKerningPairs[i].iKernAmount = 0;
/* FIXME: Should this function call SetLastError (0)? This is yet another
* Microsoft function that can return 0 on success or failure
*/
return 0;
}
/*************************************************************************
* GetKerningPairsA (GDI32.@)
*/
DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs,
LPKERNINGPAIR lpKerningPairs )
DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs, LPKERNINGPAIR lpKerningPairs )
{
int i;
FIXME("(%x,%ld,%p): almost empty stub!\n", hDC, cPairs, lpKerningPairs);
......@@ -2153,14 +1949,6 @@ DWORD WINAPI GetFontLanguageInfo(HDC hdc)
return result;
}
/*************************************************************************
* GetFontLanguageInfo (GDI.616)
*/
DWORD WINAPI GetFontLanguageInfo16(HDC16 hdc) {
/* return value 0 is correct for most cases anyway */
FIXME("(%x):stub!\n",hdc);
return 0;
}
/*************************************************************************
* GetFontData [GDI32.@] Retrieve data for TrueType font
......@@ -2191,16 +1979,6 @@ DWORD WINAPI GetFontData(HDC hdc, DWORD table, DWORD offset,
}
/*************************************************************************
* GetFontData [GDI.311]
*
*/
DWORD WINAPI GetFontData16(HDC16 hdc, DWORD dwTable, DWORD dwOffset,
LPVOID lpvBuffer, DWORD cbData)
{
return GetFontData(hdc, dwTable, dwOffset, lpvBuffer, cbData);
}
/*************************************************************************
* GetGlyphIndicesA [GDI32.@]
*/
DWORD WINAPI GetGlyphIndicesA(HDC hdc, LPCSTR lpstr, INT count,
......@@ -2485,16 +2263,6 @@ BOOL WINAPI GetCharWidthFloatW(HDC hdc, UINT iFirstChar,
* Font Resource API *
* *
***********************************************************************/
/***********************************************************************
* AddFontResource (GDI.119)
*
* Can be either .FON, or .FNT, or .TTF, or .FOT font file.
*
*/
INT16 WINAPI AddFontResource16( LPCSTR filename )
{
return AddFontResourceA( filename );
}
/***********************************************************************
* AddFontResourceA (GDI32.@)
......@@ -2537,14 +2305,6 @@ INT WINAPI AddFontResourceExW( LPCWSTR str, DWORD fl, PVOID pdv )
}
/***********************************************************************
* RemoveFontResource (GDI.136)
*/
BOOL16 WINAPI RemoveFontResource16( LPCSTR str )
{
return RemoveFontResourceA(str);
}
/***********************************************************************
* RemoveFontResourceA (GDI32.@)
*/
BOOL WINAPI RemoveFontResourceA( LPCSTR str )
......
......@@ -662,7 +662,7 @@ inline static GDIOBJHDR *alloc_large_heap( WORD size, HGDIOBJ *handle )
if ((obj = HeapAlloc( GetProcessHeap(), 0, size )))
{
large_handles[i] = obj;
*handle = (i + FIRST_LARGE_HANDLE) << 2;
*handle = (HGDIOBJ)(ULONG_PTR)((i + FIRST_LARGE_HANDLE) << 2);
next_large_handle = i;
}
return obj;
......@@ -675,6 +675,7 @@ inline static GDIOBJHDR *alloc_large_heap( WORD size, HGDIOBJ *handle )
void *GDI_AllocObject( WORD size, WORD magic, HGDIOBJ *handle, const struct gdi_obj_funcs *funcs )
{
GDIOBJHDR *obj;
HLOCAL16 hlocal;
_EnterSysLevel( &GDI_level );
switch(magic)
......@@ -691,9 +692,10 @@ void *GDI_AllocObject( WORD size, WORD magic, HGDIOBJ *handle, const struct gdi_
if (!(obj = alloc_large_heap( size, handle ))) goto error;
break;
default:
if (!(*handle = LOCAL_Alloc( GDI_HeapSel, LMEM_MOVEABLE, size ))) goto error;
assert( *handle & 2 );
obj = (GDIOBJHDR *)LOCAL_Lock( GDI_HeapSel, *handle );
if (!(hlocal = LOCAL_Alloc( GDI_HeapSel, LMEM_MOVEABLE, size ))) goto error;
assert( hlocal & 2 );
obj = (GDIOBJHDR *)LOCAL_Lock( GDI_HeapSel, hlocal );
*handle = (HGDIOBJ)(ULONG_PTR)hlocal;
break;
}
......@@ -751,7 +753,7 @@ BOOL GDI_FreeObject( HGDIOBJ handle, void *ptr )
}
else /* large heap handle */
{
int i = (handle >> 2) - FIRST_LARGE_HANDLE;
int i = ((ULONG_PTR)handle >> 2) - FIRST_LARGE_HANDLE;
if (i >= 0 && i < MAX_LARGE_HANDLES && large_handles[i])
{
HeapFree( GetProcessHeap(), 0, large_handles[i] );
......@@ -836,16 +838,6 @@ void GDI_CheckNotLock(void)
/***********************************************************************
* DeleteObject (GDI.69)
* SysDeleteObject (GDI.605)
*/
BOOL16 WINAPI DeleteObject16( HGDIOBJ16 obj )
{
return DeleteObject( obj );
}
/***********************************************************************
* DeleteObject (GDI32.@)
*/
BOOL WINAPI DeleteObject( HGDIOBJ obj )
......@@ -884,14 +876,6 @@ BOOL WINAPI DeleteObject( HGDIOBJ obj )
return FALSE;
}
/***********************************************************************
* GetStockObject (GDI.87)
*/
HGDIOBJ16 WINAPI GetStockObject16( INT16 obj )
{
return (HGDIOBJ16)GetStockObject( obj );
}
/***********************************************************************
* GetStockObject (GDI32.@)
......@@ -1055,15 +1039,6 @@ HANDLE WINAPI GetCurrentObject(HDC hdc,UINT type)
/***********************************************************************
* SelectObject (GDI.45)
*/
HGDIOBJ16 WINAPI SelectObject16( HDC16 hdc, HGDIOBJ16 handle )
{
return (HGDIOBJ16)SelectObject( hdc, handle );
}
/***********************************************************************
* SelectObject (GDI32.@)
*/
HGDIOBJ WINAPI SelectObject( HDC hdc, HGDIOBJ handle )
......@@ -1089,15 +1064,6 @@ HGDIOBJ WINAPI SelectObject( HDC hdc, HGDIOBJ handle )
/***********************************************************************
* UnrealizeObject (GDI.150)
*/
BOOL16 WINAPI UnrealizeObject16( HGDIOBJ16 obj )
{
return UnrealizeObject( obj );
}
/***********************************************************************
* UnrealizeObject (GDI32.@)
*/
BOOL WINAPI UnrealizeObject( HGDIOBJ obj )
......@@ -1281,15 +1247,6 @@ BOOL16 WINAPI IsGDIObject16( HGDIOBJ16 handle )
/***********************************************************************
* SetObjectOwner (GDI.461)
*/
void WINAPI SetObjectOwner16( HGDIOBJ16 handle, HANDLE16 owner )
{
/* Nothing to do */
}
/***********************************************************************
* SetObjectOwner (GDI32.@)
*/
void WINAPI SetObjectOwner( HGDIOBJ handle, HANDLE owner )
......@@ -1411,33 +1368,6 @@ WORD WINAPI GdiFreeResources16( DWORD reserve )
(int)LOCAL_HeapSize( GDI_HeapSel ) );
}
/***********************************************************************
* MulDiv (GDI.128)
*/
INT16 WINAPI MulDiv16(
INT16 nMultiplicand,
INT16 nMultiplier,
INT16 nDivisor)
{
INT ret;
if (!nDivisor) return -32768;
/* We want to deal with a positive divisor to simplify the logic. */
if (nDivisor < 0)
{
nMultiplicand = - nMultiplicand;
nDivisor = -nDivisor;
}
/* If the result is positive, we "add" to round. else,
* we subtract to round. */
if ( ( (nMultiplicand < 0) && (nMultiplier < 0) ) ||
( (nMultiplicand >= 0) && (nMultiplier >= 0) ) )
ret = (((int)nMultiplicand * nMultiplier) + (nDivisor/2)) / nDivisor;
else
ret = (((int)nMultiplicand * nMultiplier) - (nDivisor/2)) / nDivisor;
if ((ret > 32767) || (ret < -32767)) return -32768;
return (INT16) ret;
}
/*******************************************************************
* GetColorAdjustment [GDI32.@]
......
......@@ -140,15 +140,6 @@ static void PALETTE_ValidateFlags(PALETTEENTRY* lpPalE, int size)
/***********************************************************************
* CreatePalette (GDI.360)
*/
HPALETTE16 WINAPI CreatePalette16( const LOGPALETTE* palette )
{
return CreatePalette( palette );
}
/***********************************************************************
* CreatePalette [GDI32.@] Creates a logical color palette
*
* RETURNS
......@@ -181,20 +172,6 @@ HPALETTE WINAPI CreatePalette(
/***********************************************************************
* CreateHalftonePalette [GDI.529] Creates a halftone palette
*
* RETURNS
* Success: Handle to logical halftone palette
* Failure: 0
*/
HPALETTE16 WINAPI CreateHalftonePalette16(
HDC16 hdc) /* [in] Handle to device context */
{
return CreateHalftonePalette(hdc);
}
/***********************************************************************
* CreateHalftonePalette [GDI32.@] Creates a halftone palette
*
* RETURNS
......@@ -290,16 +267,6 @@ HPALETTE WINAPI CreateHalftonePalette(
/***********************************************************************
* GetPaletteEntries (GDI.363)
*/
UINT16 WINAPI GetPaletteEntries16( HPALETTE16 hpalette, UINT16 start,
UINT16 count, LPPALETTEENTRY entries )
{
return GetPaletteEntries( hpalette, start, count, entries );
}
/***********************************************************************
* GetPaletteEntries [GDI32.@] Retrieves palette entries
*
* RETURNS
......@@ -350,16 +317,6 @@ UINT WINAPI GetPaletteEntries(
/***********************************************************************
* SetPaletteEntries (GDI.364)
*/
UINT16 WINAPI SetPaletteEntries16( HPALETTE16 hpalette, UINT16 start,
UINT16 count, const PALETTEENTRY *entries )
{
return SetPaletteEntries( hpalette, start, count, entries );
}
/***********************************************************************
* SetPaletteEntries [GDI32.@] Sets color values for range in palette
*
* RETURNS
......@@ -399,15 +356,6 @@ UINT WINAPI SetPaletteEntries(
/***********************************************************************
* ResizePalette (GDI.368)
*/
BOOL16 WINAPI ResizePalette16( HPALETTE16 hPal, UINT16 cEntries )
{
return ResizePalette( hPal, cEntries );
}
/***********************************************************************
* ResizePalette [GDI32.@] Resizes logical palette
*
* RETURNS
......@@ -465,16 +413,6 @@ BOOL WINAPI ResizePalette(
/***********************************************************************
* AnimatePalette (GDI.367)
*/
void WINAPI AnimatePalette16( HPALETTE16 hPal, UINT16 StartIndex,
UINT16 NumEntries, const PALETTEENTRY* PaletteColors)
{
AnimatePalette( hPal, StartIndex, NumEntries, PaletteColors );
}
/***********************************************************************
* AnimatePalette [GDI32.@] Replaces entries in logical palette
*
* RETURNS
......@@ -504,15 +442,6 @@ BOOL WINAPI AnimatePalette(
/***********************************************************************
* SetSystemPaletteUse (GDI.373)
*/
UINT16 WINAPI SetSystemPaletteUse16( HDC16 hdc, UINT16 use )
{
return SetSystemPaletteUse( hdc, use );
}
/***********************************************************************
* SetSystemPaletteUse [GDI32.@]
*
* RETURNS
......@@ -531,15 +460,6 @@ UINT WINAPI SetSystemPaletteUse(
/***********************************************************************
* GetSystemPaletteUse (GDI.374)
*/
UINT16 WINAPI GetSystemPaletteUse16( HDC16 hdc )
{
return SystemPaletteUse;
}
/***********************************************************************
* GetSystemPaletteUse [GDI32.@] Gets state of system palette
*
* RETURNS
......@@ -553,16 +473,6 @@ UINT WINAPI GetSystemPaletteUse(
/***********************************************************************
* GetSystemPaletteEntries (GDI.375)
*/
UINT16 WINAPI GetSystemPaletteEntries16( HDC16 hdc, UINT16 start, UINT16 count,
LPPALETTEENTRY entries )
{
return GetSystemPaletteEntries( hdc, start, count, entries );
}
/***********************************************************************
* GetSystemPaletteEntries [GDI32.@] Gets range of palette entries
*
* RETURNS
......@@ -591,15 +501,6 @@ UINT WINAPI GetSystemPaletteEntries(
/***********************************************************************
* GetNearestPaletteIndex (GDI.370)
*/
UINT16 WINAPI GetNearestPaletteIndex16( HPALETTE16 hpalette, COLORREF color )
{
return GetNearestPaletteIndex( hpalette, color );
}
/***********************************************************************
* GetNearestPaletteIndex [GDI32.@] Gets palette index for color
*
* NOTES
......@@ -642,15 +543,6 @@ UINT WINAPI GetNearestPaletteIndex(
/***********************************************************************
* GetNearestColor (GDI.154)
*/
COLORREF WINAPI GetNearestColor16( HDC16 hdc, COLORREF color )
{
return GetNearestColor( hdc, color );
}
/***********************************************************************
* GetNearestColor [GDI32.@] Gets a system color to match
*
* RETURNS
......@@ -925,16 +817,6 @@ BOOL WINAPI UpdateColors(
}
/**********************************************************************
* UpdateColors (GDI.366)
*/
INT16 WINAPI UpdateColors16( HDC16 hDC )
{
UpdateColors( hDC );
return TRUE;
}
/*********************************************************************
* SetMagicColors (GDI.606)
*/
......
......@@ -52,23 +52,6 @@ static const struct gdi_obj_funcs pen_funcs =
GDI_FreeObject /* pDeleteObject */
};
/***********************************************************************
* CreatePen (GDI.61)
*/
HPEN16 WINAPI CreatePen16( INT16 style, INT16 width, COLORREF color )
{
LOGPEN logpen;
TRACE("%d %d %06lx\n", style, width, color );
logpen.lopnStyle = style;
logpen.lopnWidth.x = width;
logpen.lopnWidth.y = 0;
logpen.lopnColor = color;
return CreatePenIndirect( &logpen );
}
/***********************************************************************
* CreatePen (GDI32.@)
......@@ -89,24 +72,6 @@ HPEN WINAPI CreatePen( INT style, INT width, COLORREF color )
/***********************************************************************
* CreatePenIndirect (GDI.62)
*/
HPEN16 WINAPI CreatePenIndirect16( const LOGPEN16 * pen )
{
PENOBJ * penPtr;
HPEN hpen;
if (pen->lopnStyle > PS_INSIDEFRAME) return 0;
if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, &hpen, &pen_funcs ))) return 0;
penPtr->logpen.lopnStyle = pen->lopnStyle;
penPtr->logpen.lopnColor = pen->lopnColor;
CONV_POINT16TO32( &pen->lopnWidth, &penPtr->logpen.lopnWidth );
GDI_ReleaseObj( hpen );
return hpen;
}
/***********************************************************************
* CreatePenIndirect (GDI32.@)
*/
HPEN WINAPI CreatePenIndirect( const LOGPEN * pen )
......
......@@ -552,13 +552,6 @@ static HGDIOBJ REGION_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
return (HGDIOBJ)SelectClipRgn( hdc, handle );
}
/***********************************************************************
* OffsetRgn (GDI.101)
*/
INT16 WINAPI OffsetRgn16( HRGN16 hrgn, INT16 x, INT16 y )
{
return OffsetRgn( hrgn, x, y );
}
/***********************************************************************
* OffsetRgn (GDI32.@)
......@@ -598,17 +591,6 @@ INT WINAPI OffsetRgn( HRGN hrgn, INT x, INT y )
/***********************************************************************
* GetRgnBox (GDI.134)
*/
INT16 WINAPI GetRgnBox16( HRGN16 hrgn, LPRECT16 rect )
{
RECT r;
INT16 ret = (INT16)GetRgnBox( hrgn, &r );
CONV_RECT32TO16( &r, rect );
return ret;
}
/***********************************************************************
* GetRgnBox (GDI32.@)
*/
INT WINAPI GetRgnBox( HRGN hrgn, LPRECT rect )
......@@ -631,23 +613,6 @@ INT WINAPI GetRgnBox( HRGN hrgn, LPRECT rect )
/***********************************************************************
* CreateRectRgn (GDI.64)
*
* NOTE: Doesn't call CreateRectRgn because of differences in SetRectRgn16/32
*/
HRGN16 WINAPI CreateRectRgn16(INT16 left, INT16 top, INT16 right, INT16 bottom)
{
HRGN16 hrgn;
if (!(hrgn = (HRGN16)REGION_CreateRegion(RGN_DEFAULT_RECTS)))
return 0;
TRACE("\n");
SetRectRgn16(hrgn, left, top, right, bottom);
return hrgn;
}
/***********************************************************************
* CreateRectRgn (GDI32.@)
*/
HRGN WINAPI CreateRectRgn(INT left, INT top, INT right, INT bottom)
......@@ -663,14 +628,6 @@ HRGN WINAPI CreateRectRgn(INT left, INT top, INT right, INT bottom)
return hrgn;
}
/***********************************************************************
* CreateRectRgnIndirect (GDI.65)
*/
HRGN16 WINAPI CreateRectRgnIndirect16( const RECT16* rect )
{
return CreateRectRgn16( rect->left, rect->top, rect->right, rect->bottom );
}
/***********************************************************************
* CreateRectRgnIndirect (GDI32.@)
......@@ -682,21 +639,6 @@ HRGN WINAPI CreateRectRgnIndirect( const RECT* rect )
/***********************************************************************
* SetRectRgn (GDI.172)
*
* NOTE: Win 3.1 sets region to empty if left > right
*/
VOID WINAPI SetRectRgn16( HRGN16 hrgn, INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
if(left < right)
SetRectRgn( hrgn, left, top, right, bottom );
else
SetRectRgn( hrgn, 0, 0, 0, 0 );
}
/***********************************************************************
* SetRectRgn (GDI32.@)
*
* Allows either or both left and top to be greater than right or bottom.
......@@ -731,25 +673,6 @@ BOOL WINAPI SetRectRgn( HRGN hrgn, INT left, INT top,
/***********************************************************************
* CreateRoundRectRgn (GDI.444)
*
* If either ellipse dimension is zero we call CreateRectRgn16 for its
* `special' behaviour. -ve ellipse dimensions can result in GPFs under win3.1
* we just let CreateRoundRectRgn convert them to +ve values.
*/
HRGN16 WINAPI CreateRoundRectRgn16( INT16 left, INT16 top,
INT16 right, INT16 bottom,
INT16 ellipse_width, INT16 ellipse_height )
{
if( ellipse_width == 0 || ellipse_height == 0 )
return CreateRectRgn16( left, top, right, bottom );
else
return (HRGN16)CreateRoundRectRgn( left, top, right, bottom,
ellipse_width, ellipse_height );
}
/***********************************************************************
* CreateRoundRectRgn (GDI32.@)
*/
HRGN WINAPI CreateRoundRectRgn( INT left, INT top,
......@@ -858,17 +781,6 @@ HRGN WINAPI CreateRoundRectRgn( INT left, INT top,
/***********************************************************************
* CreateEllipticRgn (GDI.54)
*/
HRGN16 WINAPI CreateEllipticRgn16( INT16 left, INT16 top,
INT16 right, INT16 bottom )
{
return (HRGN16)CreateRoundRectRgn( left, top, right, bottom,
right-left, bottom-top );
}
/***********************************************************************
* CreateEllipticRgn (GDI32.@)
*/
HRGN WINAPI CreateEllipticRgn( INT left, INT top,
......@@ -880,17 +792,6 @@ HRGN WINAPI CreateEllipticRgn( INT left, INT top,
/***********************************************************************
* CreateEllipticRgnIndirect (GDI.55)
*/
HRGN16 WINAPI CreateEllipticRgnIndirect16( const RECT16 *rect )
{
return CreateRoundRectRgn( rect->left, rect->top, rect->right,
rect->bottom, rect->right - rect->left,
rect->bottom - rect->top );
}
/***********************************************************************
* CreateEllipticRgnIndirect (GDI32.@)
*/
HRGN WINAPI CreateEllipticRgnIndirect( const RECT *rect )
......@@ -947,14 +848,6 @@ DWORD WINAPI GetRegionData(HRGN hrgn, DWORD count, LPRGNDATA rgndata)
return size + sizeof(RGNDATAHEADER);
}
/***********************************************************************
* GetRegionData (GDI.607)
* FIXME: is LPRGNDATA the same in Win16 and Win32 ?
*/
DWORD WINAPI GetRegionData16(HRGN16 hrgn, DWORD count, LPRGNDATA rgndata)
{
return GetRegionData((HRGN)hrgn, count, rgndata);
}
/***********************************************************************
* ExtCreateRegion (GDI32.@)
......@@ -999,14 +892,6 @@ fail:
return 0;
}
/***********************************************************************
* PtInRegion (GDI.161)
*/
BOOL16 WINAPI PtInRegion16( HRGN16 hrgn, INT16 x, INT16 y )
{
return PtInRegion( hrgn, x, y );
}
/***********************************************************************
* PtInRegion (GDI32.@)
......@@ -1034,19 +919,6 @@ BOOL WINAPI PtInRegion( HRGN hrgn, INT x, INT y )
/***********************************************************************
* RectInRegion (GDI.466)
* RectInRegionOld (GDI.181)
*/
BOOL16 WINAPI RectInRegion16( HRGN16 hrgn, const RECT16 *rect )
{
RECT r32;
CONV_RECT16TO32(rect, &r32);
return (BOOL16)RectInRegion(hrgn, &r32);
}
/***********************************************************************
* RectInRegion (GDI32.@)
*
* Returns TRUE if rect is at least partly inside hrgn
......@@ -1090,15 +962,6 @@ BOOL WINAPI RectInRegion( HRGN hrgn, const RECT *rect )
}
/***********************************************************************
* EqualRgn (GDI.72)
*/
BOOL16 WINAPI EqualRgn16( HRGN16 rgn1, HRGN16 rgn2 )
{
return EqualRgn( rgn1, rgn2 );
}
/***********************************************************************
* EqualRgn (GDI32.@)
*/
BOOL WINAPI EqualRgn( HRGN hrgn1, HRGN hrgn2 )
......@@ -1196,15 +1059,6 @@ BOOL REGION_FrameRgn( HRGN hDest, HRGN hSrc, INT x, INT y )
/***********************************************************************
* CombineRgn (GDI.47)
*/
INT16 WINAPI CombineRgn16(HRGN16 hDest, HRGN16 hSrc1, HRGN16 hSrc2, INT16 mode)
{
return (INT16)CombineRgn( hDest, hSrc1, hSrc2, mode );
}
/***********************************************************************
* CombineRgn (GDI32.@)
*
* Note: The behavior is correct even if src and dest regions are the same.
......@@ -2847,41 +2701,6 @@ HRGN WINAPI CreatePolyPolygonRgn(const POINT *Pts, const INT *Count,
/***********************************************************************
* CreatePolygonRgn (GDI.63)
*/
HRGN16 WINAPI CreatePolygonRgn16( const POINT16 * points, INT16 count,
INT16 mode )
{
return CreatePolyPolygonRgn16( points, &count, 1, mode );
}
/***********************************************************************
* CreatePolyPolygonRgn (GDI.451)
*/
HRGN16 WINAPI CreatePolyPolygonRgn16( const POINT16 *points,
const INT16 *count, INT16 nbpolygons, INT16 mode )
{
HRGN hrgn;
int i, npts = 0;
INT *count32;
POINT *points32;
for (i = 0; i < nbpolygons; i++)
npts += count[i];
points32 = HeapAlloc( GetProcessHeap(), 0, npts * sizeof(POINT) );
for (i = 0; i < npts; i++)
CONV_POINT16TO32( &(points[i]), &(points32[i]) );
count32 = HeapAlloc( GetProcessHeap(), 0, nbpolygons * sizeof(INT) );
for (i = 0; i < nbpolygons; i++)
count32[i] = count[i];
hrgn = CreatePolyPolygonRgn( points32, count32, nbpolygons, mode );
HeapFree( GetProcessHeap(), 0, count32 );
HeapFree( GetProcessHeap(), 0, points32 );
return hrgn;
}
/***********************************************************************
* CreatePolygonRgn (GDI32.@)
*/
HRGN WINAPI CreatePolygonRgn( const POINT *points, INT count,
......
......@@ -107,29 +107,6 @@ LPWSTR FONT_mbtowc(HDC hdc, LPCSTR str, INT count, INT *plenW, UINT *pCP)
return strW;
}
/***********************************************************************
* ExtTextOut (GDI.351)
*/
BOOL16 WINAPI ExtTextOut16( HDC16 hdc, INT16 x, INT16 y, UINT16 flags,
const RECT16 *lprect, LPCSTR str, UINT16 count,
const INT16 *lpDx )
{
BOOL ret;
int i;
RECT rect32;
LPINT lpdx32 = NULL;
if (lpDx) {
lpdx32 = (LPINT)HeapAlloc( GetProcessHeap(),0, sizeof(INT)*count );
if(lpdx32 == NULL) return FALSE;
for (i=count;i--;) lpdx32[i]=lpDx[i];
}
if (lprect) CONV_RECT16TO32(lprect,&rect32);
ret = ExtTextOutA(hdc,x,y,flags,lprect?&rect32:NULL,str,count,lpdx32);
if (lpdx32) HeapFree( GetProcessHeap(), 0, lpdx32 );
return ret;
}
/***********************************************************************
* ExtTextOutA (GDI32.@)
......@@ -214,15 +191,6 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
/***********************************************************************
* TextOut (GDI.33)
*/
BOOL16 WINAPI TextOut16( HDC16 hdc, INT16 x, INT16 y, LPCSTR str, INT16 count )
{
return ExtTextOut16( hdc, x, y, 0, NULL, str, count, NULL );
}
/***********************************************************************
* TextOutA (GDI32.@)
*/
BOOL WINAPI TextOutA( HDC hdc, INT x, INT y, LPCSTR str, INT count )
......@@ -258,13 +226,6 @@ UINT WINAPI GetTextCharset(
return GetTextCharsetInfo(hdc, NULL, 0);
}
/***********************************************************************
* GetTextCharset [GDI.612]
*/
UINT16 WINAPI GetTextCharset16(HDC16 hdc)
{
return (UINT16)GetTextCharset(hdc);
}
/***********************************************************************
* GetTextCharsetInfo [GDI32.@] Gets character set for font
......
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