FaviconDatabase

class FaviconDatabase(val webkitFaviconDatabasePointer: <Error class: unknown class><<Error class: unknown class>>)(source)

Provides access to the icons associated with web sites.

WebKit will automatically look for available icons in 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

Link copied to clipboard
constructor(webkitFaviconDatabasePointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val webkitFaviconDatabasePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun clear()

Clears all icons from the database.

Link copied to clipboard
fun emitFaviconChanged(pageUri: String, faviconUri: String)

Emits the "favicon-changed" signal. See onFaviconChanged.

Link copied to clipboard
fun getFavicon(pageUri: String, cancellable: <Error class: unknown class>? = null, callback: <Error class: unknown class>?)

Asynchronously obtains a favicon image.

Link copied to clipboard
fun getFaviconFinish(result: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>>

Finishes an operation started with webkit_favicon_database_get_favicon().

Link copied to clipboard
fun getFaviconUri(pageUri: String): String

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

Link copied to clipboard
fun onFaviconChanged(    connectFlags: <Error class: unknown class> = ConnectFlags(0u),     handler: (pageUri: String, faviconUri: String) -> Unit): <Error class: unknown class>

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.