aboutsummaryrefslogtreecommitdiffstats
path: root/src/wm_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wm_layer.cpp')
-rw-r--r--src/wm_layer.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/wm_layer.cpp b/src/wm_layer.cpp
index d3e7073..2e30069 100644
--- a/src/wm_layer.cpp
+++ b/src/wm_layer.cpp
@@ -81,7 +81,7 @@ void LayerState::removeLayer(unsigned layer)
this->render_order.erase(fwd_itr, this->render_order.end());
}
-void LayerState::setArea(const string& app, const string& area)
+void LayerState::attachAppToArea(const string& app, const string& area)
{
this->area2appid[area] = app;
}
@@ -105,15 +105,14 @@ void LayerState::dump()
DUMP(" area, app : %s", apps.c_str());
}
-WMLayer::WMLayer(json_object* j, unsigned uuid) : tmp_state(), state(), uuid(uuid)
+WMLayer::WMLayer(json_object* j, unsigned wm_layer_id) : tmp_state(), state(), wm_layer_id(wm_layer_id)
{
this->name = jh::getStringFromJson(j, "name");
this->role_list = jh::getStringFromJson(j, "role");
- const char* type = jh::getStringFromJson(j, "type");
this->id_begin = static_cast<unsigned>(jh::getIntFromJson(j, "id_range_begin"));
this->id_end = static_cast<unsigned>(jh::getIntFromJson(j, "id_range_end"));
- if (name.size() == 0 || !type)
+ if (name.empty())
{
HMI_ERROR("Parse Error!!");
exit(1);
@@ -123,8 +122,6 @@ WMLayer::WMLayer(json_object* j, unsigned uuid) : tmp_state(), state(), uuid(uui
HMI_ERROR("INVALID");
exit(1);
}
- string str_type = type;
- this->type = (str_type == "tile") ? MANAGEMENT_TYPE::TILE : MANAGEMENT_TYPE::STACK;
}
unsigned WMLayer::getNewLayerID(const string& role)
@@ -201,9 +198,9 @@ void WMLayer::removeLayerFromState(unsigned layer)
this->tmp_state.removeLayer(layer);
}
-void WMLayer::setAreaToState(const string& app, const string& area)
+void WMLayer::attachAppToArea(const string& app, const string& area)
{
- this->tmp_state.setArea(app, area);
+ this->tmp_state.attachAppToArea(app, area);
}
void WMLayer::appendArea(const string& area)
@@ -211,7 +208,7 @@ void WMLayer::appendArea(const string& area)
this->area_list.push_back(area);
}
-void WMLayer::terminateApp(unsigned id)
+void WMLayer::appTerminated(unsigned id)
{
auto fwd_itr = std::remove_if(this->id_list.begin(), this->id_list.end(),
[id](unsigned elm) {