Source/WebKit/efl/ewk/ewk_settings.cpp
cairo_surface_t* ewk_settings_icon_database_icon_surface_get(const char *url)
{
    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);

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

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

    return icon->nativeImageForCurrentFrame();
}
/**
 * Queries icon for given URL, returning associated cairo surface.
 *
 * @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
 *
 * @return cairo surface if any, or @c 0 on failure
 */
Queries icon for given URL, returning associated cairo surface.
@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

@return cairo surface if any, or @c 0 on failure
Queries icon for given URL returning associated cairo surface . @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 @return cairo surface if any or @c 0 on failure
cairo_surface_t* ewk_settings_icon_database_icon_surface_get(const char *url)
{
    EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
    WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
    WebCore::Image *icon = WebCore::iconDatabase().synchronousIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
    if (!icon) {
        ERR("no icon for url %s", url);
        return 0;
    }
    return icon->nativeImageForCurrentFrame();
}
cairo_surface_t * ewk_settings_icon_database_icon_surface_get ( const char * url ) { EINA_SAFETY_ON_NULL_RETURN_VAL ( url , 0 ) ; WebCore :: KURL kurl ( WebCore :: KURL ( ) , WTF :: String :: fromUTF8 ( url ) ) ; WebCore :: Image * icon = WebCore :: iconDatabase ( ) . synchronousIconForPageURL ( kurl . string ( ) , WebCore :: IntSize ( 16 , 16 ) ) ; if ( ! icon ) { ERR ( " " , url ) ; return 0 ; } return icon -> nativeImageForCurrentFrame ( ) ; }
Queries icon for given URL, returning associated cairo surface.
Queries icon for given URL returning associated cairo surface .