gi-gio-2.0.32: Gio bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | Safe-Inferred
Language | Haskell2010

GI.Gio.Interfaces.LoadableIcon

Contents

- Exported types
- Methods
  - load
  - loadAsync
  - loadFinish

Description

`GLoadableIcon` extends the `Icon` interface and adds the ability to load icons from streams.

Synopsis

- newtype LoadableIcon = LoadableIcon (ManagedPtr LoadableIcon)
- class (GObject o, IsDescendantOf LoadableIcon 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.

Constructors

LoadableIcon (ManagedPtr LoadableIcon) |

#### Instances

Instances details

Eq LoadableIcon Source # |
Instance details Defined in GI.Gio.Interfaces.LoadableIcon Methods (==) :: LoadableIcon -> LoadableIcon -> Bool Source # (/=) :: LoadableIcon -> LoadableIcon -> Bool Source #
GObject LoadableIcon Source # |
Instance details Defined in GI.Gio.Interfaces.LoadableIcon
ManagedPtrNewtype LoadableIcon Source # |
Instance details Defined in GI.Gio.Interfaces.LoadableIcon Methods toManagedPtr :: LoadableIcon -> ManagedPtr LoadableIcon Source #
TypedObject LoadableIcon Source # |
Instance details Defined in GI.Gio.Interfaces.LoadableIcon Methods glibType :: IO GType Source #
HasParentTypes LoadableIcon Source # |
Instance details Defined in GI.Gio.Interfaces.LoadableIcon
IsGValue (Maybe LoadableIcon) Source # | Convert `LoadableIcon` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Interfaces.LoadableIcon Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe LoadableIcon -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe LoadableIcon) Source #
type ParentTypes LoadableIcon Source # |
Instance details Defined in GI.Gio.Interfaces.LoadableIcon type ParentTypes LoadableIcon = '[Icon, Object]

class (GObject o, IsDescendantOf LoadableIcon o) => IsLoadableIcon o Source #

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

#### Instances

Instances details

(GObject o, IsDescendantOf LoadableIcon o) => IsLoadableIcon o Source # |
Instance details Defined in GI.Gio.Interfaces.LoadableIcon

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

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, equal, forceFloating, freezeNotify, getv, hash, isFloating, load, loadAsync, loadFinish, notify, notifyByPspec, ref, refSink, runDispose, serialize, stealData, stealQdata, thawNotify, toString, unref, watchClosure.

#### Getters

getData, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## 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`.