static void default_content_set(Evas_Object *web) { #ifdef HAVE_ELEMENTARY_WEB Evas_Object *view, *frame; const char contents[] = "" "<html>\n" " <head>\n" " <title>Nothing to see here, move along</title>\n" " </head>\n" " <body>\n" " <a href=\"http://www.enlightenment.org\" target=\"_blank\">E</a>\n" " <br />\n" " <a href=\"http://www.google.com\" target=\"_blank\">Google</a>\n" " <br />\n" " </body>\n" "</html>\n"; view = elm_web_webkit_view_get(web); frame = ewk_view_frame_main_get(view); ewk_frame_contents_set(frame, contents, sizeof(contents) - 1, "text/html", "UTF-8", NULL); #else (void) web; #endif }
static void _default_web_content_set(Evas_Object *web) { #ifdef HAVE_ELEMENTARY_WEB Evas_Object *view, *frame; const char contents[] = "" "<html>\n" " <head>\n" " <title>Nothing to see here, move along</title>\n" " </head>\n" " <body>\n" " <a href=\"http://www.enlightenment.org\" target=\"_blank\">E</a>\n" " <br />\n" " <a href=\"http://www.google.com\" target=\"_blank\">Google</a>\n" " <br />\n" " </body>\n" "</html>\n"; view = elm_web_webkit_view_get(web); frame = ewk_view_frame_main_get(view); ewk_frame_contents_set(frame, contents, sizeof(contents) - 1, "text/html", "UTF-8", NULL); #else _printf("Webview could not be initialized - NO WEBKIT SUPPORT ON PLATFORM\n"); _printf("However still raw web widget implementation CAN be tested \n"); (void) web; #endif }
bool LoadHTMLStringItem::invoke() const { if (!m_unreachableURL->length()) ewk_frame_contents_set(browser->mainFrame(), m_content->ustring().utf8().data(), 0, 0, 0, m_baseURL->ustring().utf8().data()); else ewk_frame_contents_alternate_set(browser->mainFrame(), m_content->ustring().utf8().data(), 0, 0, 0, m_baseURL->ustring().utf8().data(), m_unreachableURL->ustring().utf8().data()); return true; }
void ActivityWebView::_webLoadFinished(Elm_Web_Frame_Load_Error *error) { EmitSignal("hide,keyboard", "calaos"); EmitSignal("stop,loading", "calaos"); if (error && !error->is_cancellation) { #ifdef HAVE_EWEBKIT string t = WEBKIT_ERROR_HTML; replace_str(t, "{FAILING_URL}", error->failing_url); replace_str(t, "{DESC}", error->description); Evas_Object *eview = elm_web_webkit_view_get(web); Evas_Object *frame = ewk_view_frame_main_get(eview); ewk_frame_contents_set(frame, t.c_str(), t.length(), "text/html", "UTF-8", error->failing_url); #endif } }