Mir
display_configuration_storage.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016-2020 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: Nick Dedekind <nick.dedekind@canonical.com>
17  */
18 
19 #ifndef MIROIL_DISPLAY_CONFIGURATION_STORAGE_H
20 #define MIROIL_DISPLAY_CONFIGURATION_STORAGE_H
21 
22 #include <miroil/display_id.h>
23 
24 #include <mir/geometry/rectangle.h>
25 #include <mir/optional_value.h>
26 #include <mir_toolkit/common.h>
27 
28 #include <sys/types.h>
29 
30 namespace miroil
31 {
32 
34 {
37  struct DisplayMode
38  {
40  double refresh_rate{-1};
41  };
46 };
47 
49 {
50 public:
51  virtual ~DisplayConfigurationStorage() = default;
52 
53  virtual void save(const DisplayId&, const DisplayConfigurationOptions&) = 0;
54  virtual bool load(const DisplayId&, DisplayConfigurationOptions&) const = 0;
55 };
56 
57 } // namespace miroil
58 
59 #endif // MIROIL_DISPLAY_CONFIGURATION_STORAGE_H
Definition: display_configuration_storage.h:49
virtual void save(const DisplayId &, const DisplayConfigurationOptions &)=0
virtual bool load(const DisplayId &, DisplayConfigurationOptions &) const =0
virtual ~DisplayConfigurationStorage()=default
Definition: compositor.h:21
Definition: size.h:32
Definition: display_configuration_storage.h:38
double refresh_rate
Definition: display_configuration_storage.h:40
mir::geometry::Size size
Definition: display_configuration_storage.h:39
Definition: display_configuration_storage.h:34
mir::optional_value< uint > clone_output_index
Definition: display_configuration_storage.h:36
mir::optional_value< float > scale
Definition: display_configuration_storage.h:45
mir::optional_value< bool > used
Definition: display_configuration_storage.h:35
mir::optional_value< DisplayMode > mode
Definition: display_configuration_storage.h:42
mir::optional_value< MirFormFactor > form_factor
Definition: display_configuration_storage.h:44
mir::optional_value< MirOrientation > orientation
Definition: display_configuration_storage.h:43
Definition: display_id.h:15

Copyright © 2012-2022 Canonical Ltd.
Generated on Fri Feb 25 18:01:13 UTC 2022
This documentation is licensed under the GPL version 2 or 3.