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 |
Extends the Icon
interface and adds the ability to
load icons from streams.
Synopsis
- newtype LoadableIcon = LoadableIcon (ManagedPtr LoadableIcon)
- noLoadableIcon :: Maybe LoadableIcon
- class GObject o => IsLoadableIcon o
- toLoadableIcon :: (MonadIO m, IsLoadableIcon o) => o -> m LoadableIcon
- loadableIconLoad :: (HasCallStack, MonadIO m, IsLoadableIcon a, IsCancellable b) => a -> Int32 -> Maybe b -> m (InputStream, Text)
- loadableIconLoadAsync :: (HasCallStack, MonadIO m, IsLoadableIcon a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- loadableIconLoadFinish :: (HasCallStack, MonadIO m, IsLoadableIcon a, IsAsyncResult b) => a -> b -> m (InputStream, Text)
Exported types
newtype LoadableIcon Source #
Memory-managed wrapper type.
Instances
GObject LoadableIcon Source # | |
Defined in GI.Gio.Interfaces.LoadableIcon gobjectType :: LoadableIcon -> IO GType # | |
IsObject LoadableIcon Source # | |
Defined in GI.Gio.Interfaces.LoadableIcon | |
IsIcon LoadableIcon Source # | |
Defined in GI.Gio.Interfaces.LoadableIcon | |
IsLoadableIcon LoadableIcon Source # | |
Defined in GI.Gio.Interfaces.LoadableIcon |
noLoadableIcon :: Maybe LoadableIcon Source #
A convenience alias for Nothing
:: Maybe
LoadableIcon
.
class GObject o => IsLoadableIcon o Source #
Type class for types which can be safely cast to LoadableIcon
, for instance with toLoadableIcon
.
Instances
(GObject a, (UnknownAncestorError LoadableIcon a :: Constraint)) => IsLoadableIcon a Source # | |
Defined in GI.Gio.Interfaces.LoadableIcon | |
IsLoadableIcon LoadableIcon Source # | |
Defined in GI.Gio.Interfaces.LoadableIcon | |
IsLoadableIcon BytesIcon Source # | |
Defined in GI.Gio.Objects.BytesIcon | |
IsLoadableIcon FileIcon Source # | |
Defined in GI.Gio.Objects.FileIcon |
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
:: (HasCallStack, MonadIO m, IsLoadableIcon a, IsCancellable b) | |
=> a |
|
-> Int32 |
|
-> Maybe b |
|
-> m (InputStream, Text) | Returns: a |
Loads a loadable icon. For the asynchronous version of this function,
see loadableIconLoadAsync
.
loadAsync
loadableIconLoadAsync Source #
:: (HasCallStack, MonadIO m, IsLoadableIcon a, IsCancellable b) | |
=> a |
|
-> Int32 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Loads an icon asynchronously. To finish this function, see
loadableIconLoadFinish
. For the synchronous, blocking
version of this function, see loadableIconLoad
.
loadFinish
loadableIconLoadFinish Source #
:: (HasCallStack, MonadIO m, IsLoadableIcon a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m (InputStream, Text) | Returns: a |
Finishes an asynchronous icon load started in loadableIconLoadAsync
.