Class ParSLViewport

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ParSLViewport extends Struct<ParSLViewport> implements NativeResource

 struct parsl_viewport {
     float left;
     float top;
     float right;
     float bottom;
 }
  • Field Details

    • SIZEOF

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

      public static final int ALIGNOF
      The struct alignment in bytes.
    • LEFT

      public static final int LEFT
      The struct member offsets.
    • TOP

      public static final int TOP
      The struct member offsets.
    • BOTTOM

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

    • ParSLViewport

      public ParSLViewport(ByteBuffer container)
      Creates a ParSLViewport 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<ParSLViewport>
    • left

      public float left()
      Returns:
      the value of the left field.
    • top

      public float top()
      Returns:
      the value of the top field.
    • right

      public float right()
      Returns:
      the value of the right field.
    • bottom

      public float bottom()
      Returns:
      the value of the bottom field.
    • left

      public ParSLViewport left(float value)
      Sets the specified value to the left field.
    • top

      public ParSLViewport top(float value)
      Sets the specified value to the top field.
    • right

      public ParSLViewport right(float value)
      Sets the specified value to the right field.
    • bottom

      public ParSLViewport bottom(float value)
      Sets the specified value to the bottom field.
    • set

      public ParSLViewport set(float left, float top, float right, float bottom)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static ParSLViewport.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new ParSLViewport.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
    • nleft

      public static float nleft(long struct)
      Unsafe version of left().
    • ntop

      public static float ntop(long struct)
      Unsafe version of top().
    • nright

      public static float nright(long struct)
      Unsafe version of right().
    • nbottom

      public static float nbottom(long struct)
      Unsafe version of bottom().
    • nleft

      public static void nleft(long struct, float value)
      Unsafe version of left.
    • ntop

      public static void ntop(long struct, float value)
      Unsafe version of top.
    • nright

      public static void nright(long struct, float value)
      Unsafe version of right.
    • nbottom

      public static void nbottom(long struct, float value)
      Unsafe version of bottom.