gi-webkit-3.0.14: WebKit bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit.Objects.IconDatabase

Contents

Description

IconDatabase provides access to website icons, as shown in tab labels, window captions or bookmarks. All views share the same icon database.

The icon database is enabled by default and stored in ~/.cache/webkit/icondatabase, depending on XDG_CACHE_HOME.

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 the memory cache if possible. The signal "icon-loaded" will be emitted when any icon is found and loaded. Old Icons are automatically cleaned up after 4 days.

iconDatabaseSetPath can be used to change the location of the database and also to disable it by passing Nothing.

If WebKitWebSettings::enable-private-browsing is True new icons won't be added to the database on disk and no existing icons will be deleted from it.

Synopsis

Exported types

Methods

clear

iconDatabaseClear Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconDatabase a) 
=> a

database: a IconDatabase

-> m () 

Deprecated: (Since version 1.8)Use faviconDatabaseClear instead.

Clears all icons from the database.

Since: 1.3.13

getIconPixbuf

iconDatabaseGetIconPixbuf Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconDatabase a) 
=> a

database: a IconDatabase

-> Text

pageUri: URI of the page containing the icon

-> m Pixbuf

Returns: a new reference to a Pixbuf, or Nothing

Deprecated: (Since version 1.8)Use faviconDatabaseTryGetFaviconPixbuf instead.

Obtains a Pixbuf of the favicon for the given page URI, or a default icon if there is no icon for the given page. Use iconDatabaseGetIconUri if you need to distinguish these cases. Usually you want to connect to WebKitIconDatabase::icon-loaded and call this method in the callback.

The pixbuf will have the largest size provided by the server and should be resized before it is displayed. See also webViewGetIconPixbuf.

Since: 1.3.13

getIconUri

iconDatabaseGetIconUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconDatabase a) 
=> a

database: a IconDatabase

-> Text

pageUri: URI of the page containing the icon

-> m Text

Returns: a newly allocated URI for the favicon, or Nothing

Deprecated: (Since version 1.8)Use faviconDatabaseGetFaviconUri instead.

Obtains the URI for the favicon for the given page URI. See also webViewGetIconUri.

Since: 1.3.13

getPath

iconDatabaseGetPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconDatabase a) 
=> a

database: a IconDatabase

-> m Text

Returns: the absolute path of the database folder, or Nothing

Deprecated: (Since version 1.8)Use faviconDatabaseGetPath instead.

Determines the absolute path to the database folder on disk.

Since: 1.3.13

setPath

iconDatabaseSetPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsIconDatabase a) 
=> a

database: a IconDatabase

-> Text

path: an absolute path to the icon database folder

-> m () 

Deprecated: (Since version 1.8)Use faviconDatabaseSetPath instead.

Specifies the absolute path to the database folder on disk.

Passing Nothing or "" disables the icon database.

Since: 1.3.13

Properties

path

Signals

iconLoaded

type IconDatabaseIconLoadedCallback = WebFrame -> Text -> IO () Source #

Deprecated: (Since version 1.8)Use WebKitFaviconDatabase::icon-loaded instead.