summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-07-02 18:01:12 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-07-09 10:20:33 +0900
commit5f3b684c2136e958c18fa4f7d37a123e040a8782 (patch)
tree326f3a85cb16765da0702f503f054fe65cfcb4bd /src
parent4b306804ba046f47c92972d4c382827ecfa96e4d (diff)
Rename APIs
rename WindowManager APIs as follows: - activateSurface -> activateWindow - deactivateSurface -> deactivateWindow The "surface" means information of display material frame buffer anaged by Graphics Subsystem (Weston). And the "window" means the right to draw on display. The "surface" is physical information and used inside WindowManager. So we think it is not good for "surface" to be included in API name. These APIs provide the function which is to activate/deactivate the right to draw for the applications. So we change to "activateWindow/deactivateWindow". We plan to delete the old API by GG. Therefore the applications can use old APIs until GG, but the warning "-Wdeprecated-declarations" is occured when compile. After GG, old APIs can not be used. If use it, the error is occured when compile. Bug-AGL: SPEC-1565 Change-Id: I8a4aa5b8b43e1d90fe28964a41257b1947ab5174 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
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;
};