Class UIRect

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<UIRect>
org.lwjgl.nanovg.UIRect
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class UIRect extends org.lwjgl.system.Struct<UIRect> implements org.lwjgl.system.NativeResource
layout rectangle

Layout


 struct UIrect {
     union {
         int v[4];
         struct {
             int x;
             int y;
             int w;
             int h;
         };
     };
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of UIRect structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

    org.lwjgl.system.Pointer.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.

    Fields inherited from interface org.lwjgl.system.Pointer

    BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    UIRect(ByteBuffer container)
    Creates a UIRect instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    static UIRect
    Returns a new UIRect instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new UIRect.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new UIRect.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static UIRect
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new UIRect instance allocated on the specified MemoryStack and initializes all its bits to zero.
    static UIRect
    Deprecated.
    callocStack(int capacity)
    Deprecated.
    callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static UIRect
    callocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static UIRect
    Returns a new UIRect instance allocated with BufferUtils.
    create(int capacity)
    Returns a new UIRect.Buffer instance allocated with BufferUtils.
    static UIRect
    create(long address)
    Returns a new UIRect instance for the specified memory address.
    create(long address, int capacity)
    Create a UIRect.Buffer instance at the specified memory.
    static UIRect
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    int
    h()
     
    h(int value)
    Sets the specified value to the h field.
    static UIRect
    Returns a new UIRect instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new UIRect.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new UIRect.Buffer instance allocated on the specified MemoryStack.
    static UIRect
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new UIRect instance allocated on the specified MemoryStack.
    static UIRect
    Deprecated.
    mallocStack(int capacity)
    Deprecated.
    mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static UIRect
    mallocStack(org.lwjgl.system.MemoryStack stack)
    Deprecated.
    static int
    nh(long struct)
    Unsafe version of h().
    static void
    nh(long struct, int value)
    Unsafe version of h.
    static IntBuffer
    nv(long struct)
    Unsafe version of v().
    static int
    nv(long struct, int index)
    Unsafe version of v.
    static void
    nv(long struct, int index, int value)
    Unsafe version of v.
    static void
    nv(long struct, IntBuffer value)
    Unsafe version of v.
    static int
    nw(long struct)
    Unsafe version of w().
    static void
    nw(long struct, int value)
    Unsafe version of w.
    static int
    nx(long struct)
    Unsafe version of x().
    static void
    nx(long struct, int value)
    Unsafe version of x.
    static int
    ny(long struct)
    Unsafe version of y().
    static void
    ny(long struct, int value)
    Unsafe version of y.
    set(UIRect src)
    Copies the specified struct data to this struct.
    int
     
    v()
     
    int
    v(int index)
     
    v(int index, int value)
    Sets the specified value at the specified index of the v field.
    v(IntBuffer value)
    Copies the specified IntBuffer to the v field.
    int
    w()
     
    w(int value)
    Sets the specified value to the w field.
    int
    x()
     
    x(int value)
    Sets the specified value to the x field.
    int
    y()
     
    y(int value)
    Sets the specified value to the y field.

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

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

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

      public static final int V
      The struct member offsets.
    • X

      public static final int X
      The struct member offsets.
    • Y

      public static final int Y
      The struct member offsets.
    • W

      public static final int W
      The struct member offsets.
    • H

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

    • UIRect

      public UIRect(ByteBuffer container)
      Creates a UIRect 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<UIRect>
    • v

      public IntBuffer v()
      Returns:
      a IntBuffer view of the v field.
    • v

      public int v(int index)
      Returns:
      the value at the specified index of the v field.
    • x

      public int x()
      Returns:
      the value of the x field.
    • y

      public int y()
      Returns:
      the value of the y field.
    • w

      public int w()
      Returns:
      the value of the w field.
    • h

      public int h()
      Returns:
      the value of the h field.
    • v

      public UIRect v(IntBuffer value)
      Copies the specified IntBuffer to the v field.
    • v

      public UIRect v(int index, int value)
      Sets the specified value at the specified index of the v field.
    • x

      public UIRect x(int value)
      Sets the specified value to the x field.
    • y

      public UIRect y(int value)
      Sets the specified value to the y field.
    • w

      public UIRect w(int value)
      Sets the specified value to the w field.
    • h

      public UIRect h(int value)
      Sets the specified value to the h field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static IntBuffer nv(long struct)
      Unsafe version of v().
    • nv

      public static int nv(long struct, int index)
      Unsafe version of v.
    • nx

      public static int nx(long struct)
      Unsafe version of x().
    • ny

      public static int ny(long struct)
      Unsafe version of y().
    • nw

      public static int nw(long struct)
      Unsafe version of w().
    • nh

      public static int nh(long struct)
      Unsafe version of h().
    • nv

      public static void nv(long struct, IntBuffer value)
      Unsafe version of v.
    • nv

      public static void nv(long struct, int index, int value)
      Unsafe version of v.
    • nx

      public static void nx(long struct, int value)
      Unsafe version of x.
    • ny

      public static void ny(long struct, int value)
      Unsafe version of y.
    • nw

      public static void nw(long struct, int value)
      Unsafe version of w.
    • nh

      public static void nh(long struct, int value)
      Unsafe version of h.