Package org.gnome.pango
Class ScriptIter
java.lang.Object
org.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
ConstructorsConstructorDescriptionScriptIter(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 org.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 iftextis nul-terminated- Since:
- 1.4
-
-
Method Details
-
getType
-
free
public void free()Frees aPangoScriptIter.- Since:
- 1.4
-
getRange
public void getRange(@Nullable Out<String> start, @Nullable Out<String> end, @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
scriptargument is declared asPangoScript, as of Pango 1.18, this function simply returnsGUnicodeScriptvalues. 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- Since:
- 1.4
-
next
public boolean next()Advances aPangoScriptIterto the next range.If this ScriptIter is already at the end, it is left unchanged and
falseis returned.- Returns:
trueif this ScriptIter was successfully advanced- Since:
- 1.4
-