public class NkImage
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct nk_image {
nk_handle handle;
unsigned short w;
unsigned short h;
unsigned short region[4];
}| Modifier and Type | Class and Description |
|---|---|
static class |
NkImage.Buffer
An array of
NkImage structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
H
The struct member offsets.
|
static int |
HANDLE
The struct member offsets.
|
static int |
REGION
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
W
The struct member offsets.
|
| Constructor and Description |
|---|
NkImage(java.nio.ByteBuffer container)
Creates a
NkImage instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static NkImage |
calloc()
Returns a new
NkImage instance allocated with memCalloc. |
static NkImage.Buffer |
calloc(int capacity)
Returns a new
NkImage.Buffer instance allocated with memCalloc. |
static NkImage |
callocStack()
Returns a new
NkImage instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkImage.Buffer |
callocStack(int capacity)
Returns a new
NkImage.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkImage.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkImage.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkImage |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkImage instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkImage |
create()
Returns a new
NkImage instance allocated with BufferUtils. |
static NkImage.Buffer |
create(int capacity)
Returns a new
NkImage.Buffer instance allocated with BufferUtils. |
static NkImage |
create(long address)
Returns a new
NkImage instance for the specified memory address. |
static NkImage.Buffer |
create(long address,
int capacity)
Create a
NkImage.Buffer instance at the specified memory. |
static NkImage |
createSafe(long address)
|
static NkImage.Buffer |
createSafe(long address,
int capacity)
|
short |
h()
Returns the value of the
h field. |
NkImage |
h(short value)
Sets the specified value to the
h field. |
NkHandle |
handle()
Returns a
NkHandle view of the handle field. |
NkImage |
handle(java.util.function.Consumer<NkHandle> consumer)
Passes the
handle field to the specified Consumer. |
NkImage |
handle(NkHandle value)
Copies the specified
NkHandle to the handle field. |
static NkImage |
malloc()
Returns a new
NkImage instance allocated with memAlloc. |
static NkImage.Buffer |
malloc(int capacity)
Returns a new
NkImage.Buffer instance allocated with memAlloc. |
static NkImage |
mallocStack()
Returns a new
NkImage instance allocated on the thread-local MemoryStack. |
static NkImage.Buffer |
mallocStack(int capacity)
Returns a new
NkImage.Buffer instance allocated on the thread-local MemoryStack. |
static NkImage.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkImage.Buffer instance allocated on the specified MemoryStack. |
static NkImage |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkImage instance allocated on the specified MemoryStack. |
static short |
nh(long struct)
Unsafe version of
h(). |
static void |
nh(long struct,
short value)
Unsafe version of
h. |
static NkHandle |
nhandle(long struct)
Unsafe version of
handle(). |
static void |
nhandle(long struct,
NkHandle value)
Unsafe version of
handle. |
static java.nio.ShortBuffer |
nregion(long struct)
Unsafe version of
region(). |
static short |
nregion(long struct,
int index)
Unsafe version of
region. |
static void |
nregion(long struct,
int index,
short value)
Unsafe version of
region. |
static void |
nregion(long struct,
java.nio.ShortBuffer value)
Unsafe version of
region. |
static short |
nw(long struct)
Unsafe version of
w(). |
static void |
nw(long struct,
short value)
Unsafe version of
w. |
java.nio.ShortBuffer |
region()
Returns a
ShortBuffer view of the region field. |
short |
region(int index)
Returns the value at the specified index of the
region field. |
NkImage |
region(int index,
short value)
Sets the specified value at the specified index of the
region field. |
NkImage |
region(java.nio.ShortBuffer value)
Copies the specified
ShortBuffer to the region field. |
NkImage |
set(NkHandle handle,
short w,
short h,
java.nio.ShortBuffer region)
Initializes this struct with the specified values.
|
NkImage |
set(NkImage src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
short |
w()
Returns the value of the
w field. |
NkImage |
w(short value)
Sets the specified value to the
w field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int HANDLE
public static final int W
public static final int H
public static final int REGION
public NkImage(java.nio.ByteBuffer container)
NkImage instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic short w()
w field.public short h()
h field.public java.nio.ShortBuffer region()
ShortBuffer view of the region field.public short region(int index)
region field.public NkImage handle(java.util.function.Consumer<NkHandle> consumer)
handle field to the specified Consumer.public NkImage w(short value)
w field.public NkImage h(short value)
h field.public NkImage region(java.nio.ShortBuffer value)
ShortBuffer to the region field.public NkImage region(int index, short value)
region field.public NkImage set(NkHandle handle, short w, short h, java.nio.ShortBuffer region)
public NkImage set(NkImage src)
src - the source structpublic static NkImage malloc()
NkImage instance allocated with memAlloc. The instance must be explicitly freed.public static NkImage calloc()
NkImage instance allocated with memCalloc. The instance must be explicitly freed.public static NkImage create()
NkImage instance allocated with BufferUtils.public static NkImage create(long address)
NkImage instance for the specified memory address.@Nullable public static NkImage createSafe(long address)
public static NkImage.Buffer malloc(int capacity)
NkImage.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkImage.Buffer calloc(int capacity)
NkImage.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkImage.Buffer create(int capacity)
NkImage.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NkImage.Buffer create(long address, int capacity)
NkImage.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NkImage.Buffer createSafe(long address, int capacity)
public static NkImage mallocStack()
NkImage instance allocated on the thread-local MemoryStack.public static NkImage callocStack()
NkImage instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NkImage mallocStack(org.lwjgl.system.MemoryStack stack)
NkImage instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NkImage callocStack(org.lwjgl.system.MemoryStack stack)
NkImage instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NkImage.Buffer mallocStack(int capacity)
NkImage.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NkImage.Buffer callocStack(int capacity)
NkImage.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NkImage.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkImage.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkImage.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkImage.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static short nw(long struct)
w().public static short nh(long struct)
h().public static java.nio.ShortBuffer nregion(long struct)
region().public static short nregion(long struct,
int index)
region.public static void nw(long struct,
short value)
w.public static void nh(long struct,
short value)
h.public static void nregion(long struct,
java.nio.ShortBuffer value)
region.public static void nregion(long struct,
int index,
short value)
region.Copyright LWJGL. All Rights Reserved. License terms.