X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwm_layer.hpp;h=65182b040d6d02a86f61110eecf9ee049a2829d5;hb=2ce7162980b40cf5587ed8a0247f3e9bd3407ad7;hp=1cb54ee77bfa62c788e63caf39a2e96d4200918a;hpb=1b1051702003391f958f4bf68c5dfe88676d56d4;p=apps%2Fagl-service-windowmanager.git diff --git a/src/wm_layer.hpp b/src/wm_layer.hpp index 1cb54ee..65182b0 100644 --- a/src/wm_layer.hpp +++ b/src/wm_layer.hpp @@ -42,6 +42,9 @@ class LayerState void removeLayer(unsigned layer); void setArea(const std::string& app, const std::string& area); + // Debug + void dump(); + private: std::vector render_order; std::unordered_map area2appid; @@ -56,22 +59,35 @@ class WMLayer STACK }; - explicit WMLayer(json_object* j); + explicit WMLayer(json_object* j, unsigned uuid); ~WMLayer() = default; + + // Status & Setting API unsigned getNewLayerID(const std::string& role); unsigned idBegin() { return this->id_begin; } unsigned idEnd() { return this->id_end; } + unsigned getUuid() { return this->uuid; } const std::string& layerName(); MANAGEMENT_TYPE layerType() { return this->type; } void appendArea(const std::string& area); - void removeLayerID(unsigned id); - LayerState& getLayerState() { return before_state; } + LayerState& getLayerState() { return tmp_state; } WMError setLayerState(const LayerState& l); bool hasLayerID(unsigned id); bool hasRole(const std::string& role); + + // Manipulation + void addLayerToState(unsigned layer); + void removeLayerFromState(unsigned layer); + void terminateApp(unsigned layer); + WMError commitChange(); + + // Debug + void dump(); + private: - LayerState before_state; + LayerState tmp_state; LayerState state; + unsigned uuid; std::string name = ""; // Layer name MANAGEMENT_TYPE type; std::string role_list;