[PATCH 2/2] include/winuser: Add CopyRect as inline version of common RECT helpers
Gabriel Ivăncescu
gabrielopcode at gmail.com
Mon Mar 11 06:54:05 CDT 2019
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
Apparently, there are some places in the Wine code where it helps to keep
CopyRect, so this does have uses after all. (see replies to patch series
from 156204)
include/winuser.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/winuser.h b/include/winuser.h
index 3cffaa1..40017ae 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -3552,7 +3552,6 @@ WINUSERAPI INT WINAPI CopyAcceleratorTableW(HACCEL,LPACCEL,INT);
#define CopyCursor(cur) ((HCURSOR)CopyIcon((HICON)(cur)))
WINUSERAPI HICON WINAPI CopyIcon(HICON);
WINUSERAPI HANDLE WINAPI CopyImage(HANDLE,UINT,INT,INT,UINT);
-WINUSERAPI BOOL WINAPI CopyRect(RECT*,const RECT*);
WINUSERAPI INT WINAPI CountClipboardFormats(void);
WINUSERAPI HACCEL WINAPI CreateAcceleratorTableA(LPACCEL,INT);
WINUSERAPI HACCEL WINAPI CreateAcceleratorTableW(LPACCEL,INT);
@@ -4276,6 +4275,7 @@ WINUSERAPI INT WINAPI wvsprintfW(LPWSTR,LPCWSTR,__ms_va_list);
#if !defined(__WINESRC__) || defined(WINE_NO_INLINE_RECT)
+WINUSERAPI BOOL WINAPI CopyRect(RECT*,const RECT*);
WINUSERAPI BOOL WINAPI EqualRect(const RECT*,const RECT*);
WINUSERAPI BOOL WINAPI InflateRect(LPRECT,INT,INT);
WINUSERAPI BOOL WINAPI IsRectEmpty(const RECT*);
@@ -4288,6 +4288,13 @@ WINUSERAPI BOOL WINAPI SetRectEmpty(LPRECT);
/* Inline versions of common RECT helpers */
+static inline BOOL WINAPI CopyRect(RECT *dest, const RECT *src)
+{
+ if (!dest || !src) return FALSE;
+ *dest = *src;
+ return TRUE;
+}
+
static inline BOOL WINAPI EqualRect(const RECT *rect1, const RECT *rect2)
{
if (!rect1 || !rect2) return FALSE;
--
2.20.1
More information about the wine-devel
mailing list