layers: introduce layers.hpp and .cpp for layer related code
[staging/windowmanager.git] / src / layout.hpp
1 //
2 // Created by mfritzsc on 6/27/17.
3 //
4
5 #ifndef TMCAGLWM_LAYOUT_HPP
6 #define TMCAGLWM_LAYOUT_HPP
7
8 #include <cstdint>
9 #include <string>
10
11 #include "result.hpp"
12 #include "wayland.hpp"
13
14 namespace wm {
15
16 // Areas and layouts are defined to have a name, let's just keep it this way,
17 // we will not copy them around anyway.
18 struct area {
19    std::string name;
20    genivi::rect rect;
21    uint32_t layer;  // i.e. zorder?
22 };
23
24 struct layout {
25    static constexpr unsigned MAX_N_AREAS = 2;
26
27    std::string name;
28    uint32_t n_areas;
29    struct area areas[MAX_N_AREAS];
30 };
31
32 typedef std::vector<struct layout> layouts_type;
33
34 }  // namespace wm
35
36 #endif  // TMCAGLWM_LAYOUT_HPP