Mir
display_configuration.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Cemil Azizoglu <cemil.azizoglu@canonical.com>
17  *
18  */
19 
20 #ifndef MIR_GRAPHICS_X_DISPLAY_CONFIGURATION_H_
21 #define MIR_GRAPHICS_X_DISPLAY_CONFIGURATION_H_
22 
24 #include "mir/geometry/size.h"
25 
26 namespace mir
27 {
28 namespace graphics
29 {
30 namespace X
31 {
32 
34 {
35 public:
37  mir::geometry::Size const pixels,
38  mir::geometry::Size const size_mm,
39  MirOrientation orientation);
41 
42  virtual ~DisplayConfiguration() = default;
43 
44  void for_each_card(std::function<void(DisplayConfigurationCard const&)> f) const override;
45  void for_each_output(std::function<void(DisplayConfigurationOutput const&)> f) const override;
46  void for_each_output(std::function<void(UserDisplayConfigurationOutput&)> f) override;
47  std::unique_ptr<graphics::DisplayConfiguration> clone() const override;
48 
49 private:
50  DisplayConfigurationOutput configuration;
52 };
53 
54 
55 }
56 }
57 }
58 #endif /* MIR_GRAPHICS_X_DISPLAY_CONFIGURATION_H_ */
Definition: size.h:30
Mirror of a DisplayConfigurationOutput, with some fields limited to being read-only, preventing users from changing things they shouldn&#39;t.
Definition: display_configuration.h:130
All things Mir.
Definition: atomic_callback.h:25
Configuration information for a display card.
Definition: display_configuration.h:44
void for_each_output(std::function< void(DisplayConfigurationOutput const &)> f) const override
Executes a function object for each output in the configuration.
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:164
std::unique_ptr< graphics::DisplayConfiguration > clone() const override
Definition: display_configuration.h:33
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:134
Configuration information for a display output.
Definition: display_configuration.h:85
void for_each_card(std::function< void(DisplayConfigurationCard const &)> f) const override
Executes a function object for each card in the configuration.
detail::IntWrapper< struct XTag > X
Definition: dimensions.h:111
Interface to a configuration of display cards and outputs.
Definition: display_configuration.h:168

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016