1.13 <WebKitFaviconDatabase>

Class: <WebKitFaviconDatabase>

It derives from <GObject>.

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 enable-private-browsing is #t, 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.

Procedures

Method: favicon-database:clear self
Method: clear self

Clears all icons from the database.

self

Passed: a <WebKitFaviconDatabase>.

a <WebKitFaviconDatabase>

Method: favicon-database:get-favicon self page-uri [cancellable] [callback]
Method: get-favicon self page-uri [cancellable] [callback]

Asynchronously obtains a favicon image.

Asynchronously obtains an image 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.

This is an asynchronous method. When the operation is finished, callback will be invoked. You can then call favicon-database:get-favicon-finish to get the result of the operation.

self

Passed: a <WebKitFaviconDatabase>.

a <WebKitFaviconDatabase>

page-uri

Passed: a string.

URI of the page for which we want to retrieve the favicon

cancellable

Passed, or left out: a <GCancellable>, or #f.

A <GCancellable> or #f.

callback

Passed, or left out: a procedure, or #f.

A GAsyncReadyCallback to call when the request is satisfied or #f if you don’t care about the result.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

The data to pass to callback.

Method: favicon-database:get-favicon-finish self result ⇒ %return
Method: get-favicon-finish self result ⇒ %return

Finishes an operation started with favicon-database:get-favicon.

self

Passed: a <WebKitFaviconDatabase>.

a <WebKitFaviconDatabase>

result

Passed: a <GAsyncResult>.

A <GAsyncResult> obtained from the GAsyncReadyCallback passed to favicon-database:get-favicon

%return

Returned: a <GdkTexture>.

a new favicon image, or #f in case of error.

Method: favicon-database:get-favicon-uri self page-uri ⇒ %return
Method: get-favicon-uri self page-uri ⇒ %return

Obtains the URI of the favicon for the given page-uri.

self

Passed: a <WebKitFaviconDatabase>.

a <WebKitFaviconDatabase>

page-uri

Passed: a string.

URI of the page containing the icon

%return

Returned: a string.

a newly allocated URI for the favicon, or #f if the database doesn’t have a favicon for page-uri.

Signals

Signal: favicon-database:favicon-changed

Connect a handler with (connect object favicon-database:favicon-changed handler). It is called as (handler self page-uri favicon-uri).

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 favicon-database:get-favicon to get the favicon. If you are interested in the favicon of a <WebKitWebView> it’s easier to use the web-view:favicon property. See web-view:get-favicon for more details.

self

Passed: a <WebKitFaviconDatabase>.

page-uri

Passed: a string.

the URI of the Web page containing the icon

favicon-uri

Passed: a string.

the URI of the favicon