summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libwindowmanager.cpp7
-rw-r--r--src/libwindowmanager.h7
2 files changed, 9 insertions, 5 deletions
diff --git a/src/libwindowmanager.cpp b/src/libwindowmanager.cpp
index 7f7895b..880e48d 100644
--- a/src/libwindowmanager.cpp
+++ b/src/libwindowmanager.cpp
@@ -950,6 +950,13 @@ int LibWindowmanager::activateWindow(const char* role, const char* area) {
return this->d->activateWindow(object);
}
+int LibWindowmanager::activateWindow(const char* role) {
+ json_object* object = json_object_new_object();
+ json_object_object_add(object, kKeyDrawingName, json_object_new_string(role));
+ json_object_object_add(object, kKeyDrawingArea, json_object_new_string(kDefaultArea.c_str()));
+ return this->d->activateWindow(object);
+}
+
int LibWindowmanager::deactivateWindow(json_object *object) {
return this->d->deactivateWindow(object);
}
diff --git a/src/libwindowmanager.h b/src/libwindowmanager.h
index 552bb2c..5bfc9c4 100644
--- a/src/libwindowmanager.h
+++ b/src/libwindowmanager.h
@@ -68,11 +68,7 @@ public:
using error_handler = std::function<void(int err, const std::string&)>;
/* DrawingArea name (usage: {layout}.{area}) */
- const std::string kStrLayoutNormal = "normal";
- const std::string kStrLayoutSplit = "split";
- const std::string kStrAreaFull = "full";
- const std::string kStrAreaMain = "main";
- const std::string kStrAreaSub = "sub";
+ const std::string kDefaultArea = "normal.full";
/* Key for json obejct */
const char *kKeyDrawingName = "drawing_name";
@@ -104,6 +100,7 @@ public:
int requestSurface(const char* role);
int requestSurfaceXDG(const char* role, unsigned ivi_id);
int activateWindow(const char* role, const char* area);
+ int activateWindow(const char* role);
int deactivateWindow(const char* role);
int endDraw(const char* role);
struct Screen getScreenInfo();