Package ch.bailu.gtk.pango
Class AttrIterator
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.pango.AttrIterator
- All Implemented Interfaces:
PointerInterface
A `PangoAttrIterator` is used to iterate through a `PangoAttrList`.
A new iterator is created with [method@Pango.AttrList.get_iterator].
Once the iterator is created, it can be advanced through the style
changes in the text using [method@Pango.AttrIterator.next]. At each
style change, the range of the current style segment and the attributes
currently in effect can be queried.
A new iterator is created with [method@Pango.AttrList.get_iterator].
Once the iterator is created, it can be advanced through the style
changes in the text using [method@Pango.AttrIterator.next]. At each
style change, the range of the current style segment and the attributes
currently in effect can be queried.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Copy a `PangoAttrIterator`.void
destroy()
Destroy a `PangoAttrIterator` and free all associated memory.get
(int type) Find the current attribute of a particular type
at the iterator location.getAttrs()
Gets a list of all attributes at the current position of the
iterator.static ClassHandler
static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
boolean
next()
Advance the iterator until the next change of style.void
Get the range of the current segment.Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
AttrIterator
-
-
Method Details
-
getClassHandler
-
copy
Copy a `PangoAttrIterator`.- Returns:
- the newly allocated `PangoAttrIterator`, which should be freed with [method@Pango.AttrIterator.destroy]
-
destroy
public void destroy()Destroy a `PangoAttrIterator` and free all associated memory. -
get
Find the current attribute of a particular type
at the iterator location.
When multiple attributes of the same type overlap,
the attribute whose range starts closest to the
current location is used.- Parameters:
type
- the type of attribute to find- Returns:
- the current attribute of the given type, or %NULL if no attribute of that type applies to the current location.
-
getAttrs
Gets a list of all attributes at the current position of the
iterator.- Returns:
- a list of all attributes for the current range. To free this value, call [method@Pango.Attribute.destroy] on each value and g_slist_free() on the list.
-
next
public boolean next()Advance the iterator until the next change of style.- Returns:
- %FALSE if the iterator is at the end of the list, otherwise %TRUE
-
range
Get the range of the current segment.
Note that the stored return values are signed, not unsigned
like the values in `PangoAttribute`. To deal with this API
oversight, stored return values that wouldn't fit into
a signed integer are clamped to %G_MAXINT.- Parameters:
start
- location to store the start of the rangeend
- location to store the end of the range
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-