Class Coverage

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class Coverage extends GObject

A PangoCoverage structure is a map from Unicode characters to Pango.CoverageLevel values.

It is often necessary in Pango to determine if a particular font can represent a particular character, and also how well it can represent that character. The PangoCoverage is a data structure that is used to represent that information. It is an opaque structure with no public fields.

  • Constructor Details

    • Coverage

      public Coverage(MemorySegment address)
      Create a Coverage instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Coverage

      public Coverage()
      Create a new Coverage.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Coverage class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Coverage asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • fromBytes

      @Deprecated public static @Nullable Coverage fromBytes(@Nullable byte @Nullable [] bytes)
      Deprecated.
      This returns null
      Convert data generated from toBytes(Out) back to a PangoCoverage.
      Parameters:
      bytes - binary data representing a PangoCoverage
      Returns:
      a newly allocated PangoCoverage
    • copy

      public Coverage copy()
      Copy an existing PangoCoverage.
      Returns:
      the newly allocated PangoCoverage, with a reference count of one, which should be freed with unref().
    • get

      public CoverageLevel get(int index)
      Determine whether a particular index is covered by coverage.
      Parameters:
      index - the index to check
      Returns:
      the coverage level of this Coverage for character index.
    • max

      @Deprecated public void max(Coverage other)
      Deprecated.
      This function does nothing
      Set the coverage for each index in this Coverage to be the max (better) value of the current coverage for the index and the coverage for the corresponding index in other.
      Parameters:
      other - another PangoCoverage
    • set

      public void set(int index, CoverageLevel level)
      Modify a particular index within this Coverage
      Parameters:
      index - the index to modify
      level - the new level for index
    • toBytes

      @Deprecated public void toBytes(@Nullable Out<byte[]> bytes)
      Deprecated.
      This returns null
      Convert a PangoCoverage structure into a flat binary format.
      Parameters:
      bytes - location to store result (must be freed with g_free())
    • unref

      @Deprecated public void unref()
      Deprecated.
      Use g_object_unref instead

      Decrease the reference count on the PangoCoverage by one.

      If the result is zero, free the coverage and all associated memory.

      Overrides:
      unref in class GObject
    • builder

      public static Coverage.Builder<? extends Coverage.Builder> builder()
      A Coverage.Builder object constructs a Coverage with the specified properties. Use the various set...() methods to set properties, and finish construction with Coverage.Builder.build().
      Returns:
      the builder object