Mercurial > dwindows
diff mac/dw.m @ 2532:457c91634881
Added dw_window_compare() to check if two window handles refer to the same object.
Most platforms just compare the pointer or handle, but Android uses IsSameObject().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 11 May 2021 05:00:07 +0000 |
parents | fa976a5bc7bd |
children | 2acc7ba5dea0 |
line wrap: on
line diff
--- a/mac/dw.m Tue May 11 00:51:20 2021 +0000 +++ b/mac/dw.m Tue May 11 05:00:07 2021 +0000 @@ -11488,6 +11488,24 @@ return NULL; } +/* + * Compare two window handles. + * Parameters: + * window1: First window handle to compare. + * window2: Second window handle to compare. + * Returns: + * TRUE if the windows are the same object, FALSE if not. + */ +int API dw_window_compare(HWND window1, HWND window2) +{ + /* If anything special is require to compare... do it + * here otherwise just compare the handles. + */ + if(window1 && window2 && window1 == window2) + return TRUE; + return FALSE; +} + #define DW_TIMER_MAX 64 static NSTimer *DWTimers[DW_TIMER_MAX];