Package org.gnome.pango
Class ScriptIter
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.pango.ScriptIter
- All Implemented Interfaces:
Proxy
A
PangoScriptIter
is used to iterate through a string
and identify ranges in different scripts.-
Constructor Summary
ConstructorDescriptionScriptIter
(MemorySegment address) Create a ScriptIter proxy instance for the provided memory address.ScriptIter
(String text, int length) Create a newPangoScriptIter
, used to break a string of Unicode text into runs by Unicode script. -
Method Summary
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ScriptIter
Create a ScriptIter proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
ScriptIter
Create a newPangoScriptIter
, used to break a string of Unicode text into runs by Unicode script.No copy is made of
text
, so the caller needs to make sure it remains valid until the iterator is freed withfree()
.- Parameters:
text
- a UTF-8 stringlength
- length oftext
, or -1 iftext
is nul-terminated
-
-
Method Details
-
getType
-
free
public void free()Frees aPangoScriptIter
. -
getRange
public void getRange(@Nullable @Nullable Out<String> start, @Nullable @Nullable Out<String> end, @Nullable @Nullable Out<Script> script) Gets information about the range to which this ScriptIter currently points.The range is the set of locations p where *start <= p < *end. (That is, it doesn't include the character stored at *end)
Note that while the type of the
script
argument is declared asPangoScript
, as of Pango 1.18, this function simply returnsGUnicodeScript
values. Callers must be prepared to handle unknown values.- Parameters:
start
- location to store start position of the rangeend
- location to store end position of the rangescript
- location to store script for range
-
next
public boolean next()Advances aPangoScriptIter
to the next range.If this ScriptIter is already at the end, it is left unchanged and
false
is returned.- Returns:
true
if this ScriptIter was successfully advanced
-