You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In highgui_set_mouse_callback currently it is not possible to pass it a closure. By storing an arbitrary dyn Fn type in the Box inside its definition, it should be possible to accept an arbitrary closure to ease callback handling.
The text was updated successfully, but these errors were encountered:
@Pzixel That is true, but we then have to turn it into a dyn FnMut so that we can pass it to C as a single pointer type since the type is erased. We will find out if we can use FnMut based on if any data races can occur in the code. I think there is a good chance we can accept FnMut. We can only do that if the C code never creates a data race. If it does then we will need to use Fn. If C makes a cross thread data race then we will also need to force it to be Send and Sync.
In
highgui_set_mouse_callback
currently it is not possible to pass it a closure. By storing an arbitrarydyn Fn
type in theBox
inside its definition, it should be possible to accept an arbitrary closure to ease callback handling.The text was updated successfully, but these errors were encountered: