Pango.Item
Description: Reference for Pango.Item

### Struct

# PangoItem

#### Description [src]

    struct PangoItem {
      int offset;
      int length;
      int num_chars;
      PangoAnalysis analysis;
    }

The `PangoItem` structure stores information about a segment of text.

You typically obtain `PangoItems` by itemizing a piece of text with `pango_itemize()`.

###### Structure members

`offset:` `int`

  Byte offset of the start of this item in text.

`length:` `int`

  Length of this item in bytes.

`num_chars:` `int`

  Number of Unicode characters in the item.

`analysis:` `PangoAnalysis`

  Analysis results for the item.

#### Constructors

###### pango_item_new

Creates a new `PangoItem` structure initialized to default values.

#### Instance methods

###### pango_item_apply_attrs

Add attributes to a `PangoItem`.

since: 1.44

###### pango_item_copy

Copy an existing `PangoItem` structure.

###### pango_item_free

Free a `PangoItem` and all associated memory.

###### pango_item_get_char_offset

Returns the character offset of the item from the beginning of the itemized text.

since: 1.54

###### pango_item_split

Modifies `orig` to cover only the text after `split_index`, and returns a new item that covers the text before `split_index` that used to be in `orig`.