comparison gtk4/dw.c @ 2334:29220ecf8db8

GTK4: dw_window_function() actually calls on the main thread now.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 02 Mar 2021 02:56:22 +0000
parents d0f884083c63
children 1d413d869fa2
comparison
equal deleted inserted replaced
2333:d0f884083c63 2334:29220ecf8db8
10544 * Parameters: 10544 * Parameters:
10545 * handle: Window handle of the widget. 10545 * handle: Window handle of the widget.
10546 * function: Function pointer to be called. 10546 * function: Function pointer to be called.
10547 * data: Pointer to the data to be passed to the function. 10547 * data: Pointer to the data to be passed to the function.
10548 */ 10548 */
10549 void API dw_window_function(HWND handle, void *function, void *data) 10549 DW_FUNCTION_DEFINITION(dw_window_function, void, DW_UNUSED(HWND handle), void *function, void *data)
10550 DW_FUNCTION_ADD_PARAM3(handle, function, data)
10551 DW_FUNCTION_NO_RETURN(dw_window_function)
10552 DW_FUNCTION_RESTORE_PARAM3(DW_UNUSED(handle), HWND, function, void *, data, void *)
10550 { 10553 {
10551 void (* windowfunc)(void *); 10554 void (* windowfunc)(void *);
10552 10555
10553 windowfunc = function; 10556 windowfunc = function;
10554 10557
10555 if(windowfunc) 10558 if(windowfunc)
10556 windowfunc(data); 10559 windowfunc(data);
10560 DW_FUNCTION_RETURN_NOTHING;
10557 } 10561 }
10558 10562
10559 /* 10563 /*
10560 * Add a named user data item to a window handle. 10564 * Add a named user data item to a window handle.
10561 * Parameters: 10565 * Parameters: