gi-webkit2-4.0.25: WebKit2 bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2.Objects.FaviconDatabase

Description

No description available in the introspection data.

Synopsis

Exported types

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.WebKit2.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

Overloaded 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 Surface 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.

You must call webContextSetFaviconDatabaseDirectory for the WebContext associated with this FaviconDatabase before attempting to use this function; otherwise, faviconDatabaseGetFaviconFinish will return FaviconDatabaseErrorNotInitialized.

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 Surface

Returns: a new reference to a Surface, 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 (Maybe 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 C_FaviconDatabaseFaviconChangedCallback = Ptr () -> CString -> CString -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

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 -> 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

onFaviconDatabaseFaviconChanged :: (IsFaviconDatabase a, MonadIO m) => 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