Pango.itemize
Description: Reference for Pango.itemize

### Function

# Pangoitemize

#### Declaration [src]

    GList*
    pango_itemize (
      PangoContext* context,
      const char* text,
      int start_index,
      int length,
      PangoAttrList* attrs,
      PangoAttrIterator* cached_iter
    )

#### Description [src]

Breaks a piece of text into segments with consistent directional level and font.

Each byte of `text` will be contained in exactly one of the items in the returned list; the generated list of items will be in logical order (the start offsets of the items are ascending).

`cached_iter` should be an iterator over `attrs` currently positioned at a range before or containing `start_index`; `cached_iter` will be advanced to the range covering the position just after `start_index` + `length`. (i.e. if itemizing in a loop, just keep passing in the same `cached_iter`).

#### Parameters

`context`

  Type: `PangoContext`

  A structure holding information that affects the itemization process.

  The data is owned by the caller of the function.

`text`

  Type: `const char*`

  The text to itemize. Must be valid UTF-8.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`start_index`

  Type: `int`

  First byte in `text` to process.

`length`

  Type: `int`

  The number of bytes (not characters) to process after `start_index`. This must be >= 0.

`attrs`

  Type: `PangoAttrList`

  The set of attributes that apply to `text`.

  The data is owned by the caller of the function.

`cached_iter`

  Type: `PangoAttrIterator`

  Cached attribute iterator.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: A list of `PangoItem*`

A `GList` of `PangoItem` structures. The items should be freed using `pango_item_free()` in combination with `g_list_free_full()`.

The caller of the function takes ownership of the data, and is responsible for freeing it.