},
{
"name": "NearApps",
- "role": "receiver2",
+ "role": "receiver2|upleftreceiver",
"id_range_begin": 2600,
"id_range_end": 2999,
"comment": "NearApps is the part of Apps. The z order of this layer is higher than Apps"
},
{
"category": "receiver",
- "role": "receiver",
+ "role": "receiver | ssubreceiver",
"area": "split.sub | normal.full",
"layer": "apps",
}
"roles":[
{
"category": "receiver",
- "role": "receiver",
+ "role": "receiver | fullreceiver",
"area": "normal.full",
"layer": "apps",
},
{
"category": "receiver2",
- "role": "receiver2",
+ "role": "receiver2 | upleftreceiver",
"area": "upper.left",
"layer": "near_apps",
},
{
"category": "general",
- "role": "video | music | sdl_bt | webbrowser | eb | poi | browser | mixer | radio | hvac | debug | phone | settings | hvac | dashboard",
+ "role": "video | music | sdl_bt | webbrowser | eb | poi | browser | mixer | radio | hvac | debug | phone | settings | hvac | hudtbt | tbtnavi | tbtnavi2 | dashboard",
"area": "hud.normal.full",
"layer": "remote_hud",
},
{
"category": "speed",
- "role": "tachometer",
+ "role": "tachometer | speed | hudspeed",
"area": "hud.upper.left",
"layer": "remote_hud_upper_left",
}
-/*
+/*;
* Copyright (c) 2017 TOYOTA MOTOR CORPORATION
*
* Licensed under the Apache License, Version 2.0 (the "License");
~afb_instance() = default;
int init();
+
+ bool testFlg;
};
struct afb_instance *g_afb_instance;
goto error;
}
+ g_afb_instance->testFlg = false;
+
atexit([] { delete g_afb_instance; });
return 0;
afb_req_success(req, NULL, "success");
};
+ HMI_DEBUG("activateWindow role:%s area:%s", appid, a_drawing_area);
+
+#if 0
+ std::string appidString = appid;
+ HMI_DEBUG("flg: %d", g_afb_instance->testFlg);
+ if ((appidString == "dashboard" && g_afb_instance->testFlg) || appidString == "hudspeed")
+ {
+ HMI_DEBUG("%s is remote transfer", appid);
+ g_afb_instance->wmgr.api_activate_surface_to_master(
+ appid, a_drawing_name, "hud.upper.left", reply);
+
+ g_afb_instance->testFlg = false;
+ return;
+ }
+
+#endif
if (!g_afb_instance->wmgr.wmcon.isRemoteArea(a_drawing_area))
{
g_afb_instance->wmgr.api_activate_window(
appid, a_drawing_name, a_drawing_area, reply);
}
}
+#if 0
+ if (appidString == "dashboard")
+ {
+ g_afb_instance->testFlg = true;
+ }
+#endif
free(appid);
}
}
}
afb_req_success(req, NULL, "success");
- g_afb_instance->wmgr.setSubscribed(true);
+ if (event_id == 7)
+ {
+ //g_afb_instance->wmgr.api_handshake();
+ g_afb_instance->wmgr.setSubscribed(true);
+ }
}
catch (std::exception &e)
{
static sd_event_source *g_timer_endInit_src = nullptr;
static AppList g_app_list;
static WindowManager *g_context;
+static bool testFlg = false;
static vector<string> white_list_area_size_change = {
"homescreen"
};
bool LayerControl::moveRemote(unsigned layer, const std::string& area)
{
bool ret = false;
- std::string remote_layer;
- std::string ecu_name = area;
-
- if (area.find('.') != std::string::npos)
- {
- std::vector<std::string> elements;
- elements = parseString(area, '.');
- ecu_name = elements[0];
- }
-
- remote_layer = this->areaToRemoteLayer(ecu_name);
-
+ std::string remote_layer = this->areaToRemoteLayer(area);
auto remote = this->getWMLayer(remote_layer);
if(remote != nullptr)
return "";
}
-std::string LayerControl::areaToRemoteLayer(std::string area)
+std::string LayerControl::areaToRemoteLayer(const std::string& area)
{
+ std::vector<std::string> elements;
+
+ if (area.find('.') != std::string::npos)
+ {
+ elements = parseString(area, '.');
+ }
+ else
+ {
+ elements.push_back(area);
+ }
+
for (auto itr = wm_remoteLayerName.begin(); itr != wm_remoteLayerName.end(); ++itr)
{
- if (std::regex_search(*itr, std::regex(area, std::regex::icase)))
+ unsigned int idx = 0;
+ for (auto itr_elem = elements.begin(); itr_elem != elements.end(); ++itr_elem)
{
- return *itr;
+ if (std::regex_search(*itr, std::regex(*itr_elem, std::regex::icase)))
+ {
+ if (++idx == elements.size())
+ {
+ return *itr;
+ }
+ }
+ else
+ {
+ // TODO: workaround, skip normal case
+ if ((itr_elem->compare("normal") == 0) || (itr_elem->compare("full") == 0))
+ {
+ if (++idx == elements.size())
+ {
+ return *itr;
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
}
}
void dispatchLayerPropChangeEvent(unsigned id, struct ilmLayerProperties*, t_ilm_notification_mask);
std::string hasRemoteLayer(unsigned layer);
- std::string areaToRemoteLayer(std::string area);
-
+ std::string areaToRemoteLayer(const std::string& area);
private:
WMError makeVisible(const std::shared_ptr<WMClient> client);
WMError makeInvisible(const std::shared_ptr<WMClient> client);