# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1618452664 0 # Node ID 206a0643add62cb1d8812f95db7322843ae1f992 # Parent ed955edc72047e8b544ab45bfaee8585239733a4 iOS: Move scrollbox functions into thread safety. diff -r ed955edc7204 -r 206a0643add6 ios/dw.m --- a/ios/dw.m Thu Apr 15 01:29:32 2021 +0000 +++ b/ios/dw.m Thu Apr 15 02:11:04 2021 +0000 @@ -3512,7 +3512,10 @@ * handle: Handle to the scrollbox to be queried. * orient: The vertical or horizontal scrollbar. */ -int API dw_scrollbox_get_pos(HWND handle, int orient) +DW_FUNCTION_DEFINITION(dw_scrollbox_get_pos, int, HWND handle, int orient) +DW_FUNCTION_ADD_PARAM2(handle, orient) +DW_FUNCTION_RETURN(dw_scrollbox_get_pos, int) +DW_FUNCTION_RESTORE_PARAM2(handle, HWND, orient, int) { DWScrollBox *scrollbox = handle; NSArray *subviews = [scrollbox subviews]; @@ -3535,7 +3538,7 @@ { val = range; } - return val; + DW_FUNCTION_RETURN_THIS(val); } /* @@ -3544,7 +3547,10 @@ * handle: Handle to the scrollbox to be queried. * orient: The vertical or horizontal scrollbar. */ -int API dw_scrollbox_get_range(HWND handle, int orient) +DW_FUNCTION_DEFINITION(dw_scrollbox_get_range, int, HWND handle, int orient) +DW_FUNCTION_ADD_PARAM2(handle, orient) +DW_FUNCTION_RETURN(dw_scrollbox_get_range, int) +DW_FUNCTION_RESTORE_PARAM2(handle, HWND, orient, int) { DWScrollBox *scrollbox = handle; NSArray *subviews = [scrollbox subviews]; @@ -3558,7 +3564,7 @@ { range = [view bounds].size.width; } - return range; + DW_FUNCTION_RETURN_THIS(range); } /* Return the handle to the text object */ @@ -3770,13 +3776,13 @@ } /* Query the objects */ - if([ object isKindOfClass:[ UIWindow class ] ]) + if([object isKindOfClass:[UIWindow class]]) { UIWindow *window = box; NSArray *subviews = [window subviews]; view = [subviews firstObject]; } - else if([ object isMemberOfClass:[ DWScrollBox class ] ]) + else if([object isMemberOfClass:[DWScrollBox class]]) { DWScrollBox *scrollbox = box; view = [scrollbox box];