Method

PangoAttrListsplice

Declaration [src]

void
pango_attr_list_splice (
  PangoAttrList* list,
  PangoAttrList* other,
  int pos,
  int len
)

Description [src]

This function opens up a hole in list, fills it in with attributes from the left, and then merges other on top of the hole.

This operation is equivalent to stretching every attribute that applies at position pos in list by an amount len, and then calling pango_attr_list_change() with a copy of each attribute in other in sequence (offset in position by pos, and limited in length to len).

This operation proves useful for, for instance, inserting a pre-edit string in the middle of an edit buffer.

For backwards compatibility, the function behaves differently when len is 0. In this case, the attributes from other are not imited to len, and are just overlayed on top of list.

This mode is useful for merging two lists of attributes together.

Parameters

other

Type: PangoAttrList

Another PangoAttrList

The data is owned by the caller of the function.
pos

Type: int

The position in list at which to insert other.

len

Type: int

The length of the spliced segment. (Note that this must be specified since the attributes in other may only be present at some subsection of this range)