Class LineBreakerNatives

java.lang.Object
org.robolectric.nativeruntime.LineBreakerNatives

public final class LineBreakerNatives
extends Object
Native methods for LineBreaker JNI registration.

Native method signatures are derived from https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/graphics/java/android/graphics/text/LineBreaker.java

  • Method Summary

    Modifier and Type Method Description
    static long nComputeLineBreaks​(long nativePtr, char[] text, long measuredTextPtr, int length, float firstWidth, int firstWidthLineCount, float restWidth, float[] variableTabStops, float defaultTabStop, int indentsOffset)  
    static int nComputeLineBreaksP​(long nativePtr, char[] text, long measuredTextPtr, int length, float firstWidth, int firstWidthLineCount, float restWidth, float[] variableTabStops, float defaultTabStop, int indentsOffset, Object recycle, int recycleLength, int[] recycleBreaks, float[] recycleWidths, float[] recycleAscents, float[] recycleDescents, int[] recycleFlags, float[] charWidths)  
    static void nFinishP​(long nativePtr)  
    static float nGetLineAscent​(long ptr, int idx)  
    static int nGetLineBreakOffset​(long ptr, int idx)  
    static int nGetLineCount​(long ptr)  
    static float nGetLineDescent​(long ptr, int idx)  
    static int nGetLineFlag​(long ptr, int idx)  
    static float nGetLineWidth​(long ptr, int idx)  
    static long nGetReleaseFunc()  
    static long nGetReleaseResultFunc()  
    static long nInit​(int breakStrategy, int hyphenationFrequency, boolean isJustified, int[] indents)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • nInit

      public static long nInit​(int breakStrategy, int hyphenationFrequency, boolean isJustified, int[] indents)
    • nGetReleaseFunc

      public static long nGetReleaseFunc()
    • nComputeLineBreaks

      public static long nComputeLineBreaks​(long nativePtr, char[] text, long measuredTextPtr, int length, float firstWidth, int firstWidthLineCount, float restWidth, float[] variableTabStops, float defaultTabStop, int indentsOffset)
    • nComputeLineBreaksP

      public static int nComputeLineBreaksP​(long nativePtr, char[] text, long measuredTextPtr, int length, float firstWidth, int firstWidthLineCount, float restWidth, float[] variableTabStops, float defaultTabStop, int indentsOffset, Object recycle, int recycleLength, int[] recycleBreaks, float[] recycleWidths, float[] recycleAscents, float[] recycleDescents, int[] recycleFlags, float[] charWidths)
    • nGetLineCount

      public static int nGetLineCount​(long ptr)
    • nGetLineBreakOffset

      public static int nGetLineBreakOffset​(long ptr, int idx)
    • nGetLineWidth

      public static float nGetLineWidth​(long ptr, int idx)
    • nGetLineAscent

      public static float nGetLineAscent​(long ptr, int idx)
    • nGetLineDescent

      public static float nGetLineDescent​(long ptr, int idx)
    • nGetLineFlag

      public static int nGetLineFlag​(long ptr, int idx)
    • nGetReleaseResultFunc

      public static long nGetReleaseResultFunc()
    • nFinishP

      public static void nFinishP​(long nativePtr)