Source/WebKit/efl/ewk/ewk_settings.cpp
Evas_Object* ewk_settings_icon_database_icon_object_add(const char* url, Evas* canvas)
{
    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);

    WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
    WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
    cairo_surface_t* surface;

    if (!icon) {
        ERR("no icon for url %s", url);
        return 0;
    }

    surface = icon->nativeImageForCurrentFrame();
    return ewk_util_image_from_cairo_surface_add(canvas, surface);
}
/**
 * Creates Evas_Object of type image representing the given URL.
 *
 * This is an utility function that creates an Evas_Object of type
 * image set to have fill always match object size
 * (evas_object_image_filled_add()), saving some code to use it from Evas.
 *
 * @note In order to have this working, one must open icon database
 *       with ewk_settings_icon_database_path_set().
 *
 * @param url which url to query icon
 * @param canvas evas instance where to add resulting object
 *
 * @return newly allocated Evas_Object instance or @c 0 on
 *         errors. Delete the object with evas_object_del().
 */
Creates Evas_Object of type image representing the given URL.
This is an utility function that creates an Evas_Object of type
image set to have fill always match object size
(evas_object_image_filled_add()), saving some code to use it from Evas.

@note In order to have this working, one must open icon database
with ewk_settings_icon_database_path_set().

@param url which url to query icon
@param canvas evas instance where to add resulting object

@return newly allocated Evas_Object instance or @c 0 on
errors. Delete the object with evas_object_del().
Creates Evas_Object of type image representing the given URL . This is an utility function that creates an Evas_Object of type image set to have fill always match object size ( evas_object_image_filled_add () ) saving some code to use it from Evas . @note In order to have this working one must open icon database with ewk_settings_icon_database_path_set () . @param url which url to query icon @param canvas evas instance where to add resulting object @return newly allocated Evas_Object instance or @c 0 on errors . Delete the object with evas_object_del () .
Evas_Object* ewk_settings_icon_database_icon_object_add(const char* url, Evas* canvas)
{
    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
    WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
    WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
    cairo_surface_t* surface;
    if (!icon) {
        ERR("no icon for url %s", url);
        return 0;
    }
    surface = icon->nativeImageForCurrentFrame();
    return ewk_util_image_from_cairo_surface_add(canvas, surface);
}
Evas_Object * ewk_settings_icon_database_icon_object_add ( const char * url , Evas * canvas ) { EINA_SAFETY_ON_NULL_RETURN_VAL ( url , 0 ) ; EINA_SAFETY_ON_NULL_RETURN_VAL ( canvas , 0 ) ; WebCore :: KURL kurl ( WebCore :: KURL ( ) , WTF :: String :: fromUTF8 ( url ) ) ; WebCore :: Image * icon = WebCore :: iconDatabase ( ) . synchronousIconForPageURL ( kurl . string ( ) , WebCore :: IntSize ( 16 , 16 ) ) ; cairo_surface_t * surface ; if ( ! icon ) { ERR ( " " , url ) ; return 0 ; } surface = icon -> nativeImageForCurrentFrame ( ) ; return ewk_util_image_from_cairo_surface_add ( canvas , surface ) ; }
Creates Evas_Object of type image representing the given URL.
Creates Evas_Object of type image representing the given URL .