Package org.lwjgl.nuklear
Class NkNineSlice
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_nine_slice {
struct nk_image img;
nk_ushort l;
nk_ushort t;
nk_ushort r;
nk_ushort b;
}-
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 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
ConstructorsConstructorDescriptionNkNineSlice(ByteBuffer container) Creates aNkNineSliceinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionshortb()b(short value) Sets the specified value to thebfield.static NkNineSlicecalloc()Returns a newNkNineSliceinstance allocated withmemCalloc.static NkNineSlice.Buffercalloc(int capacity) Returns a newNkNineSlice.Bufferinstance allocated withmemCalloc.static NkNineSlice.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkNineSlice.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkNineSlicecalloc(MemoryStack stack) Returns a newNkNineSliceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkNineSlicecreate()Returns a newNkNineSliceinstance allocated withBufferUtils.static NkNineSlice.Buffercreate(int capacity) Returns a newNkNineSlice.Bufferinstance allocated withBufferUtils.static NkNineSlicecreate(long address) Returns a newNkNineSliceinstance for the specified memory address.static NkNineSlice.Buffercreate(long address, int capacity) Create aNkNineSlice.Bufferinstance at the specified memory.static @Nullable NkNineSlicecreateSafe(long address) static @Nullable NkNineSlice.BuffercreateSafe(long address, int capacity) img()Passes theimgfield to the specifiedConsumer.Copies the specifiedNkImageto theimgfield.shortl()l(short value) Sets the specified value to thelfield.static NkNineSlicemalloc()Returns a newNkNineSliceinstance allocated withmemAlloc.static NkNineSlice.Buffermalloc(int capacity) Returns a newNkNineSlice.Bufferinstance allocated withmemAlloc.static NkNineSlice.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkNineSlice.Bufferinstance allocated on the specifiedMemoryStack.static NkNineSlicemalloc(MemoryStack stack) Returns a newNkNineSliceinstance allocated on the specifiedMemoryStack.static shortnb(long struct) Unsafe version ofb().static voidnb(long struct, short value) Unsafe version ofb.static NkImagenimg(long struct) Unsafe version ofimg().static voidUnsafe version ofimg.static shortnl(long struct) Unsafe version ofl().static voidnl(long struct, short value) Unsafe version ofl.static shortnr(long struct) Unsafe version ofr().static voidnr(long struct, short value) Unsafe version ofr.static shortnt(long struct) Unsafe version oft().static voidnt(long struct, short value) Unsafe version oft.shortr()r(short value) Sets the specified value to therfield.Initializes this struct with the specified values.set(NkNineSlice src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).shortt()t(short value) Sets the specified value to thetfield.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. -
IMG
public static final int IMGThe struct member offsets. -
L
public static final int LThe struct member offsets. -
T
public static final int TThe struct member offsets. -
R
public static final int RThe struct member offsets. -
B
public static final int BThe struct member offsets.
-
-
Constructor Details
-
NkNineSlice
Creates aNkNineSliceinstance 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).- Specified by:
sizeofin classStruct<NkNineSlice>
-
img
- Returns:
- a
NkImageview of theimgfield.
-
l
public short l()- Returns:
- the value of the
lfield.
-
t
public short t()- Returns:
- the value of the
tfield.
-
r
public short r()- Returns:
- the value of the
rfield.
-
b
public short b()- Returns:
- the value of the
bfield.
-
img
Copies the specifiedNkImageto theimgfield. -
img
Passes theimgfield to the specifiedConsumer. -
l
Sets the specified value to thelfield. -
t
Sets the specified value to thetfield. -
r
Sets the specified value to therfield. -
b
Sets the specified value to thebfield. -
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 newNkNineSliceinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkNineSliceinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkNineSliceinstance allocated withBufferUtils. -
create
Returns a newNkNineSliceinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkNineSlice.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkNineSlice.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkNineSlice.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkNineSlice.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkNineSliceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkNineSliceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkNineSlice.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkNineSlice.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nimg
Unsafe version ofimg(). -
nl
public static short nl(long struct) Unsafe version ofl(). -
nt
public static short nt(long struct) Unsafe version oft(). -
nr
public static short nr(long struct) Unsafe version ofr(). -
nb
public static short nb(long struct) Unsafe version ofb(). -
nimg
Unsafe version ofimg. -
nl
public static void nl(long struct, short value) Unsafe version ofl. -
nt
public static void nt(long struct, short value) Unsafe version oft. -
nr
public static void nr(long struct, short value) Unsafe version ofr. -
nb
public static void nb(long struct, short value) Unsafe version ofb.
-