Changed some functions prototypes (were returning void).

This commit is contained in:
Eric Pouech 1999-02-14 14:09:42 +00:00 committed by Alexandre Julliard
parent 97c1c836f7
commit b9544f159d
8 changed files with 72 additions and 48 deletions

View File

@ -345,10 +345,11 @@ void WINAPI InvertRect16( HDC16 hdc, const RECT16 *rect )
/***********************************************************************
* InvertRect32 (USER32.330)
*/
void WINAPI InvertRect32( HDC32 hdc, const RECT32 *rect )
BOOL32 WINAPI InvertRect32( HDC32 hdc, const RECT32 *rect )
{
PatBlt32( hdc, rect->left, rect->top,
rect->right - rect->left, rect->bottom - rect->top, DSTINVERT );
return PatBlt32( hdc, rect->left, rect->top,
rect->right - rect->left, rect->bottom - rect->top,
DSTINVERT );
}
@ -659,7 +660,7 @@ void WINAPI DrawFocusRect16( HDC16 hdc, const RECT16* rc )
*
* FIXME: PatBlt(PATINVERT) with background brush.
*/
void WINAPI DrawFocusRect32( HDC32 hdc, const RECT32* rc )
BOOL32 WINAPI DrawFocusRect32( HDC32 hdc, const RECT32* rc )
{
HPEN32 hOldPen, hnewPen;
INT32 oldDrawMode, oldBkMode;
@ -667,7 +668,11 @@ void WINAPI DrawFocusRect32( HDC32 hdc, const RECT32* rc )
X11DRV_PDEVICE *physDev;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return;
if (!dc)
{
SetLastError( ERROR_INVALID_HANDLE );
return FALSE;
}
physDev = (X11DRV_PDEVICE *)dc->physDev;
left = XLPTODP( dc, rc->left );
@ -675,8 +680,11 @@ void WINAPI DrawFocusRect32( HDC32 hdc, const RECT32* rc )
right = XLPTODP( dc, rc->right );
bottom = YLPTODP( dc, rc->bottom );
if(left == right || top == bottom)
return;
if(left == right || top == bottom)
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
hnewPen = CreatePen32(PS_DOT, 1, GetSysColor32(COLOR_WINDOWTEXT) );
hOldPen = SelectObject32( hdc, hnewPen );
@ -695,6 +703,7 @@ void WINAPI DrawFocusRect32( HDC32 hdc, const RECT32* rc )
SetROP232(hdc, oldDrawMode);
SelectObject32(hdc, hOldPen);
DeleteObject32(hnewPen);
return TRUE;
}

View File

