How to push custom events against event loop?
po-stulate opened this issue · comments
There is a create_proxy
function in glutin seems to be useful, but it is still in alpha and is not supported by both window::Window and window::AdvancedWindow.
Is there any good way to push a custom event for now?
You can create your own custom events here: https://docs.rs/pistoncore-input/0.28.0/input/enum.Event.html#variant.Custom
How do I send it to the event loop? I have multiple threads that raise different custom events at any time, and cannot be refactored to use only main thread. Is there any mechanism like channel
s or so I can use before the new create_proxy
api is supported?
You're right! There is design mistake here. Custom
should be moved to Input
.