comparison gtk4/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 cb795bba48a4
children 2acc7ba5dea0
comparison
equal deleted inserted replaced
2531:f45ebd96ebe5 2532:457c91634881
10610 if(G_IS_OBJECT(thiswindow)) 10610 if(G_IS_OBJECT(thiswindow))
10611 ret = (void *)g_object_get_data(G_OBJECT(thiswindow), dataname); 10611 ret = (void *)g_object_get_data(G_OBJECT(thiswindow), dataname);
10612 return ret; 10612 return ret;
10613 } 10613 }
10614 10614
10615 /*
10616 * Compare two window handles.
10617 * Parameters:
10618 * window1: First window handle to compare.
10619 * window2: Second window handle to compare.
10620 * Returns:
10621 * TRUE if the windows are the same object, FALSE if not.
10622 */
10623 int API dw_window_compare(HWND window1, HWND window2)
10624 {
10625 /* If anything special is require to compare... do it
10626 * here otherwise just compare the handles.
10627 */
10628 if(window1 && window2 && window1 == window2)
10629 return TRUE;
10630 return FALSE;
10631 }
10632
10615 /* Internal function to get the state of the timer before firing */ 10633 /* Internal function to get the state of the timer before firing */
10616 gboolean _dw_timer_func(gpointer data) 10634 gboolean _dw_timer_func(gpointer data)
10617 { 10635 {
10618 void (*sigfunc)(void *data) = NULL; 10636 void (*sigfunc)(void *data) = NULL;
10619 void *sdata; 10637 void *sdata;