diff options
-rw-r--r-- | src/cocoa_in_gtk2.mm | 10 | ||||
-rw-r--r-- | src/cocoa_in_qt5.mm | 6 | ||||
-rw-r--r-- | src/gtk2_in_qt4.cpp | 7 | ||||
-rw-r--r-- | src/gtk2_in_qt5.cpp | 22 | ||||
-rw-r--r-- | src/host.c | 8 | ||||
-rw-r--r-- | src/instance.c | 14 | ||||
-rw-r--r-- | src/qt4_in_gtk2.cpp | 6 | ||||
-rw-r--r-- | src/qt5_in_gtk.cpp | 39 | ||||
-rw-r--r-- | src/suil_internal.h | 16 | ||||
-rw-r--r-- | src/win_in_gtk2.cpp | 10 | ||||
-rw-r--r-- | src/x11.c | 6 | ||||
-rw-r--r-- | src/x11_in_gtk2.c | 44 | ||||
-rw-r--r-- | src/x11_in_gtk3.c | 40 | ||||
-rw-r--r-- | src/x11_in_qt4.cpp | 7 | ||||
-rw-r--r-- | src/x11_in_qt5.cpp | 16 | ||||
-rw-r--r-- | suil/suil.h | 6 |
16 files changed, 160 insertions, 97 deletions
diff --git a/src/cocoa_in_gtk2.mm b/src/cocoa_in_gtk2.mm index d0130da..9c6314d 100644 --- a/src/cocoa_in_gtk2.mm +++ b/src/cocoa_in_gtk2.mm @@ -15,15 +15,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <string.h> +#include "suil_internal.h" + +#include "lv2/options/options.h" +#include "lv2/urid/urid.h" #include <gtk/gtk.h> #include <gdk/gdkquartz.h> -#include "./suil_internal.h" - -#include "lv2/options/options.h" -#include "lv2/urid/urid.h" +#include <string.h> #ifndef MAC_OS_X_VERSION_10_12 #define MAC_OS_X_VERSION_10_12 101200 diff --git a/src/cocoa_in_qt5.mm b/src/cocoa_in_qt5.mm index 4259075..185f4fe 100644 --- a/src/cocoa_in_qt5.mm +++ b/src/cocoa_in_qt5.mm @@ -14,7 +14,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#import <Cocoa/Cocoa.h> +#include "suil_config.h" +#include "suil_internal.h" #include <QCloseEvent> #include <QMacCocoaViewContainer> @@ -23,8 +24,7 @@ #undef signals -#include "./suil_config.h" -#include "./suil_internal.h" +#import <Cocoa/Cocoa.h> extern "C" { diff --git a/src/gtk2_in_qt4.cpp b/src/gtk2_in_qt4.cpp index 546f7a9..91b374c 100644 --- a/src/gtk2_in_qt4.cpp +++ b/src/gtk2_in_qt4.cpp @@ -14,15 +14,16 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "suil_config.h" +#include "suil_internal.h" + #include <QX11EmbedContainer> + #undef signals #include <gtk/gtk.h> #include <gdk/gdkx.h> -#include "./suil_config.h" -#include "./suil_internal.h" - extern "C" { typedef struct _SuilGtk2InQt4Wrapper SuilGtk2InQt4Wrapper; diff --git a/src/gtk2_in_qt5.cpp b/src/gtk2_in_qt5.cpp index 1b2a429..c4add29 100644 --- a/src/gtk2_in_qt5.cpp +++ b/src/gtk2_in_qt5.cpp @@ -15,26 +15,36 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "suil_config.h" +#include "suil_internal.h" + +#include "lv2/core/lv2.h" +#include "suil/suil.h" + #include <QVBoxLayout> #include <QWidget> #include <QWindow> +#include <Qt> +#include <QtGui> #undef signals +#include <gdk/gdk.h> +#include <glib-object.h> +#include <glib.h> #include <gtk/gtk.h> +#include <gobject/gclosure.h> -#include "./suil_config.h" -#include "./suil_internal.h" +#include <dlfcn.h> +#include <stdlib.h> extern "C" { -typedef struct _SuilGtk2InQt5Wrapper SuilGtk2InQt5Wrapper; - -struct _SuilGtk2InQt5Wrapper { +typedef struct { QWidget* host_widget; QWindow* window; GtkWidget* plug; -}; +} SuilGtk2InQt5Wrapper; static void on_size_request(GtkWidget*, GtkRequisition* requisition, gpointer user_data) @@ -15,7 +15,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "./suil_internal.h" +#include "suil_config.h" +#include "suil_internal.h" + +#include "suil/suil.h" + +#include <dlfcn.h> +#include <stdlib.h> int suil_argc = 0; char** suil_argv = NULL; diff --git a/src/instance.c b/src/instance.c index 61037fc..fd0aea2 100644 --- a/src/instance.c +++ b/src/instance.c @@ -14,14 +14,20 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <assert.h> +#include "suil_config.h" +#include "suil_internal.h" + +#include "lv2/core/lv2.h" +#include "lv2/ui/ui.h" +#include "suil/suil.h" + +#include <dlfcn.h> +#include <stdbool.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "./suil_config.h" -#include "./suil_internal.h" - #define GTK2_UI_URI LV2_UI__GtkUI #define GTK3_UI_URI LV2_UI__Gtk3UI #define QT4_UI_URI LV2_UI__Qt4UI diff --git a/src/qt4_in_gtk2.cpp b/src/qt4_in_gtk2.cpp index fbec381..cc8c040 100644 --- a/src/qt4_in_gtk2.cpp +++ b/src/qt4_in_gtk2.cpp @@ -14,13 +14,15 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <gtk/gtk.h> +#include "suil_internal.h" #include <QApplication> #include <QVBoxLayout> #include <QX11EmbedWidget> -#include "./suil_internal.h" +#undef signals + +#include <gtk/gtk.h> extern "C" { 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 diff --git a/src/suil_internal.h b/src/suil_internal.h index 7b86bb9..a217d60 100644 --- a/src/suil_internal.h +++ b/src/suil_internal.h @@ -17,10 +17,10 @@ #ifndef SUIL_INTERNAL_H #define SUIL_INTERNAL_H -#include <assert.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "suil_config.h" + +#include "lv2/ui/ui.h" +#include "suil/suil.h" #ifdef _WIN32 #include <windows.h> @@ -33,10 +33,10 @@ static inline const char* dlerror(void) { return "Unknown error"; } #include <dlfcn.h> #endif -#include "lv2/ui/ui.h" - -#include "suil/suil.h" -#include "./suil_config.h" +#include <assert.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #ifdef __cplusplus extern "C" { diff --git a/src/win_in_gtk2.cpp b/src/win_in_gtk2.cpp index f2cca1a..1475862 100644 --- a/src/win_in_gtk2.cpp +++ b/src/win_in_gtk2.cpp @@ -14,7 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <string.h> +#include "suil_internal.h" + +#include "lv2/options/options.h" +#include "lv2/urid/urid.h" #include <gtk/gtk.h> #include <gdk/gdkwin32.h> @@ -26,10 +29,7 @@ # define WM_MOUSEHWHEEL 0x020E #endif -#include "./suil_internal.h" - -#include "lv2/options/options.h" -#include "lv2/urid/urid.h" +#include <string.h> extern "C" { @@ -15,9 +15,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <X11/Xlib.h> +#include "suil_internal.h" + +#include "suil/suil.h" -#include "./suil_internal.h" +#include <X11/Xlib.h> SUIL_LIB_EXPORT void diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c index 742a0b6..61dcb04 100644 --- a/src/x11_in_gtk2.c +++ b/src/x11_in_gtk2.c @@ -14,30 +14,37 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <gdk/gdkx.h> -#include <gtk/gtk.h> -#include <string.h> -#include <X11/Xatom.h> +#include "suil_internal.h" +#include "lv2/core/lv2.h" #include "lv2/options/options.h" +#include "lv2/ui/ui.h" #include "lv2/urid/urid.h" +#include "suil/suil.h" -#include "./suil_internal.h" - -#define SUIL_TYPE_X11_WRAPPER (suil_x11_wrapper_get_type()) -#define SUIL_X11_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SUIL_TYPE_X11_WRAPPER, SuilX11Wrapper)) +#include <X11/X.h> +#include <X11/Xatom.h> +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <gdk/gdk.h> +#include <gdk/gdkx.h> +#include <glib-object.h> +#include <glib.h> +#include <gobject/gclosure.h> +#include <gtk/gtk.h> -typedef struct _SuilX11Wrapper SuilX11Wrapper; -typedef struct _SuilX11WrapperClass SuilX11WrapperClass; -typedef struct _SuilX11SizeHints SuilX11SizeHints; +#include <stdbool.h> +#include <stdint.h> +#include <stdlib.h> +#include <string.h> -struct _SuilX11SizeHints { +typedef struct { bool is_set; int width; int height; -}; +} SuilX11SizeHints; -struct _SuilX11Wrapper { +typedef struct { GtkSocket socket; GtkPlug* plug; SuilWrapper* wrapper; @@ -50,14 +57,17 @@ struct _SuilX11Wrapper { SuilX11SizeHints base_size; SuilX11SizeHints min_size; bool query_wm; -}; +} SuilX11Wrapper; -struct _SuilX11WrapperClass { +typedef struct { GtkSocketClass parent_class; -}; +} SuilX11WrapperClass; GType suil_x11_wrapper_get_type(void); // Accessor for SUIL_TYPE_X11_WRAPPER +#define SUIL_TYPE_X11_WRAPPER (suil_x11_wrapper_get_type()) +#define SUIL_X11_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SUIL_TYPE_X11_WRAPPER, SuilX11Wrapper)) + G_DEFINE_TYPE(SuilX11Wrapper, suil_x11_wrapper, GTK_TYPE_SOCKET) /** diff --git a/src/x11_in_gtk3.c b/src/x11_in_gtk3.c index 6ec1994..06620c6 100644 --- a/src/x11_in_gtk3.c +++ b/src/x11_in_gtk3.c @@ -14,24 +14,31 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <string.h> - -#include <gdk/gdkx.h> -#include <gtk/gtk.h> -#include <gtk/gtkx.h> - -#include "./suil_internal.h" +#include "suil_internal.h" +#include "lv2/core/lv2.h" #include "lv2/options/options.h" +#include "lv2/ui/ui.h" #include "lv2/urid/urid.h" +#include "suil/suil.h" -#define SUIL_TYPE_X11_WRAPPER (suil_x11_wrapper_get_type()) -#define SUIL_X11_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SUIL_TYPE_X11_WRAPPER, SuilX11Wrapper)) +#include <X11/X.h> +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <gdk/gdk.h> +#include <gdk/gdkx.h> +#include <glib-object.h> +#include <glib.h> +#include <gobject/gclosure.h> +#include <gtk/gtk.h> +#include <gtk/gtkx.h> -typedef struct _SuilX11Wrapper SuilX11Wrapper; -typedef struct _SuilX11WrapperClass SuilX11WrapperClass; +#include <stdbool.h> +#include <stdint.h> +#include <stdlib.h> +#include <string.h> -struct _SuilX11Wrapper { +typedef struct { GtkSocket socket; GtkPlug* plug; SuilWrapper* wrapper; @@ -43,14 +50,17 @@ struct _SuilX11Wrapper { int initial_height; int req_width; int req_height; -}; +} SuilX11Wrapper; -struct _SuilX11WrapperClass { +typedef struct { GtkSocketClass parent_class; -}; +} SuilX11WrapperClass; GType suil_x11_wrapper_get_type(void); // Accessor for SUIL_TYPE_X11_WRAPPER +#define SUIL_TYPE_X11_WRAPPER (suil_x11_wrapper_get_type()) +#define SUIL_X11_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SUIL_TYPE_X11_WRAPPER, SuilX11Wrapper)) + G_DEFINE_TYPE(SuilX11Wrapper, suil_x11_wrapper, GTK_TYPE_SOCKET) /** diff --git a/src/x11_in_qt4.cpp b/src/x11_in_qt4.cpp index c21357d..e1e1378 100644 --- a/src/x11_in_qt4.cpp +++ b/src/x11_in_qt4.cpp @@ -14,12 +14,13 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "suil_config.h" +#include "suil_internal.h" + #include <QX11EmbedContainer> #include <QtEvents> -#undef signals -#include "./suil_config.h" -#include "./suil_internal.h" +#undef signals extern "C" { diff --git a/src/x11_in_qt5.cpp b/src/x11_in_qt5.cpp index c6c551f..8b96d50 100644 --- a/src/x11_in_qt5.cpp +++ b/src/x11_in_qt5.cpp @@ -15,18 +15,26 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <QCloseEvent> +#include "suil_internal.h" + +#include "lv2/core/lv2.h" +#include "lv2/ui/ui.h" +#include "suil/suil.h" + #include <QResizeEvent> +#include <QSize> #include <QTimerEvent> #include <QWidget> #include <QX11Info> +#include <Qt> +#include <X11/X.h> #include <X11/Xlib.h> #include <X11/Xutil.h> -#undef signals +#include <stdint.h> +#include <stdlib.h> -#include "./suil_config.h" -#include "./suil_internal.h" +#undef signals extern "C" { diff --git a/suil/suil.h b/suil/suil.h index 9fd4e65..48b418e 100644 --- a/suil/suil.h +++ b/suil/suil.h @@ -21,10 +21,10 @@ #ifndef SUIL_SUIL_H #define SUIL_SUIL_H -#include <stdint.h> - #include "lv2/core/lv2.h" +#include <stdbool.h> + #ifdef _WIN32 # define SUIL_LIB_IMPORT __declspec(dllimport) # define SUIL_LIB_EXPORT __declspec(dllexport) @@ -45,8 +45,6 @@ #ifdef __cplusplus extern "C" { -#else -# include <stdbool.h> #endif /** |