Mir
Loading...
Searching...
No Matches
forward.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 Lesser General Public License version 2 or 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 Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef MIR_GEOMETRY_FORWARD_H_
18#define MIR_GEOMETRY_FORWARD_H_
19
20namespace mir
21{
24namespace geometry
25{
30struct WidthTag{};
31struct HeightTag{};
32struct XTag{};
33struct YTag{};
34struct DeltaXTag{};
35struct DeltaYTag{};
36struct StrideTag{};
38
39namespace generic
40{
41template<typename T, typename Tag>
42struct Value;
43
44template<typename T>
45struct Point;
46
47template<typename T>
48struct Size;
49
50template<typename T>
51struct Displacement;
52
53template<typename T>
54struct Rectangle;
55
56template<typename T> using Width = Value<T, WidthTag>;
57template<typename T> using Height = Value<T, HeightTag>;
58template<typename T> using X = Value<T, XTag>;
59template<typename T> using Y = Value<T, YTag>;
60template<typename T> using DeltaX = Value<T, DeltaXTag>;
61template<typename T> using DeltaY = Value<T, DeltaYTag>;
62}
63
70
77
78// Just to be clear, mir::geometry::Stride is the stride of the buffer in bytes
80
85
90}
91}
92
93#endif // MIR_GEOMETRY_FORWARD_H_
Definition splash_session.h:22
Definition forward.h:34
Definition forward.h:35
Definition forward.h:31
Definition forward.h:36
These tag types determine what type of dimension a value holds and what operations are possible with ...
Definition forward.h:30
Definition forward.h:32
Definition forward.h:33
Definition displacement.h:39
Definition point.h:37
Definition rectangle.h:35
Definition size.h:37
Wraps a geometry value and prevents it from being accidentally used for invalid operations (such as s...
Definition dimensions.h:37

Copyright © 2012-2025 Canonical Ltd.
Generated on Mon Jan 20 23:24:07 UTC 2025
This documentation is licensed under the GPL version 2 or 3.