Class NkClipboard

    • 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class 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​(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.
      • 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​(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​(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
      • 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
      • callocStack

        public static NkClipboard.Buffer callocStack​(int capacity,
                                                     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.