gi-webkit-6.0.2: WebKit bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit.Objects.FaviconDatabase

Description

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 Settings:enable-private-browsing is True, 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.

Synopsis

Exported types

newtype FaviconDatabase Source #

Memory-managed wrapper type.

Constructors

FaviconDatabase (ManagedPtr FaviconDatabase) 

Instances

Instances details
Eq FaviconDatabase Source # 
Instance details

Defined in GI.WebKit.Objects.FaviconDatabase

GObject FaviconDatabase Source # 
Instance details

Defined in GI.WebKit.Objects.FaviconDatabase

ManagedPtrNewtype FaviconDatabase Source # 
Instance details

Defined in GI.WebKit.Objects.FaviconDatabase

TypedObject FaviconDatabase Source # 
Instance details

Defined in GI.WebKit.Objects.FaviconDatabase

Methods

glibType :: IO GType

HasParentTypes FaviconDatabase Source # 
Instance details

Defined in GI.WebKit.Objects.FaviconDatabase

IsGValue (Maybe FaviconDatabase) Source #

Convert FaviconDatabase to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit.Objects.FaviconDatabase

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe FaviconDatabase -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe FaviconDatabase)

type ParentTypes FaviconDatabase Source # 
Instance details

Defined in GI.WebKit.Objects.FaviconDatabase

type ParentTypes FaviconDatabase = '[Object]

class (GObject o, IsDescendantOf FaviconDatabase o) => IsFaviconDatabase o Source #

Type class for types which can be safely cast to FaviconDatabase, for instance with toFaviconDatabase.

Instances

Instances details
(GObject o, IsDescendantOf FaviconDatabase o) => IsFaviconDatabase o Source # 
Instance details

Defined in GI.WebKit.Objects.FaviconDatabase

toFaviconDatabase :: (MonadIO m, IsFaviconDatabase o) => o -> m FaviconDatabase Source #

Cast to FaviconDatabase, for types for which this is known to be safe. For general casts, use castTo.

Methods

clear

faviconDatabaseClear Source #

Arguments

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

database: a FaviconDatabase

-> m () 

Clears all icons from the database.

getFavicon

faviconDatabaseGetFavicon Source #

Arguments

:: (HasCallStack, MonadIO m, IsFaviconDatabase a, IsCancellable b) 
=> a

database: a FaviconDatabase

-> Text

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

-> Maybe b

cancellable: A Cancellable or Nothing.

-> Maybe AsyncReadyCallback

callback: A AsyncReadyCallback to call when the request is satisfied or Nothing if you don't care about the result.

-> m () 

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 faviconDatabaseGetFaviconFinish to get the result of the operation.

getFaviconFinish

faviconDatabaseGetFaviconFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsFaviconDatabase a, IsAsyncResult b) 
=> a

database: a FaviconDatabase

-> b

result: A AsyncResult obtained from the AsyncReadyCallback passed to faviconDatabaseGetFavicon

-> m Texture

Returns: a new favicon image, or Nothing in case of error. (Can throw GError)

Finishes an operation started with faviconDatabaseGetFavicon.

getFaviconUri

faviconDatabaseGetFaviconUri Source #

Arguments

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

database: a FaviconDatabase

-> Text

pageUri: URI of the page containing the icon

-> m Text

Returns: a newly allocated URI for the favicon, or Nothing if the database doesn't have a favicon for pageUri.

Obtains the URI of the favicon for the given pageUri.

Signals

faviconChanged

type FaviconDatabaseFaviconChangedCallback Source #

Arguments

 = Text

pageUri: the URI of the Web page containing the icon

-> Text

faviconUri: the URI of the favicon

-> IO () 

This signal is emitted when the favicon URI of pageUri has been changed to faviconUri in the database. You can connect to this signal and call faviconDatabaseGetFavicon to get the favicon. If you are interested in the favicon of a WebView it's easier to use the WebView:favicon property. See webViewGetFavicon for more details.

afterFaviconDatabaseFaviconChanged :: (IsFaviconDatabase a, MonadIO m) => a -> ((?self :: a) => FaviconDatabaseFaviconChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the faviconChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after faviconDatabase #faviconChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onFaviconDatabaseFaviconChanged :: (IsFaviconDatabase a, MonadIO m) => a -> ((?self :: a) => FaviconDatabaseFaviconChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the faviconChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on faviconDatabase #faviconChanged callback