Package org.lwjgl.nuklear
Class NkDrawList
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkDrawList
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class NkDrawList extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct nk_draw_list {
struct nk_rect
clip_rect;struct nk_vec2
circle_vtx[12];struct nk_convert_config
config;struct nk_buffer
* buffer;struct nk_buffer
* vertices;struct nk_buffer
* elements; unsigned int element_count; unsigned int vertex_count; unsigned int cmd_count; nk_size cmd_offset; unsigned int path_count; unsigned int path_offset; enum nk_anti_aliasing line_AA; enum nk_anti_aliasing shape_AA;nk_handle
userdata; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NkDrawList.Buffer
An array ofNkDrawList
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
BUFFER
CIRCLE_VTX
CLIP_RECT
CMD_COUNT
CMD_OFFSET
CONFIG
ELEMENT_COUNT
ELEMENTS
LINE_AA
PATH_COUNT
PATH_OFFSET
SHAPE_AAThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
USERDATA
VERTEX_COUNT
VERTICESThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description NkDrawList(java.nio.ByteBuffer container)
Creates aNkDrawList
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NkBuffer
buffer()
Returns aNkBuffer
view of the struct pointed to by thebuffer
field.static NkDrawList
calloc()
Returns a newNkDrawList
instance allocated withmemCalloc
.static NkDrawList.Buffer
calloc(int capacity)
Returns a newNkDrawList.Buffer
instance allocated withmemCalloc
.static NkDrawList
callocStack()
Returns a newNkDrawList
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkDrawList.Buffer
callocStack(int capacity)
Returns a newNkDrawList.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NkDrawList.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawList.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkDrawList
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawList
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.NkVec2.Buffer
circle_vtx()
Returns aNkVec2
.Buffer view of thecircle_vtx
field.NkVec2
circle_vtx(int index)
Returns aNkVec2
view of the struct at the specified index of thecircle_vtx
field.NkRect
clip_rect()
Returns aNkRect
view of theclip_rect
field.int
cmd_count()
Returns the value of thecmd_count
field.long
cmd_offset()
Returns the value of thecmd_offset
field.NkConvertConfig
config()
Returns aNkConvertConfig
view of theconfig
field.static NkDrawList
create()
Returns a newNkDrawList
instance allocated withBufferUtils
.static NkDrawList.Buffer
create(int capacity)
Returns a newNkDrawList.Buffer
instance allocated withBufferUtils
.static NkDrawList
create(long address)
Returns a newNkDrawList
instance for the specified memory address.static NkDrawList.Buffer
create(long address, int capacity)
Create aNkDrawList.Buffer
instance at the specified memory.static NkDrawList
createSafe(long address)
static NkDrawList.Buffer
createSafe(long address, int capacity)
int
element_count()
Returns the value of theelement_count
field.NkBuffer
elements()
Returns aNkBuffer
view of the struct pointed to by theelements
field.int
line_AA()
Returns the value of theline_AA
field.static NkDrawList
malloc()
Returns a newNkDrawList
instance allocated withmemAlloc
.static NkDrawList.Buffer
malloc(int capacity)
Returns a newNkDrawList.Buffer
instance allocated withmemAlloc
.static NkDrawList
mallocStack()
Returns a newNkDrawList
instance allocated on the thread-localMemoryStack
.static NkDrawList.Buffer
mallocStack(int capacity)
Returns a newNkDrawList.Buffer
instance allocated on the thread-localMemoryStack
.static NkDrawList.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawList.Buffer
instance allocated on the specifiedMemoryStack
.static NkDrawList
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawList
instance allocated on the specifiedMemoryStack
.static NkBuffer
nbuffer(long struct)
Unsafe version ofbuffer()
.static NkVec2.Buffer
ncircle_vtx(long struct)
Unsafe version ofcircle_vtx()
.static NkVec2
ncircle_vtx(long struct, int index)
Unsafe version ofcircle_vtx
.static NkRect
nclip_rect(long struct)
Unsafe version ofclip_rect()
.static int
ncmd_count(long struct)
Unsafe version ofcmd_count()
.static long
ncmd_offset(long struct)
Unsafe version ofcmd_offset()
.static NkConvertConfig
nconfig(long struct)
Unsafe version ofconfig()
.static int
nelement_count(long struct)
Unsafe version ofelement_count()
.static NkBuffer
nelements(long struct)
Unsafe version ofelements()
.static int
nline_AA(long struct)
Unsafe version ofline_AA()
.static int
npath_count(long struct)
Unsafe version ofpath_count()
.static int
npath_offset(long struct)
Unsafe version ofpath_offset()
.static int
nshape_AA(long struct)
Unsafe version ofshape_AA()
.static NkHandle
nuserdata(long struct)
Unsafe version ofuserdata()
.static int
nvertex_count(long struct)
Unsafe version ofvertex_count()
.static NkBuffer
nvertices(long struct)
Unsafe version ofvertices()
.int
path_count()
Returns the value of thepath_count
field.int
path_offset()
Returns the value of thepath_offset
field.int
shape_AA()
Returns the value of theshape_AA
field.int
sizeof()
NkHandle
userdata()
Returns aNkHandle
view of theuserdata
field.int
vertex_count()
Returns the value of thevertex_count
field.NkBuffer
vertices()
Returns aNkBuffer
view of the struct pointed to by thevertices
field.
-
-
-
Constructor Detail
-
NkDrawList
public NkDrawList(java.nio.ByteBuffer container)
Creates aNkDrawList
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
circle_vtx
public NkVec2.Buffer circle_vtx()
Returns aNkVec2
.Buffer view of thecircle_vtx
field.
-
circle_vtx
public NkVec2 circle_vtx(int index)
Returns aNkVec2
view of the struct at the specified index of thecircle_vtx
field.
-
config
public NkConvertConfig config()
Returns aNkConvertConfig
view of theconfig
field.
-
buffer
@Nullable public NkBuffer buffer()
Returns aNkBuffer
view of the struct pointed to by thebuffer
field.
-
vertices
@Nullable public NkBuffer vertices()
Returns aNkBuffer
view of the struct pointed to by thevertices
field.
-
elements
@Nullable public NkBuffer elements()
Returns aNkBuffer
view of the struct pointed to by theelements
field.
-
element_count
public int element_count()
Returns the value of theelement_count
field.
-
vertex_count
public int vertex_count()
Returns the value of thevertex_count
field.
-
cmd_count
public int cmd_count()
Returns the value of thecmd_count
field.
-
cmd_offset
public long cmd_offset()
Returns the value of thecmd_offset
field.
-
path_count
public int path_count()
Returns the value of thepath_count
field.
-
path_offset
public int path_offset()
Returns the value of thepath_offset
field.
-
line_AA
public int line_AA()
Returns the value of theline_AA
field.
-
shape_AA
public int shape_AA()
Returns the value of theshape_AA
field.
-
malloc
public static NkDrawList malloc()
Returns a newNkDrawList
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NkDrawList calloc()
Returns a newNkDrawList
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NkDrawList create()
Returns a newNkDrawList
instance allocated withBufferUtils
.
-
create
public static NkDrawList create(long address)
Returns a newNkDrawList
instance for the specified memory address.
-
createSafe
@Nullable public static NkDrawList createSafe(long address)
-
malloc
public static NkDrawList.Buffer malloc(int capacity)
Returns a newNkDrawList.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static NkDrawList.Buffer calloc(int capacity)
Returns a newNkDrawList.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static NkDrawList.Buffer create(int capacity)
Returns a newNkDrawList.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static NkDrawList.Buffer create(long address, int capacity)
Create aNkDrawList.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static NkDrawList.Buffer createSafe(long address, int capacity)
-
mallocStack
public static NkDrawList mallocStack()
Returns a newNkDrawList
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NkDrawList callocStack()
Returns a newNkDrawList
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NkDrawList mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawList
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NkDrawList callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawList
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static NkDrawList.Buffer mallocStack(int capacity)
Returns a newNkDrawList.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static NkDrawList.Buffer callocStack(int capacity)
Returns a newNkDrawList.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static NkDrawList.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawList.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static NkDrawList.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawList.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nclip_rect
public static NkRect nclip_rect(long struct)
Unsafe version ofclip_rect()
.
-
ncircle_vtx
public static NkVec2.Buffer ncircle_vtx(long struct)
Unsafe version ofcircle_vtx()
.
-
ncircle_vtx
public static NkVec2 ncircle_vtx(long struct, int index)
Unsafe version ofcircle_vtx
.
-
nconfig
public static NkConvertConfig nconfig(long struct)
Unsafe version ofconfig()
.
-
nvertices
@Nullable public static NkBuffer nvertices(long struct)
Unsafe version ofvertices()
.
-
nelements
@Nullable public static NkBuffer nelements(long struct)
Unsafe version ofelements()
.
-
nelement_count
public static int nelement_count(long struct)
Unsafe version ofelement_count()
.
-
nvertex_count
public static int nvertex_count(long struct)
Unsafe version ofvertex_count()
.
-
ncmd_count
public static int ncmd_count(long struct)
Unsafe version ofcmd_count()
.
-
ncmd_offset
public static long ncmd_offset(long struct)
Unsafe version ofcmd_offset()
.
-
npath_count
public static int npath_count(long struct)
Unsafe version ofpath_count()
.
-
npath_offset
public static int npath_offset(long struct)
Unsafe version ofpath_offset()
.
-
nline_AA
public static int nline_AA(long struct)
Unsafe version ofline_AA()
.
-
nshape_AA
public static int nshape_AA(long struct)
Unsafe version ofshape_AA()
.
-
nuserdata
public static NkHandle nuserdata(long struct)
Unsafe version ofuserdata()
.
-
-