I have moved this PR from the nih-plug repository to here. I have gone through Micah's comments over there.
I think a thorough review of these changes is still needed. A big chunk of this is from Micah's draft PR. All I did was try and get that to the finish line.
Some additional comments:
- VirtualKeyCode parsing was recently added with this PR: #9. The vst3 crate also defines
VirtualKeyCodes_ and KeyModifier_, and these are automatically generated. So I think it would be cleaner to use these bindings instead. But I left this out because changing this would probably be a breaking change.
- The RunLoopEventHandler struct contained this comment:
/// Allow handling tasks on the host's GUI thread on Linux. This doesn't need to be a separate
/// struct, but vst3-sys does not let us implement interfaces conditionally and the interface is
/// only exposed when compiling on Linux. The struct will register itself when calling
/// [`RunLoopEventHandler::new()`] and it will unregister itself when it gets dropped.
According to this comment this struct could be redundant because we replaced the vst3-sys crate. I kept it in because I think it's actually nice to have this scoped to a separate struct. Since it's a linux only thing, and only then deals with the IEventHandler. But this comment might still be something to consider.
I have moved this PR from the nih-plug repository to here. I have gone through [Micah's comments over there](https://github.com/robbert-vdh/nih-plug/pull/263).
I think a thorough review of these changes is still needed. A big chunk of this is from [Micah's draft PR](https://github.com/robbert-vdh/nih-plug/pull/243). All I did was try and get that to the finish line.
Some additional comments:
* VirtualKeyCode parsing was recently added with this PR: #9. The vst3 crate also defines `VirtualKeyCodes_` and `KeyModifier_`, and these are automatically generated. So I think it would be cleaner to use these bindings instead. But I left this out because changing this would probably be a breaking change.
* The RunLoopEventHandler struct contained this comment:
```
/// Allow handling tasks on the host's GUI thread on Linux. This doesn't need to be a separate
/// struct, but vst3-sys does not let us implement interfaces conditionally and the interface is
/// only exposed when compiling on Linux. The struct will register itself when calling
/// [`RunLoopEventHandler::new()`] and it will unregister itself when it gets dropped.
```
According to this comment this struct could be redundant because we replaced the vst3-sys crate. I kept it in because I think it's actually nice to have this scoped to a separate struct. Since it's a linux only thing, and only then deals with the IEventHandler. But this comment might still be something to consider.