Mir
display_configuration_storage.h
Go to the documentation of this file.
1/*
2 * Copyright © 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
28namespace miroil
29{
30
32{
36 {
38 double refresh_rate{-1};
39 };
41 mir::optional_value<MirOrientation> orientation;
44};
45
47{
48public:
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
Definition: optional_value.h:27
Definition: display_configuration_storage.h:47
virtual void save(const DisplayId &, const DisplayConfigurationOptions &)=0
virtual bool load(const DisplayId &, DisplayConfigurationOptions &) const =0
virtual ~DisplayConfigurationStorage()=default
Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support.
Definition: size.h:27
Definition: runner.h:27
Definition: compositor.h:21
Definition: display_configuration_storage.h:36
double refresh_rate
Definition: display_configuration_storage.h:38
mir::geometry::Size size
Definition: display_configuration_storage.h:37
Definition: display_configuration_storage.h:32
mir::optional_value< uint > clone_output_index
Definition: display_configuration_storage.h:34
mir::optional_value< float > scale
Definition: display_configuration_storage.h:43
mir::optional_value< bool > used
Definition: display_configuration_storage.h:33
mir::optional_value< DisplayMode > mode
Definition: display_configuration_storage.h:40
mir::optional_value< MirFormFactor > form_factor
Definition: display_configuration_storage.h:42
mir::optional_value< MirOrientation > orientation
Definition: display_configuration_storage.h:41
Definition: display_id.h:15

Copyright © 2012-2023 Canonical Ltd.
Generated on Tue 2 May 10:01:24 UTC 2023
This documentation is licensed under the GPL version 2 or 3.