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.NativeResourceLayout
struct nk_draw_list {struct nk_rectclip_rect;struct nk_vec2circle_vtx[12];struct nk_convert_configconfig;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_handleuserdata; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkDrawList.BufferAn array ofNkDrawListstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intBUFFER
CIRCLE_VTX
CLIP_RECT
CMD_COUNT
CMD_OFFSET
CONFIG
ELEMENT_COUNT
ELEMENTS
LINE_AA
PATH_COUNT
PATH_OFFSET
SHAPE_AAThe struct member offsets.static intSIZEOFThe struct size in bytes.static intUSERDATA
VERTEX_COUNT
VERTICESThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description NkDrawList(java.nio.ByteBuffer container)Creates aNkDrawListinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NkBufferbuffer()Returns aNkBufferview of the struct pointed to by thebufferfield.static NkDrawListcalloc()Returns a newNkDrawListinstance allocated withmemCalloc.static NkDrawList.Buffercalloc(int capacity)Returns a newNkDrawList.Bufferinstance allocated withmemCalloc.static NkDrawListcallocStack()Returns a newNkDrawListinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkDrawList.BuffercallocStack(int capacity)Returns a newNkDrawList.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NkDrawList.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkDrawList.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkDrawListcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkDrawListinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.NkVec2.Buffercircle_vtx()Returns aNkVec2.Buffer view of thecircle_vtxfield.NkVec2circle_vtx(int index)Returns aNkVec2view of the struct at the specified index of thecircle_vtxfield.NkRectclip_rect()Returns aNkRectview of theclip_rectfield.NkDrawListclip_rect(java.util.function.Consumer<NkRect> consumer)Passes theclip_rectfield to the specifiedConsumer.intcmd_count()Returns the value of thecmd_countfield.longcmd_offset()Returns the value of thecmd_offsetfield.NkConvertConfigconfig()Returns aNkConvertConfigview of theconfigfield.NkDrawListconfig(java.util.function.Consumer<NkConvertConfig> consumer)Passes theconfigfield to the specifiedConsumer.static NkDrawListcreate()Returns a newNkDrawListinstance allocated withBufferUtils.static NkDrawList.Buffercreate(int capacity)Returns a newNkDrawList.Bufferinstance allocated withBufferUtils.static NkDrawListcreate(long address)Returns a newNkDrawListinstance for the specified memory address.static NkDrawList.Buffercreate(long address, int capacity)Create aNkDrawList.Bufferinstance at the specified memory.static NkDrawListcreateSafe(long address)static NkDrawList.BuffercreateSafe(long address, int capacity)intelement_count()Returns the value of theelement_countfield.NkBufferelements()Returns aNkBufferview of the struct pointed to by theelementsfield.intline_AA()Returns the value of theline_AAfield.static NkDrawListmalloc()Returns a newNkDrawListinstance allocated withmemAlloc.static NkDrawList.Buffermalloc(int capacity)Returns a newNkDrawList.Bufferinstance allocated withmemAlloc.static NkDrawListmallocStack()Returns a newNkDrawListinstance allocated on the thread-localMemoryStack.static NkDrawList.BuffermallocStack(int capacity)Returns a newNkDrawList.Bufferinstance allocated on the thread-localMemoryStack.static NkDrawList.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newNkDrawList.Bufferinstance allocated on the specifiedMemoryStack.static NkDrawListmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newNkDrawListinstance allocated on the specifiedMemoryStack.static NkBuffernbuffer(long struct)Unsafe version ofbuffer().static NkVec2.Bufferncircle_vtx(long struct)Unsafe version ofcircle_vtx().static NkVec2ncircle_vtx(long struct, int index)Unsafe version ofcircle_vtx.static NkRectnclip_rect(long struct)Unsafe version ofclip_rect().static intncmd_count(long struct)Unsafe version ofcmd_count().static longncmd_offset(long struct)Unsafe version ofcmd_offset().static NkConvertConfignconfig(long struct)Unsafe version ofconfig().static intnelement_count(long struct)Unsafe version ofelement_count().static NkBuffernelements(long struct)Unsafe version ofelements().static intnline_AA(long struct)Unsafe version ofline_AA().static intnpath_count(long struct)Unsafe version ofpath_count().static intnpath_offset(long struct)Unsafe version ofpath_offset().static intnshape_AA(long struct)Unsafe version ofshape_AA().static NkHandlenuserdata(long struct)Unsafe version ofuserdata().static intnvertex_count(long struct)Unsafe version ofvertex_count().static NkBuffernvertices(long struct)Unsafe version ofvertices().intpath_count()Returns the value of thepath_countfield.intpath_offset()Returns the value of thepath_offsetfield.intshape_AA()Returns the value of theshape_AAfield.intsizeof()NkHandleuserdata()Returns aNkHandleview of theuserdatafield.NkDrawListuserdata(java.util.function.Consumer<NkHandle> consumer)Passes theuserdatafield to the specifiedConsumer.intvertex_count()Returns the value of thevertex_countfield.NkBuffervertices()Returns aNkBufferview of the struct pointed to by theverticesfield.
-
-
-
Constructor Detail
-
NkDrawList
public NkDrawList(java.nio.ByteBuffer container)
Creates aNkDrawListinstance 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
clip_rect
public NkDrawList clip_rect(java.util.function.Consumer<NkRect> consumer)
Passes theclip_rectfield to the specifiedConsumer.
-
circle_vtx
public NkVec2.Buffer circle_vtx()
Returns aNkVec2.Buffer view of thecircle_vtxfield.
-
circle_vtx
public NkVec2 circle_vtx(int index)
Returns aNkVec2view of the struct at the specified index of thecircle_vtxfield.
-
config
public NkConvertConfig config()
Returns aNkConvertConfigview of theconfigfield.
-
config
public NkDrawList config(java.util.function.Consumer<NkConvertConfig> consumer)
Passes theconfigfield to the specifiedConsumer.
-
buffer
@Nullable public NkBuffer buffer()
Returns aNkBufferview of the struct pointed to by thebufferfield.
-
vertices
@Nullable public NkBuffer vertices()
Returns aNkBufferview of the struct pointed to by theverticesfield.
-
elements
@Nullable public NkBuffer elements()
Returns aNkBufferview of the struct pointed to by theelementsfield.
-
element_count
public int element_count()
Returns the value of theelement_countfield.
-
vertex_count
public int vertex_count()
Returns the value of thevertex_countfield.
-
cmd_count
public int cmd_count()
Returns the value of thecmd_countfield.
-
cmd_offset
public long cmd_offset()
Returns the value of thecmd_offsetfield.
-
path_count
public int path_count()
Returns the value of thepath_countfield.
-
path_offset
public int path_offset()
Returns the value of thepath_offsetfield.
-
line_AA
public int line_AA()
Returns the value of theline_AAfield.
-
shape_AA
public int shape_AA()
Returns the value of theshape_AAfield.
-
userdata
public NkDrawList userdata(java.util.function.Consumer<NkHandle> consumer)
Passes theuserdatafield to the specifiedConsumer.
-
malloc
public static NkDrawList malloc()
Returns a newNkDrawListinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkDrawList calloc()
Returns a newNkDrawListinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkDrawList create()
Returns a newNkDrawListinstance allocated withBufferUtils.
-
create
public static NkDrawList create(long address)
Returns a newNkDrawListinstance for the specified memory address.
-
createSafe
@Nullable public static NkDrawList createSafe(long address)
-
malloc
public static NkDrawList.Buffer malloc(int capacity)
Returns a newNkDrawList.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkDrawList.Buffer calloc(int capacity)
Returns a newNkDrawList.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkDrawList.Buffer create(int capacity)
Returns a newNkDrawList.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkDrawList.Buffer create(long address, int capacity)
Create aNkDrawList.Bufferinstance 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 newNkDrawListinstance allocated on the thread-localMemoryStack.
-
callocStack
public static NkDrawList callocStack()
Returns a newNkDrawListinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NkDrawList mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawListinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NkDrawList callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newNkDrawListinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NkDrawList.Buffer callocStack(int capacity)
Returns a newNkDrawList.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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().
-
-