Class NkStyleItem

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

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

Layout


 struct nk_style_item {
     enum nk_style_item_type type();
     union nk_style_item_data data();
 }
  • 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.
    • DATA

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

    • NkStyleItem

      public NkStyleItem(ByteBuffer container)
      Creates a NkStyleItem 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<NkStyleItem>
    • type

      public int type()
    • data

      public NkStyleItemData data()
      the style data
    • type

      public NkStyleItem type(int value)
      Sets the specified value to the type() field.
    • data

      public NkStyleItem data(NkStyleItemData value)
      Copies the specified NkStyleItemData to the data() field.
    • data

      public NkStyleItem data(Consumer<NkStyleItemData> consumer)
      Passes the data() field to the specified Consumer.
    • set

      public NkStyleItem set(int type, NkStyleItemData data)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static NkStyleItem mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static NkStyleItem callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static NkStyleItem mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static NkStyleItem callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static NkStyleItem.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static NkStyleItem.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static NkStyleItem.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static NkStyleItem.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

      public static NkStyleItem.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new NkStyleItem.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
    • ntype

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

      public static NkStyleItemData ndata(long struct)
      Unsafe version of data().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • ndata

      public static void ndata(long struct, NkStyleItemData value)
      Unsafe version of data.