FaviconDatabase

#WebKitFaviconDatabase provides access to the icons associated with web sites.

WebKit will automatically look for available icons in <link> elements on opened pages as well as an existing favicon.ico and load the images found into a memory cache if possible. That cache is frozen to an on-disk database for persistence.

If #WebKitSettings:enable-private-browsing is %TRUE, new icons won't be added to the on-disk database and no existing icons will be deleted from it. Nevertheless, WebKit will still store them in the in-memory cache during the current execution.

Constructors

this
this(WebKitFaviconDatabase* webKitFaviconDatabase, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

addOnFaviconChanged
gulong addOnFaviconChanged(void delegate(string, string, FaviconDatabase) dlg, ConnectFlags connectFlags)

This signal is emitted when the favicon URI of @page_uri has been changed to @favicon_uri in the database. You can connect to this signal and call webkit_favicon_database_get_favicon() to get the favicon. If you are interested in the favicon of a #WebKitWebView it's easier to use the #WebKitWebView:favicon property. See webkit_web_view_get_favicon() for more details.

clear
void clear()

Clears all icons from the database.

getFavicon
void getFavicon(string pageUri, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously obtains a #cairo_surface_t of the favicon for the given page URI. It returns the cached icon if it's in the database asynchronously waiting for the icon to be read from the database.

getFaviconDatabaseStruct
WebKitFaviconDatabase* getFaviconDatabaseStruct(bool transferOwnership)

Get the main Gtk struct

getFaviconFinish
Surface getFaviconFinish(AsyncResultIF result)

Finishes an operation started with webkit_favicon_database_get_favicon().

getFaviconUri
string getFaviconUri(string pageUri)

Obtains the URI of the favicon for the given @page_uri.

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

getType
GType getType()

Variables

webKitFaviconDatabase
WebKitFaviconDatabase* webKitFaviconDatabase;

the main Gtk struct

Meta