mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
Implement IPlugView onKey{Up,Down}
This commit is contained in:
@@ -81,6 +81,8 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
||||
YaPlugView::Attached,
|
||||
YaPlugView::Removed,
|
||||
YaPlugView::OnWheel,
|
||||
YaPlugView::OnKeyDown,
|
||||
YaPlugView::OnKeyUp,
|
||||
YaPlugView::GetSize,
|
||||
YaPluginBase::Initialize,
|
||||
YaPluginBase::Terminate,
|
||||
|
||||
@@ -149,9 +149,55 @@ class YaPlugView : public Steinberg::IPlugView {
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API onWheel(float distance) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IPlugView::onKeyDown(key, keyCode,
|
||||
* modifiers)` to the Wine plugin host.
|
||||
*/
|
||||
struct OnKeyDown {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t owner_instance_id;
|
||||
|
||||
char16 key;
|
||||
int16 key_code;
|
||||
int16 modifiers;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(owner_instance_id);
|
||||
s.value2b(key);
|
||||
s.value2b(key_code);
|
||||
s.value2b(modifiers);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API onKeyDown(char16 key,
|
||||
int16 keyCode,
|
||||
int16 modifiers) override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IPlugView::onKeyUp(key, keyCode,
|
||||
* modifiers)` to the Wine plugin host.
|
||||
*/
|
||||
struct OnKeyUp {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t owner_instance_id;
|
||||
|
||||
char16 key;
|
||||
int16 key_code;
|
||||
int16 modifiers;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(owner_instance_id);
|
||||
s.value2b(key);
|
||||
s.value2b(key_code);
|
||||
s.value2b(modifiers);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API onKeyUp(char16 key,
|
||||
int16 keyCode,
|
||||
int16 modifiers) override = 0;
|
||||
|
||||
Reference in New Issue
Block a user