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.ColorNode

Contents

- Exported types
- Methods
  - getColor
  - new

Description

A render node for a solid color.

Synopsis

- newtype ColorNode = ColorNode (ManagedPtr ColorNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf ColorNode o) => IsColorNode o
- toColorNode :: (MonadIO m, IsColorNode o) => o -> m ColorNode
- colorNodeGetColor :: (HasCallStack, MonadIO m, IsColorNode a) => a -> m RGBA
- colorNodeNew :: (HasCallStack, MonadIO m) => RGBA -> Rect -> m ColorNode

# Exported types

newtype ColorNode Source #

Memory-managed wrapper type.

Constructors

ColorNode (ManagedPtr ColorNode) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf ColorNode o) => IsColorNode o Source #

Type class for types which can be safely cast to `ColorNode`, for instance with `toColorNode`.

#### Instances

Instances details

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

toColorNode :: (MonadIO m, IsColorNode o) => o -> m ColorNode Source #

Cast to `ColorNode`, 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, getChildren, getColor, getNodeType, getOpaqueRect.

#### Setters

None.

## getColor

colorNodeGetColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsColorNode a) |
=> a | `node`: a `GskRenderNode`
-> m RGBA | Returns: the color of the node

Retrieves the color of the given `node`.

The value returned by this function will not be correct if the render node was created for a non-sRGB color.

## new

colorNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> RGBA | `rgba`: a `GdkRGBA` specifying a color
-> Rect | `bounds`: the rectangle to render the color into
-> m ColorNode | Returns: A new `GskRenderNode`

Creates a `GskRenderNode` that will render the color specified by `rgba` into the area given by `bounds`.