aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-05-31 20:06:59 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-05-31 20:06:59 +0900
commit2c30dbcf2ea220364240584a57edf94f6f0d1fec (patch)
tree31231704b22c56e733545bd62d3b49d3005d099c
parent8e125d0a9f7437b6754ee12e1a809885571b43fa (diff)
Add get function to wm-client
Change-Id: I4880cfc48148e0055029d4b902b445e79f9c422c Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--src/wm-client.cpp12
-rw-r--r--src/wm-client.hpp2
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);