Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- newtype IconDatabase = IconDatabase (ManagedPtr IconDatabase)
- class GObject o => IsIconDatabase o
- toIconDatabase :: (MonadIO m, IsIconDatabase o) => o -> m IconDatabase
- noIconDatabase :: Maybe IconDatabase
- iconDatabaseClear :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> m ()
- iconDatabaseGetIconPixbuf :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> Text -> m Pixbuf
- iconDatabaseGetIconUri :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> Text -> m Text
- iconDatabaseGetPath :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> m Text
- iconDatabaseSetPath :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> Text -> m ()
- constructIconDatabasePath :: IsIconDatabase o => Text -> IO (GValueConstruct o)
- getIconDatabasePath :: (MonadIO m, IsIconDatabase o) => o -> m Text
- setIconDatabasePath :: (MonadIO m, IsIconDatabase o) => o -> Text -> m ()
- type C_IconDatabaseIconLoadedCallback = Ptr () -> Ptr WebFrame -> CString -> Ptr () -> IO ()
- type IconDatabaseIconLoadedCallback = WebFrame -> Text -> IO ()
- afterIconDatabaseIconLoaded :: (IsIconDatabase a, MonadIO m) => a -> IconDatabaseIconLoadedCallback -> m SignalHandlerId
- genClosure_IconDatabaseIconLoaded :: IconDatabaseIconLoadedCallback -> IO Closure
- mk_IconDatabaseIconLoadedCallback :: C_IconDatabaseIconLoadedCallback -> IO (FunPtr C_IconDatabaseIconLoadedCallback)
- noIconDatabaseIconLoadedCallback :: Maybe IconDatabaseIconLoadedCallback
- onIconDatabaseIconLoaded :: (IsIconDatabase a, MonadIO m) => a -> IconDatabaseIconLoadedCallback -> m SignalHandlerId
- wrap_IconDatabaseIconLoadedCallback :: IconDatabaseIconLoadedCallback -> Ptr () -> Ptr WebFrame -> CString -> Ptr () -> IO ()
Exported types
newtype IconDatabase Source #
class GObject o => IsIconDatabase o Source #
toIconDatabase :: (MonadIO m, IsIconDatabase o) => o -> m IconDatabase Source #
Methods
clear
:: (HasCallStack, MonadIO m, IsIconDatabase a) | |
=> a |
|
-> m () |
Deprecated: (Since version 1.8)Use faviconDatabaseClear
instead.
Clears all icons from the database.
Since: 1.3.13
getIconPixbuf
iconDatabaseGetIconPixbuf Source #
:: (HasCallStack, MonadIO m, IsIconDatabase a) | |
=> a |
|
-> Text |
|
-> m Pixbuf |
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 #
:: (HasCallStack, MonadIO m, IsIconDatabase a) | |
=> a |
|
-> Text |
|
-> m Text | Returns: a newly allocated URI for the favicon, or |
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
:: (HasCallStack, MonadIO m, IsIconDatabase a) | |
=> a |
|
-> m Text | Returns: the absolute path of the database folder, or |
Deprecated: (Since version 1.8)Use faviconDatabaseGetPath
instead.
Determines the absolute path to the database folder on disk.
Since: 1.3.13
setPath
:: (HasCallStack, MonadIO m, IsIconDatabase a) | |
=> a |
|
-> Text |
|
-> 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
constructIconDatabasePath :: IsIconDatabase o => Text -> IO (GValueConstruct o) Source #
getIconDatabasePath :: (MonadIO m, IsIconDatabase o) => o -> m Text Source #
setIconDatabasePath :: (MonadIO m, IsIconDatabase o) => o -> Text -> m () Source #
Signals
iconLoaded
type C_IconDatabaseIconLoadedCallback = Ptr () -> Ptr WebFrame -> CString -> Ptr () -> IO () Source #
type IconDatabaseIconLoadedCallback = WebFrame -> Text -> IO () Source #
Deprecated: (Since version 1.8)Use WebKitFaviconDatabase::icon-loaded instead.
afterIconDatabaseIconLoaded :: (IsIconDatabase a, MonadIO m) => a -> IconDatabaseIconLoadedCallback -> m SignalHandlerId Source #
mk_IconDatabaseIconLoadedCallback :: C_IconDatabaseIconLoadedCallback -> IO (FunPtr C_IconDatabaseIconLoadedCallback) Source #
onIconDatabaseIconLoaded :: (IsIconDatabase a, MonadIO m) => a -> IconDatabaseIconLoadedCallback -> m SignalHandlerId Source #
wrap_IconDatabaseIconLoadedCallback :: IconDatabaseIconLoadedCallback -> Ptr () -> Ptr WebFrame -> CString -> Ptr () -> IO () Source #