diff options
author | 2017-07-25 12:27:54 +0200 | |
---|---|---|
committer | 2017-08-08 17:24:00 +0200 | |
commit | 353bfe55c134bb19247bf26c2498c0d87f80dc18 (patch) | |
tree | ff1cb65492d0fe3f523fefe21b1fb86fd14e6567 /src/layout.hpp | |
parent | f0e3d51ee7adb54cd31f0625a71c86995cf0760f (diff) |
app: add very c++-y layout parsing
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src/layout.hpp')
-rw-r--r-- | src/layout.hpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/layout.hpp b/src/layout.hpp new file mode 100644 index 0000000..4ee14a7 --- /dev/null +++ b/src/layout.hpp @@ -0,0 +1,37 @@ +// +// Created by mfritzsc on 6/27/17. +// + +#ifndef TMCAGLWM_LAYOUT_HPP +#define TMCAGLWM_LAYOUT_HPP + +#include <cstdint> +#include <string> + +#include <json-c/json.h> + +#include "wayland.hpp" + +namespace wm { + +// Areas and layouts are defined to have a name, let's just keep it this way, +// we will not copy them around anyway. +struct area { + std::string name; + genivi::rect rect; + uint32_t layer; // i.e. zorder? +}; + +struct layout { + static constexpr unsigned MAX_N_AREAS = 2; + + std::string name; + uint32_t n_areas; + struct area areas[MAX_N_AREAS]; +}; + +typedef std::vector<struct layout> layouts_type; + +} // namespace wm + +#endif // TMCAGLWM_LAYOUT_HPP |