Class NkUserFont

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • USERDATA, HEIGHT, WIDTH, QUERY, TEXTURE

        The struct member offsets.
    • Constructor Detail

      • NkUserFont

        public NkUserFont​(java.nio.ByteBuffer container)
        Creates a NkUserFont 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
      • userdata

        public NkHandle userdata()
        user provided font handle
      • height

        public float height()
        max height of the font
      • texture

        public NkHandle texture()
        texture handle to the used font atlas or texture
      • userdata

        public NkUserFont userdata​(java.util.function.Consumer<NkHandle> consumer)
        Passes the userdata() field to the specified Consumer.
      • height

        public NkUserFont height​(float value)
        Sets the specified value to the height() field.
      • texture

        public NkUserFont texture​(java.util.function.Consumer<NkHandle> consumer)
        Passes the texture() field to the specified Consumer.
      • set

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

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

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

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

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

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

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

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

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

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

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

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

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

        @Deprecated
        public static NkUserFont.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 NkUserFont.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 NkUserFont malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new NkUserFont instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

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

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

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

        public static NkHandle nuserdata​(long struct)
        Unsafe version of userdata().
      • nheight

        public static float nheight​(long struct)
        Unsafe version of height().
      • ntexture

        public static NkHandle ntexture​(long struct)
        Unsafe version of texture().
      • nuserdata

        public static void nuserdata​(long struct,
                                     NkHandle value)
        Unsafe version of userdata.
      • nheight

        public static void nheight​(long struct,
                                   float value)
        Unsafe version of height.
      • ntexture

        public static void ntexture​(long struct,
                                    NkHandle value)
        Unsafe version of texture.