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

Contents

- Exported types
- Methods
  - getChild
  - getNChildren
  - new

Description

A render node that can contain other render nodes.

Synopsis

- newtype ContainerNode = ContainerNode (ManagedPtr ContainerNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf ContainerNode o) => IsContainerNode o
- toContainerNode :: (MonadIO m, IsContainerNode o) => o -> m ContainerNode
- containerNodeGetChild :: (HasCallStack, MonadIO m, IsContainerNode a) => a -> Word32 -> m RenderNode
- containerNodeGetNChildren :: (HasCallStack, MonadIO m, IsContainerNode a) => a -> m Word32
- containerNodeNew :: (HasCallStack, MonadIO m) => [RenderNode] -> m ContainerNode

# Exported types

newtype ContainerNode Source #

Memory-managed wrapper type.

Constructors

ContainerNode (ManagedPtr ContainerNode) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf ContainerNode o) => IsContainerNode o Source #

Type class for types which can be safely cast to `ContainerNode`, for instance with `toContainerNode`.

#### Instances

Instances details

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

toContainerNode :: (MonadIO m, IsContainerNode o) => o -> m ContainerNode Source #

Cast to `ContainerNode`, 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, getNChildren, getNodeType, getOpaqueRect.

#### Setters

None.

## getChild

containerNodeGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainerNode a) |
=> a | `node`: a container `GskRenderNode`
-> Word32 | `idx`: the position of the child to get
-> m RenderNode | Returns: the `idx`'th child of `container`

Gets one of the children of `container`.

## getNChildren

containerNodeGetNChildren Source #

Arguments

:: (HasCallStack, MonadIO m, IsContainerNode a) |
=> a | `node`: a container `GskRenderNode`
-> m Word32 | Returns: the number of children of the `GskRenderNode`

Retrieves the number of direct children of `node`.

## new

containerNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> [RenderNode] | `children`: The children of the node
-> m ContainerNode | Returns: the new `GskRenderNode`

Creates a new `GskRenderNode` instance for holding the given `children`.

The new node will acquire a reference to each of the children.