diff options
-rw-r--r-- | src/wm-client.cpp | 12 | ||||
-rw-r--r-- | src/wm-client.hpp | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/wm-client.cpp b/src/wm-client.cpp index 4e0ff01..b568817 100644 --- a/src/wm-client.cpp +++ b/src/wm-client.cpp @@ -77,6 +77,18 @@ string WMClient::appID() return this->id; } +unsigned WMClient::surfaceID(const string &role){ + if(0 == role2surface.count(role)){ + HMI_WARNING("wm", "invalid role"); + return INVALID_SURFACE_ID; + } + return role2surface.at(role); +} + +unsigned WMClient::layerID(){ + return layer; +} + void WMClient::registerLayer(unsigned layerID) { this->layer = layerID; diff --git a/src/wm-client.hpp b/src/wm-client.hpp index 33024b0..3680d8f 100644 --- a/src/wm-client.hpp +++ b/src/wm-client.hpp @@ -39,6 +39,8 @@ class WMClient virtual ~WMClient(); std::string appID(); + unsigned surfaceID(const std::string &role); + unsigned layerID(); void registerLayer(unsigned layerID); bool addSurface(const std::string& role, unsigned surface); bool removeSurfaceIfExist(unsigned surfaceID); |