Mir
display_configuration_observer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
17  */
18 
19 #ifndef MIR_GRAPHICS_DISPLAY_CONFIGURATION_OBSERVER_
20 #define MIR_GRAPHICS_DISPLAY_CONFIGURATION_OBSERVER_
21 
22 #include <exception>
23 #include <memory>
24 
25 namespace mir
26 {
27 namespace frontend
28 {
29 class Session;
30 }
31 namespace graphics
32 {
33 class DisplayConfiguration;
34 
36 {
37 public:
45  virtual void initial_configuration(std::shared_ptr<DisplayConfiguration const> const& config) = 0;
46 
55  virtual void configuration_applied(std::shared_ptr<DisplayConfiguration const> const& config) = 0;
56 
62  virtual void base_configuration_updated(std::shared_ptr<DisplayConfiguration const> const& base_config) = 0;
63 
70  virtual void session_configuration_applied(std::shared_ptr<frontend::Session> const& session,
71  std::shared_ptr<DisplayConfiguration> const& config) = 0;
77  virtual void session_configuration_removed(std::shared_ptr<frontend::Session> const& session) = 0;
78 
90  virtual void configuration_failed(
91  std::shared_ptr<DisplayConfiguration const> const& attempted,
92  std::exception const& error) = 0;
93 
111  virtual void catastrophic_configuration_error(
112  std::shared_ptr<DisplayConfiguration const> const& failed_fallback,
113  std::exception const& error) = 0;
114 
115 protected:
116  DisplayConfigurationObserver() = default;
117  virtual ~DisplayConfigurationObserver() = default;
120 };
121 }
122 }
123 
124 #endif //MIR_GRAPHICS_DISPLAY_CONFIGURATION_OBSERVER_
Definition: as_render_target.h:27
Definition: display_configuration_observer.h:35

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 11:05:03 UTC 2017