From 74ca087cd372f5d68d00031ea421d8346635da44 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 3 Aug 2017 23:11:01 +0200 Subject: [PATCH] Remove the public C++ interface of the GUI-starter plugin This plugin is essentially an implementation detail, and there is no mechanism yet to use several different implementations of the interface. Thus it is pointless to expose the lifecycle methods on a public interface, while there is no way to obtain an instance of this interface, since the latter is confined to the internals of the UI subsystem lifecycle --- src/common/guifacade.cpp | 13 +++++++++++-- src/gui/guifacade.hpp | 23 ++++++----------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/common/guifacade.cpp b/src/common/guifacade.cpp index 67abbe023..2f6e691c5 100644 --- a/src/common/guifacade.cpp +++ b/src/common/guifacade.cpp @@ -57,7 +57,7 @@ namespace gui { /** load and start the GUI as a plugin */ struct GuiRunner - : public GuiFacade + : boost::noncopyable { typedef InstanceHandle GuiHandle; @@ -75,7 +75,16 @@ namespace gui { } - bool launchUI (Subsys::SigTerm& terminationHandle) override + /* ===== control interface for the GuiStarterPlugin ======= */ + + /** start the actual GUI thread(s), after successfully loading + * the GuiStarterPlugin, that is. The implementation of this function + * must ensure to invoke the given termination signal reliably after + * shutting down the GUI, otherwise the application will hang on exit. + * @internal this function is invoked automatically during the GUI + * loading and startup process. Don't call it manually. + */ + bool launchUI (Subsys::SigTerm& terminationHandle) { return theGUI_->launchUI (reinterpret_cast (&terminationHandle)); } diff --git a/src/gui/guifacade.hpp b/src/gui/guifacade.hpp index 9c0c3f909..ce8318088 100644 --- a/src/gui/guifacade.hpp +++ b/src/gui/guifacade.hpp @@ -64,15 +64,16 @@ namespace gui { * and wired internally such as to allow transparent access from * within the core. * - * \par implementation notes - * This is an facade interface to the GUI subsystem, but it is setup - * somewhat special, as its sole purpose is to expose the subsystem + * ## intended usage + * This is an facade interface to the GUI subsystem, but it's setup + * is somewhat special, as its sole purpose is to expose the subsystem * descriptor, which, when started, loads the GUI as a plugin and * invokes `launchUI(term)` there. For the implementation see * gui::GuiRunner (guifacade.cpp) and gtk-lumiera.cpp (the plugin). * * @note this facade is intended to be used by Lumiera main solely. - * client code should always use the "business" interface(s). + * client code should always use the "business" interface(s): + * - gui::GuiNotification * */ class GuiFacade @@ -90,20 +91,8 @@ namespace gui { static bool isUp(); - /* ===== control interface for the GuiStarterPlugin ======= */ - - /** start the actual GUI thread(s), after successfully loading - * the GuiStarterPlugin, that is. The implementation of this function - * must ensure to invoke the given termination signal reliably after - * shutting down the GUI, otherwise the application will hang on exit. - * @internal this function is invoked automatically during the GUI - * loading and startup process. Don't call it manually. - */ - virtual bool launchUI (lumiera::Subsys::SigTerm&) =0; - - protected: - virtual ~GuiFacade() {} + GuiFacade() = delete; }; /** interface of the GuiStarterPlugin */