Package org.lwjgl.system.windows
Class RECT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.RECT
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class RECT extends Struct
Defines the coordinates of the upper-left and lower-right corners of a rectangle.Member documentation
left– the x-coordinate of the upper-left corner of the rectangletop– the y-coordinate of the upper-left corner of the rectangleright– the x-coordinate of the lower-right corner of the rectanglebottom– the y-coordinate of the lower-right corner of the rectangle
Layout
struct RECT { LONG left; LONG top; LONG right; LONG bottom; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classRECT.BufferAn array ofRECTstructs.-
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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intbottom()Returns the value of thebottomfield.RECTbottom(int value)Sets the specified value to thebottomfield.static RECTcalloc()static RECT.Buffercalloc(int capacity)Returns a newRECT.Bufferinstance allocated withmemCalloc.static RECTcallocStack()Returns a newRECTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RECT.BuffercallocStack(int capacity)Returns a newRECT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static RECT.BuffercallocStack(int capacity, MemoryStack stack)Returns a newRECT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RECTcallocStack(MemoryStack stack)Returns a newRECTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RECTcreate()Returns a newRECTinstance allocated withBufferUtils.static RECT.Buffercreate(int capacity)Returns a newRECT.Bufferinstance allocated withBufferUtils.static RECTcreate(long address)static RECT.Buffercreate(long address, int capacity)Create aRECT.Bufferinstance at the specified memory.intleft()Returns the value of theleftfield.RECTleft(int value)Sets the specified value to theleftfield.static RECTmalloc()static RECT.Buffermalloc(int capacity)Returns a newRECT.Bufferinstance allocated withmemAlloc.static RECTmallocStack()Returns a newRECTinstance allocated on the thread-localMemoryStack.static RECT.BuffermallocStack(int capacity)Returns a newRECT.Bufferinstance allocated on the thread-localMemoryStack.static RECT.BuffermallocStack(int capacity, MemoryStack stack)Returns a newRECT.Bufferinstance allocated on the specifiedMemoryStack.static RECTmallocStack(MemoryStack stack)Returns a newRECTinstance allocated on the specifiedMemoryStack.RECTnset(long struct)Unsafe version ofset.intright()Returns the value of therightfield.RECTright(int value)Sets the specified value to therightfield.RECTset(int left, int top, int right, int bottom)Initializes this struct with the specified values.RECTset(RECT src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).inttop()Returns the value of thetopfield.RECTtop(int value)Sets the specified value to thetopfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
RECT
public RECT(java.nio.ByteBuffer container)
Creates aRECTinstance 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).
-
left
public int left()
Returns the value of theleftfield.
-
top
public int top()
Returns the value of thetopfield.
-
right
public int right()
Returns the value of therightfield.
-
bottom
public int bottom()
Returns the value of thebottomfield.
-
left
public RECT left(int value)
Sets the specified value to theleftfield.
-
top
public RECT top(int value)
Sets the specified value to thetopfield.
-
right
public RECT right(int value)
Sets the specified value to therightfield.
-
bottom
public RECT bottom(int value)
Sets the specified value to thebottomfield.
-
set
public RECT set(int left, int top, int right, int bottom)
Initializes this struct with the specified values.
-
set
public RECT set(RECT src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static RECT malloc()
-
calloc
public static RECT calloc()
-
create
public static RECT create()
Returns a newRECTinstance allocated withBufferUtils.
-
create
public static RECT create(long address)
-
malloc
public static RECT.Buffer malloc(int capacity)
Returns a newRECT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static RECT.Buffer calloc(int capacity)
Returns a newRECT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static RECT.Buffer create(int capacity)
Returns a newRECT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static RECT.Buffer create(long address, int capacity)
Create aRECT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static RECT mallocStack()
Returns a newRECTinstance allocated on the thread-localMemoryStack.
-
callocStack
public static RECT callocStack()
Returns a newRECTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static RECT mallocStack(MemoryStack stack)
Returns a newRECTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static RECT callocStack(MemoryStack stack)
Returns a newRECTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static RECT.Buffer mallocStack(int capacity)
Returns a newRECT.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static RECT.Buffer callocStack(int capacity)
Returns a newRECT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static RECT.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newRECT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static RECT.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newRECT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-