gi-pango-1.0.19: Pango bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com)
Safe Haskell | None
Language | Haskell2010

GI.Pango.Structs.Coverage

Contents

- Exported types
- Methods
  - get
  - max
  - set
  - toBytes
  - unref

Description

The `Coverage` structure represents a map from Unicode characters to `CoverageLevel`. It is an opaque structure with no public fields.

Synopsis

- newtype Coverage = Coverage (ManagedPtr Coverage)
- noCoverage :: Maybe Coverage
- coverageGet :: (HasCallStack, MonadIO m) => Coverage -> Int32 -> m CoverageLevel
- coverageMax :: (HasCallStack, MonadIO m) => Coverage -> Coverage -> m ()
- coverageSet :: (HasCallStack, MonadIO m) => Coverage -> Int32 -> CoverageLevel -> m ()
- coverageToBytes :: (HasCallStack, MonadIO m) => Coverage -> m ByteString
- coverageUnref :: (HasCallStack, MonadIO m) => Coverage -> m ()

# Exported types

newtype Coverage Source #

Memory-managed wrapper type.

Constructors

Coverage (ManagedPtr Coverage) |

Instances

WrappedPtr Coverage Source # |
Instance details Defined in GI.Pango.Structs.Coverage Methods wrappedPtrCalloc :: IO (Ptr Coverage) Source # wrappedPtrCopy :: Coverage -> IO Coverage Source # wrappedPtrFree :: Maybe (FunPtr (Ptr Coverage -> IO ())) Source #

noCoverage :: Maybe Coverage Source #

A convenience alias for `Nothing` :: `Maybe` `Coverage`.

# Methods

## get

coverageGet Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Coverage | `coverage`: a `Coverage`
-> Int32 | `index_`: the index to check
-> m CoverageLevel | Returns: the coverage level of `coverage` for character `index_`.

Determine whether a particular index is covered by `coverage`

## max

coverageMax Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Coverage | `coverage`: a `Coverage`
-> Coverage | `other`: another `Coverage`
-> m () |

Set the coverage for each index in `coverage` to be the max (better) value of the current coverage for the index and the coverage for the corresponding index in `other`.

## set

coverageSet Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Coverage | `coverage`: a `Coverage`
-> Int32 | `index_`: the index to modify
-> CoverageLevel | `level`: the new level for `index_`
-> m () |

Modify a particular index within `coverage`

## toBytes

coverageToBytes Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Coverage | `coverage`: a `Coverage`
-> m ByteString |

Convert a `Coverage` structure into a flat binary format

## unref

coverageUnref Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Coverage | `coverage`: a `Coverage`
-> m () |

Decrease the reference count on the `Coverage` by one. If the result is zero, free the coverage and all associated memory.