86 lines
2.4 KiB
C
86 lines
2.4 KiB
C
|
|
/*
|
||
|
|
GUINOTIFICATIONFACADE.hpp - access point for pushing informations into the GUI
|
||
|
|
|
||
|
|
Copyright (C) Lumiera.org
|
||
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||
|
|
|
||
|
|
This program is free software; you can redistribute it and/or
|
||
|
|
modify it under the terms of the GNU General Public License as
|
||
|
|
published by the Free Software Foundation; either version 2 of the
|
||
|
|
License, or (at your option) any later version.
|
||
|
|
|
||
|
|
This program is distributed in the hope that it will be useful,
|
||
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
|
GNU General Public License for more details.
|
||
|
|
|
||
|
|
You should have received a copy of the GNU General Public License
|
||
|
|
along with this program; if not, write to the Free Software
|
||
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||
|
|
|
||
|
|
*/
|
||
|
|
|
||
|
|
/** @file guifacade.hpp
|
||
|
|
** Interface for the GUI loader and for accessing the GUI interface from the
|
||
|
|
** lower layers of Lumiera. While part of the public interface of the Lumiera GUI,
|
||
|
|
** the implementation of this facility is part of the core application (and not
|
||
|
|
** contained within the GUI dynamic module), because it's job is to load and
|
||
|
|
** activate this module and to startup the GUI.
|
||
|
|
**
|
||
|
|
** @see lumiera::AppState
|
||
|
|
** @see lumiera::Option
|
||
|
|
** @see guifacade.cpp
|
||
|
|
** @see main.cpp
|
||
|
|
*/
|
||
|
|
|
||
|
|
|
||
|
|
#ifndef GUI_FACADE_H
|
||
|
|
#define GUI_FACADE_H
|
||
|
|
|
||
|
|
|
||
|
|
#include "common/singletonsubclass.hpp"
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
|
||
|
|
|
||
|
|
namespace gui {
|
||
|
|
|
||
|
|
using std::string;
|
||
|
|
|
||
|
|
|
||
|
|
/*********************************************************************
|
||
|
|
* Global access point pushing state update and notification of events
|
||
|
|
* from the lower layers into the Lumiera GUI. Typically, this happens
|
||
|
|
* asynchronously and triggered by events within the lower layers.
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
class GuiNotification
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
static lumiera::SingletonSub<GuiNotification> facade;
|
||
|
|
|
||
|
|
virtual void displayInfo (string const& text) =0;
|
||
|
|
|
||
|
|
virtual void triggerGuiShutdown (string const& cause) =0;
|
||
|
|
|
||
|
|
protected:
|
||
|
|
virtual ~GuiNotification() {}
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
} // namespace gui
|
||
|
|
|
||
|
|
extern "C" {
|
||
|
|
#include "lumiera/interface.h"
|
||
|
|
|
||
|
|
LUMIERA_INTERFACE_DECLARE (lumieraorg_guinotification, 0,
|
||
|
|
LUMIERA_INTERFACE_SLOT (void, displayInfo, (const char*)),
|
||
|
|
LUMIERA_INTERFACE_SLOT (void, triggerGuiShutdown, (const char*)),
|
||
|
|
);
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
#endif
|