Package org.lwjgl.system.windows
Class RECT
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct RECT {
LONG left;
LONG top;
LONG right;
LONG bottom;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionRECT(ByteBuffer container) Creates aRECTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintbottom()bottom(int value) Sets the specified value to thebottomfield.static RECTcalloc()Returns a newRECTinstance allocated withmemCalloc.static RECT.Buffercalloc(int capacity) Returns a newRECT.Bufferinstance allocated withmemCalloc.static RECT.Buffercalloc(int capacity, MemoryStack stack) Returns a newRECT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static RECTcalloc(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) Returns a newRECTinstance for the specified memory address.static RECT.Buffercreate(long address, int capacity) Create aRECT.Bufferinstance at the specified memory.static @Nullable RECTcreateSafe(long address) static @Nullable RECT.BuffercreateSafe(long address, int capacity) intleft()left(int value) Sets the specified value to theleftfield.static RECTmalloc()Returns a newRECTinstance allocated withmemAlloc.static RECT.Buffermalloc(int capacity) Returns a newRECT.Bufferinstance allocated withmemAlloc.static RECT.Buffermalloc(int capacity, MemoryStack stack) Returns a newRECT.Bufferinstance allocated on the specifiedMemoryStack.static RECTmalloc(MemoryStack stack) Returns a newRECTinstance allocated on the specifiedMemoryStack.static intnbottom(long struct) Unsafe version ofbottom().static voidnbottom(long struct, int value) Unsafe version ofbottom.static intnleft(long struct) Unsafe version ofleft().static voidnleft(long struct, int value) Unsafe version ofleft.static intnright(long struct) Unsafe version ofright().static voidnright(long struct, int value) Unsafe version ofright.static intntop(long struct) Unsafe version oftop().static voidntop(long struct, int value) Unsafe version oftop.intright()right(int value) Sets the specified value to therightfield.set(int left, int top, int right, int bottom) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).inttop()top(int value) Sets the specified value to thetopfield.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
LEFT
public static final int LEFTThe struct member offsets. -
TOP
public static final int TOPThe struct member offsets. -
RIGHT
public static final int RIGHTThe struct member offsets. -
BOTTOM
public static final int BOTTOMThe struct member offsets.
-
-
Constructor Details
-
RECT
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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct). -
left
public int left()- Returns:
- the value of the
leftfield.
-
top
public int top()- Returns:
- the value of the
topfield.
-
right
public int right()- Returns:
- the value of the
rightfield.
-
bottom
public int bottom()- Returns:
- the value of the
bottomfield.
-
left
Sets the specified value to theleftfield. -
top
Sets the specified value to thetopfield. -
right
Sets the specified value to therightfield. -
bottom
Sets the specified value to thebottomfield. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newRECTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newRECTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newRECTinstance allocated withBufferUtils. -
create
Returns a newRECTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newRECT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newRECT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newRECT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aRECT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newRECTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newRECTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newRECT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newRECT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nleft
public static int nleft(long struct) Unsafe version ofleft(). -
ntop
public static int ntop(long struct) Unsafe version oftop(). -
nright
public static int nright(long struct) Unsafe version ofright(). -
nbottom
public static int nbottom(long struct) Unsafe version ofbottom(). -
nleft
public static void nleft(long struct, int value) Unsafe version ofleft. -
ntop
public static void ntop(long struct, int value) Unsafe version oftop. -
nright
public static void nright(long struct, int value) Unsafe version ofright. -
nbottom
public static void nbottom(long struct, int value) Unsafe version ofbottom.
-