Class NkClipboard

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

    public class NkClipboard
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Layout

    
     struct nk_clipboard {
         nk_handle userdata;
         nk_plugin_paste paste;
         nk_plugin_copy copy;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • USERDATA, PASTE, COPY

        The struct member offsets.
    • Constructor Detail

      • NkClipboard

        public NkClipboard​(java.nio.ByteBuffer container)
        Creates a NkClipboard 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()
        Returns a NkHandle view of the userdata field.
      • paste

        @Nullable
        public NkPluginPaste paste()
        Returns the value of the paste field.
      • copy

        @Nullable
        public NkPluginCopy copy()
        Returns the value of the copy field.
      • userdata

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

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

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

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

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

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

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

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

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

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

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

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

        public static NkClipboard mallocStack()
        Returns a new NkClipboard instance allocated on the thread-local MemoryStack.
      • callocStack

        public static NkClipboard callocStack()
        Returns a new NkClipboard instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static NkClipboard mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new NkClipboard instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

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

        public static NkClipboard.Buffer mallocStack​(int capacity)
        Returns a new NkClipboard.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static NkClipboard.Buffer callocStack​(int capacity)
        Returns a new NkClipboard.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

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

        @Nullable
        public static NkPluginCopy ncopy​(long struct)
        Unsafe version of copy().
      • nuserdata

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

        public static void npaste​(long struct,
                                  @Nullable
                                  NkPluginPasteI value)
        Unsafe version of paste.
      • ncopy

        public static void ncopy​(long struct,
                                 @Nullable
                                 NkPluginCopyI value)
        Unsafe version of copy.