summaryrefslogtreecommitdiffstats
path: root/src/qt5_in_gtk.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-09-27 15:35:56 +0200
committerDavid Robillard <d@drobilla.net>2020-09-27 15:35:56 +0200
commite102c25959461d5b961bdb42c725cedfb91ba2df (patch)
tree99889ca2ded150ea53a9ee0216a6ba2d9cc9c535 /src/qt5_in_gtk.cpp
parent85bf9bc3a671216ffa4909b7988c47ba923036af (diff)
downloadsuil-e102c25959461d5b961bdb42c725cedfb91ba2df.tar.gz
suil-e102c25959461d5b961bdb42c725cedfb91ba2df.tar.bz2
suil-e102c25959461d5b961bdb42c725cedfb91ba2df.zip
Clean up includes and forward declarations
Diffstat (limited to 'src/qt5_in_gtk.cpp')
-rw-r--r--src/qt5_in_gtk.cpp39
1 files changed, 24 insertions, 15 deletions
diff --git a/src/qt5_in_gtk.cpp b/src/qt5_in_gtk.cpp
index ab682c6..6d0c001 100644
--- a/src/qt5_in_gtk.cpp
+++ b/src/qt5_in_gtk.cpp
@@ -15,30 +15,36 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <gtk/gtk.h>
+#include "suil_internal.h"
+
+#include "suil/suil.h"
+#include "lv2/options/options.h"
+#include "lv2/urid/urid.h"
+#include "lv2/core/lv2.h"
+#include "lv2/ui/ui.h"
#include <QVBoxLayout>
#include <QWidget>
#include <QWindow>
+#include <QtGui>
+
+#undef signals
+
+#include <gtk/gtk.h>
+#include <glib-object.h>
+#include <glib.h>
+#include <gobject/gclosure.h>
#if GTK_MAJOR_VERSION == 3
#include <gtk/gtkx.h>
#endif
-#include "lv2/options/options.h"
-#include "lv2/urid/urid.h"
-
-#include "./suil_internal.h"
+#include <stdlib.h>
+#include <string.h>
extern "C" {
-#define SUIL_TYPE_QT_WRAPPER (suil_qt_wrapper_get_type())
-#define SUIL_QT_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SUIL_TYPE_QT_WRAPPER, SuilQtWrapper))
-
-typedef struct _SuilQtWrapper SuilQtWrapper;
-typedef struct _SuilQtWrapperClass SuilQtWrapperClass;
-
-struct _SuilQtWrapper {
+typedef struct {
GtkSocket socket;
QWidget* qembed;
SuilWrapper* wrapper;
@@ -46,14 +52,17 @@ struct _SuilQtWrapper {
const LV2UI_Idle_Interface* idle_iface;
guint idle_id;
guint idle_ms;
-};
+} SuilQtWrapper;
-struct _SuilQtWrapperClass {
+typedef struct {
GtkSocketClass parent_class;
-};
+} SuilQtWrapperClass;
GType suil_qt_wrapper_get_type(void); // Accessor for SUIL_TYPE_QT_WRAPPER
+#define SUIL_TYPE_QT_WRAPPER (suil_qt_wrapper_get_type())
+#define SUIL_QT_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SUIL_TYPE_QT_WRAPPER, SuilQtWrapper))
+
G_DEFINE_TYPE(SuilQtWrapper, suil_qt_wrapper, GTK_TYPE_SOCKET)
static void