Class NkNineSlice

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class NkNineSlice
    extends org.lwjgl.system.Struct
    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  NkNineSlice.Buffer
      An array of NkNineSlice structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

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

        org.lwjgl.system.Struct.StructValidation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int B
      IMG
      L
      R
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int T
      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
      NkNineSlice​(java.nio.ByteBuffer container)
      Creates a NkNineSlice instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      short b()  
      NkNineSlice b​(short value)
      Sets the specified value to the b field.
      static NkNineSlice calloc()
      Returns a new NkNineSlice instance allocated with memCalloc.
      static NkNineSlice.Buffer calloc​(int capacity)
      Returns a new NkNineSlice.Buffer instance allocated with memCalloc.
      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.
      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.
      static NkNineSlice create()
      Returns a new NkNineSlice instance allocated with BufferUtils.
      static NkNineSlice.Buffer create​(int capacity)
      Returns a new NkNineSlice.Buffer instance allocated with BufferUtils.
      static NkNineSlice create​(long address)
      Returns a new NkNineSlice instance for the specified memory address.
      static NkNineSlice.Buffer create​(long address, int capacity)
      Create a NkNineSlice.Buffer instance at the specified memory.
      static NkNineSlice createSafe​(long address)
      Like create, but returns null if address is NULL.
      static NkNineSlice.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      NkImage img()  
      NkNineSlice img​(java.util.function.Consumer<NkImage> consumer)
      Passes the img field to the specified Consumer.
      NkNineSlice img​(NkImage value)
      Copies the specified NkImage to the img field.
      short l()  
      NkNineSlice l​(short value)
      Sets the specified value to the l field.
      static NkNineSlice malloc()
      Returns a new NkNineSlice instance allocated with memAlloc.
      static NkNineSlice.Buffer malloc​(int capacity)
      Returns a new NkNineSlice.Buffer instance allocated with memAlloc.
      static NkNineSlice.Buffer malloc​(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new NkNineSlice.Buffer instance allocated on the specified MemoryStack.
      static NkNineSlice 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()  
      NkNineSlice r​(short value)
      Sets the specified value to the r field.
      NkNineSlice set​(NkImage img, short l, short t, short r, short b)
      Initializes this struct with the specified values.
      NkNineSlice set​(NkNineSlice src)
      Copies the specified struct data to this struct.
      int sizeof()  
      short t()  
      NkNineSlice t​(short value)
      Sets the specified value to the t field.
      • Methods inherited from interface org.lwjgl.system.NativeResource

        close, free
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull, validate
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • IMG, L, T, R, B

        The struct member offsets.
    • Constructor Detail

      • NkNineSlice

        public NkNineSlice​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • 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​(java.util.function.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

        @Nullable
        public static 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

        @Nullable
        public static 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.