summaryrefslogtreecommitdiff
path: root/distrho
diff options
context:
space:
mode:
Diffstat (limited to 'distrho')
-rw-r--r--distrho/DistrhoUI.hpp6
-rw-r--r--distrho/src/DistrhoPluginLV2export.cpp31
-rw-r--r--distrho/src/DistrhoUI.cpp5
3 files changed, 36 insertions, 6 deletions
diff --git a/distrho/DistrhoUI.hpp b/distrho/DistrhoUI.hpp
index 6975a699..b5e44e49 100644
--- a/distrho/DistrhoUI.hpp
+++ b/distrho/DistrhoUI.hpp
@@ -62,6 +62,12 @@ public:
virtual ~UI();
/**
+ Wherever this UI is resizable by the user.
+ This simply returns the value passed in the constructor.
+ */
+ bool isUserResizable() const noexcept;
+
+ /**
Set geometry constraints for the UI when resized by the user, and optionally scale UI automatically.
@see Window::setGeometryConstraints(uint,uint,bool)
@see Window::setScaling(double)
diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp
index 6ed2f7c5..08103f4d 100644
--- a/distrho/src/DistrhoPluginLV2export.cpp
+++ b/distrho/src/DistrhoPluginLV2export.cpp
@@ -139,8 +139,17 @@ void lv2_generate_ttl(const char* const basename)
# endif
manifestString += "\n";
# if DISTRHO_PLUGIN_HAS_EMBED_UI
- manifestString += " lv2:optionalFeature ui:noUserResize ,\n";
- manifestString += " ui:resize ,\n";
+ /*
+ if (! pluginUI.isUserResizable())
+ {
+ manifestString += " lv2:optionalFeature ui:noUserResize ,\n";
+ manifestString += " ui:resize ,\n";
+ }
+ else
+ */
+ {
+ manifestString += " lv2:optionalFeature ui:resize ,\n";
+ }
manifestString += " ui:touch ;\n";
manifestString += "\n";
# endif
@@ -148,9 +157,10 @@ void lv2_generate_ttl(const char* const basename)
manifestString += " <" LV2_INSTANCE_ACCESS_URI "> ,\n";
manifestString += " <" LV2_OPTIONS__options "> ,\n";
manifestString += " <" LV2_URID__map "> .\n";
-# else
+ manifestString += " opts:supportedOption <" LV2_PARAMETERS__sampleRate "> .\n";
+# else // DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
manifestString += " rdfs:seeAlso <" + uiTTL + "> .\n";
-# endif
+# endif // DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
manifestString += "\n";
#endif
@@ -628,8 +638,17 @@ void lv2_generate_ttl(const char* const basename)
# endif
uiString += "\n";
# if DISTRHO_PLUGIN_HAS_EMBED_UI
- uiString += " lv2:optionalFeature ui:noUserResize ,\n";
- uiString += " ui:resize ,\n";
+ /*
+ if (! pluginUI.isUserResizable())
+ {
+ uiString += " lv2:optionalFeature ui:noUserResize ,\n";
+ uiString += " ui:resize ,\n";
+ }
+ else
+ */
+ {
+ uiString += " lv2:optionalFeature ui:resize ,\n";
+ }
uiString += " ui:touch ;\n";
uiString += "\n";
# endif
diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp
index e48e365c..f83d0775 100644
--- a/distrho/src/DistrhoUI.cpp
+++ b/distrho/src/DistrhoUI.cpp
@@ -57,6 +57,11 @@ UI::~UI()
delete pData;
}
+bool UI::isUserResizable() const noexcept
+{
+ return pData->userResizable;
+}
+
void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale)
{
DISTRHO_SAFE_ASSERT_RETURN(minWidth > 0,);