comparison win/dw.c @ 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
comparison
equal deleted inserted replaced
2531:f45ebd96ebe5 2532:457c91634881
13541 UserData *ud = _find_userdata(&(cinfo->root), dataname); 13541 UserData *ud = _find_userdata(&(cinfo->root), dataname);
13542 if(ud) 13542 if(ud)
13543 return ud->data; 13543 return ud->data;
13544 } 13544 }
13545 return NULL; 13545 return NULL;
13546 }
13547
13548 /*
13549 * Compare two window handles.
13550 * Parameters:
13551 * window1: First window handle to compare.
13552 * window2: Second window handle to compare.
13553 * Returns:
13554 * TRUE if the windows are the same object, FALSE if not.
13555 */
13556 int API dw_window_compare(HWND window1, HWND window2)
13557 {
13558 /* If anything special is require to compare... do it
13559 * here otherwise just compare the handles.
13560 */
13561 if(window1 && window2 && window1 == window2)
13562 return TRUE;
13563 return FALSE;
13546 } 13564 }
13547 13565
13548 /* 13566 /*
13549 * Add a callback to a timer event. 13567 * Add a callback to a timer event.
13550 * Parameters: 13568 * Parameters: