InfText.ChunkIter

Fields

Name

Type

Access

Description

chunk

InfText.Chunk

r

first

GLib.SequenceIter

r

second

GLib.SequenceIter

r

Methods

copy ()

free ()

get_author ()

get_bytes ()

get_length ()

get_offset ()

get_text ()

next ()

prev ()

Details

class InfText.ChunkIter

InfText.ChunkIter is an opaque data type. You should only access it via the public API functions.

InfText.ChunkIter can be safely allocated on the stack and copied by value. Use InfText.Chunk.iter_init_begin() or InfText.Chunk.iter_init_end() to initialize a InfText.ChunkIter. There is no deinitialization required. A InfText.ChunkIter is valid as long as the chunk is not modified.

copy()
Returns:

A copy of self. Free with InfText.ChunkIter.free().

Return type:

InfText.ChunkIter

Makes a dynamically-allocated copy of self. This is typically not needed because InfText.ChunkIter can be copied by value, however it might be useful to language bindings.

free()

Frees all resources allocated with InfText.ChunkIter.copy(). Must not be used with stack-allocated InfText.ChunkIter s.

get_author()
Returns:

The user ID of the author of the segment self points to.

Return type:

int

Returns the user ID of the author of the segment self points to.

get_bytes()
Returns:

The number of bytes in the segment self points to.

Return type:

int

Returns the number of bytes in the segment self points to.

get_length()
Returns:

The number of characters in the segment self points to.

Return type:

int

Returns the number of characters in the segment self points to.

get_offset()
Returns:

The offset of the first characters in the segment self points to.

Return type:

int

Returns the offset of the first character in the segment self points to.

get_text()
Returns:

The text of the segment self points to.

Return type:

object or None

Returns the text of the segment self points to. The text is in the underlaying InfText.Chunk's encoding.

next()
Returns:

Whether self was set.

Return type:

bool

Sets self to point to the next segment. If self already points to the last segment, the function returns False.

prev()
Returns:

Whether self has changed.

Return type:

bool

Sets self to point to the previous segment. If self already points to the first segment, the function returns False.