Commit c1585509 authored by Alexandre Julliard's avatar Alexandre Julliard

Moved a couple of 16-bit functions to user16.c.

parent f86f51a6
......@@ -113,6 +113,51 @@ INT16 WINAPI ShowCursor16(BOOL16 bShow)
return ShowCursor(bShow);
}
/***********************************************************************
* FillRect (USER.81)
* NOTE
* The Win16 variant doesn't support special color brushes like
* the Win32 one, despite the fact that Win16, as well as Win32,
* supports special background brushes for a window class.
*/
INT16 WINAPI FillRect16( HDC16 hdc, const RECT16 *rect, HBRUSH16 hbrush )
{
HBRUSH prevBrush;
/* coordinates are logical so we cannot fast-check 'rect',
* it will be done later in the PatBlt().
*/
if (!(prevBrush = SelectObject( HDC_32(hdc), HBRUSH_32(hbrush) ))) return 0;
PatBlt( HDC_32(hdc), rect->left, rect->top,
rect->right - rect->left, rect->bottom - rect->top, PATCOPY );
SelectObject( HDC_32(hdc), prevBrush );
return 1;
}
/***********************************************************************
* InvertRect (USER.82)
*/
void WINAPI InvertRect16( HDC16 hdc, const RECT16 *rect )
{
PatBlt( HDC_32(hdc), rect->left, rect->top,
rect->right - rect->left, rect->bottom - rect->top, DSTINVERT );
}
/***********************************************************************
* FrameRect (USER.83)
*/
INT16 WINAPI FrameRect16( HDC16 hdc, const RECT16 *rect16, HBRUSH16 hbrush )
{
RECT rect;
CONV_RECT16TO32( rect16, &rect );
return FrameRect( HDC_32(hdc), &rect, HBRUSH_32(hbrush) );
}
/***********************************************************************
* DrawIcon (USER.84)
*/
......@@ -873,6 +918,17 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
}
/***********************************************************************
* DrawFocusRect (USER.466)
*/
void WINAPI DrawFocusRect16( HDC16 hdc, const RECT16* rc )
{
RECT rect32;
CONV_RECT16TO32( rc, &rect32 );
DrawFocusRect( HDC_32(hdc), &rect32 );
}
/**********************************************************************
* DrawFrameControl (USER.656)
*/
......
......@@ -944,29 +944,6 @@ BOOL WINAPI ValidateRect( HWND hwnd, const RECT *rect )
/***********************************************************************
* FillRect (USER.81)
* NOTE
* The Win16 variant doesn't support special color brushes like
* the Win32 one, despite the fact that Win16, as well as Win32,
* supports special background brushes for a window class.
*/
INT16 WINAPI FillRect16( HDC16 hdc, const RECT16 *rect, HBRUSH16 hbrush )
{
HBRUSH prevBrush;
/* coordinates are logical so we cannot fast-check 'rect',
* it will be done later in the PatBlt().
*/
if (!(prevBrush = SelectObject( HDC_32(hdc), HBRUSH_32(hbrush) ))) return 0;
PatBlt( HDC_32(hdc), rect->left, rect->top,
rect->right - rect->left, rect->bottom - rect->top, PATCOPY );
SelectObject( HDC_32(hdc), prevBrush );
return 1;
}
/***********************************************************************
* FillRect (USER32.@)
*/
INT WINAPI FillRect( HDC hdc, const RECT *rect, HBRUSH hbrush )
......@@ -986,16 +963,6 @@ INT WINAPI FillRect( HDC hdc, const RECT *rect, HBRUSH hbrush )
/***********************************************************************
* InvertRect (USER.82)
*/
void WINAPI InvertRect16( HDC16 hdc, const RECT16 *rect )
{
PatBlt( HDC_32(hdc), rect->left, rect->top,
rect->right - rect->left, rect->bottom - rect->top, DSTINVERT );
}
/***********************************************************************
* InvertRect (USER32.@)
*/
BOOL WINAPI InvertRect( HDC hdc, const RECT *rect )
......@@ -1032,28 +999,6 @@ INT WINAPI FrameRect( HDC hdc, const RECT *rect, HBRUSH hbrush )
/***********************************************************************
* FrameRect (USER.83)
*/
INT16 WINAPI FrameRect16( HDC16 hdc, const RECT16 *rect16, HBRUSH16 hbrush )
{
RECT rect;
CONV_RECT16TO32( rect16, &rect );
return FrameRect( HDC_32(hdc), &rect, HBRUSH_32(hbrush) );
}
/***********************************************************************
* DrawFocusRect (USER.466)
*/
void WINAPI DrawFocusRect16( HDC16 hdc, const RECT16* rc )
{
RECT rect32;
CONV_RECT16TO32( rc, &rect32 );
DrawFocusRect( HDC_32(hdc), &rect32 );
}
/***********************************************************************
* DrawFocusRect (USER32.@)
*
* FIXME: PatBlt(PATINVERT) with background brush.
......
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