gi-gio-2.0.18: Gio 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.Gio.Interfaces.LoadableIcon

Contents

Description

Extends the Icon interface and adds the ability to load icons from streams.

Synopsis

Exported types

newtype LoadableIcon Source #

Memory-managed wrapper type.

class GObject o => IsLoadableIcon o Source #

Type class for types which can be safely cast to LoadableIcon, for instance with toLoadableIcon.

toLoadableIcon :: (MonadIO m, IsLoadableIcon o) => o -> m LoadableIcon Source #

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

Methods

load

loadableIconLoad Source #

Arguments

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

icon: a LoadableIcon.

-> Int32

size: an integer.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> m (InputStream, Text)

Returns: a InputStream to read the icon from. (Can throw GError)

Loads a loadable icon. For the asynchronous version of this function, see loadableIconLoadAsync.

loadAsync

loadableIconLoadAsync Source #

Arguments

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

icon: a LoadableIcon.

-> Int32

size: an integer.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the request is satisfied

-> m () 

Loads an icon asynchronously. To finish this function, see loadableIconLoadFinish. For the synchronous, blocking version of this function, see loadableIconLoad.

loadFinish

loadableIconLoadFinish Source #

Arguments

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

icon: a LoadableIcon.

-> b

res: a AsyncResult.

-> m (InputStream, Text)

Returns: a InputStream to read the icon from. (Can throw GError)

Finishes an asynchronous icon load started in loadableIconLoadAsync.