diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-06-08 19:14:17 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-06-08 19:29:07 +0200 |
commit | 0979c285c0cdaf7efc65bdf86882db20596e1de7 (patch) | |
tree | d58393521280fa1725c4113951d1e87cecf8482f /plugingui/testmain.cc | |
parent | 0531409611867ae8dad711e52d6534fa634d40cc (diff) |
Make pugl work with testmain.
Diffstat (limited to 'plugingui/testmain.cc')
-rw-r--r-- | plugingui/testmain.cc | 15 |
1 files changed, 14 insertions, 1 deletions
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; |