| @@ -29,6 +29,7 @@ OBJS = \ | |||||
| OBJS += \ | OBJS += \ | ||||
| distrho-3bandeq.o \ | distrho-3bandeq.o \ | ||||
| distrho-3bandsplitter.o \ | distrho-3bandsplitter.o \ | ||||
| distrho-pingpongpan.o \ | |||||
| distrho-pugl.o | distrho-pugl.o | ||||
| # ZynAddSubFX | # ZynAddSubFX | ||||
| @@ -56,6 +57,9 @@ distrho-3bandeq.o: distrho-3bandeq.cpp | |||||
| distrho-3bandsplitter.o: distrho-3bandsplitter.cpp | distrho-3bandsplitter.o: distrho-3bandsplitter.cpp | ||||
| $(CXX) -c $< $(BUILD_CXX_FLAGS) -I../distrho-plugin-toolkit -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -o $@ | $(CXX) -c $< $(BUILD_CXX_FLAGS) -I../distrho-plugin-toolkit -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -o $@ | ||||
| distrho-pingpongpan.o: distrho-pingpongpan.cpp | |||||
| $(CXX) -c $< $(BUILD_CXX_FLAGS) -I../distrho-plugin-toolkit -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -o $@ | |||||
| distrho-pugl.o: distrho-pugl.cpp | distrho-pugl.o: distrho-pugl.cpp | ||||
| $(CXX) -c $< $(BUILD_CXX_FLAGS) -I../distrho-plugin-toolkit -o $@ | $(CXX) -c $< $(BUILD_CXX_FLAGS) -I../distrho-plugin-toolkit -o $@ | ||||
| @@ -191,6 +191,7 @@ void carla_register_native_plugin_midiSplit(); | |||||
| // DISTRHO plugins | // DISTRHO plugins | ||||
| void carla_register_native_plugin_3BandEQ(); | void carla_register_native_plugin_3BandEQ(); | ||||
| void carla_register_native_plugin_3BandSplitter(); | void carla_register_native_plugin_3BandSplitter(); | ||||
| void carla_register_native_plugin_PingPongPan(); | |||||
| #ifdef WANT_ZYNADDSUBFX | #ifdef WANT_ZYNADDSUBFX | ||||
| // ZynAddSubFX | // ZynAddSubFX | ||||
| @@ -130,6 +130,12 @@ protected: | |||||
| setFixedSize(width, height); | setFixedSize(width, height); | ||||
| } | } | ||||
| void closeEvent(QCloseEvent* event) | |||||
| { | |||||
| m_host->ui_closed(m_host->handle); | |||||
| QDialog::closeEvent(event); | |||||
| } | |||||
| private: | private: | ||||
| // Plugin stuff | // Plugin stuff | ||||
| const HostDescriptor* const m_host; | const HostDescriptor* const m_host; | ||||
| @@ -51,6 +51,7 @@ public: | |||||
| host.write_midi_event = carla_host_write_midi_event; | host.write_midi_event = carla_host_write_midi_event; | ||||
| host.ui_parameter_changed = carla_host_ui_parameter_changed; | host.ui_parameter_changed = carla_host_ui_parameter_changed; | ||||
| host.ui_custom_data_changed = carla_host_ui_custom_data_changed; | host.ui_custom_data_changed = carla_host_ui_custom_data_changed; | ||||
| host.ui_closed = carla_host_ui_closed; | |||||
| isProcessing = false; | isProcessing = false; | ||||
| @@ -1481,6 +1482,13 @@ public: | |||||
| setCustomData(CUSTOM_DATA_STRING, key, value, false); | setCustomData(CUSTOM_DATA_STRING, key, value, false); | ||||
| } | } | ||||
| void handleUiClosed() | |||||
| { | |||||
| x_engine->callback(CALLBACK_SHOW_GUI, m_id, 0, 0, 0.0, nullptr); | |||||
| } | |||||
| // ------------------------------------------------------------------- | |||||
| static uint32_t carla_host_get_buffer_size(HostHandle handle) | static uint32_t carla_host_get_buffer_size(HostHandle handle) | ||||
| { | { | ||||
| CARLA_ASSERT(handle); | CARLA_ASSERT(handle); | ||||
| @@ -1517,6 +1525,12 @@ public: | |||||
| ((NativePlugin*)handle)->handleUiCustomDataChanged(key, value); | ((NativePlugin*)handle)->handleUiCustomDataChanged(key, value); | ||||
| } | } | ||||
| static void carla_host_ui_closed(HostHandle handle) | |||||
| { | |||||
| CARLA_ASSERT(handle); | |||||
| ((NativePlugin*)handle)->handleUiClosed(); | |||||
| } | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| static size_t getPluginCount() | static size_t getPluginCount() | ||||
| @@ -1552,6 +1566,7 @@ public: | |||||
| carla_register_native_plugin_3BandEQ(); | carla_register_native_plugin_3BandEQ(); | ||||
| carla_register_native_plugin_3BandSplitter(); | carla_register_native_plugin_3BandSplitter(); | ||||
| carla_register_native_plugin_PingPongPan(); | |||||
| #ifdef WANT_ZYNADDSUBFX | #ifdef WANT_ZYNADDSUBFX | ||||
| carla_register_native_plugin_zynaddsubfx(); | carla_register_native_plugin_zynaddsubfx(); | ||||
| @@ -1176,7 +1176,7 @@ void OpenGLExtUI::d_onMotion(int x, int y) | |||||
| if (movX != 0) | if (movX != 0) | ||||
| { | { | ||||
| int d = (d_uiGetModifiers() & MOD_SHIFT) ? 2000 : 200; | |||||
| int d = (d_uiGetModifiers() & MODIFIER_SHIFT) ? 2000 : 200; | |||||
| float value = knob->_value + (knob->_max - knob->_min) / d * movX; | float value = knob->_value + (knob->_max - knob->_min) / d * movX; | ||||
| if (value < knob->_min) | if (value < knob->_min) | ||||
| @@ -1199,7 +1199,7 @@ void OpenGLExtUI::d_onMotion(int x, int y) | |||||
| if (movY != 0) | if (movY != 0) | ||||
| { | { | ||||
| int d = (d_uiGetModifiers() & MOD_SHIFT) ? 2000 : 200; | |||||
| int d = (d_uiGetModifiers() & MODIFIER_SHIFT) ? 2000 : 200; | |||||
| float value = knob->_value + (knob->_max - knob->_min) / d * movY; | float value = knob->_value + (knob->_max - knob->_min) / d * movY; | ||||
| if (value < knob->_min) | if (value < knob->_min) | ||||