gi-pango-1.0.30: Pango 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.Pango.Objects.Coverage

Contents

- Exported types
- Methods
  - copy
  - fromBytes
  - get
  - max
  - new
  - ref
  - set
  - toBytes
  - unref

Description

A `PangoCoverage` structure is a map from Unicode characters to `CoverageLevel` values.

It is often necessary in Pango to determine if a particular font can represent a particular character, and also how well it can represent that character. The `PangoCoverage` is a data structure that is used to represent that information. It is an opaque structure with no public fields.

Synopsis

- newtype Coverage = Coverage (ManagedPtr Coverage)
- class (GObject o, IsDescendantOf Coverage o) => IsCoverage o
- toCoverage :: (MonadIO m, IsCoverage o) => o -> m Coverage
- coverageCopy :: (HasCallStack, MonadIO m, IsCoverage a) => a -> m Coverage
- coverageFromBytes :: (HasCallStack, MonadIO m) => ByteString -> m (Maybe Coverage)
- coverageGet :: (HasCallStack, MonadIO m, IsCoverage a) => a -> Int32 -> m CoverageLevel
- coverageMax :: (HasCallStack, MonadIO m, IsCoverage a, IsCoverage b) => a -> b -> m ()
- coverageNew :: (HasCallStack, MonadIO m) => m Coverage
- coverageRef :: (HasCallStack, MonadIO m, IsCoverage a) => a -> m Coverage
- coverageSet :: (HasCallStack, MonadIO m, IsCoverage a) => a -> Int32 -> CoverageLevel -> m ()
- coverageToBytes :: (HasCallStack, MonadIO m, IsCoverage a) => a -> m ByteString
- coverageUnref :: (HasCallStack, MonadIO m, IsCoverage a) => a -> m ()

# Exported types

newtype Coverage Source #

Memory-managed wrapper type.

Constructors

Coverage (ManagedPtr Coverage) |

#### Instances

Instances details

Eq Coverage Source # |
Instance details Defined in GI.Pango.Objects.Coverage Methods (==) :: Coverage -> Coverage -> Bool Source # (/=) :: Coverage -> Coverage -> Bool Source #
GObject Coverage Source # |
Instance details Defined in GI.Pango.Objects.Coverage
ManagedPtrNewtype Coverage Source # |
Instance details Defined in GI.Pango.Objects.Coverage Methods toManagedPtr :: Coverage -> ManagedPtr Coverage Source #
TypedObject Coverage Source # |
Instance details Defined in GI.Pango.Objects.Coverage Methods glibType :: IO GType Source #
HasParentTypes Coverage Source # |
Instance details Defined in GI.Pango.Objects.Coverage
IsGValue (Maybe Coverage) Source # | Convert `Coverage` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Pango.Objects.Coverage Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Coverage -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Coverage) Source #
type ParentTypes Coverage Source # |
Instance details Defined in GI.Pango.Objects.Coverage type ParentTypes Coverage = '[Object]

class (GObject o, IsDescendantOf Coverage o) => IsCoverage o Source #

Type class for types which can be safely cast to `Coverage`, for instance with `toCoverage`.

#### Instances

Instances details

(GObject o, IsDescendantOf Coverage o) => IsCoverage o Source # |
Instance details Defined in GI.Pango.Objects.Coverage

toCoverage :: (MonadIO m, IsCoverage o) => o -> m Coverage Source #

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

bindProperty, bindPropertyFull, copy, forceFloating, freezeNotify, get, getv, isFloating, max, notify, notifyByPspec, ref, refSink, runDispose, set, stealData, stealQdata, thawNotify, toBytes, unref, watchClosure.

#### Getters

getData, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## copy

coverageCopy Source #

Arguments

:: (HasCallStack, MonadIO m, IsCoverage a) |
=> a | `coverage`: a `PangoCoverage`
-> m Coverage | Returns: the newly allocated `PangoCoverage`, with a reference count of one, which should be freed with `coverageUnref`.

Copy an existing `PangoCoverage`.

## fromBytes

coverageFromBytes Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ByteString | `bytes`: binary data representing a `PangoCoverage`
-> m (Maybe Coverage) | Returns: a newly allocated `PangoCoverage`

Deprecated: (Since version 1.44)This returns `Nothing`

Convert data generated from `coverageToBytes` back to a `PangoCoverage`.

## get

coverageGet Source #

Arguments

:: (HasCallStack, MonadIO m, IsCoverage a) |
=> a | `coverage`: a `PangoCoverage`
-> 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, IsCoverage a, IsCoverage b) |
=> a | `coverage`: a `PangoCoverage`
-> b | `other`: another `PangoCoverage`
-> m () |

Deprecated: (Since version 1.44)This function does nothing

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

## new

coverageNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Coverage | Returns: the newly allocated `PangoCoverage`, initialized to `CoverageLevelNone` with a reference count of one, which should be freed with `coverageUnref`.

Create a new `PangoCoverage`

## ref

coverageRef Source #

Arguments

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

Deprecated: (Since version 1.52)Use g_object_ref instead

Increase the reference count on the `PangoCoverage` by one.

## set

coverageSet Source #

Arguments

:: (HasCallStack, MonadIO m, IsCoverage a) |
=> a | `coverage`: a `PangoCoverage`
-> 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, IsCoverage a) |
=> a | `coverage`: a `PangoCoverage`
-> m ByteString |

Deprecated: (Since version 1.44)This returns `Nothing`

Convert a `PangoCoverage` structure into a flat binary format.

## unref

coverageUnref Source #

Arguments

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

Deprecated: (Since version 1.52)Use g_object_unref instead

Decrease the reference count on the `PangoCoverage` by one.

If the result is zero, free the coverage and all associated memory.