From 36894382ff965c3751fdedb18b452d1329d3a82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Wed, 10 May 2017 18:16:47 +0200 Subject: Make createWindow return the window handle. Assign *widget of lv2 init. --- plugin.h | 2 +- pluginlv2.cc | 2 +- pluginlv2.h | 2 +- pluginvst.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin.h b/plugin.h index b7f683f..f541255 100644 --- a/plugin.h +++ b/plugin.h @@ -177,7 +177,7 @@ public: } //! Create new window. - virtual void createWindow(void *parent) {} + virtual void* createWindow(void *parent) { return nullptr; } //! Destroy window. virtual void onDestroyWindow() {} diff --git a/pluginlv2.cc b/pluginlv2.cc index 0d9a50b..515d434 100644 --- a/pluginlv2.cc +++ b/pluginlv2.cc @@ -542,7 +542,7 @@ LV2UI_Handle PluginLV2::uiInstantiate(const struct _LV2UI_Descriptor*descriptor, plugin_lv2->resize = resize; - plugin_lv2->createWindow(parent); + *widget = plugin_lv2->createWindow(parent); return plugin_lv2; } diff --git a/pluginlv2.h b/pluginlv2.h index 1677fbf..86a661e 100644 --- a/pluginlv2.h +++ b/pluginlv2.h @@ -161,7 +161,7 @@ public: } //! Create new window. - virtual void createWindow(void *parent) override {} + virtual void* createWindow(void *parent) override { return nullptr; } //! Destroy window. virtual void onDestroyWindow() override {} diff --git a/pluginvst.h b/pluginvst.h index ca140d1..63bdefe 100644 --- a/pluginvst.h +++ b/pluginvst.h @@ -153,7 +153,7 @@ public: } //! Create new window. - virtual void createWindow(void *parent) override {} + virtual void* createWindow(void *parent) override { return nullptr; } //! Destroy window. virtual void onDestroyWindow() override {} -- cgit v1.2.3