diff options
author | David Robillard <d@drobilla.net> | 2019-06-06 21:03:16 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-06-06 21:05:10 +0200 |
commit | 8fcbdf19755f37592c67deb2c61f5470a1852ea4 (patch) | |
tree | e10e086f0acd939bd8b40b315556db8018912b65 /src | |
parent | 2f113db65cb0378b92b83369606a53c975572931 (diff) | |
download | suil-8fcbdf19755f37592c67deb2c61f5470a1852ea4.tar.gz suil-8fcbdf19755f37592c67deb2c61f5470a1852ea4.tar.bz2 suil-8fcbdf19755f37592c67deb2c61f5470a1852ea4.zip |
Add support for Qt5 in Gtk3
Diffstat (limited to 'src')
-rw-r--r-- | src/instance.c | 8 | ||||
-rw-r--r-- | src/qt5_in_gtk.cpp (renamed from src/qt5_in_gtk2.cpp) | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/instance.c b/src/instance.c index d365ca2..61037fc 100644 --- a/src/instance.c +++ b/src/instance.c @@ -54,6 +54,8 @@ suil_ui_supported(const char* host_type_uri, && !strcmp(ui_type_uri, X11_UI_URI)) || (!strcmp(host_type_uri, GTK3_UI_URI) && !strcmp(ui_type_uri, X11_UI_URI)) + || (!strcmp(host_type_uri, GTK3_UI_URI) + && !strcmp(ui_type_uri, QT5_UI_URI)) || (!strcmp(host_type_uri, GTK2_UI_URI) && !strcmp(ui_type_uri, WIN_UI_URI)) || (!strcmp(host_type_uri, GTK2_UI_URI) @@ -114,6 +116,12 @@ open_wrapper(SuilHost* host, module_name = "suil_x11_in_gtk3"; } #endif +#ifdef SUIL_WITH_QT5_IN_GTK3 + if (!strcmp(container_type_uri, GTK3_UI_URI) + && !strcmp(ui_type_uri, QT5_UI_URI)) { + module_name = "suil_qt5_in_gtk3"; + } +#endif #ifdef SUIL_WITH_WIN_IN_GTK2 if (!strcmp(container_type_uri, GTK2_UI_URI) && !strcmp(ui_type_uri, WIN_UI_URI)) { diff --git a/src/qt5_in_gtk2.cpp b/src/qt5_in_gtk.cpp index eac44af..e74ab5d 100644 --- a/src/qt5_in_gtk2.cpp +++ b/src/qt5_in_gtk.cpp @@ -21,6 +21,10 @@ #include <QWidget> #include <QWindow> +#if GTK_MAJOR_VERSION == 3 +#include <gtk/gtkx.h> +#endif + #include "lv2/options/options.h" #include "lv2/urid/urid.h" @@ -173,7 +177,7 @@ wrapper_free(SuilWrapper* wrapper) { if (wrapper->impl) { SuilQtWrapper* const wrap = SUIL_QT_WRAPPER(wrapper->impl); - gtk_object_destroy(GTK_OBJECT(wrap)); + gtk_widget_destroy(GTK_WIDGET(wrap)); } } |