| 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.AttrIterator
Description
The AttrIterator structure is used to represent an
iterator through a AttrList. A new iterator is created
with pango_attr_list_get_iterator(). Once the iterator
is created, it can be advanced through the style changes
in the text using attrIteratorNext. At each
style change, the range of the current style segment and the
attributes currently in effect can be queried.
- newtype AttrIterator = AttrIterator (ManagedPtr AttrIterator)
- noAttrIterator :: Maybe AttrIterator
- data AttrIteratorDestroyMethodInfo
- attrIteratorDestroy :: (HasCallStack, MonadIO m) => AttrIterator -> m ()
- data AttrIteratorGetAttrsMethodInfo
- attrIteratorGetAttrs :: (HasCallStack, MonadIO m) => AttrIterator -> m [Attribute]
- data AttrIteratorGetFontMethodInfo
- attrIteratorGetFont :: (HasCallStack, MonadIO m) => AttrIterator -> FontDescription -> Maybe Language -> [Attribute] -> m ()
- data AttrIteratorNextMethodInfo
- attrIteratorNext :: (HasCallStack, MonadIO m) => AttrIterator -> m Bool
- data AttrIteratorRangeMethodInfo
- attrIteratorRange :: (HasCallStack, MonadIO m) => AttrIterator -> m (Int32, Int32)
Exported types
newtype AttrIterator Source #
Constructors
| AttrIterator (ManagedPtr AttrIterator) |
Instances
Methods
destroy
data AttrIteratorDestroyMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m) => MethodInfo * AttrIteratorDestroyMethodInfo AttrIterator signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AttrIterator |
|
| -> m () |
Destroy a AttrIterator and free all associated memory.
getAttrs
data AttrIteratorGetAttrsMethodInfo Source #
Instances
| ((~) * signature (m [Attribute]), MonadIO m) => MethodInfo * AttrIteratorGetAttrsMethodInfo AttrIterator signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AttrIterator |
|
| -> m [Attribute] | Returns: a list of
all attributes for the current range.
To free this value, call |
Gets a list of all attributes at the current position of the iterator.
Since: 1.2
getFont
data AttrIteratorGetFontMethodInfo Source #
Instances
| ((~) * signature (FontDescription -> Maybe Language -> [Attribute] -> m ()), MonadIO m) => MethodInfo * AttrIteratorGetFontMethodInfo AttrIterator signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AttrIterator |
|
| -> FontDescription |
|
| -> Maybe Language |
|
| -> [Attribute] |
|
| -> m () |
Get the font and other attributes at the current iterator position.
next
data AttrIteratorNextMethodInfo Source #
Instances
| ((~) * signature (m Bool), MonadIO m) => MethodInfo * AttrIteratorNextMethodInfo AttrIterator signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AttrIterator |
|
| -> m Bool | Returns: |
Advance the iterator until the next change of style.
range
data AttrIteratorRangeMethodInfo Source #
Instances
| ((~) * signature (m (Int32, Int32)), MonadIO m) => MethodInfo * AttrIteratorRangeMethodInfo AttrIterator signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => AttrIterator |
|
| -> m (Int32, Int32) |
Get the range of the current segment. Note that the
stored return values are signed, not unsigned like
the values in Attribute. To deal with this API
oversight, stored return values that wouldn't fit into
a signed integer are clamped to G_MAXINT.