gi-pango-1.0.13: Pango bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Pango.Structs.Item

Contents

Description

The Item structure stores information about a segment of text.

Synopsis

Exported types

newtype Item Source #

Constructors

Item (ManagedPtr Item) 

Instances

BoxedObject Item Source # 

Methods

boxedType :: Item -> IO GType #

(~) AttrOpTag tag AttrSet => Constructible Item tag Source # 

Methods

new :: MonadIO m => (ManagedPtr Item -> Item) -> [AttrOp Item tag] -> m Item #

((~) * info (ResolveItemMethod t Item), MethodInfo * info Item p) => IsLabel t (Item -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Item -> p #

((~) * info (ResolveItemMethod t Item), MethodInfo * info Item p) => IsLabelProxy t (Item -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Item -> p #

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 # 

newZeroItem :: MonadIO m => m Item Source #

Construct a Item struct initialized to zero.

Methods

copy

data ItemCopyMethodInfo Source #

Instances

((~) * signature (m (Maybe Item)), MonadIO m) => MethodInfo * ItemCopyMethodInfo Item signature Source # 

itemCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Item

item: a Item, may be Nothing

-> m (Maybe Item)

Returns: the newly allocated Item, which should be freed with itemFree, or Nothing if item was Nothing.

Copy an existing Item structure.

free

data ItemFreeMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m) => MethodInfo * ItemFreeMethodInfo Item signature Source # 

itemFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Item

item: a Item, may be Nothing

-> m () 

Free a Item and all associated memory.

new

itemNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Item

Returns: the newly allocated Item, which should be freed with itemFree.

Creates a new Item structure initialized to default values.

split

data ItemSplitMethodInfo Source #

Instances

((~) * signature (Int32 -> Int32 -> m Item), MonadIO m) => MethodInfo * ItemSplitMethodInfo Item signature Source # 

itemSplit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Item

orig: a Item

-> Int32

splitIndex: byte index of position to split item, relative to the start of the item

-> Int32

splitOffset: number of chars between start of orig and splitIndex

-> m Item

Returns: new item representing text before splitIndex, which should be freed with itemFree.

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

length

setItemLength :: MonadIO m => Item -> Int32 -> m () Source #

numChars

offset

setItemOffset :: MonadIO m => Item -> Int32 -> m () Source #