aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-19 17:07:51 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-06-19 17:07:51 +0900
commit81a6d5f63b77f2ffaeef25cea30d2ecc486c7426 (patch)
treea4a440d1d8e370284f80ed78e6de197918836b12
parent8f01fbeeca1a6f3d10ea42b312191532a4a830d4 (diff)
Shorten the length of line to under 100
Change-Id: I2f0819f804811001faf51423f52a4fb250823e5f Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--src/app.cpp34
-rw-r--r--src/applist.cpp3
-rw-r--r--src/applist.hpp8
-rw-r--r--src/wm_client.cpp28
-rw-r--r--src/wm_client.hpp3
5 files changed, 57 insertions, 19 deletions
diff --git a/src/app.cpp b/src/app.cpp
index d4c36f9..f311bcf 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -397,7 +397,7 @@ void App::setTimer()
{
// firsttime set into sd_event
int ret = sd_event_add_time(afb_daemon_get_event_loop(), &g_timer_ev_src,
- CLOCK_REALTIME, time(NULL) * (1000000UL) + kTimeOut, 1, processTimerHandler, this);
+ CLOCK_REALTIME, time(NULL) * (1000000UL) + kTimeOut, 1, processTimerHandler, this);
if (ret < 0)
{
HMI_ERROR("wm", "Could't set timer");
@@ -482,7 +482,8 @@ WMError App::lm_release(const struct WMAction &action)
state = nl;
this->layout_commit();
- std::string str_area = std::string(kNameLayoutNormal) + "." + std::string(kNameAreaFull);
+ std::string str_area =
+ std::string(kNameLayoutNormal) + "." + std::string(kNameAreaFull);
compositor::rect area_rect = this->area_info[state.sub];
this->emit_syncdraw(sub.c_str(), str_area.c_str(),
area_rect.x, area_rect.y, area_rect.w, area_rect.h);
@@ -509,10 +510,11 @@ WMError App::lm_release(const struct WMAction &action)
state = nl;
this->layout_commit();
- std::string str_area = std::string(kNameLayoutNormal) + "." + std::string(kNameAreaFull);
+ std::string str_area =
+ std::string(kNameLayoutNormal) + "." + std::string(kNameAreaFull);
compositor::rect area_rect = this->area_info[state.main];
this->emit_syncdraw(main.c_str(), str_area.c_str(),
- area_rect.x, area_rect.y, area_rect.w, area_rect.h);
+ area_rect.x, area_rect.y, area_rect.w, area_rect.h);
this->enqueue_flushdraw(state.main);
});
}
@@ -578,7 +580,8 @@ WMError App::checkPolicy(unsigned req_num)
std::string add_area = std::string(kNameLayoutSplit) + "." + std::string(kNameAreaMain);
// Change request area
req_area = std::string(kNameLayoutSplit) + "." + std::string(kNameAreaSub);
- HMI_SEQ_NOTICE(req_num, "Change request area from %s to %s, because split is happen", trigger.area, req_area);
+ HMI_SEQ_NOTICE(req_num, "Change request area from %s to %s, because split is happen",
+ trigger.area, req_area);
// set another action
std::string add_name = g_app_list.getAppID(curernt_sid, add_role, &found);
if (!found)
@@ -627,7 +630,8 @@ WMError App::checkPolicy(unsigned req_num)
HMI_SEQ_NOTICE(req_num, "Hack. This process will be removed. Change HomeScreen code!!");
req_area = "fullscreen";
}
- TaskVisible task_visible = (trigger.task == Task::TASK_ALLOCATE) ? TaskVisible::VISIBLE : TaskVisible::INVISIBLE;
+ TaskVisible task_visible =
+ (trigger.task == Task::TASK_ALLOCATE) ? TaskVisible::VISIBLE : TaskVisible::INVISIBLE;
ret = g_app_list.setAction(req_num, trigger.appid, trigger.role, req_area, task_visible);
g_app_list.reqDump();
@@ -644,7 +648,8 @@ WMError App::startTransition(unsigned req_num)
if (!found)
{
ret = WMError::NO_ENTRY;
- HMI_SEQ_ERROR(req_num, "Window Manager bug :%s : Action is not set", errorDescription(ret));
+ HMI_SEQ_ERROR(req_num,
+ "Window Manager bug :%s : Action is not set", errorDescription(ret));
return ret;
}
@@ -887,7 +892,8 @@ WMError App::setRequest(const std::string& appid, const std::string &role, const
unsigned requested_num = g_app_list.getRequestNumber(appid);
if (requested_num != 0)
{
- HMI_SEQ_INFO(requested_num, "%s %s %s request is already queued", appid.c_str(), role.c_str(), area.c_str());
+ HMI_SEQ_INFO(requested_num,
+ "%s %s %s request is already queued", appid.c_str(), role.c_str(), area.c_str());
return REQ_REJECTED;
}
@@ -901,7 +907,8 @@ WMError App::setRequest(const std::string& appid, const std::string &role, const
return WMError::SUCCESS;
}
-void App::api_activate_surface(char const *appid, char const *drawing_name, char const *drawing_area, const reply_func &reply)
+void App::api_activate_surface(char const *appid, char const *drawing_name,
+ char const *drawing_area, const reply_func &reply)
{
ST();
@@ -943,7 +950,8 @@ void App::api_activate_surface(char const *appid, char const *drawing_name, char
}
}
-void App::api_deactivate_surface(char const *appid, char const *drawing_name, const reply_func &reply)
+void App::api_deactivate_surface(char const *appid, char const *drawing_name,
+ const reply_func &reply)
{
ST();
@@ -1035,13 +1043,15 @@ WMError App::doEndDraw(unsigned req_num)
ret = this->layoutChange(act);
if(ret != WMError::SUCCESS)
{
- HMI_SEQ_WARNING(req_num, "Failed to manipulate surfaces while state change : %s", errorDescription(ret));
+ HMI_SEQ_WARNING(req_num,
+ "Failed to manipulate surfaces while state change : %s", errorDescription(ret));
return ret;
}
ret = this->visibilityChange(act);
if (ret != WMError::SUCCESS)
{
- HMI_SEQ_WARNING(req_num, "Failed to manipulate surfaces while state change : %s", errorDescription(ret));
+ HMI_SEQ_WARNING(req_num,
+ "Failed to manipulate surfaces while state change : %s", errorDescription(ret));
return ret;
}
HMI_SEQ_DEBUG(req_num, "visible %s", act.role.c_str());
diff --git a/src/applist.cpp b/src/applist.cpp
index c6eaa0c..a5ae9f0 100644
--- a/src/applist.cpp
+++ b/src/applist.cpp
@@ -111,7 +111,8 @@ void AppList::removeSurface(unsigned surface){
{
ret = x.second->removeSurfaceIfExist(surface);
if(ret){
- HMI_DEBUG("wm", "remove surface %d from Client %s finish", surface, x.second->appID().c_str());
+ HMI_DEBUG("wm", "remove surface %d from Client %s finish",
+ surface, x.second->appID().c_str());
break;
}
}
diff --git a/src/applist.hpp b/src/applist.hpp
index 86c9903..b46789f 100644
--- a/src/applist.hpp
+++ b/src/applist.hpp
@@ -42,7 +42,8 @@ class AppList
/* TODO: consider, which is better WMClient as parameter or not
If the WMClient should be more flexible, I think this param should be WMClient class
*/
- void addClient(const std::string &appid, unsigned layer, unsigned surface, const std::string &role);
+ void addClient(const std::string &appid, unsigned layer,
+ unsigned surface,const std::string &role);
void removeClient(const std::string &appid);
bool contains(const std::string &appid) const;
int countClient() const;
@@ -55,9 +56,10 @@ class AppList
unsigned getRequestNumber(const std::string &appid) const;
unsigned addRequest(WMRequest req);
WMError setAction(unsigned req_num, const struct WMAction &action);
- WMError setAction(unsigned req_num, const std::string &appid, const std::string &role, const std::string &area, TaskVisible visible);
+ WMError setAction(unsigned req_num, const std::string &appid,
+ const std::string &role, const std::string &area, TaskVisible visible);
bool setEndDrawFinished(unsigned req_num, const std::string &appid, const std::string &role);
- bool endDrawFullfilled(unsigned req_num);
+ bool endDrawFullfislled(unsigned req_num);
void removeRequest(unsigned req_num);
void next();
bool haveRequest() const;
diff --git a/src/wm_client.cpp b/src/wm_client.cpp
index e7bdd76..a9ed547 100644
--- a/src/wm_client.cpp
+++ b/src/wm_client.cpp
@@ -26,10 +26,10 @@ using std::vector;
namespace wm
{
-const vector<string> kWMEvents = {
+static const vector<string> kWMEvents = {
// Private event for applications
"syncDraw", "flushDraw", "visible", "invisible", "active", "inactive", "error"};
-const vector<string> kErrorDescription = {
+static const vector<string> kErrorDescription = {
"unknown-error"};
static const char kKeyDrawingName[] = "drawing_name";
@@ -106,11 +106,35 @@ unsigned WMClient::layerID() const
return this->layer;
}
+/**
+ * Set layerID the client belongs to
+ *
+ * This function set layerID the client belongs to.
+ * But this function may not used because the layer should be fixed at constructor.
+ * So this function will be used to change layer by some reasons.
+ *
+ * @param unsigned[in] layerID
+ * @return None
+ * @attention WMClient can't have multiple layer
+ */
void WMClient::registerLayer(unsigned layer)
{
this->layer = layer;
}
+/**
+ * Add the pair of role and surface to the client
+ *
+ * This function set the pair of role and surface to the client.
+ * This function is used for the client which has multi surfaces.
+ * If the model and relationship for role and surface(layer)
+ * is changed, this function will be changed
+ * Current Window Manager doesn't use this function.
+ *
+ * @param string[in] role
+ * @param unsigned[in] surface
+ * @return true
+ */
bool WMClient::addSurface(const string &role, unsigned surface)
{
HMI_DEBUG("wm", "Add role %s with surface %d", role.c_str(), surface);
diff --git a/src/wm_client.hpp b/src/wm_client.hpp
index 3af75af..0d6faeb 100644
--- a/src/wm_client.hpp
+++ b/src/wm_client.hpp
@@ -39,7 +39,8 @@ class WMClient
{
public:
WMClient();
- WMClient(const std::string &appid, unsigned layer, unsigned surface, const std::string &role);
+ WMClient(const std::string &appid, unsigned layer,
+ unsigned surface, const std::string &role);
WMClient(const std::string &appid, const std::string &role);
virtual ~WMClient();