From 2c30dbcf2ea220364240584a57edf94f6f0d1fec Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Thu, 31 May 2018 20:06:59 +0900 Subject: Add get function to wm-client Change-Id: I4880cfc48148e0055029d4b902b445e79f9c422c Signed-off-by: Kazumasa Mitsunari --- src/wm-client.cpp | 12 ++++++++++++ src/wm-client.hpp | 2 ++ 2 files changed, 14 insertions(+) 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); -- cgit 1.2.3-korg