W Wrapl, The Programming Language

Libraries:Gtk:Pango:AttrList

Types

T

Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



New() : Gtk.Pango.AttrList.T

Create a new empty attribute list with a reference count of one.

Returns the newly allocated T, which should be freed with Unref.


Methods

:"="(_ @ T, _ @ T)

:Change(self @ T, attr @ Gtk.Pango.Attribute.T) : Std.Object.T

Insert the given attribute into the T. It will replace any attributes of the same type on that segment and be merged with any adjoining attributes that are identical.

This function is slower than Insert for creating a attribute list in order (potentially much slower for large lists). However, Insert is not suitable for continually changing a set of attributes since it never removes or combines existing attributes.

list a T
attr the attribute to insert. Ownership of this value is assumed by the list.


:Copy(self @ T) : Gtk.Pango.AttrList.T

Copy list and return an identical new list.

list a T, may be NULL
Returns the newly allocated T, with a reference count of one, which should be freed with Unref. Returns NULL if list was NULL.


:Filter(self @ T, func @ Std.Function.T, data @ Std.Address.T) : Gtk.Pango.AttrList.T

Given a T and callback function, removes any elements of list for which func returns TRUE and inserts them into a new list.

list a T
func callback function; returns TRUE if an attribute should be filtered out. [scope call][closure data]
data Data to be passed to func. [closure]
Returns the new T or NULL if no attributes of the given types were found. [transfer full]


:GetIterator(self @ T) : Gtk.Pango.AttrIterator.T

Create a iterator initialized to the beginning of the list. list must not be modified until this iterator is freed.

list a T
Returns the newly allocated Gtk.Pango.AttrIterator.T, which should be freed with Gtk.Pango.AttrIterator.Destroy.


:Insert(self @ T, attr @ Gtk.Pango.Attribute.T) : Std.Object.T

Insert the given attribute into the T. It will be inserted after all other attributes with a matching start_index.

list a T
attr the attribute to insert. Ownership of this value is assumed by the list.


:InsertBefore(self @ T, attr @ Gtk.Pango.Attribute.T) : Std.Object.T

Insert the given attribute into the T. It will be inserted before all other attributes with a matching start_index.

list a T
attr the attribute to insert. Ownership of this value is assumed by the list.


:Ref(self @ T) : Gtk.Pango.AttrList.T

Increase the reference count of the given attribute list by one.

list a T, may be NULL
Returns The attribute list passed in


:Splice(self @ T, other @ Gtk.Pango.AttrList.T, pos @ Std.Integer.SmallT, len @ Std.Integer.SmallT) : Std.Object.T

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 Change with a copy of each attribute in other in sequence (offset in position by pos).

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

list a T
other another T
pos the position in list at which to insert other
len 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)


:Unref(self @ T) : Std.Object.T

Decrease the reference count of the given attribute list by one. If the result is zero, free the attribute list and the attributes it contains.

list a T, may be NULL


:"~="(_ @ T, _ @ T)