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.Objects.BytesIcon

Contents

- Exported types
- Methods
  - getBytes
  - new
- Properties
  - bytes

Description

`GBytesIcon` specifies an image held in memory in a common format (usually PNG) to be used as icon.

Since: 2.38

Synopsis

- newtype BytesIcon = BytesIcon (ManagedPtr BytesIcon)
- class (GObject o, IsDescendantOf BytesIcon o) => IsBytesIcon o
- toBytesIcon :: (MonadIO m, IsBytesIcon o) => o -> m BytesIcon
- bytesIconGetBytes :: (HasCallStack, MonadIO m, IsBytesIcon a) => a -> m Bytes
- bytesIconNew :: (HasCallStack, MonadIO m) => Bytes -> m BytesIcon
- constructBytesIconBytes :: (IsBytesIcon o, MonadIO m) => Bytes -> m (GValueConstruct o)
- getBytesIconBytes :: (MonadIO m, IsBytesIcon o) => o -> m Bytes

# Exported types

newtype BytesIcon Source #

Memory-managed wrapper type.

Constructors

BytesIcon (ManagedPtr BytesIcon) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf BytesIcon o) => IsBytesIcon o Source #

Type class for types which can be safely cast to `BytesIcon`, for instance with `toBytesIcon`.

#### Instances

Instances details

(GObject o, IsDescendantOf BytesIcon o) => IsBytesIcon o Source # |
Instance details Defined in GI.Gio.Objects.BytesIcon

toBytesIcon :: (MonadIO m, IsBytesIcon o) => o -> m BytesIcon Source #

Cast to `BytesIcon`, 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

getBytes, getData, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## getBytes

bytesIconGetBytes Source #

Arguments

:: (HasCallStack, MonadIO m, IsBytesIcon a) |
=> a | `icon`: a `Icon`.
-> m Bytes | Returns: a `Bytes`.

Gets the `Bytes` associated with the given `icon`.

Since: 2.38

## new

bytesIconNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Bytes | `bytes`: a `Bytes`.
-> m BytesIcon | Returns: a `Icon` for the given `bytes`.

Creates a new icon for a bytes.

This cannot fail, but loading and interpreting the bytes may fail later on (for example, if `loadableIconLoad` is called) if the image is invalid.

Since: 2.38

# Properties

## bytes

The bytes containing the icon.

constructBytesIconBytes :: (IsBytesIcon o, MonadIO m) => Bytes -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`bytes`” property. This is rarely needed directly, but it is used by `new`.

getBytesIconBytes :: (MonadIO m, IsBytesIcon o) => o -> m Bytes Source #

Get the value of the “`bytes`” property. When overloading is enabled, this is equivalent to

    get bytesIcon #bytes