Mir
zone.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2019 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 2 or 3 as
6  * 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: William Wold <william.wold@canonical.com>
17  */
18 
19 #ifndef MIRAL_ZONE_H
20 #define MIRAL_ZONE_H
21 
22 #include <mir_toolkit/common.h>
23 
24 #include <mir/geometry/rectangle.h>
25 #include <mir/int_wrapper.h>
26 
27 #include <memory>
28 
29 namespace miral
30 {
31 using namespace mir::geometry;
32 
35 class Zone
36 {
37 public:
38 
39  Zone(Rectangle const& extents);
40  Zone(Zone const& other);
41  Zone& operator=(Zone const& other);
42  ~Zone();
43 
46  auto operator==(Zone const& other) const -> bool;
47 
51  auto is_same_zone(Zone const& other) const -> bool;
52 
54  auto extents() const -> Rectangle;
55 
58  void extents(Rectangle const& extents);
59 
60 private:
61  class Self;
62  std::unique_ptr<Self> self;
63 };
64 }
65 
66 #endif // MIRAL_ZONE_H
miral
Mir Abstraction Layer.
Definition: floating_window_manager.h:29
int_wrapper.h
mir::geometry::Rectangle
Definition: rectangle.h:33
rectangle.h
mir::geometry
Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support.
Definition: dimensions.h:30
common.h
miral::operator==
bool operator==(Output::PhysicalSizeMM const &lhs, Output::PhysicalSizeMM const &rhs)
miral::Zone
A rectangular area of the display. Not tied to a specific output.
Definition: zone.h:35

Copyright © 2012-2024 Canonical Ltd.
Generated on Tue May 7 06:11:54 UTC 2024
This documentation is licensed under the GPL version 2 or 3.