Class NkChartSlot

All Implemented Interfaces:
Pointer

public class NkChartSlot extends Struct<NkChartSlot>

Layout


 struct nk_chart_slot {
     enum nk_chart_type type;
     struct nk_color color;
     struct nk_color highlight;
     float min;
     float max;
     float range;
     int count;
     struct nk_vec2 last;
     int index;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • COLOR

      public static final int COLOR
      The struct member offsets.
    • HIGHLIGHT

      public static final int HIGHLIGHT
      The struct member offsets.
    • MIN

      public static final int MIN
      The struct member offsets.
    • MAX

      public static final int MAX
      The struct member offsets.
    • RANGE

      public static final int RANGE
      The struct member offsets.
    • COUNT

      public static final int COUNT
      The struct member offsets.
    • LAST

      public static final int LAST
      The struct member offsets.
    • INDEX

      public static final int INDEX
      The struct member offsets.
  • Constructor Details

    • NkChartSlot

      public NkChartSlot(ByteBuffer container)
      Creates a NkChartSlot instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<NkChartSlot>
    • type

      public int type()
      Returns:
      the value of the type field.
    • color

      public NkColor color()
      Returns:
      a NkColor view of the color field.
    • highlight

      public NkColor highlight()
      Returns:
      a NkColor view of the highlight field.
    • min

      public float min()
      Returns:
      the value of the min field.
    • max

      public float max()
      Returns:
      the value of the max field.
    • range

      public float range()
      Returns:
      the value of the range field.
    • count

      public int count()
      Returns:
      the value of the count field.
    • last

      public NkVec2 last()
      Returns:
      a NkVec2 view of the last field.
    • index

      public int index()
      Returns:
      the value of the index field.
    • create

      public static NkChartSlot create(long address)
      Returns a new NkChartSlot instance for the specified memory address.
    • createSafe

      @Nullable public static NkChartSlot createSafe(long address)
      Like create, but returns null if address is NULL.
    • create

      public static NkChartSlot.Buffer create(long address, int capacity)
      Create a NkChartSlot.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static NkChartSlot.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • ncolor

      public static NkColor ncolor(long struct)
      Unsafe version of color().
    • nhighlight

      public static NkColor nhighlight(long struct)
      Unsafe version of highlight().
    • nmin

      public static float nmin(long struct)
      Unsafe version of min().
    • nmax

      public static float nmax(long struct)
      Unsafe version of max().
    • nrange

      public static float nrange(long struct)
      Unsafe version of range().
    • ncount

      public static int ncount(long struct)
      Unsafe version of count().
    • nlast

      public static NkVec2 nlast(long struct)
      Unsafe version of last().
    • nindex

      public static int nindex(long struct)
      Unsafe version of index().