* limitations under the License.
*/
-//
-// Created by mfritzsc on 6/27/17.
-//
-
#ifndef TMCAGLWM_LAYOUT_HPP
#define TMCAGLWM_LAYOUT_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 LayoutState {
+ enum States {
+ Single,
+ Split,
+ };
-struct layout {
- static constexpr unsigned MAX_N_AREAS = 2;
+ enum States s{Single};
+ int main{-1};
+ int sub{-1};
- std::string name;
- uint32_t n_areas;
- struct area areas[MAX_N_AREAS];
-};
+ bool operator==(const LayoutState &b) const {
+ return s == b.s && main == b.main && sub == b.sub;
+ }
-typedef std::vector<struct layout> layouts_type;
+ bool operator!=(const LayoutState &b) const {
+ return !(*this == b);
+ }
+};
} // namespace wm