| 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.Item
Description
The Item structure stores information about a segment of text.
- newtype Item = Item (ManagedPtr Item)
- newZeroItem :: MonadIO m => m Item
- noItem :: Maybe Item
- data ItemCopyMethodInfo
- itemCopy :: (HasCallStack, MonadIO m) => Item -> m (Maybe Item)
- data ItemFreeMethodInfo
- itemFree :: (HasCallStack, MonadIO m) => Item -> m ()
- itemNew :: (HasCallStack, MonadIO m) => m Item
- data ItemSplitMethodInfo
- itemSplit :: (HasCallStack, MonadIO m) => Item -> Int32 -> Int32 -> m Item
- getItemAnalysis :: MonadIO m => Item -> m Analysis
- item_analysis :: AttrLabelProxy "analysis"
- getItemLength :: MonadIO m => Item -> m Int32
- item_length :: AttrLabelProxy "length"
- setItemLength :: MonadIO m => Item -> Int32 -> m ()
- getItemNumChars :: MonadIO m => Item -> m Int32
- item_numChars :: AttrLabelProxy "numChars"
- setItemNumChars :: MonadIO m => Item -> Int32 -> m ()
- getItemOffset :: MonadIO m => Item -> m Int32
- item_offset :: AttrLabelProxy "offset"
- setItemOffset :: MonadIO m => Item -> Int32 -> m ()
Exported types
Constructors
| Item (ManagedPtr Item) |
Instances
| BoxedObject Item Source # | |
| (~) AttrOpTag tag AttrSet => Constructible Item tag Source # | |
| ((~) * info (ResolveItemMethod t Item), MethodInfo * info Item p) => IsLabel t (Item -> p) Source # | |
| ((~) * info (ResolveItemMethod t Item), MethodInfo * info Item p) => IsLabelProxy t (Item -> p) Source # | |
| HasAttributeList * Item Source # | |
| ((~) * signature (Int32 -> Int32 -> m Item), MonadIO m) => MethodInfo * ItemSplitMethodInfo Item signature Source # | |
| ((~) * signature (m ()), MonadIO m) => MethodInfo * ItemFreeMethodInfo Item signature Source # | |
| ((~) * signature (m (Maybe Item)), MonadIO m) => MethodInfo * ItemCopyMethodInfo Item signature Source # | |
| type AttributeList Item Source # | |
Methods
copy
data ItemCopyMethodInfo Source #
Instances
| ((~) * signature (m (Maybe Item)), MonadIO m) => MethodInfo * ItemCopyMethodInfo Item signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Item | |
| -> m (Maybe Item) | Returns: the newly allocated |
Copy an existing Item structure.
free
data ItemFreeMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m) => MethodInfo * ItemFreeMethodInfo Item signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Item | |
| -> m () |
Free a Item and all associated memory.
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m Item | Returns: the newly allocated |
Creates a new Item structure initialized to default values.
split
data ItemSplitMethodInfo Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Item |
|
| -> Int32 |
|
| -> Int32 |
|
| -> m Item | Returns: new item representing text before |
Modifies orig to cover only the text after splitIndex, and
returns a new item that covers the text before splitIndex that
used to be in orig. You can think of splitIndex as the length of
the returned item. splitIndex may not be 0, and it may not be
greater than or equal to the length of orig (that is, there must
be at least one byte assigned to each item, you can't create a
zero-length item). splitOffset is the length of the first item in
chars, and must be provided because the text used to generate the
item isn't available, so itemSplit can't count the char
length of the split items itself.
Properties
analysis
item_analysis :: AttrLabelProxy "analysis" Source #
length
item_length :: AttrLabelProxy "length" Source #
numChars
item_numChars :: AttrLabelProxy "numChars" Source #
offset
item_offset :: AttrLabelProxy "offset" Source #