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 
17 #ifndef MIROIL_DISPLAY_CONFIGURATION_STORAGE_H
18 #define MIROIL_DISPLAY_CONFIGURATION_STORAGE_H
19 
20 #include <miroil/display_id.h>
21 
22 #include <mir/geometry/rectangle.h>
23 #include <mir/optional_value.h>
24 #include <mir_toolkit/common.h>
25 
26 #include <sys/types.h>
27 
28 namespace miroil
29 {
30 
32 {
35  struct DisplayMode
36  {
37  mir::geometry::Size size;
38  double refresh_rate{-1};
39  };
41  mir::optional_value<MirOrientation> orientation;
42  mir::optional_value<MirFormFactor> form_factor;
44 };
45 
47 {
48 public:
49  virtual ~DisplayConfigurationStorage() = default;
50 
51  virtual void save(const DisplayId&, const DisplayConfigurationOptions&) = 0;
52  virtual bool load(const DisplayId&, DisplayConfigurationOptions&) const = 0;
53 };
54 
55 } // namespace miroil
56 
57 #endif // MIROIL_DISPLAY_CONFIGURATION_STORAGE_H

Copyright © 2012-2022 Canonical Ltd.
Generated on Thu Sep 8 12:37:23 UTC 2022
This documentation is licensed under the GPL version 2 or 3.