Package org.lwjgl.system.jawt
Class JAWTRectangle
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.jawt.JAWTRectangle
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class JAWTRectangle extends Struct
Structure for a native rectangle.Member documentation
x
– the rectangle X axis coordinatey
– the rectangle Y axis coordinatewidth
– the rectangle widthheight
– the rectangle height
Layout
struct JAWT_Rectangle { jint x; jint y; jint width; jint height; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
JAWTRectangle.Buffer
An array ofJAWTRectangle
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description JAWTRectangle(java.nio.ByteBuffer container)
Creates aJAWTRectangle
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static JAWTRectangle
calloc()
Returns a newJAWTRectangle
instance allocated withmemCalloc
.static JAWTRectangle.Buffer
calloc(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated withmemCalloc
.static JAWTRectangle
callocStack()
Returns a newJAWTRectangle
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static JAWTRectangle.Buffer
callocStack(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static JAWTRectangle.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newJAWTRectangle.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static JAWTRectangle
callocStack(MemoryStack stack)
Returns a newJAWTRectangle
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static JAWTRectangle
create()
Returns a newJAWTRectangle
instance allocated withBufferUtils
.static JAWTRectangle.Buffer
create(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated withBufferUtils
.static JAWTRectangle
create(long address)
Returns a newJAWTRectangle
instance for the specified memory address ornull
if the address isNULL
.static JAWTRectangle.Buffer
create(long address, int capacity)
Create aJAWTRectangle.Buffer
instance at the specified memory.int
height()
Returns the value of theheight
field.JAWTRectangle
height(int value)
Sets the specified value to theheight
field.static JAWTRectangle
malloc()
Returns a newJAWTRectangle
instance allocated withmemAlloc
.static JAWTRectangle.Buffer
malloc(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated withmemAlloc
.static JAWTRectangle
mallocStack()
Returns a newJAWTRectangle
instance allocated on the thread-localMemoryStack
.static JAWTRectangle.Buffer
mallocStack(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated on the thread-localMemoryStack
.static JAWTRectangle.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newJAWTRectangle.Buffer
instance allocated on the specifiedMemoryStack
.static JAWTRectangle
mallocStack(MemoryStack stack)
Returns a newJAWTRectangle
instance allocated on the specifiedMemoryStack
.JAWTRectangle
nset(long struct)
Unsafe version ofset
.JAWTRectangle
set(int x, int y, int width, int height)
Initializes this struct with the specified values.JAWTRectangle
set(JAWTRectangle src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
width()
Returns the value of thewidth
field.JAWTRectangle
width(int value)
Sets the specified value to thewidth
field.int
x()
Returns the value of thex
field.JAWTRectangle
x(int value)
Sets the specified value to thex
field.int
y()
Returns the value of they
field.JAWTRectangle
y(int value)
Sets the specified value to they
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
JAWTRectangle
public JAWTRectangle(java.nio.ByteBuffer container)
Creates aJAWTRectangle
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()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
x
public int x()
Returns the value of thex
field.
-
y
public int y()
Returns the value of they
field.
-
width
public int width()
Returns the value of thewidth
field.
-
height
public int height()
Returns the value of theheight
field.
-
x
public JAWTRectangle x(int value)
Sets the specified value to thex
field.
-
y
public JAWTRectangle y(int value)
Sets the specified value to they
field.
-
width
public JAWTRectangle width(int value)
Sets the specified value to thewidth
field.
-
height
public JAWTRectangle height(int value)
Sets the specified value to theheight
field.
-
set
public JAWTRectangle set(int x, int y, int width, int height)
Initializes this struct with the specified values.
-
nset
public JAWTRectangle nset(long struct)
Unsafe version ofset
.
-
set
public JAWTRectangle set(JAWTRectangle src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static JAWTRectangle malloc()
Returns a newJAWTRectangle
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static JAWTRectangle calloc()
Returns a newJAWTRectangle
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static JAWTRectangle create()
Returns a newJAWTRectangle
instance allocated withBufferUtils
.
-
create
public static JAWTRectangle create(long address)
Returns a newJAWTRectangle
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static JAWTRectangle.Buffer malloc(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static JAWTRectangle.Buffer calloc(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static JAWTRectangle.Buffer create(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static JAWTRectangle.Buffer create(long address, int capacity)
Create aJAWTRectangle.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static JAWTRectangle mallocStack()
Returns a newJAWTRectangle
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static JAWTRectangle callocStack()
Returns a newJAWTRectangle
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static JAWTRectangle mallocStack(MemoryStack stack)
Returns a newJAWTRectangle
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static JAWTRectangle callocStack(MemoryStack stack)
Returns a newJAWTRectangle
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static JAWTRectangle.Buffer mallocStack(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static JAWTRectangle.Buffer callocStack(int capacity)
Returns a newJAWTRectangle.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static JAWTRectangle.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newJAWTRectangle.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static JAWTRectangle.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newJAWTRectangle.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-