| @@ -84,6 +84,9 @@ | |||
| <file>bitmaps/canvas/frame_node_header.png</file> | |||
| <file>bitmaps/canvas/frame_port_bg.png</file> | |||
| <file>bitmaps/style/arrow.png</file> | |||
| <file>bitmaps/style/groupbox.png</file> | |||
| <file>scalable/pb_generic.svg</file> | |||
| <file>scalable/pb_hardware.svg</file> | |||
| <file>scalable/pb_audacious.svg</file> | |||
| @@ -125,9 +125,18 @@ | |||
| <property name="spacing"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="margin"> | |||
| <property name="leftMargin"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="topMargin"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="rightMargin"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="bottomMargin"> | |||
| <number>1</number> | |||
| </property> | |||
| <item> | |||
| <widget class="QTreeView" name="fileTreeView"/> | |||
| </item> | |||
| @@ -169,7 +178,7 @@ | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>782</width> | |||
| <height>19</height> | |||
| <height>18</height> | |||
| </rect> | |||
| </property> | |||
| <widget class="QMenu" name="menu_File"> | |||
| @@ -6,7 +6,7 @@ | |||
| <rect> | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>484</width> | |||
| <width>510</width> | |||
| <height>433</height> | |||
| </rect> | |||
| </property> | |||
| @@ -49,6 +49,12 @@ | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>0</width> | |||
| <height>0</height> | |||
| </size> | |||
| </property> | |||
| </spacer> | |||
| </item> | |||
| <item row="2" column="2"> | |||
| @@ -56,6 +62,12 @@ | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>0</width> | |||
| <height>0</height> | |||
| </size> | |||
| </property> | |||
| </spacer> | |||
| </item> | |||
| <item row="1" column="0" colspan="3"> | |||
| @@ -64,7 +76,7 @@ | |||
| <string/> | |||
| </property> | |||
| <property name="pixmap"> | |||
| <pixmap resource="../../resources/resources.qrc">:/bitmaps/carla_about.png</pixmap> | |||
| <pixmap resource="../resources.qrc">:/bitmaps/carla_about.png</pixmap> | |||
| </property> | |||
| <property name="alignment"> | |||
| <set>Qt::AlignCenter</set> | |||
| @@ -183,6 +195,12 @@ | |||
| </item> | |||
| <item row="1" column="0" colspan="2"> | |||
| <widget class="Line" name="line"> | |||
| <property name="lineWidth"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="midLineWidth"> | |||
| <number>1</number> | |||
| </property> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| @@ -190,6 +208,12 @@ | |||
| </item> | |||
| <item row="5" column="0" colspan="2"> | |||
| <widget class="Line" name="line_2"> | |||
| <property name="lineWidth"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="midLineWidth"> | |||
| <number>1</number> | |||
| </property> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| @@ -197,6 +221,12 @@ | |||
| </item> | |||
| <item row="3" column="0" colspan="2"> | |||
| <widget class="Line" name="line_3"> | |||
| <property name="lineWidth"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="midLineWidth"> | |||
| <number>1</number> | |||
| </property> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| @@ -326,8 +356,8 @@ | |||
| </layout> | |||
| </widget> | |||
| <resources> | |||
| <include location="../../resources/resources.qrc"/> | |||
| <include location="../../resources/resources.qrc"/> | |||
| <include location="../resources.qrc"/> | |||
| <include location="../resources.qrc"/> | |||
| </resources> | |||
| <connections> | |||
| <connection> | |||
| @@ -6,8 +6,8 @@ | |||
| <rect> | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>686</width> | |||
| <height>523</height> | |||
| <width>749</width> | |||
| <height>585</height> | |||
| </rect> | |||
| </property> | |||
| <property name="windowTitle"> | |||
| @@ -535,6 +535,12 @@ Plugin Name | |||
| </item> | |||
| <item> | |||
| <widget class="Line" name="line"> | |||
| <property name="lineWidth"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="midLineWidth"> | |||
| <number>1</number> | |||
| </property> | |||
| <property name="orientation"> | |||
| <enum>Qt::Vertical</enum> | |||
| </property> | |||
| @@ -6,8 +6,8 @@ | |||
| <rect> | |||
| <x>0</x> | |||
| <y>0</y> | |||
| <width>615</width> | |||
| <height>255</height> | |||
| <width>610</width> | |||
| <height>308</height> | |||
| </rect> | |||
| </property> | |||
| <property name="windowTitle"> | |||
| @@ -76,6 +76,12 @@ | |||
| </item> | |||
| <item> | |||
| <widget class="Line" name="line_3"> | |||
| <property name="lineWidth"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="midLineWidth"> | |||
| <number>1</number> | |||
| </property> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| @@ -102,6 +108,19 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <spacer name="horizontalSpacer_4"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>40</width> | |||
| <height>5</height> | |||
| </size> | |||
| </property> | |||
| </spacer> | |||
| </item> | |||
| <item> | |||
| <spacer name="verticalSpacer_3"> | |||
| <property name="orientation"> | |||
| @@ -118,20 +137,13 @@ | |||
| </layout> | |||
| </item> | |||
| <item> | |||
| <spacer name="horizontalSpacer_4"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| <widget class="Line" name="line_2"> | |||
| <property name="lineWidth"> | |||
| <number>0</number> | |||
| </property> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>40</width> | |||
| <height>5</height> | |||
| </size> | |||
| <property name="midLineWidth"> | |||
| <number>1</number> | |||
| </property> | |||
| </spacer> | |||
| </item> | |||
| <item> | |||
| <widget class="Line" name="line_2"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Vertical</enum> | |||
| </property> | |||
| @@ -146,13 +158,6 @@ | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <widget class="Line" name="line_4"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| </property> | |||
| </widget> | |||
| </item> | |||
| <item> | |||
| <widget class="QCheckBox" name="ch_posix32"> | |||
| <property name="text"> | |||
| @@ -388,10 +393,13 @@ | |||
| </layout> | |||
| </item> | |||
| <item> | |||
| <spacer name="verticalSpacer"> | |||
| <spacer name="verticalSpacer_5"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Vertical</enum> | |||
| </property> | |||
| <property name="sizeType"> | |||
| <enum>QSizePolicy::Fixed</enum> | |||
| </property> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>20</width> | |||
| @@ -401,11 +409,17 @@ | |||
| </spacer> | |||
| </item> | |||
| <item> | |||
| <widget class="Line" name="line"> | |||
| <spacer name="verticalSpacer"> | |||
| <property name="orientation"> | |||
| <enum>Qt::Horizontal</enum> | |||
| <enum>Qt::Vertical</enum> | |||
| </property> | |||
| </widget> | |||
| <property name="sizeHint" stdset="0"> | |||
| <size> | |||
| <width>20</width> | |||
| <height>6</height> | |||
| </size> | |||
| </property> | |||
| </spacer> | |||
| </item> | |||
| <item> | |||
| <layout class="QHBoxLayout" name="horizontalLayout"> | |||
| @@ -183,6 +183,8 @@ struct CarlaTransportInfo { | |||
| CARLA_EXPORT const char* carla_get_extended_license_text(); | |||
| CARLA_EXPORT const char* carla_get_supported_file_types(); | |||
| CARLA_EXPORT void carla_set_up_qt(uintptr_t app); | |||
| CARLA_EXPORT unsigned int carla_get_engine_driver_count(); | |||
| CARLA_EXPORT const char* carla_get_engine_driver_name(unsigned int index); | |||
| @@ -30,11 +30,6 @@ CARLA_BACKEND_START_NAMESPACE | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| // Engine Helpers | |||
| QMainWindow* getEngineHostWindow(CarlaEngine* const engine) | |||
| { | |||
| return CarlaEngineProtectedData::getHostWindow(engine); | |||
| } | |||
| #ifndef BUILD_BRIDGE | |||
| void registerEnginePlugin(CarlaEngine* const engine, const unsigned int id, CarlaPlugin* const plugin) | |||
| { | |||
| @@ -202,11 +202,6 @@ struct CarlaEngineProtectedData { | |||
| CarlaEngineProtectedData(CarlaEngineProtectedData&) = delete; | |||
| CarlaEngineProtectedData(const CarlaEngineProtectedData&) = delete; | |||
| static QMainWindow* getHostWindow(CarlaEngine* const engine) | |||
| { | |||
| return engine->kData->hostWindow; | |||
| } | |||
| #ifndef BUILD_BRIDGE | |||
| static void registerEnginePlugin(CarlaEngine* const engine, const unsigned int id, CarlaPlugin* const plugin) | |||
| { | |||
| @@ -30,7 +30,7 @@ | |||
| # include "DistrhoUIMain.cpp" | |||
| #endif | |||
| // ------------------------------------------------- | |||
| // ----------------------------------------------------------------------- | |||
| START_NAMESPACE_DISTRHO | |||
| @@ -52,6 +52,7 @@ public: | |||
| fUi(this, 0, editParameterCallback, setParameterCallback, setStateCallback, sendNoteCallback, uiResizeCallback) | |||
| #endif | |||
| { | |||
| setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint); | |||
| #ifdef DISTRHO_UI_OPENGL | |||
| setCentralWidget(&fWidget); | |||
| #else | |||
| @@ -25,16 +25,11 @@ CARLA_BACKEND_START_NAMESPACE | |||
| #include "moc_CarlaPluginGui.cpp" | |||
| // ----------------------------------------------------------------------- | |||
| // Engine Helpers, defined in CarlaEngine.cpp | |||
| extern QMainWindow* getEngineHostWindow(CarlaEngine* const engine); | |||
| // ------------------------------------------------------------------- | |||
| // CarlaPluginGUI | |||
| CarlaPluginGui::CarlaPluginGui(CarlaEngine* const engine, Callback* const callback, const Options& options) | |||
| : QMainWindow(getEngineHostWindow(engine)), | |||
| : QMainWindow(nullptr), | |||
| kCallback(callback), | |||
| fContainer(nullptr), | |||
| fOptions(options) | |||
| @@ -54,9 +49,11 @@ CarlaPluginGui::CarlaPluginGui(CarlaEngine* const engine, Callback* const callba | |||
| #ifdef Q_OS_WIN | |||
| if (! options.resizable) | |||
| setWindowFlags(windowFlags() | Qt::MSWindowsFixedSizeDialogHint); | |||
| setWindowFlags(windowFlags()|Qt::MSWindowsFixedSizeDialogHint); | |||
| #endif | |||
| setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint); | |||
| connect(this, SIGNAL(setSizeSafeSignal(int,int)), SLOT(setSizeSafeSlot(int,int))); | |||
| } | |||
| @@ -23,6 +23,7 @@ | |||
| #include "CarlaPlugin.hpp" | |||
| #include "CarlaMIDI.h" | |||
| #include "CarlaNative.h" | |||
| #include "CarlaStyle.hpp" | |||
| #include <QtCore/Qt> | |||
| @@ -86,6 +87,18 @@ struct CarlaBackendStandalone { | |||
| app = nullptr; | |||
| } | |||
| void registerThemeIfPossible(QApplication* const hostApp) | |||
| { | |||
| if (needsInit) | |||
| return; | |||
| CARLA_ASSERT(app != nullptr); | |||
| CARLA_ASSERT(app == hostApp); | |||
| if (app == hostApp) | |||
| hostApp->setStyle(new CarlaStyle()); | |||
| } | |||
| CARLA_DECLARE_NON_COPY_STRUCT_WITH_LEAK_DETECTOR(CarlaBackendStandalone) | |||
| } standalone; | |||
| @@ -185,6 +198,21 @@ const char* carla_get_supported_file_types() | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| void carla_set_up_qt(uintptr_t app) | |||
| { | |||
| carla_debug("carla_set_up_qt(" P_UINTPTR ")", app); | |||
| CARLA_ASSERT(app != 0); | |||
| if (app == 0) | |||
| return; | |||
| QApplication* hostApp = (QApplication*)CarlaBackend::getPointerFromAddress(app); | |||
| standalone.registerThemeIfPossible(hostApp); | |||
| } | |||
| // ------------------------------------------------------------------------------------------------------------------- | |||
| unsigned int carla_get_engine_driver_count() | |||
| { | |||
| carla_debug("carla_get_engine_driver_count()"); | |||
| @@ -8,7 +8,7 @@ include ../Makefile.mk | |||
| # -------------------------------------------------------------- | |||
| BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) | |||
| BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) -I../../theme | |||
| ifeq ($(HAVE_QT5),true) | |||
| BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core) | |||
| @@ -93,6 +93,7 @@ LIBS += ../libcarla_plugin.a | |||
| LIBS += ../libcarla_native.a | |||
| LIBS += ../../libs/rtmempool.a | |||
| LIBS += ../../libs/widgets.a | |||
| LIBS += ../../libs/theme.a | |||
| ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||
| LIBS += ../../libs/lilv.a | |||
| @@ -1951,6 +1951,7 @@ if __name__ == '__main__': | |||
| Carla.host = Host(libName) | |||
| Carla.host.set_engine_callback(engineCallback) | |||
| Carla.host.set_engine_option(OPTION_PROCESS_NAME, 0, "carla") | |||
| Carla.host.set_up_qt(app) | |||
| # Set bridge paths | |||
| if carla_bridge_native: | |||
| @@ -21,6 +21,7 @@ | |||
| from ctypes import * | |||
| from platform import architecture | |||
| from sip import unwrapinstance | |||
| from sys import platform, maxsize | |||
| # ------------------------------------------------------------------------------------------------------------ | |||
| @@ -253,6 +254,7 @@ else: | |||
| c_enum = c_int | |||
| c_nullptr = None | |||
| c_uintptr = c_uint64 if kIs64bit else c_uint32 | |||
| CallbackFunc = CFUNCTYPE(None, c_void_p, c_enum, c_uint, c_int, c_int, c_float, c_char_p) | |||
| @@ -371,6 +373,9 @@ class Host(object): | |||
| self.lib.carla_get_supported_file_types.argtypes = None | |||
| self.lib.carla_get_supported_file_types.restype = c_char_p | |||
| self.lib.carla_set_up_qt.argtypes = [c_uintptr] | |||
| self.lib.carla_set_up_qt.restype = None | |||
| self.lib.carla_get_engine_driver_count.argtypes = None | |||
| self.lib.carla_get_engine_driver_count.restype = c_uint | |||
| @@ -607,6 +612,9 @@ class Host(object): | |||
| def get_supported_file_types(self): | |||
| return self.lib.carla_get_supported_file_types() | |||
| def set_up_qt(self, app): | |||
| self.lib.carla_set_up_qt(unwrapinstance(app)) | |||
| def get_engine_driver_count(self): | |||
| return self.lib.carla_get_engine_driver_count() | |||
| @@ -2098,6 +2098,7 @@ class PluginWidget(QFrame): | |||
| def paintEvent(self, event): | |||
| painter = QPainter(self) | |||
| painter.save() | |||
| areaX = self.ui.area_right.x() | |||
| @@ -2131,6 +2132,11 @@ class PluginWidget(QFrame): | |||
| # fill the rest | |||
| painter.drawRect(areaX+19, 5, self.width(), self.height()) | |||
| # bottom 1px line | |||
| painter.setPen(self.fColorSeprtr) | |||
| painter.drawLine(0, self.height()-1, self.width(), self.height()-1) | |||
| painter.restore() | |||
| QFrame.paintEvent(self, event) | |||
| @pyqtSlot(bool) | |||
| @@ -46,9 +46,6 @@ | |||
| #elif defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__) | |||
| # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 | |||
| # define CARLA_PROPER_CPP11_SUPPORT | |||
| # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 | |||
| # define IS_CPP11 1 | |||
| # endif | |||
| # endif | |||
| #endif | |||
| @@ -57,10 +54,6 @@ | |||
| # define nullptr (0) | |||
| #endif | |||
| #ifndef IS_CPP11 | |||
| # define IS_CPP11 0 | |||
| #endif | |||
| // Common includes | |||
| #ifdef CARLA_OS_WIN | |||
| # include <winsock2.h> | |||
| @@ -35,6 +35,9 @@ rtmempool.%.a: | |||
| widgets.a: | |||
| $(MAKE) -C ../widgets | |||
| theme.a: | |||
| $(MAKE) -C ../theme | |||
| # -------------------------------------------------------------- | |||
| jackbridge-win32.dll: | |||