From 353bfe55c134bb19247bf26c2498c0d87f80dc18 Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Tue, 25 Jul 2017 12:27:54 +0200 Subject: app: add very c++-y layout parsing Signed-off-by: Marcus Fritzsch --- src/layout.hpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/layout.hpp (limited to 'src/layout.hpp') 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 +#include + +#include + +#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 layouts_type; + +} // namespace wm + +#endif // TMCAGLWM_LAYOUT_HPP -- cgit 1.2.3-korg