Class ScriptIter

All Implemented Interfaces:
PointerInterface

public class ScriptIter extends Record
A `PangoScriptIter` is used to iterate through a string
and identify ranges in different scripts.

https://docs.gtk.org/Pango/struct.ScriptIter.html

  • Constructor Details

    • ScriptIter

      public ScriptIter(PointerContainer pointer)
    • ScriptIter

      public ScriptIter(@Nonnull Str text, int length)
      Create a new `PangoScriptIter`, 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 with
      [method@Pango.ScriptIter.free].
      Parameters:
      text - a UTF-8 string
      length - length of @text, or -1 if @text is nul-terminated
    • ScriptIter

      public ScriptIter(String text, int length)
      Create a new `PangoScriptIter`, 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 with
      [method@Pango.ScriptIter.free].
      Parameters:
      text - a UTF-8 string
      length - length of @text, or -1 if @text is nul-terminated
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • free

      public void free()
      Frees a `PangoScriptIter`.
    • getRange

      public void getRange(@Nullable Strs start, @Nullable Strs end, @Nullable Int script)
      Gets information about the range to which @iter 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
      as `PangoScript`, as of Pango 1.18, this function simply returns
      `GUnicodeScript` values. Callers must be prepared to handle unknown
      values.
      Parameters:
      start - location to store start position of the range
      end - location to store end position of the range
      script - location to store script for range
    • next

      public boolean next()
      Advances a `PangoScriptIter` to the next range.

      If @iter is already at the end, it is left unchanged
      and %FALSE is returned.
      Returns:
      %TRUE if @iter was successfully advanced
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()