comparison gtk3/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 eaac1317b851
children 2acc7ba5dea0
comparison
equal deleted inserted replaced
2531:f45ebd96ebe5 2532:457c91634881
12154 ret = (void *)g_object_get_data(G_OBJECT(thiswindow), dataname); 12154 ret = (void *)g_object_get_data(G_OBJECT(thiswindow), dataname);
12155 DW_MUTEX_UNLOCK; 12155 DW_MUTEX_UNLOCK;
12156 return ret; 12156 return ret;
12157 } 12157 }
12158 12158
12159 /*
12160 * Compare two window handles.
12161 * Parameters:
12162 * window1: First window handle to compare.
12163 * window2: Second window handle to compare.
12164 * Returns:
12165 * TRUE if the windows are the same object, FALSE if not.
12166 */
12167 int API dw_window_compare(HWND window1, HWND window2)
12168 {
12169 /* If anything special is require to compare... do it
12170 * here otherwise just compare the handles.
12171 */
12172 if(window1 && window2 && window1 == window2)
12173 return TRUE;
12174 return FALSE;
12175 }
12176
12159 /* Internal function to get the state of the timer before firing */ 12177 /* Internal function to get the state of the timer before firing */
12160 gboolean _dw_timer_func(gpointer data) 12178 gboolean _dw_timer_func(gpointer data)
12161 { 12179 {
12162 void (*sigfunc)(void *data) = NULL; 12180 void (*sigfunc)(void *data) = NULL;
12163 void *sdata; 12181 void *sdata;