/usr/include/mirserver/mir/graphics/display_configuration_observer.h is in libmirserver-dev 0.26.3+16.04.20170605-0ubuntu1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | /*
* Copyright © 2016 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3,
* as published by the Free Software Foundation.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
*/
#ifndef MIR_GRAPHICS_DISPLAY_CONFIGURATION_OBSERVER_
#define MIR_GRAPHICS_DISPLAY_CONFIGURATION_OBSERVER_
#include <exception>
#include <memory>
namespace mir
{
namespace frontend
{
class Session;
}
namespace graphics
{
class DisplayConfiguration;
class DisplayConfigurationObserver
{
public:
/**
* Notification of the initial display configuration.
*
* This is called exactly once, at server startup.
*
* \param [in] config The initial configuration
*/
virtual void initial_configuration(std::shared_ptr<DisplayConfiguration const> const& config) = 0;
/**
* Notification after every successful display configuration.
*
* This is called once per successful display configuration, after it has been applied
* to the hardware.
*
* \param [in] config The configuration that has just been applied.
*/
virtual void configuration_applied(std::shared_ptr<DisplayConfiguration const> const& config) = 0;
/**
* Notification after updating base display configuration.
*
* \param [in] config The configuration that has just been updated.
*/
virtual void base_configuration_updated(std::shared_ptr<DisplayConfiguration const> const& base_config) = 0;
/**
* Notification after updating the session display configuration.
*
* \param [in] session The session that is updating its display configuration.
* \param [in] config The configuration that is being applied to the session.
*/
virtual void session_configuration_applied(std::shared_ptr<frontend::Session> const& session,
std::shared_ptr<DisplayConfiguration> const& config) = 0;
/**
* Notification after removing the session display configuration.
*
* \param [in] session The session that is removing its display configuration.
*/
virtual void session_configuration_removed(std::shared_ptr<frontend::Session> const& session) = 0;
/**
* Notification after every failed display configuration attempt.
*
* This is called if the graphics platform throws an exception when trying
* to configure the hardware.
*
* In this case the previous display configuration has been re-applied.
*
* \param [in] attempted The display configuration that failed to apply.
* \param [in] error The exception thrown by the graphics platform.
*/
virtual void configuration_failed(
std::shared_ptr<DisplayConfiguration const> const& attempted,
std::exception const& error) = 0;
/**
* Notification after a failed display configuration with failed recovery.
*
* This is called if the graphics platform throws an exception when trying
* to configure the hardware \b and has thrown an exception when trying
* to re-apply the previous configuration.
*
* When this call is made it is unknown what state the display hardware is in,
* but it's unlikely to be displaying any image to the user.
*
* As there is no sensible behaviour for Mir to have in this case, the shell
* should respond to this either by trying to guess a safe configuration,
* by switching to some other display mechanism, or by terminating.
*
* \param [in] failed_fallback The fallback display configuration that failed to apply.
* \param error The exception thrown by the graphics platform.
*/
virtual void catastrophic_configuration_error(
std::shared_ptr<DisplayConfiguration const> const& failed_fallback,
std::exception const& error) = 0;
protected:
DisplayConfigurationObserver() = default;
virtual ~DisplayConfigurationObserver() = default;
DisplayConfigurationObserver(DisplayConfigurationObserver const&) = delete;
DisplayConfigurationObserver& operator=(DisplayConfigurationObserver const&) = delete;
};
}
}
#endif //MIR_GRAPHICS_DISPLAY_CONFIGURATION_OBSERVER_
|