Browse Source

Carla: Remove remaining references to Wine

tags/v0.9.0
falkTX 13 years ago
parent
commit
0b0d44a82c
6 changed files with 14 additions and 50 deletions
  1. +1
    -1
      c++/carla-backend/carla_backend_standalone.cpp
  2. +3
    -12
      c++/carla-backend/carla_plugin.h
  3. +4
    -14
      c++/carla-backend/lv2.cpp
  4. +4
    -13
      c++/carla-backend/vst.cpp
  5. +1
    -10
      c++/carla-includes/carla_includes.h
  6. +1
    -0
      c++/carla-includes/lv2/lv2_external_ui.h

+ 1
- 1
c++/carla-backend/carla_backend_standalone.cpp View File

@@ -1509,7 +1509,7 @@ int main(int argc, char* argv[])

// lock
app.exec();
delete vstGui;
vstGui = nullptr;



+ 3
- 12
c++/carla-backend/carla_plugin.h View File

@@ -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);
}

/*!


+ 4
- 14
c++/carla-backend/lv2.cpp View File

@@ -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;


+ 4
- 13
c++/carla-backend/vst.cpp View File

@@ -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
{


+ 1
- 10
c++/carla-includes/carla_includes.h View File

@@ -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


+ 1
- 0
c++/carla-includes/lv2/lv2_external_ui.h View File

@@ -96,6 +96,7 @@ typedef struct _LV2_External_UI_Host {
* LV2UI_Descriptor::instantiate()
*/
const char * plugin_human_id;

} LV2_External_UI_Host;

#ifdef __cplusplus


Loading…
Cancel
Save