Class JAWT

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


    public class JAWT
    extends Struct
    Structure for containing native AWT functions.

    Member documentation

    • version – Version of this structure. This must always be set before calling JAWT_GetAWT()

    Layout

    struct JAWT {
        jint version;
        void * GetDrawingSurface;
        void * FreeDrawingSurface;
        void * Lock;
        void * Unlock;
        void * GetComponent;
    }
    • Field Detail

      • SIZEOF

        public static final int SIZEOF
        The struct size in bytes.
    • Constructor Detail

      • JAWT

        public JAWT(java.nio.ByteBuffer container)
        Creates a JAWT 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 the sizeof(struct).
        Specified by:
        sizeof in class Struct
      • version

        public int version()
        Returns the value of the version field.
      • GetDrawingSurface

        public long GetDrawingSurface()
        Returns the value of the GetDrawingSurface field.
      • FreeDrawingSurface

        public long FreeDrawingSurface()
        Returns the value of the FreeDrawingSurface field.
      • Lock

        public long Lock()
        Returns the value of the Lock field.
      • Unlock

        public long Unlock()
        Returns the value of the Unlock field.
      • GetComponent

        public long GetComponent()
        Returns the value of the GetComponent field.
      • version

        public JAWT version(int value)
        Sets the specified value to the version field.
      • GetDrawingSurface

        public JAWT GetDrawingSurface(long value)
        Sets the specified value to the GetDrawingSurface field.
      • FreeDrawingSurface

        public JAWT FreeDrawingSurface(long value)
        Sets the specified value to the FreeDrawingSurface field.
      • Lock

        public JAWT Lock(long value)
        Sets the specified value to the Lock field.
      • Unlock

        public JAWT Unlock(long value)
        Sets the specified value to the Unlock field.
      • GetComponent

        public JAWT GetComponent(long value)
        Sets the specified value to the GetComponent field.
      • set

        public JAWT set(int version,
                        long GetDrawingSurface,
                        long FreeDrawingSurface,
                        long Lock,
                        long Unlock,
                        long GetComponent)
        Initializes this struct with the specified values.
      • nset

        public JAWT nset(long struct)
        Unsafe version of set.
      • set

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

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

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

        public static JAWT create(long address)
        Returns a new JAWT instance for the specified memory address or null if the address is NULL.
      • malloc

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

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

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

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

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

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

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

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

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

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

        public static JAWT.Buffer callocStack(int capacity,
                                              MemoryStack stack)
        Returns a new JAWT.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