MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / openFileFromDSP

Method openFileFromDSP

plugins/Cardinal/src/Ildaeil.cpp:1087–1101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1085 }
1086
1087 void openFileFromDSP(bool /* isDir */, const char* const title, const char* /* filter */)
1088 {
1089 DISTRHO_SAFE_ASSERT_RETURN(idleCallbackActive,);
1090 DISTRHO_SAFE_ASSERT_RETURN(fPluginType == PLUGIN_INTERNAL || fPluginType == PLUGIN_LV2,);
1091
1092 const CarlaHostHandle handle = module->fCarlaHostHandle;
1093 async_dialog_filebrowser(false, nullptr, nullptr, title, [handle](char* path)
1094 {
1095 if (path == nullptr)
1096 return;
1097
1098 carla_set_custom_data(handle, 0, CUSTOM_DATA_TYPE_PATH, "file", path);
1099 std::free(path);
1100 });
1101 }
1102
1103 void createOrUpdatePluginGenericUI(const CarlaHostHandle handle)
1104 {

Callers 1

host_ui_open_fileFunction · 0.80

Calls 1

async_dialog_filebrowserFunction · 0.50

Tested by

no test coverage detected