gi-pango-1.0.23: Pango bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Pango.Structs.AttrSize

Contents

- Exported types
- Methods
  - Overloaded methods
  - new
  - newAbsolute
- Properties
  - absolute
  - attr
  - size

Description

The `AttrSize` structure is used to represent attributes which set font size.

Synopsis

- newtype AttrSize = AttrSize (ManagedPtr AttrSize)
- newZeroAttrSize :: MonadIO m => m AttrSize
- attrSizeNew :: (HasCallStack, MonadIO m) => Int32 -> m Attribute
- attrSizeNewAbsolute :: (HasCallStack, MonadIO m) => Int32 -> m Attribute
- getAttrSizeAbsolute :: MonadIO m => AttrSize -> m Word32
- setAttrSizeAbsolute :: MonadIO m => AttrSize -> Word32 -> m ()
- getAttrSizeAttr :: MonadIO m => AttrSize -> m Attribute
- getAttrSizeSize :: MonadIO m => AttrSize -> m Int32
- setAttrSizeSize :: MonadIO m => AttrSize -> Int32 -> m ()

# Exported types

newtype AttrSize Source #

Memory-managed wrapper type.

Constructors

AttrSize (ManagedPtr AttrSize) |

#### Instances

Instances details

Eq AttrSize Source # |
Instance details Defined in GI.Pango.Structs.AttrSize Methods (==) :: AttrSize -> AttrSize -> Bool # (/=) :: AttrSize -> AttrSize -> Bool #
CallocPtr AttrSize Source # |
Instance details Defined in GI.Pango.Structs.AttrSize Methods boxedPtrCalloc :: IO (Ptr AttrSize) Source #
BoxedPtr AttrSize Source # |
Instance details Defined in GI.Pango.Structs.AttrSize Methods boxedPtrCopy :: AttrSize -> IO AttrSize Source # boxedPtrFree :: AttrSize -> IO () Source #
ManagedPtrNewtype AttrSize Source # |
Instance details Defined in GI.Pango.Structs.AttrSize Methods toManagedPtr :: AttrSize -> ManagedPtr AttrSize Source #
tag ~ 'AttrSet => Constructible AttrSize tag Source # |
Instance details Defined in GI.Pango.Structs.AttrSize Methods new :: MonadIO m => (ManagedPtr AttrSize -> AttrSize) -> [AttrOp AttrSize tag] -> m AttrSize Source #

newZeroAttrSize :: MonadIO m => m AttrSize Source #

Construct a `AttrSize` struct initialized to zero.

# Methods

## Overloaded methods

## new

attrSizeNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Int32 | `size`: the font size, in `PANGO_SCALEths` of a point.
-> m Attribute | Returns: the newly allocated `Attribute`, which should be freed with `attributeDestroy`.

Create a new font-size attribute in fractional points.

## newAbsolute

attrSizeNewAbsolute Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Int32 | `size`: the font size, in `PANGO_SCALEths` of a device unit.
-> m Attribute | Returns: the newly allocated `Attribute`, which should be freed with `attributeDestroy`.

Create a new font-size attribute in device units.

Since: 1.8

# Properties

## absolute

whether the font size is in device units or points. This field is only present for compatibility with Pango-1.8.0 (`AttrTypeAbsoluteSize` was added in 1.8.1); and always will be `False` for `AttrTypeSize` and `True` for `AttrTypeAbsoluteSize`.

getAttrSizeAbsolute :: MonadIO m => AttrSize -> m Word32 Source #

Get the value of the “`absolute`” field. When overloading is enabled, this is equivalent to

    get attrSize #absolute

setAttrSizeAbsolute :: MonadIO m => AttrSize -> Word32 -> m () Source #

Set the value of the “`absolute`” field. When overloading is enabled, this is equivalent to

    set attrSize [ #absolute := value ]

## attr

the common portion of the attribute

getAttrSizeAttr :: MonadIO m => AttrSize -> m Attribute Source #

Get the value of the “`attr`” field. When overloading is enabled, this is equivalent to

    get attrSize #attr

## size

size of font, in units of 1/`SCALE` of a point (for `AttrTypeSize`) or of a device uni (for `AttrTypeAbsoluteSize`)

getAttrSizeSize :: MonadIO m => AttrSize -> m Int32 Source #

Get the value of the “`size`” field. When overloading is enabled, this is equivalent to

    get attrSize #size

setAttrSizeSize :: MonadIO m => AttrSize -> Int32 -> m () Source #

Set the value of the “`size`” field. When overloading is enabled, this is equivalent to

    set attrSize [ #size := value ]