Class NkNineSlice

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NkNineSlice>
org.lwjgl.nuklear.NkNineSlice
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class NkNineSlice extends org.lwjgl.system.Struct<NkNineSlice> implements org.lwjgl.system.NativeResource

Layout


 struct nk_nine_slice {
     struct nk_image img;
     nk_ushort l;
     nk_ushort t;
     nk_ushort r;
     nk_ushort b;
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of NkNineSlice structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    The struct member offsets.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a NkNineSlice instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    short
    b()
     
    b(short value)
    Sets the specified value to the b field.
    Returns a new NkNineSlice instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new NkNineSlice.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new NkNineSlice.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new NkNineSlice instance allocated on the specified MemoryStack and initializes all its bits to zero.
    Returns a new NkNineSlice instance allocated with BufferUtils.
    create(int capacity)
    Returns a new NkNineSlice.Buffer instance allocated with BufferUtils.
    create(long address)
    Returns a new NkNineSlice instance for the specified memory address.
    create(long address, int capacity)
    Create a NkNineSlice.Buffer instance at the specified memory.
    static @Nullable NkNineSlice
    createSafe(long address)
    Like create, but returns null if address is NULL.
    static @Nullable NkNineSlice.Buffer
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    img()
     
    img(Consumer<NkImage> consumer)
    Passes the img field to the specified Consumer.
    img(NkImage value)
    Copies the specified NkImage to the img field.
    short
    l()
     
    l(short value)
    Sets the specified value to the l field.
    Returns a new NkNineSlice instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new NkNineSlice.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new NkNineSlice.Buffer instance allocated on the specified MemoryStack.
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new NkNineSlice instance allocated on the specified MemoryStack.
    static short
    nb(long struct)
    Unsafe version of b().
    static void
    nb(long struct, short value)
    Unsafe version of b.
    static NkImage
    nimg(long struct)
    Unsafe version of img().
    static void
    nimg(long struct, NkImage value)
    Unsafe version of img.
    static short
    nl(long struct)
    Unsafe version of l().
    static void
    nl(long struct, short value)
    Unsafe version of l.
    static short
    nr(long struct)
    Unsafe version of r().
    static void
    nr(long struct, short value)
    Unsafe version of r.
    static short
    nt(long struct)
    Unsafe version of t().
    static void
    nt(long struct, short value)
    Unsafe version of t.
    short
    r()
     
    r(short value)
    Sets the specified value to the r field.
    set(NkImage img, short l, short t, short r, short b)
    Initializes this struct with the specified values.
    Copies the specified struct data to this struct.
    int
     
    short
    t()
     
    t(short value)
    Sets the specified value to the t field.

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

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

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

      public static final int IMG
      The struct member offsets.
    • L

      public static final int L
      The struct member offsets.
    • T

      public static final int T
      The struct member offsets.
    • R

      public static final int R
      The struct member offsets.
    • B

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

    • NkNineSlice

      public NkNineSlice(ByteBuffer container)
      Creates a NkNineSlice 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<NkNineSlice>
    • img

      public NkImage img()
      Returns:
      a NkImage view of the img field.
    • l

      public short l()
      Returns:
      the value of the l field.
    • t

      public short t()
      Returns:
      the value of the t field.
    • r

      public short r()
      Returns:
      the value of the r field.
    • b

      public short b()
      Returns:
      the value of the b field.
    • img

      public NkNineSlice img(NkImage value)
      Copies the specified NkImage to the img field.
    • img

      public NkNineSlice img(Consumer<NkImage> consumer)
      Passes the img field to the specified Consumer.
    • l

      public NkNineSlice l(short value)
      Sets the specified value to the l field.
    • t

      public NkNineSlice t(short value)
      Sets the specified value to the t field.
    • r

      public NkNineSlice r(short value)
      Sets the specified value to the r field.
    • b

      public NkNineSlice b(short value)
      Sets the specified value to the b field.
    • set

      public NkNineSlice set(NkImage img, short l, short t, short r, short b)
      Initializes this struct with the specified values.
    • set

      public NkNineSlice set(NkNineSlice src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static NkNineSlice malloc()
      Returns a new NkNineSlice instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static NkNineSlice calloc()
      Returns a new NkNineSlice instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static NkNineSlice create()
      Returns a new NkNineSlice instance allocated with BufferUtils.
    • create

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

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

      public static NkNineSlice.Buffer malloc(int capacity)
      Returns a new NkNineSlice.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static NkNineSlice.Buffer calloc(int capacity)
      Returns a new NkNineSlice.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static NkNineSlice.Buffer create(int capacity)
      Returns a new NkNineSlice.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

      public static NkNineSlice malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new NkNineSlice instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static NkNineSlice calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new NkNineSlice instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static NkNineSlice.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new NkNineSlice.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static NkNineSlice.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new NkNineSlice.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nimg

      public static NkImage nimg(long struct)
      Unsafe version of img().
    • nl

      public static short nl(long struct)
      Unsafe version of l().
    • nt

      public static short nt(long struct)
      Unsafe version of t().
    • nr

      public static short nr(long struct)
      Unsafe version of r().
    • nb

      public static short nb(long struct)
      Unsafe version of b().
    • nimg

      public static void nimg(long struct, NkImage value)
      Unsafe version of img.
    • nl

      public static void nl(long struct, short value)
      Unsafe version of l.
    • nt

      public static void nt(long struct, short value)
      Unsafe version of t.
    • nr

      public static void nr(long struct, short value)
      Unsafe version of r.
    • nb

      public static void nb(long struct, short value)
      Unsafe version of b.