Browse Source

Expose through backend API hints which plugin UIs are file based

tags/v2.5.0
falkTX 2 years ago
parent
commit
a965cc4808
3 changed files with 9 additions and 0 deletions
  1. +5
    -0
      source/backend/CarlaBackend.h
  2. +2
    -0
      source/backend/plugin/CarlaPluginLV2.cpp
  3. +2
    -0
      source/backend/plugin/CarlaPluginNative.cpp

+ 5
- 0
source/backend/CarlaBackend.h View File

@@ -199,6 +199,11 @@ static const uint PLUGIN_HAS_INLINE_DISPLAY = 0x800;
*/
static const uint PLUGIN_HAS_CUSTOM_EMBED_UI = 0x1000;

/*!
* Plugin custom UI is a fake one that simply invokes an open file browser dialog.
*/
static const uint PLUGIN_HAS_CUSTOM_UI_USING_FILE_OPEN = 0x2000;

/** @} */

/* ------------------------------------------------------------------------------------------------------------


+ 2
- 0
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -3281,6 +3281,8 @@ public:

if (fUI.type == UI::TYPE_EMBED || fUI.type == UI::TYPE_EXTERNAL)
pData->hints |= PLUGIN_NEEDS_UI_MAIN_THREAD;
else if (fFilePathURI.isNotEmpty())
pData->hints |= PLUGIN_HAS_CUSTOM_UI_USING_FILE_OPEN;
}

if (LV2_IS_GENERATOR(fRdfDescriptor->Type[0], fRdfDescriptor->Type[1]))


+ 2
- 0
source/backend/plugin/CarlaPluginNative.cpp View File

@@ -1433,6 +1433,8 @@ public:
pData->hints |= PLUGIN_NEEDS_FIXED_BUFFERS;
if (fDescriptor->hints & NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD)
pData->hints |= PLUGIN_NEEDS_UI_MAIN_THREAD;
if (fDescriptor->hints & NATIVE_PLUGIN_NEEDS_UI_OPEN_SAVE)
pData->hints |= PLUGIN_HAS_CUSTOM_UI_USING_FILE_OPEN;
if (fDescriptor->hints & NATIVE_PLUGIN_USES_MULTI_PROGS)
pData->hints |= PLUGIN_USES_MULTI_PROGS;
if (fDescriptor->hints & NATIVE_PLUGIN_HAS_INLINE_DISPLAY)


Loading…
Cancel
Save