Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The PangoAttrSize
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
Memory-managed wrapper type.
Instances
Eq AttrSize Source # | |
BoxedPtr AttrSize Source # | |
Defined in GI.Pango.Structs.AttrSize boxedPtrCopy :: AttrSize -> IO AttrSize # boxedPtrFree :: AttrSize -> IO () # | |
CallocPtr AttrSize Source # | |
Defined in GI.Pango.Structs.AttrSize boxedPtrCalloc :: IO (Ptr AttrSize) # | |
ManagedPtrNewtype AttrSize Source # | |
Defined in GI.Pango.Structs.AttrSize toManagedPtr :: AttrSize -> ManagedPtr AttrSize # | |
tag ~ 'AttrSet => Constructible AttrSize tag Source # | |
Defined in GI.Pango.Structs.AttrSize |
Methods
new
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> m Attribute | Returns: the newly allocated
|
Create a new font-size attribute in fractional points.
newAbsolute
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> m Attribute | Returns: the newly allocated
|
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 unit (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 ]