From 5aa6e6180b9575d49cd5a9ac61d2752d4b083386 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 20 Oct 2011 04:03:31 +0000 Subject: Support embedding X11 UIs. git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3551 a436a847-0d15-0410-975c-d299462d15a1 --- src/instance.c | 15 +++++++++++++-- src/qt4_in_gtk2.cpp | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/instance.c b/src/instance.c index e1f8e8e..c3e983e 100644 --- a/src/instance.c +++ b/src/instance.c @@ -28,6 +28,7 @@ #define NS_UI "http://lv2plug.in/ns/extensions/ui#" #define GTK2_UI_URI NS_UI "GtkUI" #define QT4_UI_URI NS_UI "Qt4UI" +#define X11_UI_URI NS_UI "X11UI" SUIL_API unsigned @@ -44,7 +45,11 @@ suil_ui_supported(const char* container_type_uri, } else if ((!strcmp(container_type_uri, GTK2_UI_URI) && !strcmp(ui_type_uri, QT4_UI_URI)) || (!strcmp(container_type_uri, QT4_UI_URI) - && !strcmp(ui_type_uri, GTK2_UI_URI))) { + && !strcmp(ui_type_uri, GTK2_UI_URI)) + || (!strcmp(container_type_uri, GTK2_UI_URI) + && !strcmp(ui_type_uri, X11_UI_URI)) + || (!strcmp(container_type_uri, QT4_UI_URI) + && !strcmp(ui_type_uri, X11_UI_URI))) { return SUIL_WRAPPING_EMBEDDED; } else { return SUIL_WRAPPING_UNSUPPORTED; @@ -71,8 +76,14 @@ get_wrap_module(const char* container_type_uri, && !strcmp(ui_type_uri, GTK2_UI_URI)) { module_name = "libsuil_gtk2_in_qt4"; } else if (!strcmp(container_type_uri, GTK2_UI_URI) - && !strcmp(ui_type_uri, QT4_UI_URI)) { + && !strcmp(ui_type_uri, QT4_UI_URI)) { module_name = "libsuil_qt4_in_gtk2"; + } else if (!strcmp(container_type_uri, GTK2_UI_URI) + && !strcmp(ui_type_uri, X11_UI_URI)) { + module_name = "libsuil_x11_in_gtk2"; + } else if (!strcmp(container_type_uri, QT4_UI_URI) + && !strcmp(ui_type_uri, X11_UI_URI)) { + module_name = "libsuil_x11_in_qt4"; } if (!module_name) { diff --git a/src/qt4_in_gtk2.cpp b/src/qt4_in_gtk2.cpp index 191215e..a2aa28a 100644 --- a/src/qt4_in_gtk2.cpp +++ b/src/qt4_in_gtk2.cpp @@ -66,7 +66,7 @@ struct _WrapWidgetPrivate { SuilInstance* instance; }; -G_DEFINE_TYPE(WrapWidget, wrap_widget, GTK_TYPE_SOCKET); +G_DEFINE_TYPE(WrapWidget, wrap_widget, GTK_TYPE_SOCKET) static void wrap_widget_dispose(GObject* gobject) -- cgit v1.2.1