+void LayerState::addLayer(unsigned layer)
+{
+ this->render_order.push_back(layer);
+}
+
+void LayerState::removeLayer(unsigned layer)
+{
+ auto fwd_itr = std::remove_if(
+ this->render_order.begin(), this->render_order.end(),
+ [layer](unsigned elm) {
+ if(elm == layer)
+ HMI_DEBUG("remove layer %d", elm);
+ return elm == layer;
+ }
+ );
+ this->render_order.erase(fwd_itr, this->render_order.end());
+}
+
+void LayerState::setArea(const string& app, const string& area)
+{
+ this->area2appid[area] = app;
+}
+
+void LayerState::dump()
+{
+ std::string str;
+ for(const auto& ro : this->render_order)
+ {
+ str += std::to_string(ro);
+ str += ",";
+ }
+ DUMP(" render order : %s", str.c_str());
+}
+
+WMLayer::WMLayer(json_object* j, unsigned uuid) : tmp_state(), state(), uuid(uuid)