summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libwindowmanager.cpp30
-rw-r--r--src/libwindowmanager.h8
2 files changed, 26 insertions, 12 deletions
diff --git a/src/libwindowmanager.cpp b/src/libwindowmanager.cpp
index 2357252..55e5ed6 100644
--- a/src/libwindowmanager.cpp
+++ b/src/libwindowmanager.cpp
@@ -70,8 +70,8 @@ class LibWindowmanager::Impl {
// WM API
int requestSurface(json_object *object);
int requestSurfaceXDG(json_object *object);
- int activateSurface(json_object *object);
- int deactivateSurface(json_object *object);
+ int activateWindow(json_object *object);
+ int deactivateWindow(json_object *object);
int endDraw(json_object *object);
int getDisplayInfo(json_object *object);
@@ -337,12 +337,12 @@ int LibWindowmanager::Impl::requestSurfaceXDG(json_object *object) {
return rc;
}
-int LibWindowmanager::Impl::activateSurface(json_object *object) {
+int LibWindowmanager::Impl::activateWindow(json_object *object) {
TRACE();
HMI_DEBUG("libwm", "called");
- return this->api_call("ActivateSurface", object, [](bool ok, json_object *j) {
+ return this->api_call("ActivateWindow", object, [](bool ok, json_object *j) {
if (!ok) {
- HMI_ERROR("libwm", "API Call activate_surface() failed: %s",
+ HMI_ERROR("libwm", "API Call activateWindow() failed: %s",
j != nullptr ? json_object_to_json_string_ext(
j, JSON_C_TO_STRING_PRETTY)
: "no-info");
@@ -350,12 +350,12 @@ int LibWindowmanager::Impl::activateSurface(json_object *object) {
});
}
-int LibWindowmanager::Impl::deactivateSurface(json_object *object) {
+int LibWindowmanager::Impl::deactivateWindow(json_object *object) {
TRACE();
HMI_DEBUG("libwm", "called");
- return this->api_call("DeactivateSurface", object, [](bool ok, json_object *j) {
+ return this->api_call("DeactivateWindow", object, [](bool ok, json_object *j) {
if (!ok) {
- HMI_ERROR("libwm", "API Call deactivate_surface() failed: %s",
+ HMI_ERROR("libwm", "API Call deactivateWindow() failed: %s",
j != nullptr ? json_object_to_json_string_ext(
j, JSON_C_TO_STRING_PRETTY)
: "no-info");
@@ -737,12 +737,22 @@ int LibWindowmanager::requestSurfaceXDG(json_object *object) {
return this->d->requestSurfaceXDG(object);
}
+int LibWindowmanager::activateWindow(json_object *object) {
+ return this->d->activateWindow(object);
+}
+
+int LibWindowmanager::deactivateWindow(json_object *object) {
+ return this->d->deactivateWindow(object);
+}
+
+// This API is deprecated, please use new API
int LibWindowmanager::activateSurface(json_object *object) {
- return this->d->activateSurface(object);
+ return this->activateWindow(object);
}
+// This API is deprecated, please use new API
int LibWindowmanager::deactivateSurface(json_object *object) {
- return this->d->deactivateSurface(object);
+ return this->deactivateWindow(object);
}
int LibWindowmanager::endDraw(json_object *object) {
diff --git a/src/libwindowmanager.h b/src/libwindowmanager.h
index 3b21091..60a3dab 100644
--- a/src/libwindowmanager.h
+++ b/src/libwindowmanager.h
@@ -65,8 +65,8 @@ public:
// WM API
int requestSurface(json_object *object);
int requestSurfaceXDG(json_object *object);
- int activateSurface(json_object *object);
- int deactivateSurface(json_object *object);
+ int activateWindow(json_object *object);
+ int deactivateWindow(json_object *object);
int endDraw(json_object *object);
int getDisplayInfo(json_object *object);
int getAreaInfo(json_object *in_obj, json_object *out_obj);
@@ -77,6 +77,10 @@ public:
struct Impl;
+ // These APIs are deprecated, please use new API
+ THIS_FUNCTION_IS_DEPRECATED(int activateSurface(json_object *object));
+ THIS_FUNCTION_IS_DEPRECATED(int deactivateSurface(json_object *object));
+
private:
Impl *const d;
};