From 4e74920e2387de927a5ced4c862713c1a01f2a56 Mon Sep 17 00:00:00 2001 From: "sihoons.yang" Date: Tue, 11 Aug 2015 11:53:46 +0900 Subject: [PATCH] [Tizen_2.4] Delete the "Setting the Page URL" in web_tutorials_n.htm Change-Id: I5a8c352808444d0f44676cde0e6a88b26f665442 Signed-off-by: sihoons.yang --- .../html/native/web/web_tutorials_n.htm | 47 ---------------------- 1 file changed, 47 deletions(-) diff --git a/org.tizen.tutorials/html/native/web/web_tutorials_n.htm b/org.tizen.tutorials/html/native/web/web_tutorials_n.htm index 699c498..9ee1f2c 100644 --- a/org.tizen.tutorials/html/native/web/web_tutorials_n.htm +++ b/org.tizen.tutorials/html/native/web/web_tutorials_n.htm @@ -35,8 +35,6 @@
  • Showing a Window and Setting the Focus
  • -
  • Setting the Page URL -
  • Finding a Window
  • Finalizing the Application @@ -73,8 +71,6 @@

    Handle the key and mouse event.

  • Showing a Window and Setting the Focus

    Show a window and set the focus.

  • -
  • Setting the Page URL -

    Set the page URL.

  • Finding a Window

    Use the helper functions to find a window.

  • Finalizing the Application @@ -399,49 +395,6 @@ window_create()

    The void evas_object_show (Evas_Object *obj) function makes the given Evas object visible.

    -

    Setting the Page URL

    - -

    This example uses 2 helper functions for finding window structures. The first one, the window_find_with_elm_window() function, takes elm_window as an argument and returns a pointer to the Browser_Window object that the window is part of. The second one, the window_find_with_ewk_view() function, does the same with ewk_view passed as an argument. Both of them use the EINA_LIST_FOREACH macro to iterate over the windows list.

    - -
    -char *url_from_user_input(const char *arg)
    -{
    -   // If it is already a URL, return the argument as is
    -   if (has_scheme(arg) || !strcasecmp(arg, "about:blank"))
    -      return strdup(arg);
    -
    -   Eina_Strbuf *buf = eina_strbuf_manage_new(eina_file_path_sanitize(arg));
    -
    -   // Check whether the path exists
    -   if (ecore_file_exists(eina_strbuf_string_get(buf)))
    -   {
    -      // File exists, convert local path to a URL
    -      eina_strbuf_prepend(buf, "file://");
    -   }
    -   else
    -   {
    -      // The path does not exist, convert it to a URL by
    -      // prepending http:// scheme:
    -      // www.google.com -> http://www.google.com
    -      eina_strbuf_string_free(buf);
    -      eina_strbuf_append_printf(buf, "http://%s", arg);
    -   }
    -   char *url = eina_strbuf_string_steal(buf);
    -   eina_strbuf_free(buf);
    -
    -   return url;
    -}
    -
    - -

    The body of the has_scheme() function used in the previous code can be found here:

    - -
    -Eina_Bool has_scheme(const char *url)
    -{
    -   return !!strstr(url, "://");
    -}
    -
    -

    Finding a Window

    This example uses 2 helper functions for finding window structures. The first one, the window_find_with_elm_window() function, takes elm_window as an argument and returns a pointer to the Browser_Window object that the window is part of. The second one, the window_find_with_ewk_view() function, does the same for ewk_view. Both of them use the EINA_LIST_FOREACH macro to iterate over the windows list.

    -- 2.7.4