diff options
author | David Robillard <d@drobilla.net> | 2012-03-26 03:58:21 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-26 03:58:21 +0000 |
commit | 15c291b3dd247dd30141b40a3d204f47aa7bc1af (patch) | |
tree | 2b12389ad4009c82c9e8820fc5cf07104f820aee | |
parent | 6d02219044cbafc072c0eed93ce65eddc17b0961 (diff) | |
download | suil-15c291b3dd247dd30141b40a3d204f47aa7bc1af.tar.gz suil-15c291b3dd247dd30141b40a3d204f47aa7bc1af.tar.bz2 suil-15c291b3dd247dd30141b40a3d204f47aa7bc1af.zip |
Update for latest LV2.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@4106 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/suil_internal.h | 7 | ||||
-rw-r--r-- | src/x11_in_gtk2.c | 10 | ||||
-rw-r--r-- | src/x11_in_qt4.cpp | 10 | ||||
-rw-r--r-- | wscript | 9 |
4 files changed, 9 insertions, 27 deletions
diff --git a/src/suil_internal.h b/src/suil_internal.h index 0f35ab5..15ef284 100644 --- a/src/suil_internal.h +++ b/src/suil_internal.h @@ -31,9 +31,6 @@ static inline char* dlerror(void) { return "Unknown error"; } #endif #include "lv2/lv2plug.in/ns/extensions/ui/ui.h" -#ifdef HAVE_LV2_UI_RESIZE -#include "lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.h" -#endif #include "suil/suil.h" @@ -63,9 +60,7 @@ typedef struct _SuilWrapper { void* lib; LV2_Feature** features; void* impl; -#ifdef HAVE_LV2_UI_RESIZE - LV2_UI_Resize_Feature resize; -#endif + LV2UI_Resize resize; } SuilWrapper; struct SuilInstanceImpl { diff --git a/src/x11_in_gtk2.c b/src/x11_in_gtk2.c index e860322..d939cc4 100644 --- a/src/x11_in_gtk2.c +++ b/src/x11_in_gtk2.c @@ -71,14 +71,12 @@ suil_x11_wrapper_realize(GtkWidget* w, gpointer data) gtk_widget_show_all(GTK_WIDGET(wrap->plug)); } -#ifdef HAVE_LV2_UI_RESIZE static int -wrapper_resize(LV2_UI_Resize_Feature_Data data, int width, int height) +wrapper_resize(LV2UI_Resize_Handle handle, int width, int height) { - gtk_widget_set_size_request(GTK_WIDGET(data), width, height); + gtk_widget_set_size_request(GTK_WIDGET(handle), width, height); return 0; } -#endif static int wrapper_wrap(SuilWrapper* wrapper, @@ -135,15 +133,13 @@ suil_wrapper_new(SuilHost* host, wrapper->features[n_features + 1] = NULL; wrapper->features[n_features + 2] = NULL; -#ifdef HAVE_LV2_UI_RESIZE - wrapper->resize.data = wrap; + wrapper->resize.handle = wrap; wrapper->resize.ui_resize = wrapper_resize; LV2_Feature* resize_feature = (LV2_Feature*)malloc(sizeof(LV2_Feature)); resize_feature->URI = "http://lv2plug.in/ns/ext/ui-resize#UIResize"; resize_feature->data = &wrapper->resize; wrapper->features[n_features + 1] = resize_feature; -#endif return wrapper; } diff --git a/src/x11_in_qt4.cpp b/src/x11_in_qt4.cpp index aca2146..f7c9c3f 100644 --- a/src/x11_in_qt4.cpp +++ b/src/x11_in_qt4.cpp @@ -36,15 +36,13 @@ wrapper_wrap(SuilWrapper* wrapper, return 0; } -#ifdef HAVE_LV2_UI_RESIZE static int -wrapper_resize(LV2_UI_Resize_Feature_Data data, int width, int height) +wrapper_resize(LV2UI_Resize_Handle handle, int width, int height) { - QX11EmbedWidget* const ew = (QX11EmbedWidget*)data; + QX11EmbedWidget* const ew = (QX11EmbedWidget*)handle; ew->resize(width, height); return 0; } -#endif SUIL_API SuilWrapper* @@ -75,15 +73,13 @@ suil_wrapper_new(SuilHost* host, wrapper->features[n_features + 1] = NULL; wrapper->features[n_features + 2] = NULL; -#ifdef HAVE_LV2_UI_RESIZE - wrapper->resize.data = ew; + wrapper->resize.handle = ew; wrapper->resize.ui_resize = wrapper_resize; LV2_Feature* resize_feature = (LV2_Feature*)malloc(sizeof(LV2_Feature)); resize_feature->URI = "http://lv2plug.in/ns/ext/ui-resize#UIResize"; resize_feature->data = &wrapper->resize; wrapper->features[n_features + 1] = resize_feature; -#endif return wrapper; } @@ -42,12 +42,7 @@ def configure(conf): conf.env.append_unique('CFLAGS', '-std=c99') - autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-extensions-ui', uselib_store='LV2_UI') - autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-ext-ui-resize', - uselib_store='LV2_UI_RESIZE', mandatory=False) - - if conf.env['HAVE_LV2_UI_RESIZE']: - autowaf.define(conf, 'HAVE_LV2_UI_RESIZE', 1) + autowaf.check_pkg(conf, 'lv2', atleast_version='0.1.0', uselib_store='LV2') autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2', atleast_version='2.18.0', mandatory=False) @@ -108,7 +103,7 @@ def build(bld): install_path = '${LIBDIR}', cflags = cflags, lib = lib, - uselib = 'LV2_UI') + uselib = 'LV2') if bld.is_defined('HAVE_GTK2') and bld.is_defined('HAVE_QT4'): obj = bld(features = 'cxx cxxshlib', |