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 classJAWTRectangle.BufferAn array ofJAWTRectanglestructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe 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 aJAWTRectangleinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static JAWTRectanglecalloc()Returns a newJAWTRectangleinstance allocated withmemCalloc.static JAWTRectangle.Buffercalloc(int capacity)Returns a newJAWTRectangle.Bufferinstance allocated withmemCalloc.static JAWTRectanglecallocStack()Returns a newJAWTRectangleinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static JAWTRectangle.BuffercallocStack(int capacity)Returns a newJAWTRectangle.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static JAWTRectangle.BuffercallocStack(int capacity, MemoryStack stack)Returns a newJAWTRectangle.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static JAWTRectanglecallocStack(MemoryStack stack)Returns a newJAWTRectangleinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static JAWTRectanglecreate()Returns a newJAWTRectangleinstance allocated withBufferUtils.static JAWTRectangle.Buffercreate(int capacity)Returns a newJAWTRectangle.Bufferinstance allocated withBufferUtils.static JAWTRectanglecreate(long address)Returns a newJAWTRectangleinstance for the specified memory address ornullif the address isNULL.static JAWTRectangle.Buffercreate(long address, int capacity)Create aJAWTRectangle.Bufferinstance at the specified memory.intheight()Returns the value of theheightfield.JAWTRectangleheight(int value)Sets the specified value to theheightfield.static JAWTRectanglemalloc()Returns a newJAWTRectangleinstance allocated withmemAlloc.static JAWTRectangle.Buffermalloc(int capacity)Returns a newJAWTRectangle.Bufferinstance allocated withmemAlloc.static JAWTRectanglemallocStack()Returns a newJAWTRectangleinstance allocated on the thread-localMemoryStack.static JAWTRectangle.BuffermallocStack(int capacity)Returns a newJAWTRectangle.Bufferinstance allocated on the thread-localMemoryStack.static JAWTRectangle.BuffermallocStack(int capacity, MemoryStack stack)Returns a newJAWTRectangle.Bufferinstance allocated on the specifiedMemoryStack.static JAWTRectanglemallocStack(MemoryStack stack)Returns a newJAWTRectangleinstance allocated on the specifiedMemoryStack.JAWTRectanglenset(long struct)Unsafe version ofset.JAWTRectangleset(int x, int y, int width, int height)Initializes this struct with the specified values.JAWTRectangleset(JAWTRectangle src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).intwidth()Returns the value of thewidthfield.JAWTRectanglewidth(int value)Sets the specified value to thewidthfield.intx()Returns the value of thexfield.JAWTRectanglex(int value)Sets the specified value to thexfield.inty()Returns the value of theyfield.JAWTRectangley(int value)Sets the specified value to theyfield.-
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 aJAWTRectangleinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturns thesizeof(struct).
-
x
public int x()
Returns the value of thexfield.
-
y
public int y()
Returns the value of theyfield.
-
width
public int width()
Returns the value of thewidthfield.
-
height
public int height()
Returns the value of theheightfield.
-
x
public JAWTRectangle x(int value)
Sets the specified value to thexfield.
-
y
public JAWTRectangle y(int value)
Sets the specified value to theyfield.
-
width
public JAWTRectangle width(int value)
Sets the specified value to thewidthfield.
-
height
public JAWTRectangle height(int value)
Sets the specified value to theheightfield.
-
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 newJAWTRectangleinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static JAWTRectangle calloc()
Returns a newJAWTRectangleinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static JAWTRectangle create()
Returns a newJAWTRectangleinstance allocated withBufferUtils.
-
create
public static JAWTRectangle create(long address)
Returns a newJAWTRectangleinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static JAWTRectangle.Buffer malloc(int capacity)
Returns a newJAWTRectangle.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static JAWTRectangle.Buffer calloc(int capacity)
Returns a newJAWTRectangle.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static JAWTRectangle.Buffer create(int capacity)
Returns a newJAWTRectangle.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static JAWTRectangle.Buffer create(long address, int capacity)
Create aJAWTRectangle.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static JAWTRectangle mallocStack()
Returns a newJAWTRectangleinstance allocated on the thread-localMemoryStack.
-
callocStack
public static JAWTRectangle callocStack()
Returns a newJAWTRectangleinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static JAWTRectangle mallocStack(MemoryStack stack)
Returns a newJAWTRectangleinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static JAWTRectangle callocStack(MemoryStack stack)
Returns a newJAWTRectangleinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static JAWTRectangle.Buffer callocStack(int capacity)
Returns a newJAWTRectangle.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static JAWTRectangle.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newJAWTRectangle.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-