Add message structs for IParameterFinder

This commit is contained in:
Robbert van der Helm
2021-01-03 23:24:14 +01:00
parent 52de84f81f
commit 00632dc920
2 changed files with 37 additions and 0 deletions
@@ -18,6 +18,7 @@
#include <pluginterfaces/vst/ivstplugview.h>
#include "../../common.h"
#include "../base.h"
#pragma GCC diagnostic push
@@ -60,6 +61,41 @@ class YaParameterFinder : public Steinberg::Vst::IParameterFinder {
inline bool supported() const { return arguments.supported; }
/**
* The response code and editor size returned by a call to
* `IParameterFinder::findParameter(x_pos, y_pos, &result_tag)`.
*/
struct FindParameterResponse {
UniversalTResult result;
Steinberg::Vst::ParamID result_tag;
template <typename S>
void serialize(S& s) {
s.object(result);
s.value4b(result_tag);
}
};
/**
* Message to pass through a call to `IParameterFinder::findParameter(x_pos,
* y_pos, &result_tag)` to the Wine plugin host.
*/
struct FindParameter {
using Response = FindParameterResponse;
native_size_t owner_instance_id;
int32 x_pos;
int32 y_pos;
template <typename S>
void serialize(S& s) {
s.value8b(owner_instance_id);
s.value4b(x_pos);
s.value4b(y_pos);
}
};
virtual tresult PLUGIN_API
findParameter(int32 xPos,
int32 yPos,
@@ -18,6 +18,7 @@
#include <pluginterfaces/gui/iplugview.h>
#include "../../common.h"
#include "../base.h"
#include "../plug-frame-proxy.h"