Package org.lwjgl.nanovg
Class UIRect
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.UIRect
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class UIRect extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
layout rectangleLayout
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
UIRect.Buffer
An array ofUIRect
structs.
-
Constructor Summary
Constructors Constructor Description UIRect(java.nio.ByteBuffer container)
Creates aUIRect
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UIRect
calloc()
Returns a newUIRect
instance allocated withmemCalloc
.static UIRect.Buffer
calloc(int capacity)
Returns a newUIRect.Buffer
instance allocated withmemCalloc
.static UIRect
callocStack()
Returns a newUIRect
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static UIRect.Buffer
callocStack(int capacity)
Returns a newUIRect.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static UIRect.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newUIRect.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static UIRect
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newUIRect
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static UIRect
create()
Returns a newUIRect
instance allocated withBufferUtils
.static UIRect.Buffer
create(int capacity)
Returns a newUIRect.Buffer
instance allocated withBufferUtils
.static UIRect
create(long address)
Returns a newUIRect
instance for the specified memory address.static UIRect.Buffer
create(long address, int capacity)
Create aUIRect.Buffer
instance at the specified memory.static UIRect
createSafe(long address)
static UIRect.Buffer
createSafe(long address, int capacity)
int
h()
Returns the value of theh
field.UIRect
h(int value)
Sets the specified value to theh
field.static UIRect
malloc()
Returns a newUIRect
instance allocated withmemAlloc
.static UIRect.Buffer
malloc(int capacity)
Returns a newUIRect.Buffer
instance allocated withmemAlloc
.static UIRect
mallocStack()
Returns a newUIRect
instance allocated on the thread-localMemoryStack
.static UIRect.Buffer
mallocStack(int capacity)
Returns a newUIRect.Buffer
instance allocated on the thread-localMemoryStack
.static UIRect.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newUIRect.Buffer
instance allocated on the specifiedMemoryStack
.static UIRect
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newUIRect
instance allocated on the specifiedMemoryStack
.static int
nh(long struct)
Unsafe version ofh()
.static void
nh(long struct, int value)
Unsafe version ofh
.static java.nio.IntBuffer
nv(long struct)
Unsafe version ofv()
.static int
nv(long struct, int index)
Unsafe version ofv
.static void
nv(long struct, int index, int value)
Unsafe version ofv
.static void
nv(long struct, java.nio.IntBuffer value)
Unsafe version ofv
.static int
nw(long struct)
Unsafe version ofw()
.static void
nw(long struct, int value)
Unsafe version ofw
.static int
nx(long struct)
Unsafe version ofx()
.static void
nx(long struct, int value)
Unsafe version ofx
.static int
ny(long struct)
Unsafe version ofy()
.static void
ny(long struct, int value)
Unsafe version ofy
.UIRect
set(UIRect src)
Copies the specified struct data to this struct.int
sizeof()
java.nio.IntBuffer
v()
Returns aIntBuffer
view of thev
field.int
v(int index)
Returns the value at the specified index of thev
field.UIRect
v(int index, int value)
Sets the specified value at the specified index of thev
field.UIRect
v(java.nio.IntBuffer value)
Copies the specifiedIntBuffer
to thev
field.int
w()
Returns the value of thew
field.UIRect
w(int value)
Sets the specified value to thew
field.int
x()
Returns the value of thex
field.UIRect
x(int value)
Sets the specified value to thex
field.int
y()
Returns the value of they
field.UIRect
y(int value)
Sets the specified value to they
field.
-
-
-
Constructor Detail
-
UIRect
public UIRect(java.nio.ByteBuffer container)
Creates aUIRect
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
v
public java.nio.IntBuffer v()
Returns aIntBuffer
view of thev
field.
-
v
public int v(int index)
Returns the value at the specified index of thev
field.
-
x
public int x()
Returns the value of thex
field.
-
y
public int y()
Returns the value of they
field.
-
w
public int w()
Returns the value of thew
field.
-
h
public int h()
Returns the value of theh
field.
-
v
public UIRect v(java.nio.IntBuffer value)
Copies the specifiedIntBuffer
to thev
field.
-
v
public UIRect v(int index, int value)
Sets the specified value at the specified index of thev
field.
-
x
public UIRect x(int value)
Sets the specified value to thex
field.
-
y
public UIRect y(int value)
Sets the specified value to they
field.
-
w
public UIRect w(int value)
Sets the specified value to thew
field.
-
h
public UIRect h(int value)
Sets the specified value to theh
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 newUIRect
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static UIRect calloc()
Returns a newUIRect
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static UIRect create()
Returns a newUIRect
instance allocated withBufferUtils
.
-
create
public static UIRect create(long address)
Returns a newUIRect
instance for the specified memory address.
-
createSafe
@Nullable public static UIRect createSafe(long address)
-
malloc
public static UIRect.Buffer malloc(int capacity)
Returns a newUIRect.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static UIRect.Buffer calloc(int capacity)
Returns a newUIRect.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static UIRect.Buffer create(int capacity)
Returns a newUIRect.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static UIRect.Buffer create(long address, int capacity)
Create aUIRect.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static UIRect.Buffer createSafe(long address, int capacity)
-
mallocStack
public static UIRect mallocStack()
Returns a newUIRect
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static UIRect callocStack()
Returns a newUIRect
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static UIRect mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newUIRect
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static UIRect callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newUIRect
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static UIRect.Buffer mallocStack(int capacity)
Returns a newUIRect.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static UIRect.Buffer callocStack(int capacity)
Returns a newUIRect.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static UIRect.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newUIRect.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static UIRect.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newUIRect.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nv
public static java.nio.IntBuffer nv(long struct)
Unsafe version ofv()
.
-
nv
public static int nv(long struct, int index)
Unsafe version ofv
.
-
nx
public static int nx(long struct)
Unsafe version ofx()
.
-
ny
public static int ny(long struct)
Unsafe version ofy()
.
-
nw
public static int nw(long struct)
Unsafe version ofw()
.
-
nh
public static int nh(long struct)
Unsafe version ofh()
.
-
nv
public static void nv(long struct, java.nio.IntBuffer value)
Unsafe version ofv
.
-
nv
public static void nv(long struct, int index, int value)
Unsafe version ofv
.
-
nx
public static void nx(long struct, int value)
Unsafe version ofx
.
-
ny
public static void ny(long struct, int value)
Unsafe version ofy
.
-
nw
public static void nw(long struct, int value)
Unsafe version ofw
.
-
nh
public static void nh(long struct, int value)
Unsafe version ofh
.
-
-