@ -3123,7 +3123,7 @@ BOOL32 WINAPI DrawCaptionTemp32W(HWND32,HDC32,const RECT32*,HFONT32,HICON32
#define DrawCaptionTemp WINELIB_NAME_AW(DrawCaptionTemp)
BOOL32 WINAPI DrawEdge32(HDC32,LPRECT32,UINT32,UINT32);
#define DrawEdge WINELIB_NAME(DrawEdge)
void WINAPI DrawFocusRect32(HDC32,const RECT32*);
BOOL32 WINAPI DrawFocusRect32(HDC32,const RECT32*);
#define DrawFocusRect WINELIB_NAME(DrawFocusRect)
BOOL32 WINAPI DrawFrameControl32(HDC32,LPRECT32,UINT32,UINT32);
#define DrawFrameControl WINELIB_NAME(DrawFrameControl)
@ -3209,7 +3209,7 @@ INT32 WINAPI GetClassName32W(HWND32,LPWSTR,INT32);
#define GetClassName WINELIB_NAME_AW(GetClassName)
WORD WINAPI GetClassWord32(HWND32,INT32);
#define GetClassWord WINELIB_NAME(GetClassWord)
void WINAPI GetClientRect32(HWND32,LPRECT32);
BOOL32 WINAPI GetClientRect32(HWND32,LPRECT32);
#define GetClientRect WINELIB_NAME(GetClientRect)
HANDLE32 WINAPI GetClipboardData32(UINT32);
#define GetClipboardData WINELIB_NAME(GetClipboardData)
@ -3220,7 +3220,7 @@ HWND32 WINAPI GetClipboardOwner32(void);
#define GetClipboardOwner WINELIB_NAME(GetClipboardOwner)
HWND32 WINAPI GetClipboardViewer32(void);
#define GetClipboardViewer WINELIB_NAME(GetClipboardViewer)
void WINAPI GetClipCursor32(LPRECT32);
BOOL32 WINAPI GetClipCursor32(LPRECT32);
#define GetClipCursor WINELIB_NAME(GetClipCursor)
#define GetCurrentTime32() GetTickCount()
#define GetCurrentTime WINELIB_NAME(GetCurrentTime)
@ -3370,7 +3370,7 @@ BOOL32 WINAPI HideCaret32(HWND32);
#define HideCaret WINELIB_NAME(HideCaret)
BOOL32 WINAPI HiliteMenuItem32(HWND32,HMENU32,UINT32,UINT32);
#define HiliteMenuItem WINELIB_NAME(HiliteMenuItem)
void WINAPI InflateRect32(LPRECT32,INT32,INT32);
BOOL32 WINAPI InflateRect32(LPRECT32,INT32,INT32);
#define InflateRect WINELIB_NAME(InflateRect)
BOOL32 WINAPI InSendMessage32(void);
#define InSendMessage WINELIB_NAME(InSendMessage)
@ -3382,11 +3382,11 @@ BOOL32 WINAPI InsertMenuItem32W(HMENU32,UINT32,BOOL32,const MENUITEMINFO32W
#define InsertMenuItem WINELIB_NAME_AW(InsertMenuItem)
BOOL32 WINAPI IntersectRect32(LPRECT32,const RECT32*,const RECT32*);
#define IntersectRect WINELIB_NAME(IntersectRect)
void WINAPI InvalidateRect32(HWND32,const RECT32*,BOOL32);
BOOL32 WINAPI InvalidateRect32(HWND32,const RECT32*,BOOL32);
#define InvalidateRect WINELIB_NAME(InvalidateRect)
void WINAPI InvalidateRgn32(HWND32,HRGN32,BOOL32);
BOOL32 WINAPI InvalidateRgn32(HWND32,HRGN32,BOOL32);
#define InvalidateRgn WINELIB_NAME(InvalidateRgn)
void WINAPI InvertRect32(HDC32,const RECT32*);
BOOL32 WINAPI InvertRect32(HDC32,const RECT32*);
#define InvertRect WINELIB_NAME(InvertRect)
BOOL32 WINAPI IsCharAlpha32A(CHAR);
BOOL32 WINAPI IsCharAlpha32W(WCHAR);
@ -3465,9 +3465,9 @@ UINT32 WINAPI MapVirtualKey32W(UINT32,UINT32);
#define MapVirtualKey WINELIB_NAME_AW(MapVirtualKey)
UINT32 WINAPI MapVirtualKeyEx32A(UINT32,UINT32,HKL32);
#define MapVirtualKeyEx WINELIB_NAME_AW(MapVirtualKeyEx)
void WINAPI MapDialogRect32(HWND32,LPRECT32);
BOOL32 WINAPI MapDialogRect32(HWND32,LPRECT32);
#define MapDialogRect WINELIB_NAME(MapDialogRect)
void WINAPI MapWindowPoints32(HWND32,HWND32,LPPOINT32,UINT32);
INT32 WINAPI MapWindowPoints32(HWND32,HWND32,LPPOINT32,UINT32);
#define MapWindowPoints WINELIB_NAME(MapWindowPoints)
BOOL32 WINAPI MessageBeep32(UINT32);
#define MessageBeep WINELIB_NAME(MessageBeep)
@ -3488,7 +3488,7 @@ BOOL32 WINAPI OemToChar32W(LPCSTR,LPWSTR);
BOOL32 WINAPI OemToCharBuff32A(LPCSTR,LPSTR,DWORD);
BOOL32 WINAPI OemToCharBuff32W(LPCSTR,LPWSTR,DWORD);
#define OemToCharBuff WINELIB_NAME_AW(OemToCharBuff)
void WINAPI OffsetRect32(LPRECT32,INT32,INT32);
BOOL32 WINAPI OffsetRect32(LPRECT32,INT32,INT32);
#define OffsetRect WINELIB_NAME(OffsetRect)
BOOL32 WINAPI OpenClipboard32(HWND32);
#define OpenClipboard WINELIB_NAME(OpenClipboard)
@ -3532,7 +3532,7 @@ HANDLE32 WINAPI RemoveProp32W(HWND32,LPCWSTR);
#define RemoveProp WINELIB_NAME_AW(RemoveProp)
BOOL32 WINAPI ReplyMessage32(LRESULT);
#define ReplyMessage WINELIB_NAME(ReplyMessage)
void WINAPI ScreenToClient32(HWND32,LPPOINT32);
BOOL32 WINAPI ScreenToClient32(HWND32,LPPOINT32);
#define ScreenToClient WINELIB_NAME(ScreenToClient)
VOID WINAPI ScrollChildren32(HWND32,UINT32,WPARAM32,LPARAM);
#define ScrollChildren WINELIB_NAME(ScrollChildren)
@ -3580,7 +3580,7 @@ BOOL32 WINAPI SetCursorPos32(INT32,INT32);
#define SetCursorPos WINELIB_NAME(SetCursorPos)
BOOL32 WINAPI SetDeskWallPaper32(LPCSTR);
#define SetDeskWallPaper WINELIB_NAME(SetDeskWallPaper)
void WINAPI SetDlgItemInt32(HWND32,INT32,UINT32,BOOL32);
BOOL32 WINAPI SetDlgItemInt32(HWND32,INT32,UINT32,BOOL32);
#define SetDlgItemInt WINELIB_NAME(SetDlgItemInt)
BOOL32 WINAPI SetDlgItemText32A(HWND32,INT32,LPCSTR);
BOOL32 WINAPI SetDlgItemText32W(HWND32,INT32,LPCWSTR);
@ -3606,9 +3606,9 @@ HWND32 WINAPI SetParent32(HWND32,HWND32);
BOOL32 WINAPI SetProp32A(HWND32,LPCSTR,HANDLE32);
BOOL32 WINAPI SetProp32W(HWND32,LPCWSTR,HANDLE32);
#define SetProp WINELIB_NAME_AW(SetProp)
void WINAPI SetRect32(LPRECT32,INT32,INT32,INT32,INT32);
BOOL32 WINAPI SetRect32(LPRECT32,INT32,INT32,INT32,INT32);
#define SetRect WINELIB_NAME(SetRect)
void WINAPI SetRectEmpty32(LPRECT32);
BOOL32 WINAPI SetRectEmpty32(LPRECT32);
#define SetRectEmpty WINELIB_NAME(SetRectEmpty)
INT32 WINAPI SetScrollInfo32(HWND32,INT32,const SCROLLINFO*,BOOL32);
#define SetScrollInfo WINELIB_NAME(SetScrollInfo)

View File

@ -1330,9 +1330,14 @@ void WINAPI GetClipCursor16( RECT16 *rect )
/***********************************************************************
* GetClipCursor32 (USER32.221)
*/
void WINAPI GetClipCursor32( RECT32 *rect )
BOOL32 WINAPI GetClipCursor32( RECT32 *rect )
{
if (rect) CopyRect32( rect, &CURSOR_ClipRect );
if (rect)
{
CopyRect32( rect, &CURSOR_ClipRect );
return TRUE;
}
return FALSE;
}
/**********************************************************************

View File

@ -1430,14 +1430,14 @@ INT32 WINAPI GetDlgItemText32W( HWND32 hwnd, INT32 id, LPWSTR str, UINT32 len )
*/
void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned )
{
return SetDlgItemInt32( hwnd, (UINT32)(UINT16)id, value, fSigned );
SetDlgItemInt32( hwnd, (UINT32)(UINT16)id, value, fSigned );
}
/*******************************************************************
* SetDlgItemInt32 (USER32.477)
*/
void WINAPI SetDlgItemInt32( HWND32 hwnd, INT32 id, UINT32 value,
BOOL32 WINAPI SetDlgItemInt32( HWND32 hwnd, INT32 id, UINT32 value,
BOOL32 fSigned )
{
char str[20];
@ -1445,6 +1445,7 @@ void WINAPI SetDlgItemInt32( HWND32 hwnd, INT32 id, UINT32 value,
if (fSigned) sprintf( str, "%d", (INT32)value );
else sprintf( str, "%u", value );
SendDlgItemMessage32A( hwnd, id, WM_SETTEXT, 0, (LPARAM)str );
return TRUE;
}
@ -1608,16 +1609,17 @@ void WINAPI MapDialogRect16( HWND16 hwnd, LPRECT16 rect )
/***********************************************************************
* MapDialogRect32 (USER32.382)
*/
void WINAPI MapDialogRect32( HWND32 hwnd, LPRECT32 rect )
BOOL32 WINAPI MapDialogRect32( HWND32 hwnd, LPRECT32 rect )
{
DIALOGINFO * dlgInfo;
WND * wndPtr = WIN_FindWndPtr( hwnd );
if (!wndPtr) return;
if (!wndPtr) return FALSE;
dlgInfo = (DIALOGINFO *)wndPtr->wExtra;
rect->left = (rect->left * dlgInfo->xBaseUnit) / 4;
rect->right = (rect->right * dlgInfo->xBaseUnit) / 4;
rect->top = (rect->top * dlgInfo->yBaseUnit) / 8;
rect->bottom = (rect->bottom * dlgInfo->yBaseUnit) / 8;
return TRUE;
}

View File

@ -550,9 +550,9 @@ void WINAPI InvalidateRgn16( HWND16 hwnd, HRGN16 hrgn, BOOL16 erase )
/***********************************************************************
* InvalidateRgn32 (USER32.329)
*/
void WINAPI InvalidateRgn32( HWND32 hwnd, HRGN32 hrgn, BOOL32 erase )
BOOL32 WINAPI InvalidateRgn32( HWND32 hwnd, HRGN32 hrgn, BOOL32 erase )
{
PAINT_RedrawWindow(hwnd, NULL, hrgn, RDW_INVALIDATE | (erase ? RDW_ERASE : 0), 0 );
return PAINT_RedrawWindow(hwnd, NULL, hrgn, RDW_INVALIDATE | (erase ? RDW_ERASE : 0), 0 );
}
@ -568,10 +568,10 @@ void WINAPI InvalidateRect16( HWND16 hwnd, const RECT16 *rect, BOOL16 erase )
/***********************************************************************
* InvalidateRect32 (USER32.328)
*/
void WINAPI InvalidateRect32( HWND32 hwnd, const RECT32 *rect, BOOL32 erase )
BOOL32 WINAPI InvalidateRect32( HWND32 hwnd, const RECT32 *rect, BOOL32 erase )
{
PAINT_RedrawWindow( hwnd, rect, 0,
RDW_INVALIDATE | (erase ? RDW_ERASE : 0), 0 );
return PAINT_RedrawWindow( hwnd, rect, 0,
RDW_INVALIDATE | (erase ? RDW_ERASE : 0), 0 );
}

View File

@ -24,13 +24,14 @@ void WINAPI SetRect16( LPRECT16 rect, INT16 left, INT16 top,
/***********************************************************************
* SetRect32 (USER32.499)
*/
void WINAPI SetRect32( LPRECT32 rect, INT32 left, INT32 top,
BOOL32 WINAPI SetRect32( LPRECT32 rect, INT32 left, INT32 top,
INT32 right, INT32 bottom )
{
rect->left = left;
rect->right = right;
rect->top = top;
rect->bottom = bottom;
return TRUE;
}
@ -46,9 +47,10 @@ void WINAPI SetRectEmpty16( LPRECT16 rect )
/***********************************************************************
* SetRectEmpty32 (USER32.500)
*/
void WINAPI SetRectEmpty32( LPRECT32 rect )
BOOL32 WINAPI SetRectEmpty32( LPRECT32 rect )
{
rect->left = rect->right = rect->top = rect->bottom = 0;
return TRUE;
}
@ -125,12 +127,13 @@ void WINAPI OffsetRect16( LPRECT16 rect, INT16 x, INT16 y )
/***********************************************************************
* OffsetRect32 (USER32.406)
*/
void WINAPI OffsetRect32( LPRECT32 rect, INT32 x, INT32 y )
BOOL32 WINAPI OffsetRect32( LPRECT32 rect, INT32 x, INT32 y )
{
rect->left += x;
rect->right += x;
rect->top += y;
rect->bottom += y;
return TRUE;
}
@ -149,12 +152,13 @@ void WINAPI InflateRect16( LPRECT16 rect, INT16 x, INT16 y )
/***********************************************************************
* InflateRect32 (USER32.321)
*/
void WINAPI InflateRect32( LPRECT32 rect, INT32 x, INT32 y )
BOOL32 WINAPI InflateRect32( LPRECT32 rect, INT32 x, INT32 y )
{
rect->left -= x;
rect->top -= y;
rect->right += x;
rect->bottom += y;
return TRUE;
}

View File

@ -61,16 +61,19 @@ WND * WIN_FindWndPtr( HWND32 hwnd )
{
WND * ptr;
if (!hwnd || HIWORD(hwnd)) return NULL;
if (!hwnd || HIWORD(hwnd)) goto error;
ptr = (WND *) USER_HEAP_LIN_ADDR( hwnd );
if (ptr->dwMagic != WND_MAGIC) return NULL;
if (ptr->dwMagic != WND_MAGIC) goto error;
if (ptr->hwndSelf != hwnd)
{
ERR( win, "Can't happen: hwnd %04x self pointer is %04x\n",
hwnd, ptr->hwndSelf );
return NULL;
hwnd, ptr->hwndSelf );
goto error;
}
return ptr;
error:
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return NULL;
}

View File

@ -317,16 +317,15 @@ void WINAPI GetClientRect16( HWND16 hwnd, LPRECT16 rect )
/***********************************************************************
* GetClientRect32 (USER32.220)
*/
void WINAPI GetClientRect32( HWND32 hwnd, LPRECT32 rect )
BOOL32 WINAPI GetClientRect32( HWND32 hwnd, LPRECT32 rect )
{
WND * wndPtr = WIN_FindWndPtr( hwnd );
rect->left = rect->top = rect->right = rect->bottom = 0;
if (wndPtr)
{
rect->right = wndPtr->rectClient.right - wndPtr->rectClient.left;
rect->bottom = wndPtr->rectClient.bottom - wndPtr->rectClient.top;
}
if (!wndPtr) return FALSE;
rect->right = wndPtr->rectClient.right - wndPtr->rectClient.left;
rect->bottom = wndPtr->rectClient.bottom - wndPtr->rectClient.top;
return TRUE;
}
@ -361,9 +360,10 @@ void WINAPI ScreenToClient16( HWND16 hwnd, LPPOINT16 lppnt )
/*******************************************************************
* ScreenToClient32 (USER32.447)
*/
void WINAPI ScreenToClient32( HWND32 hwnd, LPPOINT32 lppnt )
BOOL32 WINAPI ScreenToClient32( HWND32 hwnd, LPPOINT32 lppnt )
{
MapWindowPoints32( 0, hwnd, lppnt, 1 );
return TRUE;
}
@ -635,7 +635,7 @@ void WINAPI MapWindowPoints16( HWND16 hwndFrom, HWND16 hwndTo,
/*******************************************************************
* MapWindowPoints32 (USER32.386)
*/
void WINAPI MapWindowPoints32( HWND32 hwndFrom, HWND32 hwndTo,
INT32 WINAPI MapWindowPoints32( HWND32 hwndFrom, HWND32 hwndTo,
LPPOINT32 lppt, UINT32 count )
{
POINT32 offset;
@ -647,6 +647,7 @@ void WINAPI MapWindowPoints32( HWND32 hwndFrom, HWND32 hwndTo,
lppt->y += offset.y;
lppt++;
}
return MAKELONG( LOWORD(offset.x), LOWORD(offset.y) );
}