Rename APIs 23/14923/7
authorYuta Doi <yuta-d@witz-inc.co.jp>
Mon, 2 Jul 2018 08:26:13 +0000 (17:26 +0900)
committerYuta Doi <yuta-d@witz-inc.co.jp>
Mon, 9 Jul 2018 01:05:24 +0000 (10:05 +0900)
rename WindowManager APIs as follows:
 - activateSurface   -> activateWindow
 - deactivateSurface -> deactivateWindow

The "surface" means information of display material frame buffer
managed 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: Ic7da4e5ddb759e642a2b60ecf61e327aaf74a699
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
src/main.cpp

index 201fbcf..6521c6c 100644 (file)
@@ -331,7 +331,7 @@ void windowmanager_requestsurfacexdg(afb_req req) noexcept
     }
 }
 
-void windowmanager_activatesurface(afb_req req) noexcept
+void windowmanager_activatewindow(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
 #ifdef ST
@@ -380,7 +380,7 @@ void windowmanager_activatesurface(afb_req req) noexcept
     }
 }
 
-void windowmanager_deactivatesurface(afb_req req) noexcept
+void windowmanager_deactivatewindow(afb_req req) noexcept
 {
     std::lock_guard<std::mutex> guard(binding_m);
 #ifdef ST
@@ -739,8 +739,8 @@ void windowmanager_debug_terminate(afb_req req) noexcept
 const struct afb_verb_v2 windowmanager_verbs[] = {
     {"requestsurface", windowmanager_requestsurface, nullptr, nullptr, AFB_SESSION_NONE},
     {"requestsurfacexdg", windowmanager_requestsurfacexdg, nullptr, nullptr, AFB_SESSION_NONE},
-    {"activatesurface", windowmanager_activatesurface, nullptr, nullptr, AFB_SESSION_NONE},
-    {"deactivatesurface", windowmanager_deactivatesurface, nullptr, nullptr, AFB_SESSION_NONE},
+    {"activatewindow", windowmanager_activatewindow, nullptr, nullptr, AFB_SESSION_NONE},
+    {"deactivatewindow", windowmanager_deactivatewindow, nullptr, nullptr, AFB_SESSION_NONE},
     {"enddraw", windowmanager_enddraw, nullptr, nullptr, AFB_SESSION_NONE},
     {"getdisplayinfo", windowmanager_getdisplayinfo_thunk, nullptr, nullptr, AFB_SESSION_NONE},
     {"getareainfo", windowmanager_getareainfo_thunk, nullptr, nullptr, AFB_SESSION_NONE},