From 0979c285c0cdaf7efc65bdf86882db20596e1de7 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 8 Jun 2018 19:14:17 +0200 Subject: Make pugl work with testmain. --- plugingui/testmain.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'plugingui/testmain.cc') diff --git a/plugingui/testmain.cc b/plugingui/testmain.cc index 9d10bd9..b122756 100644 --- a/plugingui/testmain.cc +++ b/plugingui/testmain.cc @@ -37,23 +37,36 @@ int main() { INFO(example, "We are up and running"); + void* native_window_handle{nullptr}; +#ifndef UI_PUGL GUI::Window parent{nullptr}; parent.setCaption("PluginGui Test Application"); + native_window_handle = parent.getNativeWindowHandle(); +#endif Settings settings; - GUI::MainWindow main_window(settings, parent.getNativeWindowHandle()); + GUI::MainWindow main_window(settings, native_window_handle); + +#ifndef UI_PUGL CONNECT(&parent, eventHandler()->closeNotifier, &main_window, &GUI::MainWindow::closeEventHandler); parent.show(); +#endif main_window.show(); // TODO: automatically use drumgizmo_plugin.h size here +#ifndef UI_PUGL parent.resize(750, 613); +#else + main_window.resize(750, 613); +#endif while(true) { +#ifndef UI_PUGL parent.eventHandler()->processEvents(); +#endif if(!main_window.processEvents()) { break; -- cgit v1.2.3