:right-sidebar: True FaviconDatabase =================================================================== .. currentmodule:: gi.repository.WebKit .. class:: FaviconDatabase(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` :Constructors: :: FaviconDatabase(**properties) Methods ------- .. rst-class:: interim-class .. class:: FaviconDatabase :no-index: .. method:: clear() -> None Clears all icons from the database. .. method:: get_favicon(page_uri: str, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[...], None] | None = None, *user_data: ~typing.Any) -> None 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 :func:`~gi.repository.WebKit.FaviconDatabase.get_favicon_finish` to get the result of the operation. :param page_uri: URI of the page for which we want to retrieve the favicon :param cancellable: A :obj:`~gi.repository.Gio.Cancellable` or :const:`None`. :param callback: A :obj:`~gi.repository.Gio.AsyncReadyCallback` to call when the request is satisfied or :const:`None` if you don't care about the result. :param user_data: The data to pass to ``callback``. .. method:: get_favicon_finish(result: ~gi.repository.Gio.AsyncResult) -> ~gi.repository.Gdk.Texture Finishes an operation started with :func:`~gi.repository.WebKit.FaviconDatabase.get_favicon`. :param result: A :obj:`~gi.repository.Gio.AsyncResult` obtained from the :obj:`~gi.repository.Gio.AsyncReadyCallback` passed to :func:`~gi.repository.WebKit.FaviconDatabase.get_favicon` .. method:: get_favicon_uri(page_uri: str) -> str Obtains the URI of the favicon for the given ``page_uri``. :param page_uri: URI of the page containing the icon Signals ------- .. rst-class:: interim-class .. class:: FaviconDatabase.signals :no-index: .. method:: favicon_changed(page_uri: str, favicon_uri: str) -> None 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 :func:`~gi.repository.WebKit.FaviconDatabase.get_favicon` to get the favicon. If you are interested in the favicon of a :obj:`~gi.repository.WebKit.WebView` it's easier to use the :obj:`~gi.repository.WebKit.WebView`:favicon property. See :func:`~gi.repository.WebKit.WebView.get_favicon` for more details. :param page_uri: the URI of the Web page containing the icon :param favicon_uri: the URI of the favicon