1993-09-04 12:09:32 +02:00
|
|
|
/*
|
|
|
|
* DC device-independent Get/SetXXX functions
|
|
|
|
*
|
|
|
|
* Copyright 1993 Alexandre Julliard
|
1994-12-10 14:02:28 +01:00
|
|
|
*
|
1996-07-12 21:02:39 +02:00
|
|
|
*/
|
|
|
|
|
2001-07-24 02:58:52 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
2000-08-19 23:38:55 +02:00
|
|
|
#include "winbase.h"
|
|
|
|
#include "winerror.h"
|
2001-07-24 02:58:52 +02:00
|
|
|
|
1993-09-04 12:09:32 +02:00
|
|
|
#include "gdi.h"
|
|
|
|
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* SetBkMode (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI SetBkMode( HDC hdc, INT mode )
|
|
|
|
{
|
|
|
|
INT ret;
|
|
|
|
DC *dc;
|
|
|
|
if ((mode <= 0) || (mode > BKMODE_LAST))
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
|
|
|
|
if (dc->funcs->pSetBkMode)
|
|
|
|
ret = dc->funcs->pSetBkMode( dc, mode );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ret = dc->backgroundMode;
|
|
|
|
dc->backgroundMode = mode;
|
|
|
|
}
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return ret;
|
|
|
|
}
|
1999-04-25 11:24:23 +02:00
|
|
|
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
/***********************************************************************
|
2001-07-24 02:58:52 +02:00
|
|
|
* SetROP2 (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI SetROP2( HDC hdc, INT mode )
|
|
|
|
{
|
|
|
|
INT ret;
|
|
|
|
DC *dc;
|
|
|
|
if ((mode < R2_BLACK) || (mode > R2_WHITE))
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
|
|
|
|
if (dc->funcs->pSetROP2)
|
|
|
|
ret = dc->funcs->pSetROP2( dc, mode );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ret = dc->ROPmode;
|
|
|
|
dc->ROPmode = mode;
|
|
|
|
}
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-04-25 11:24:23 +02:00
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* SetRelAbs (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI SetRelAbs( HDC hdc, INT mode )
|
|
|
|
{
|
|
|
|
INT ret;
|
|
|
|
DC *dc;
|
|
|
|
if ((mode != ABSOLUTE) && (mode != RELATIVE))
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
|
|
|
|
if (dc->funcs->pSetRelAbs)
|
|
|
|
ret = dc->funcs->pSetRelAbs( dc, mode );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ret = dc->relAbsMode;
|
|
|
|
dc->relAbsMode = mode;
|
|
|
|
}
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-04-25 11:24:23 +02:00
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* SetPolyFillMode (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI SetPolyFillMode( HDC hdc, INT mode )
|
|
|
|
{
|
|
|
|
INT ret;
|
|
|
|
DC *dc;
|
|
|
|
if ((mode <= 0) || (mode > POLYFILL_LAST))
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
|
|
|
|
if (dc->funcs->pSetPolyFillMode)
|
|
|
|
ret = dc->funcs->pSetPolyFillMode( dc, mode );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ret = dc->polyFillMode;
|
|
|
|
dc->polyFillMode = mode;
|
|
|
|
}
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-04-25 11:24:23 +02:00
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* SetStretchBltMode (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI SetStretchBltMode( HDC hdc, INT mode )
|
|
|
|
{
|
|
|
|
INT ret;
|
|
|
|
DC *dc;
|
|
|
|
if ((mode <= 0) || (mode > MAXSTRETCHBLTMODE))
|
|
|
|
{
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (!(dc = DC_GetDCPtr( hdc ))) return 0;
|
|
|
|
if (dc->funcs->pSetStretchBltMode)
|
|
|
|
ret = dc->funcs->pSetStretchBltMode( dc, mode );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ret = dc->stretchBltMode;
|
|
|
|
dc->stretchBltMode = mode;
|
|
|
|
}
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetBkColor (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
COLORREF WINAPI GetBkColor( HDC hdc )
|
|
|
|
{
|
|
|
|
COLORREF ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->backgroundColor;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetBkMode (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI GetBkMode( HDC hdc )
|
|
|
|
{
|
|
|
|
INT ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->backgroundMode;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetMapMode (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI GetMapMode( HDC hdc )
|
|
|
|
{
|
|
|
|
INT ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->MapMode;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetPolyFillMode (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI GetPolyFillMode( HDC hdc )
|
|
|
|
{
|
|
|
|
INT ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->polyFillMode;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetROP2 (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI GetROP2( HDC hdc )
|
|
|
|
{
|
|
|
|
INT ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->ROPmode;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetStretchBltMode (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI GetStretchBltMode( HDC hdc )
|
|
|
|
{
|
|
|
|
INT ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->stretchBltMode;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetTextColor (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
COLORREF WINAPI GetTextColor( HDC hdc )
|
|
|
|
{
|
|
|
|
COLORREF ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->textColor;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetTextAlign (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
UINT WINAPI GetTextAlign( HDC hdc )
|
|
|
|
{
|
|
|
|
UINT ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->textAlign;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetArcDirection (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI GetArcDirection( HDC hdc )
|
|
|
|
{
|
|
|
|
INT ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->ArcDirection;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetGraphicsMode (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT WINAPI GetGraphicsMode( HDC hdc )
|
|
|
|
{
|
|
|
|
INT ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->GraphicsMode;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetBrushOrgEx (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
BOOL WINAPI GetBrushOrgEx( HDC hdc, LPPOINT pt )
|
|
|
|
{
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (!dc) return FALSE;
|
|
|
|
pt->x = dc->brushOrgX;
|
|
|
|
pt->y = dc->brushOrgY;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetCurrentPositionEx (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
BOOL WINAPI GetCurrentPositionEx( HDC hdc, LPPOINT pt )
|
|
|
|
{
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (!dc) return FALSE;
|
|
|
|
pt->x = dc->CursPosX;
|
|
|
|
pt->y = dc->CursPosY;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetViewportExtEx (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
BOOL WINAPI GetViewportExtEx( HDC hdc, LPSIZE size )
|
|
|
|
{
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (!dc) return FALSE;
|
|
|
|
size->cx = dc->vportExtX;
|
|
|
|
size->cy = dc->vportExtY;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetViewportOrgEx (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
BOOL WINAPI GetViewportOrgEx( HDC hdc, LPPOINT pt )
|
|
|
|
{
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (!dc) return FALSE;
|
|
|
|
pt->x = dc->vportOrgX;
|
|
|
|
pt->y = dc->vportOrgY;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetWindowExtEx (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
BOOL WINAPI GetWindowExtEx( HDC hdc, LPSIZE size )
|
|
|
|
{
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (!dc) return FALSE;
|
|
|
|
size->cx = dc->wndExtX;
|
|
|
|
size->cy = dc->wndExtY;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetWindowOrgEx (GDI32.@)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
BOOL WINAPI GetWindowOrgEx( HDC hdc, LPPOINT pt )
|
|
|
|
{
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (!dc) return FALSE;
|
|
|
|
pt->x = dc->wndOrgX;
|
|
|
|
pt->y = dc->wndOrgY;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**** 16-bit functions ****/
|
2001-07-24 02:58:52 +02:00
|
|
|
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* SetBkMode (GDI.2)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI SetBkMode16( HDC16 hdc, INT16 mode )
|
|
|
|
{
|
|
|
|
return SetBkMode( hdc, mode );
|
|
|
|
}
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* SetROP2 (GDI.4)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI SetROP216( HDC16 hdc, INT16 mode )
|
|
|
|
{
|
|
|
|
return SetROP2( hdc, mode );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* SetRelAbs (GDI.5)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI SetRelAbs16( HDC16 hdc, INT16 mode )
|
|
|
|
{
|
|
|
|
return SetRelAbs( hdc, mode );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* SetPolyFillMode (GDI.6)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI SetPolyFillMode16( HDC16 hdc, INT16 mode )
|
|
|
|
{
|
|
|
|
return SetPolyFillMode( hdc, mode );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* SetStretchBltMode (GDI.7)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI SetStretchBltMode16( HDC16 hdc, INT16 mode )
|
|
|
|
{
|
|
|
|
return SetStretchBltMode( hdc, mode );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetBkColor (GDI.75)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
COLORREF WINAPI GetBkColor16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetBkColor( hdc );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetBkMode (GDI.76)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI GetBkMode16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetBkMode( hdc );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetCurrentPosition (GDI.78)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
DWORD WINAPI GetCurrentPosition16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
POINT pt32;
|
|
|
|
if (!GetCurrentPositionEx( hdc, &pt32 )) return 0;
|
|
|
|
return MAKELONG( pt32.x, pt32.y );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetMapMode (GDI.81)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI GetMapMode16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetMapMode( hdc );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetPolyFillMode (GDI.84)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI GetPolyFillMode16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetPolyFillMode( hdc );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetROP2 (GDI.85)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI GetROP216( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetROP2( hdc );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetRelAbs (GDI.86)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI GetRelAbs16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetRelAbs( hdc, 0 );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetStretchBltMode (GDI.88)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI GetStretchBltMode16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetStretchBltMode( hdc );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetTextColor (GDI.90)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
COLORREF WINAPI GetTextColor16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetTextColor( hdc );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetViewportExt (GDI.94)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
DWORD WINAPI GetViewportExt16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
SIZE size;
|
|
|
|
if (!GetViewportExtEx( hdc, &size )) return 0;
|
|
|
|
return MAKELONG( size.cx, size.cy );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetViewportOrg (GDI.95)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
DWORD WINAPI GetViewportOrg16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
POINT pt;
|
|
|
|
if (!GetViewportOrgEx( hdc, &pt )) return 0;
|
|
|
|
return MAKELONG( pt.x, pt.y );
|
|
|
|
}
|
|
|
|
|
2000-08-19 23:38:55 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetWindowExt (GDI.96)
|
2000-08-19 23:38:55 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
DWORD WINAPI GetWindowExt16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
SIZE size;
|
|
|
|
if (!GetWindowExtEx( hdc, &size )) return 0;
|
|
|
|
return MAKELONG( size.cx, size.cy );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetWindowOrg (GDI.97)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
DWORD WINAPI GetWindowOrg16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
POINT pt;
|
|
|
|
if (!GetWindowOrgEx( hdc, &pt )) return 0;
|
|
|
|
return MAKELONG( pt.x, pt.y );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* InquireVisRgn (GDI.131)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
HRGN16 WINAPI InquireVisRgn16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
HRGN16 ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->hVisRgn;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetBrushOrg (GDI.149)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
DWORD WINAPI GetBrushOrg16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
POINT pt;
|
|
|
|
if (!GetBrushOrgEx( hdc, &pt )) return 0;
|
|
|
|
return MAKELONG( pt.x, pt.y );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetClipRgn (GDI.173)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
HRGN16 WINAPI GetClipRgn16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
HRGN16 ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->hClipRgn;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetTextAlign (GDI.345)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
UINT16 WINAPI GetTextAlign16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetTextAlign( hdc );
|
|
|
|
}
|
2001-07-24 02:58:52 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetCurLogFont (GDI.411)
|
2001-07-24 02:58:52 +02:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
HFONT16 WINAPI GetCurLogFont16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
HFONT16 ret = 0;
|
|
|
|
DC * dc = DC_GetDCPtr( hdc );
|
|
|
|
if (dc)
|
|
|
|
{
|
|
|
|
ret = dc->hFont;
|
|
|
|
GDI_ReleaseObj( hdc );
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetBrushOrgEx (GDI.469)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
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;
|
|
|
|
}
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetCurrentPositionEx (GDI.470)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
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;
|
|
|
|
}
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetViewportExtEx (GDI.472)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
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;
|
|
|
|
}
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetViewportOrgEx (GDI.473)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
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;
|
|
|
|
}
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 02:58:52 +02:00
|
|
|
* GetWindowOrgEx (GDI.475)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
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;
|
|
|
|
}
|
1999-10-31 03:07:05 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-24 22:54:30 +02:00
|
|
|
* GetArcDirection (GDI.524)
|
1999-10-31 03:07:05 +01:00
|
|
|
*/
|
2001-07-24 22:54:30 +02:00
|
|
|
INT16 WINAPI GetArcDirection16( HDC16 hdc )
|
|
|
|
{
|
|
|
|
return GetArcDirection( hdc );
|
|
|
|
}
|