Mir
server_example_display_configuration_policy.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 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: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 #ifndef MIR_EXAMPLE_DISPLAY_CONFIGURATION_POLICY_H_
20 #define MIR_EXAMPLE_DISPLAY_CONFIGURATION_POLICY_H_
21 
23 
24 #include <memory>
25 
26 namespace mir
27 {
28 class Server;
29 
30 namespace examples
31 {
32 extern char const* const display_config_opt;
33 extern char const* const display_config_descr;
34 extern char const* const clone_opt_val;
35 extern char const* const sidebyside_opt_val;
36 extern char const* const single_opt_val;
37 extern char const* const display_alpha_opt;
38 extern char const* const display_alpha_descr;
39 extern char const* const display_alpha_off;
40 extern char const* const display_alpha_on;
41 
48 {
49 public:
50  PixelFormatSelector(std::shared_ptr<graphics::DisplayConfigurationPolicy> const& base_policy,
51  bool with_alpha);
52  virtual void apply_to(graphics::DisplayConfiguration& conf);
53 private:
54  std::shared_ptr<graphics::DisplayConfigurationPolicy> const base_policy;
55  bool const with_alpha;
56 };
57 
59 }
60 }
61 
62 #endif /* MIR_EXAMPLE_DISPLAY_CONFIGURATION_POLICY_H_ */
Definition: as_render_target.h:27
char const *const display_config_opt
Definition: server_example_display_configuration_policy.cpp:37
Customise and run a Mir server.
Definition: server.h:85
char const *const display_alpha_descr
Definition: server_example_display_configuration_policy.cpp:45
char const *const display_alpha_on
Definition: server_example_display_configuration_policy.cpp:48
virtual void apply_to(graphics::DisplayConfiguration &conf)
Definition: server_example_display_configuration_policy.cpp:65
Example of a DisplayConfigurationPolicy that tries to find an opaque or transparent pixel format...
Definition: server_example_display_configuration_policy.h:47
char const *const sidebyside_opt_val
Definition: server_example_display_configuration_policy.cpp:41
char const *const clone_opt_val
Definition: server_example_display_configuration_policy.cpp:40
void add_display_configuration_options_to(Server &server)
Definition: server_example_display_configuration_policy.cpp:89
Definition: display_configuration_policy.h:29
char const *const display_alpha_off
Definition: server_example_display_configuration_policy.cpp:47
char const *const display_alpha_opt
Definition: server_example_display_configuration_policy.cpp:44
PixelFormatSelector(std::shared_ptr< graphics::DisplayConfigurationPolicy > const &base_policy, bool with_alpha)
Definition: server_example_display_configuration_policy.cpp:59
char const *const display_config_descr
Definition: server_example_display_configuration_policy.cpp:38
char const *const single_opt_val
Definition: server_example_display_configuration_policy.cpp:42
Interface to a configuration of display cards and outputs.
Definition: display_configuration.h:185

Copyright © 2012-2016 Canonical Ltd.
Generated on Wed May 10 10:41:27 UTC 2017