gi-gio-2.0.38: Gio bindings

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

GI.Gio.Objects.Emblem

Contents

- Exported types
- Methods
  - getIcon
  - getOrigin
  - new
  - newWithOrigin
- Properties
  - icon
  - origin

Description

`GEmblem` is an implementation of `Icon` that supports having an emblem, which is an icon with additional properties. It can than be added to a `EmblemedIcon`.

Currently, only metainformation about the emblem's origin is supported. More may be added in the future.

Synopsis

- newtype Emblem = Emblem (ManagedPtr Emblem)
- class (GObject o, IsDescendantOf Emblem o) => IsEmblem o
- toEmblem :: (MonadIO m, IsEmblem o) => o -> m Emblem
- emblemGetIcon :: (HasCallStack, MonadIO m, IsEmblem a) => a -> m Icon
- emblemGetOrigin :: (HasCallStack, MonadIO m, IsEmblem a) => a -> m EmblemOrigin
- emblemNew :: (HasCallStack, MonadIO m, IsIcon a) => a -> m Emblem
- emblemNewWithOrigin :: (HasCallStack, MonadIO m, IsIcon a) => a -> EmblemOrigin -> m Emblem
- constructEmblemIcon :: (IsEmblem o, MonadIO m, IsObject a) => a -> m (GValueConstruct o)
- getEmblemIcon :: (MonadIO m, IsEmblem o) => o -> m (Maybe Object)
- constructEmblemOrigin :: (IsEmblem o, MonadIO m) => EmblemOrigin -> m (GValueConstruct o)
- getEmblemOrigin :: (MonadIO m, IsEmblem o) => o -> m EmblemOrigin

# Exported types

newtype Emblem Source #

Memory-managed wrapper type.

Constructors

Emblem (ManagedPtr Emblem) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf Emblem o) => IsEmblem o Source #

Type class for types which can be safely cast to `Emblem`, for instance with `toEmblem`.

#### Instances

Instances details

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

toEmblem :: (MonadIO m, IsEmblem o) => o -> m Emblem Source #

Cast to `Emblem`, 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, notify, notifyByPspec, ref, refSink, runDispose, serialize, stealData, stealQdata, thawNotify, toString, unref, watchClosure.

#### Getters

getData, getIcon, getOrigin, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## getIcon

emblemGetIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsEmblem a) |
=> a | `emblem`: a `Emblem` from which the icon should be extracted.
-> m Icon | Returns: a `Icon`. The returned object belongs to the emblem and should not be modified or freed.

Gives back the icon from `emblem`.

Since: 2.18

## getOrigin

emblemGetOrigin Source #

Arguments

:: (HasCallStack, MonadIO m, IsEmblem a) |
=> a | `emblem`: a `Emblem`
-> m EmblemOrigin | Returns: the origin of the emblem

Gets the origin of the emblem.

Since: 2.18

## new

emblemNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsIcon a) |
=> a | `icon`: a GIcon containing the icon.
-> m Emblem | Returns: a new `Emblem`.

Creates a new emblem for `icon`.

Since: 2.18

## newWithOrigin

emblemNewWithOrigin Source #

Arguments

:: (HasCallStack, MonadIO m, IsIcon a) |
=> a | `icon`: a GIcon containing the icon.
-> EmblemOrigin | `origin`: a GEmblemOrigin enum defining the emblem's origin
-> m Emblem | Returns: a new `Emblem`.

Creates a new emblem for `icon`.

Since: 2.18

# Properties

## icon

The actual icon of the emblem.

Since: 2.18

constructEmblemIcon :: (IsEmblem o, MonadIO m, IsObject a) => a -> m (GValueConstruct o) Source #

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

getEmblemIcon :: (MonadIO m, IsEmblem o) => o -> m (Maybe Object) Source #

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

    get emblem #icon

## origin

The origin the emblem is derived from.

Since: 2.18

constructEmblemOrigin :: (IsEmblem o, MonadIO m) => EmblemOrigin -> m (GValueConstruct o) Source #

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

getEmblemOrigin :: (MonadIO m, IsEmblem o) => o -> m EmblemOrigin Source #

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

    get emblem #origin