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

Contents

- Exported types
- Methods
  - getColors
  - getOutline
  - getWidths
  - new

Description

A render node for a border.

Synopsis

- newtype BorderNode = BorderNode (ManagedPtr BorderNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf BorderNode o) => IsBorderNode o
- toBorderNode :: (MonadIO m, IsBorderNode o) => o -> m BorderNode
- borderNodeGetColors :: (HasCallStack, MonadIO m, IsBorderNode a) => a -> m [RGBA]
- borderNodeGetOutline :: (HasCallStack, MonadIO m, IsBorderNode a) => a -> m RoundedRect
- borderNodeGetWidths :: (HasCallStack, MonadIO m, IsBorderNode a) => a -> m [Float]
- borderNodeNew :: (HasCallStack, MonadIO m) => RoundedRect -> [Float] -> [RGBA] -> m BorderNode

# Exported types

newtype BorderNode Source #

Memory-managed wrapper type.

Constructors

BorderNode (ManagedPtr BorderNode) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf BorderNode o) => IsBorderNode o Source #

Type class for types which can be safely cast to `BorderNode`, for instance with `toBorderNode`.

#### Instances

Instances details

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

toBorderNode :: (MonadIO m, IsBorderNode o) => o -> m BorderNode Source #

Cast to `BorderNode`, 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, getColors, getNodeType, getOpaqueRect, getOutline, getWidths.

#### Setters

None.

## getColors

borderNodeGetColors Source #

Arguments

:: (HasCallStack, MonadIO m, IsBorderNode a) |
=> a | `node`: a `GskRenderNode` for a border
-> m [RGBA] | Returns: an array of 4 `GdkRGBA` structs for the top, right, bottom and left color of the border

Retrieves the colors of the border.

## getOutline

borderNodeGetOutline Source #

Arguments

:: (HasCallStack, MonadIO m, IsBorderNode a) |
=> a | `node`: a `GskRenderNode` for a border
-> m RoundedRect | Returns: the outline of the border

Retrieves the outline of the border.

## getWidths

borderNodeGetWidths Source #

Arguments

:: (HasCallStack, MonadIO m, IsBorderNode a) |
=> a | `node`: a `GskRenderNode` for a border
-> m [Float] | Returns: an array of 4 floats for the top, right, bottom and left stroke width of the border, respectively

Retrieves the stroke widths of the border.

## new

borderNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> RoundedRect | `outline`: a `GskRoundedRect` describing the outline of the border
-> [Float] | `borderWidth`: the stroke width of the border on the top, right, bottom and left side respectively.
-> [RGBA] | `borderColor`: the color used on the top, right, bottom and left side.
-> m BorderNode | Returns: A new `GskRenderNode`

Creates a `GskRenderNode` that will stroke a border rectangle inside the given `outline`.

The 4 sides of the border can have different widths and colors.