mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 14:47:44 +00:00
include: Use inline functions for common RECT helpers.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f22be3afb1
commit
5f494bfeb4
|
@ -17,6 +17,7 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define WINE_NO_INLINE_RECT
|
||||
#include "wine/test.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define WINE_NO_INLINE_RECT
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
|
|
|
@ -3771,7 +3771,6 @@ WINUSERAPI BOOL WINAPI IsGUIThread(BOOL);
|
|||
WINUSERAPI BOOL WINAPI IsHungAppWindow(HWND);
|
||||
WINUSERAPI BOOL WINAPI IsIconic(HWND);
|
||||
WINUSERAPI BOOL WINAPI IsMenu(HMENU);
|
||||
WINUSERAPI BOOL WINAPI IsRectEmpty(const RECT*);
|
||||
WINUSERAPI BOOL WINAPI IsTouchWindow(HWND,PULONG);
|
||||
WINUSERAPI BOOL WINAPI IsWinEventHookInstalled(DWORD);
|
||||
WINUSERAPI BOOL WINAPI IsWindow(HWND);
|
||||
|
@ -3982,8 +3981,6 @@ WINUSERAPI HWND WINAPI SetParent(HWND,HWND);
|
|||
WINUSERAPI BOOL WINAPI SetPropA(HWND,LPCSTR,HANDLE);
|
||||
WINUSERAPI BOOL WINAPI SetPropW(HWND,LPCWSTR,HANDLE);
|
||||
#define SetProp WINELIB_NAME_AW(SetProp)
|
||||
WINUSERAPI BOOL WINAPI SetRect(LPRECT,INT,INT,INT,INT);
|
||||
WINUSERAPI BOOL WINAPI SetRectEmpty(LPRECT);
|
||||
WINUSERAPI INT WINAPI SetScrollInfo(HWND,INT,const SCROLLINFO*,BOOL);
|
||||
WINUSERAPI INT WINAPI SetScrollPos(HWND,INT,INT,BOOL);
|
||||
WINUSERAPI BOOL WINAPI SetScrollRange(HWND,INT,INT,INT,BOOL);
|
||||
|
@ -4092,6 +4089,41 @@ WINUSERAPI INT WINAPI wvsprintfA(LPSTR,LPCSTR,__ms_va_list);
|
|||
WINUSERAPI INT WINAPI wvsprintfW(LPWSTR,LPCWSTR,__ms_va_list);
|
||||
#define wvsprintf WINELIB_NAME_AW(wvsprintf)
|
||||
|
||||
#if !defined(__WINESRC__) || defined(WINE_NO_INLINE_RECT)
|
||||
|
||||
WINUSERAPI BOOL WINAPI IsRectEmpty(const RECT*);
|
||||
WINUSERAPI BOOL WINAPI SetRect(LPRECT,INT,INT,INT,INT);
|
||||
WINUSERAPI BOOL WINAPI SetRectEmpty(LPRECT);
|
||||
|
||||
#else
|
||||
|
||||
/* Inline versions of common RECT helpers */
|
||||
|
||||
static inline BOOL WINAPI IsRectEmpty(const RECT *rect)
|
||||
{
|
||||
if (!rect) return TRUE;
|
||||
return ((rect->left >= rect->right) || (rect->top >= rect->bottom));
|
||||
}
|
||||
|
||||
static inline BOOL WINAPI SetRect(LPRECT rect, INT left, INT top, INT right, INT bottom)
|
||||
{
|
||||
if (!rect) return FALSE;
|
||||
rect->left = left;
|
||||
rect->right = right;
|
||||
rect->top = top;
|
||||
rect->bottom = bottom;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static inline BOOL WINAPI SetRectEmpty(LPRECT rect)
|
||||
{
|
||||
if (!rect) return FALSE;
|
||||
rect->left = rect->right = rect->top = rect->bottom = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif /* !defined(__WINESRC__) || defined(WINE_NO_INLINE_RECT) */
|
||||
|
||||
/* Undocumented functions */
|
||||
|
||||
/* NOTE: This is SYSTEM.3, not USER.182, which is also named KillSystemTimer */
|
||||
|
|
Loading…
Reference in a new issue