gi-gsk-4.0.9: Gsk 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.Gsk.Objects.OpacityNode

Contents

- Exported types
- Methods
  - getChild
  - getOpacity
  - new

Description

A render node controlling the opacity of its single child node.

Synopsis

- newtype OpacityNode = OpacityNode (ManagedPtr OpacityNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf OpacityNode o) => IsOpacityNode o
- toOpacityNode :: (MonadIO m, IsOpacityNode o) => o -> m OpacityNode
- opacityNodeGetChild :: (HasCallStack, MonadIO m, IsOpacityNode a) => a -> m RenderNode
- opacityNodeGetOpacity :: (HasCallStack, MonadIO m, IsOpacityNode a) => a -> m Float
- opacityNodeNew :: (HasCallStack, MonadIO m, IsRenderNode a) => a -> Float -> m OpacityNode

# Exported types

newtype OpacityNode Source #

Memory-managed wrapper type.

Constructors

OpacityNode (ManagedPtr OpacityNode) |

#### Instances

Instances details

Eq OpacityNode Source # |
Instance details Defined in GI.Gsk.Objects.OpacityNode Methods (==) :: OpacityNode -> OpacityNode -> Bool Source # (/=) :: OpacityNode -> OpacityNode -> Bool Source #
BoxedPtr OpacityNode Source # |
Instance details Defined in GI.Gsk.Objects.OpacityNode Methods boxedPtrCopy :: OpacityNode -> IO OpacityNode Source # boxedPtrFree :: OpacityNode -> IO () Source #
ManagedPtrNewtype OpacityNode Source # |
Instance details Defined in GI.Gsk.Objects.OpacityNode Methods toManagedPtr :: OpacityNode -> ManagedPtr OpacityNode Source #
TypedObject OpacityNode Source # |
Instance details Defined in GI.Gsk.Objects.OpacityNode Methods glibType :: IO GType Source #
HasParentTypes OpacityNode Source # |
Instance details Defined in GI.Gsk.Objects.OpacityNode
type ParentTypes OpacityNode Source # |
Instance details Defined in GI.Gsk.Objects.OpacityNode type ParentTypes OpacityNode = '[RenderNode]

class (BoxedPtr o, TypedObject o, IsDescendantOf OpacityNode o) => IsOpacityNode o Source #

Type class for types which can be safely cast to `OpacityNode`, for instance with `toOpacityNode`.

#### Instances

Instances details

(BoxedPtr o, TypedObject o, IsDescendantOf OpacityNode o) => IsOpacityNode o Source # |
Instance details Defined in GI.Gsk.Objects.OpacityNode

toOpacityNode :: (MonadIO m, IsOpacityNode o) => o -> m OpacityNode Source #

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

draw, ref, serialize, unref, writeToFile.

#### Getters

getBounds, getChild, getChildren, getNodeType, getOpacity, getOpaqueRect.

#### Setters

None.

## getChild

opacityNodeGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsOpacityNode a) |
=> a | `node`: a `GskRenderNode` for an opacity
-> m RenderNode | Returns: The child that is getting opacityed

Gets the child node that is getting opacityed by the given `node`.

## getOpacity

opacityNodeGetOpacity Source #

Arguments

:: (HasCallStack, MonadIO m, IsOpacityNode a) |
=> a | `node`: a `GskRenderNode` for an opacity
-> m Float | Returns: the opacity factor

Gets the transparency factor for an opacity node.

## new

opacityNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsRenderNode a) |
=> a | `child`: The node to draw
-> Float | `opacity`: The opacity to apply
-> m OpacityNode | Returns: A new `GskRenderNode`

Creates a `GskRenderNode` that will drawn the `child` with reduced `opacity`.