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 |
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.
- newtype IconDatabase = IconDatabase (ManagedPtr IconDatabase)
- class GObject o => IsIconDatabase o
- toIconDatabase :: IsIconDatabase o => o -> IO IconDatabase
- noIconDatabase :: Maybe IconDatabase
- data IconDatabaseClearMethodInfo
- iconDatabaseClear :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> m ()
- data IconDatabaseGetIconPixbufMethodInfo
- iconDatabaseGetIconPixbuf :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> Text -> m Pixbuf
- data IconDatabaseGetIconUriMethodInfo
- iconDatabaseGetIconUri :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> Text -> m Text
- data IconDatabaseGetPathMethodInfo
- iconDatabaseGetPath :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> m Text
- data IconDatabaseSetPathMethodInfo
- iconDatabaseSetPath :: (HasCallStack, MonadIO m, IsIconDatabase a) => a -> Text -> m ()
- data IconDatabasePathPropertyInfo
- constructIconDatabasePath :: IsIconDatabase o => Text -> IO (GValueConstruct o)
- getIconDatabasePath :: (MonadIO m, IsIconDatabase o) => o -> m Text
- iconDatabasePath :: AttrLabelProxy "path"
- setIconDatabasePath :: (MonadIO m, IsIconDatabase o) => o -> Text -> m ()
- type C_IconDatabaseIconLoadedCallback = Ptr () -> Ptr WebFrame -> CString -> Ptr () -> IO ()
- type IconDatabaseIconLoadedCallback = WebFrame -> Text -> IO ()
- data IconDatabaseIconLoadedSignalInfo
- 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 #
Constructors
IconDatabase (ManagedPtr IconDatabase) |
Instances
GObject IconDatabase Source # | |
IsObject IconDatabase Source # | |
IsIconDatabase IconDatabase Source # | |
((~) * info (ResolveIconDatabaseMethod t IconDatabase), MethodInfo * info IconDatabase p) => IsLabel t (IconDatabase -> p) Source # | |
((~) * info (ResolveIconDatabaseMethod t IconDatabase), MethodInfo * info IconDatabase p) => IsLabelProxy t (IconDatabase -> p) Source # | |
HasAttributeList * IconDatabase Source # | |
type AttributeList IconDatabase Source # | |
type SignalList IconDatabase Source # | |
class GObject o => IsIconDatabase o Source #
Instances
toIconDatabase :: IsIconDatabase o => o -> IO IconDatabase Source #
Methods
clear
data IconDatabaseClearMethodInfo Source #
Instances
((~) * signature (m ()), MonadIO m, IsIconDatabase a) => MethodInfo * IconDatabaseClearMethodInfo a signature Source # | |
Arguments
:: (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
data IconDatabaseGetIconPixbufMethodInfo Source #
Instances
((~) * signature (Text -> m Pixbuf), MonadIO m, IsIconDatabase a) => MethodInfo * IconDatabaseGetIconPixbufMethodInfo a signature Source # | |
iconDatabaseGetIconPixbuf Source #
Arguments
:: (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
data IconDatabaseGetIconUriMethodInfo Source #
Instances
((~) * signature (Text -> m Text), MonadIO m, IsIconDatabase a) => MethodInfo * IconDatabaseGetIconUriMethodInfo a signature Source # | |
iconDatabaseGetIconUri Source #
Arguments
:: (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
data IconDatabaseGetPathMethodInfo Source #
Instances
((~) * signature (m Text), MonadIO m, IsIconDatabase a) => MethodInfo * IconDatabaseGetPathMethodInfo a signature Source # | |
Arguments
:: (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
data IconDatabaseSetPathMethodInfo Source #
Instances
((~) * signature (Text -> m ()), MonadIO m, IsIconDatabase a) => MethodInfo * IconDatabaseSetPathMethodInfo a signature Source # | |
Arguments
:: (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
data IconDatabasePathPropertyInfo Source #
Instances
constructIconDatabasePath :: IsIconDatabase o => Text -> IO (GValueConstruct o) Source #
getIconDatabasePath :: (MonadIO m, IsIconDatabase o) => o -> m Text Source #
iconDatabasePath :: AttrLabelProxy "path" 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 #