| @@ -1509,7 +1509,7 @@ int main(int argc, char* argv[]) | |||
| // lock | |||
| app.exec(); | |||
| delete vstGui; | |||
| vstGui = nullptr; | |||
| @@ -33,10 +33,7 @@ | |||
| #include <cstdio> | |||
| #include <cstdlib> | |||
| #include <vector> | |||
| #ifndef __WINE__ | |||
| # include <QtGui/QDialog> | |||
| #endif | |||
| #include <QtGui/QDialog> | |||
| CARLA_BACKEND_START_NAMESPACE | |||
| @@ -49,12 +46,6 @@ CARLA_BACKEND_START_NAMESPACE | |||
| #define CARLA_PROCESS_CONTINUE_CHECK if (! m_enabled) { x_engine->callback(CALLBACK_DEBUG, m_id, m_enabled, 0, 0.0); return; } | |||
| #ifdef __WINE__ | |||
| typedef HWND GuiDataHandle; | |||
| #else | |||
| typedef QDialog* GuiDataHandle; | |||
| #endif | |||
| const unsigned short MAX_MIDI_EVENTS = 512; | |||
| const unsigned short MAX_POST_EVENTS = 152; | |||
| @@ -1272,9 +1263,9 @@ public: | |||
| * | |||
| * \note This function must be always called from the main thread. | |||
| */ | |||
| virtual void setGuiData(const GuiDataHandle handle) | |||
| virtual void setGuiData(QDialog* const dialog) | |||
| { | |||
| Q_UNUSED(handle); | |||
| Q_UNUSED(dialog); | |||
| } | |||
| /*! | |||
| @@ -20,10 +20,7 @@ | |||
| #include "rtmempool/rtmempool.h" | |||
| #include <QtCore/QDir> | |||
| #ifndef __WINE__ | |||
| #include <QtGui/QLayout> | |||
| #endif | |||
| #ifdef HAVE_SUIL | |||
| #include <suil/suil.h> | |||
| @@ -305,7 +302,7 @@ public: | |||
| break; | |||
| case GUI_EXTERNAL_SUIL: | |||
| #if defined(HAVE_SUIL) && ! defined(__WINE__) | |||
| #ifdef HAVE_SUIL | |||
| if (ui.widget) | |||
| ((QWidget*)ui.widget)->close(); | |||
| #endif | |||
| @@ -881,18 +878,16 @@ public: | |||
| // ------------------------------------------------------------------- | |||
| // Set gui stuff | |||
| void setGuiData(const GuiDataHandle handle) | |||
| void setGuiData(QDialog* const dialog) | |||
| { | |||
| switch(gui.type) | |||
| { | |||
| case GUI_NONE: | |||
| break; | |||
| #ifndef __WINE__ | |||
| case GUI_INTERNAL_QT4: | |||
| if (ui.widget) | |||
| { | |||
| QDialog* const dialog = handle; | |||
| QWidget* const widget = (QWidget*)ui.widget; | |||
| dialog->layout()->addWidget(widget); | |||
| widget->adjustSize(); | |||
| @@ -900,18 +895,13 @@ public: | |||
| widget->show(); | |||
| } | |||
| break; | |||
| #endif | |||
| case GUI_INTERNAL_COCOA: | |||
| case GUI_INTERNAL_HWND: | |||
| case GUI_INTERNAL_X11: | |||
| if (ui.descriptor) | |||
| { | |||
| #ifdef __WINE__ | |||
| features[lv2_feature_id_ui_parent]->data = (void*)handle; | |||
| #else | |||
| features[lv2_feature_id_ui_parent]->data = (void*)handle->winId(); | |||
| #endif | |||
| features[lv2_feature_id_ui_parent]->data = (void*)dialog->winId(); | |||
| ui.handle = ui.descriptor->instantiate(ui.descriptor, | |||
| descriptor->URI, ui.rdf_descriptor->Bundle, | |||
| carla_lv2_ui_write_function, this, &ui.widget,features); | |||
| @@ -973,7 +963,7 @@ public: | |||
| break; | |||
| case GUI_EXTERNAL_SUIL: | |||
| #if defined(HAVE_SUIL) && ! defined(__WINE__) | |||
| #ifdef HAVE_SUIL | |||
| if (ui.widget) | |||
| { | |||
| QWidget* const widget = (QWidget*)ui.widget; | |||
| @@ -18,12 +18,9 @@ | |||
| #include "carla_plugin.h" | |||
| #include "carla_vst.h" | |||
| #ifndef __WINE__ | |||
| #include <QtGui/QDialog> | |||
| #ifdef Q_WS_X11 | |||
| #include <QtGui/QX11Info> | |||
| #endif | |||
| #endif | |||
| CARLA_BACKEND_START_NAMESPACE | |||
| @@ -331,10 +328,9 @@ public: | |||
| // ------------------------------------------------------------------- | |||
| // Set gui stuff | |||
| void setGuiData(const GuiDataHandle handle) | |||
| void setGuiData(QDialog* const dialog) | |||
| { | |||
| qDebug("VstPlugin::setGuiData(%p)", handle); | |||
| Q_ASSERT(handle); | |||
| Q_ASSERT(dialog); | |||
| if (gui.type == GUI_EXTERNAL_OSC) | |||
| return; | |||
| @@ -344,12 +340,7 @@ public: | |||
| value = (int64_t)QX11Info::display(); | |||
| #endif | |||
| #ifdef __WINE__ | |||
| if (effect->dispatcher(effect, effEditOpen, 0, value, handle, 0.0f) == 1) | |||
| #else | |||
| const QDialog* const dialog = handle; | |||
| if (effect->dispatcher(effect, effEditOpen, 0, value, (void*)dialog->winId(), 0.0f) == 1) | |||
| #endif | |||
| { | |||
| ERect* vstRect = nullptr; | |||
| effect->dispatcher(effect, effEditGetRect, 0, 0, &vstRect, 0.0f); | |||
| @@ -361,7 +352,7 @@ public: | |||
| if (width <= 0 || height <= 0) | |||
| { | |||
| qCritical("VstPlugin::setGuiData(%p) - failed to get proper window size", handle); | |||
| qCritical("VstPlugin::setGuiData(%p) - failed to get proper window size", dialog); | |||
| return; | |||
| } | |||
| @@ -369,7 +360,7 @@ public: | |||
| gui.height = height; | |||
| } | |||
| else | |||
| qCritical("VstPlugin::setGuiData(%p) - failed to get plugin window size", handle); | |||
| qCritical("VstPlugin::setGuiData(%p) - failed to get plugin window size", dialog); | |||
| } | |||
| else | |||
| { | |||
| @@ -18,20 +18,11 @@ | |||
| #ifndef CARLA_INCLUDES_H | |||
| #define CARLA_INCLUDES_H | |||
| #ifdef __WINE__ | |||
| # define __socklen_t_defined | |||
| //# define __WINE_WINSOCK2__ | |||
| //# define HRESULT LONG | |||
| # define Q_CORE_EXPORT | |||
| # define Q_GUI_EXPORT | |||
| # define QT_NO_STL | |||
| #endif | |||
| #include <QtCore/Qt> | |||
| // TESTING - remove later | |||
| #ifdef QTCREATOR_TEST | |||
| #undef Q_COMPILER_INITIALIZER_LISTS | |||
| # undef Q_COMPILER_INITIALIZER_LISTS | |||
| #endif | |||
| #ifndef Q_COMPILER_LAMBDA | |||
| @@ -96,6 +96,7 @@ typedef struct _LV2_External_UI_Host { | |||
| * LV2UI_Descriptor::instantiate() | |||
| */ | |||
| const char * plugin_human_id; | |||
| } LV2_External_UI_Host; | |||
| #ifdef __cplusplus | |||