BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
}
-struct wpaInfo {
+typedef struct {
+ std::string id;
+ std::string decodedIcon; // needs to src, type, sizes.
std::string uri;
- std::string orientation;
- int displayMode;
-};
+ std::string name;
+ std::string shortName;
+ int orientation; // needs to portrait-primary, portrait-secondary, landscape-primary, landscape-secondary.
+ int displayMode; // needs to fullscreen, standalone, minimal-ui, browser, and so on.
+ long themeColor;
+ long backgroundColor;
+} wpaInfo;
WebPageUI::~WebPageUI()
{
}
void* pNum;
+wpaInfo *info = new wpaInfo();
void WebPageUI::_cm_add_to_hs_clicked(void* data, Evas_Object*, void* )
{
WebPageUI* webPageUI = static_cast<WebPageUI*>(data);
_cm_dismissed(nullptr, webPageUI->m_ctxpopup, nullptr);
- wpaInfo *info = new wpaInfo();
pNum = &info;
std::string uri = webPageUI->getURI();
- std::string str = "landscape";
- BROWSER_LOGD("[%s:%d] uri : %s", __PRETTY_FUNCTION__, __LINE__, uri.c_str());
BROWSER_LOGD("[%s:%d] pNum : %s", __PRETTY_FUNCTION__, __LINE__, pNum);
info->uri = uri.c_str();
- info->orientation = str.c_str();
- info->displayMode = 111;
+ info->orientation = portrait_secondary; // test result : 1 (success)
+ info->displayMode = WebDisplayModeMinimalUi; // test result : 2 (success)
BROWSER_LOGD("[%s:%d] info[0] : %s", __PRETTY_FUNCTION__, __LINE__, (info->uri).c_str());
- BROWSER_LOGD("[%s:%d] info[1] : %s", __PRETTY_FUNCTION__, __LINE__, (info->orientation).c_str());
+ BROWSER_LOGD("[%s:%d] info[1] : %d", __PRETTY_FUNCTION__, __LINE__, info->orientation);
BROWSER_LOGD("[%s:%d] info[2] : %d", __PRETTY_FUNCTION__, __LINE__, info->displayMode);
- shortcut_add_to_home("Shortcut", LAUNCH_BY_APP, NULL, NULL, 0, result_cb, NULL);
+ shortcut_add_to_home("Shortcut", LAUNCH_BY_APP, NULL, NULL, 0, result_cb, pNum);
} else {
BROWSER_LOGW("[%s] data = nullptr", __PRETTY_FUNCTION__);
}
int WebPageUI::result_cb(int ret, void *data) {
BROWSER_LOGD("[%s:%d]", __PRETTY_FUNCTION__, __LINE__);
BROWSER_LOGD("[%s:%d] ret : %d, data : %s", __PRETTY_FUNCTION__, __LINE__, ret, data);
-// BROWSER_LOGD("[%s:%d] data->displayMode : %d", __PRETTY_FUNCTION__, __LINE__, *(int *)(&(data->displayMode)));
+
+// WebPageUI* webPageUI = static_cast<WebPageUI*>(data);
+// webPageUI = (wpaInfo*)data;
+// BROWSER_LOGD("[%s:%d] data->displayMode : %d", __PRETTY_FUNCTION__, __LINE__, (*(int *)((wpaInfo*)data)->displayMode));
return 0;
}