Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.nuklear;
import javax.annotation.*;
import java.nio.*;
import org.lwjgl.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* This is a minimal state immediate mode graphical user interface single header toolkit written in ANSI C and licensed under public domain. It was
* designed as a simple embeddable user interface for application and does not have any dependencies, a default renderbackend or OS window and input
* handling but instead provides a very modular library approach by using simple input state for input and draw commands describing primitive shapes as
* output. So instead of providing a layered library that tries to abstract over a number of platform and render backends it only focuses on the actual
* UI.
*
*
VALUES
*
*
*
Immediate mode graphical user interface toolkit
*
Single header library
*
Written in C89 (ANSI C)
*
Small codebase (~15kLOC)
*
Focus on portability, efficiency and simplicity
*
No dependencies (not even the standard library if not wanted)
*
Fully skinnable and customizable
*
Low memory footprint with total memory control if needed or wanted
*
UTF-8 support
*
No global or hidden state
*
Customizable library modules (you can compile and use only what you need)
*
Optional font baker and vertex buffer output
*
*
*
FEATURES
*
*
*
Absolutely no platform dependent code
*
Memory management control ranging from/to
*
Ease of use by allocating everything from the standard library
*
Control every byte of memory inside the library
*
Font handling control ranging from/to
*
Use your own font implementation for everything
*
Use this libraries internal font baking and handling API
*
Drawing output control ranging from/to
*
Simple shapes for more high level APIs which already having drawing capabilities
Customizable colors and properties ranging from/to
*
Simple changes to color by filling a simple color table
*
Complete control with ability to use skinning to decorate widgets
*
Bendable UI library with widget ranging from/to
*
Basic widgets like buttons, checkboxes, slider, ...
*
Advanced widget like abstract comboboxes, contextual menus,...
*
Compile time configuration to only compile what you need
*
Subset which can be used if you do not want to link or use the standard library
*
Can be easily modified to only update on user input instead of frame updates
*
*
*
FONT
*
*
Font handling in this library was designed to be quite customizable and lets you decide what you want to use and what you want to provide. There are
* three different ways to use the font atlas. The first two will use your font handling scheme and only requires essential data to run nuklear. The next
* slightly more advanced features is font handling with vertex buffer output.
*
*
*
Using your own implementation without vertex buffer output
*
* So first of the easiest way to do font handling is by just providing a {@link NkUserFont} struct which only requires the height in pixel of the used font
* and a callback to calculate the width of a string. This way of handling fonts is best fitted for using the normal draw shape command API where you
* do all the text drawing yourself and the library does not require any kind of deeper knowledge about which font handling mechanism you use.
* IMPORTANT: the {@link NkUserFont} pointer provided to nuklear has to persist over the complete life time! I know this sucks but it is currently the only
* way to switch between fonts.
*
*
Using your own implementation with vertex buffer output
*
* While the first approach works fine if you don't want to use the optional vertex buffer output it is not enough if you do. To get font handling
* working for these cases you have to provide two additional parameters inside the `nk_user_font`. First a texture atlas handle used to draw text as
* subimages of a bigger font atlas texture and a callback to query a character's glyph information (offset, size, ...). So it is still possible to
* provide your own font and use the vertex buffer output.
*
*
A basic (double)-buffer with linear allocation and resetting as only freeing policy. The buffer's main purpose is to control all memory management
* inside the GUI toolkit and still leave memory control as much as possible in the hand of the user while also making sure the library is easy to use if
* not as much control is needed. In general all memory inside this library can be provided from the user in three different ways.
*
*
The first way and the one providing most control is by just passing a fixed size memory block. In this case all control lies in the hand of the user
* since he can exactly control where the memory comes from and how much memory the library should consume. Of course using the fixed size API removes the
* ability to automatically resize a buffer if not enough memory is provided so you have to take over the resizing. While being a fixed sized buffer
* sounds quite limiting, it is very effective in this library since the actual memory consumption is quite stable and has a fixed upper bound for a lot
* of cases.
*
*
If you don't want to think about how much memory the library should allocate at all time or have a very dynamic UI with unpredictable memory
* consumption habits but still want control over memory allocation you can use the dynamic allocator based API. The allocator consists of two callbacks
* for allocating and freeing memory and optional userdata so you can plugin your own allocator.
*
*
TEXT EDITOR
*
*
Editing text in this library is handled by either {@link #nk_edit_string edit_string} or {@link #nk_edit_buffer edit_buffer}. But like almost everything in this library there are multiple
* ways of doing it and a balance between control and ease of use with memory as well as functionality controlled by flags.
*
*
This library generally allows three different levels of memory control: First of is the most basic way of just providing a simple char array with
* string length. This method is probably the easiest way of handling simple user text input. Main upside is complete control over memory while the
* biggest downside in comparsion with the other two approaches is missing undo/redo.
*
*
For UIs that require undo/redo the second way was created. It is based on a fixed size {@link NkTextEdit} struct, which has an internal undo/redo stack. This
* is mainly useful if you want something more like a text editor but don't want to have a dynamically growing buffer.
*
*
The final way is using a dynamically growing nk_text_edit struct, which has both a default version if you don't care where memory comes from and an
* allocator version if you do. While the text editor is quite powerful for its complexity I would not recommend editing gigabytes of data with it. It is
* rather designed for uses cases which make sense for a GUI library not for an full blown text editor.
*
*
DRAWING
*
*
This library was designed to be render backend agnostic so it does not draw anything to screen. Instead all drawn shapes, widgets are made of, are
* buffered into memory and make up a command queue. Each frame therefore fills the command buffer with draw commands that then need to be executed by the
* user and his own render backend. After that the command buffer needs to be cleared and a new frame can be started. It is probably important to note
* that the command buffer is the main drawing API and the optional vertex buffer API only takes this format and converts it into a hardware accessible
* format.
*
*
To use the command queue to draw your own widgets you can access the command buffer of each window by calling {@link #nk_window_get_canvas window_get_canvas} after previously
* having called {@link #nk_begin begin}:
Important to know if you want to create your own widgets is the {@link #nk_widget widget} call. It allocates space on the panel reserved for this widget to be used,
* but also returns the state of the widget space. If your widget is not seen and does not have to be updated it is '0' and you can just return. If it
* only has to be drawn the state will be {@link #NK_WIDGET_ROM WIDGET_ROM} otherwise you can do both update and draw your widget. The reason for separating is to only draw and
* update what is actually neccessary which is crucial for performance.
*
*
STACK
*
*
The style modifier stack can be used to temporarily change a property inside `nk_style`. For example if you want a special red button you can
* temporarily push the old button color onto a stack draw the button with a red color and then you just pop the old color back from the stack:
Nuklear has a stack for style_items, float properties, vector properties, flags, colors, fonts and for button_behavior. Each has it's own fixed size
* stack which can be changed in compile time.
*/
public class Nuklear {
/** Constants. */
public static final int
NK_UTF_INVALID = 0xFFFD,
NK_UTF_SIZE = 4,
NK_INPUT_MAX = 16,
NK_MAX_NUMBER_BUFFER = 64;
/** Constants. */
public static final float
NK_UNDEFINED = -1.0f,
NK_SCROLLBAR_HIDING_TIMEOUT = 4.0f;
/**
* Boolean values.
*
*
Enum values:
*
*
*
{@link #nk_false nk_false}
*
{@link #nk_true nk_true}
*
*/
public static final int
nk_false = 0,
nk_true = 1;
/**
* nk_heading
*
*
Enum values:
*
*
*
{@link #NK_UP UP}
*
{@link #NK_RIGHT RIGHT}
*
{@link #NK_DOWN DOWN}
*
{@link #NK_LEFT LEFT}
*
*/
public static final int
NK_UP = 0,
NK_RIGHT = 1,
NK_DOWN = 2,
NK_LEFT = 3;
/**
* nk_button_behavior
*
*
Enum values:
*
*
*
{@link #NK_BUTTON_DEFAULT BUTTON_DEFAULT}
*
{@link #NK_BUTTON_REPEATER BUTTON_REPEATER}
*
*/
public static final int
NK_BUTTON_DEFAULT = 0,
NK_BUTTON_REPEATER = 1;
/**
* nk_modify
*
*
Enum values:
*
*
*
{@link #NK_FIXED FIXED}
*
{@link #NK_MODIFIABLE MODIFIABLE}
*
*/
public static final int
NK_FIXED = nk_false,
NK_MODIFIABLE = nk_true;
/**
* nk_orientation
*
*
Enum values:
*
*
*
{@link #NK_VERTICAL VERTICAL}
*
{@link #NK_HORIZONTAL HORIZONTAL}
*
*/
public static final int
NK_VERTICAL = 0,
NK_HORIZONTAL = 1;
/**
* nk_collapse_states
*
*
Enum values:
*
*
*
{@link #NK_MINIMIZED MINIMIZED}
*
{@link #NK_MAXIMIZED MAXIMIZED}
*
*/
public static final int
NK_MINIMIZED = nk_false,
NK_MAXIMIZED = nk_true;
/**
* nk_show_states
*
*
Enum values:
*
*
*
{@link #NK_HIDDEN HIDDEN}
*
{@link #NK_SHOWN SHOWN}
*
*/
public static final int
NK_HIDDEN = nk_false,
NK_SHOWN = nk_true;
/**
* nk_chart_type
*
*
Enum values:
*
*
*
{@link #NK_CHART_LINES CHART_LINES}
*
{@link #NK_CHART_COLUMN CHART_COLUMN}
*
{@link #NK_CHART_MAX CHART_MAX}
*
*/
public static final int
NK_CHART_LINES = 0,
NK_CHART_COLUMN = 1,
NK_CHART_MAX = 2;
/**
* nk_chart_event
*
*
Enum values:
*
*
*
{@link #NK_CHART_HOVERING CHART_HOVERING}
*
{@link #NK_CHART_CLICKED CHART_CLICKED}
*
*/
public static final int
NK_CHART_HOVERING = 0x1,
NK_CHART_CLICKED = 0x2;
/**
* nk_color_format
*
*
Enum values:
*
*
*
{@link #NK_RGB RGB}
*
{@link #NK_RGBA RGBA}
*
*/
public static final int
NK_RGB = 0,
NK_RGBA = 1;
/**
* nk_popup_type
*
*
Enum values:
*
*
*
{@link #NK_POPUP_STATIC POPUP_STATIC}
*
{@link #NK_POPUP_DYNAMIC POPUP_DYNAMIC}
*
*/
public static final int
NK_POPUP_STATIC = 0,
NK_POPUP_DYNAMIC = 1;
/**
* nk_layout_format
*
*
Enum values:
*
*
*
{@link #NK_DYNAMIC DYNAMIC}
*
{@link #NK_STATIC STATIC}
*
*/
public static final int
NK_DYNAMIC = 0,
NK_STATIC = 1;
/**
* nk_tree_type
*
*
Enum values:
*
*
*
{@link #NK_TREE_NODE TREE_NODE}
*
{@link #NK_TREE_TAB TREE_TAB}
*
*/
public static final int
NK_TREE_NODE = 0,
NK_TREE_TAB = 1;
/**
* nk_anti_aliasing
*
*
Enum values:
*
*
*
{@link #NK_ANTI_ALIASING_OFF ANTI_ALIASING_OFF}
*
{@link #NK_ANTI_ALIASING_ON ANTI_ALIASING_ON}
*
*/
public static final int
NK_ANTI_ALIASING_OFF = 0,
NK_ANTI_ALIASING_ON = 1;
/**
* nk_convert_result
*
*
{@link #NK_WINDOW_BORDER WINDOW_BORDER} - Draws a border around the window to visually separate the window from the background
*
{@link #NK_WINDOW_MOVABLE WINDOW_MOVABLE} - The movable flag indicates that a window can be moved by user input or by dragging the window header
*
{@link #NK_WINDOW_SCALABLE WINDOW_SCALABLE} - The scalable flag indicates that a window can be scaled by user input by dragging a scaler icon at the button of the window
*
{@link #NK_WINDOW_CLOSABLE WINDOW_CLOSABLE} - adds a closable icon into the header
*
{@link #NK_WINDOW_MINIMIZABLE WINDOW_MINIMIZABLE} - adds a minimize icon into the header
*
{@link #NK_WINDOW_NO_SCROLLBAR WINDOW_NO_SCROLLBAR} - Removes the scrollbar from the window
*
{@link #NK_WINDOW_TITLE WINDOW_TITLE} - Forces a header at the top at the window showing the title
*
{@link #NK_WINDOW_SCROLL_AUTO_HIDE WINDOW_SCROLL_AUTO_HIDE} - Automatically hides the window scrollbar if no user interaction: also requires delta time in {@code nk_context} to be set each frame
*
{@link #NK_WINDOW_BACKGROUND WINDOW_BACKGROUND} - Always keep window in the background
*
{@link #NK_WINDOW_SCALE_LEFT WINDOW_SCALE_LEFT} - Puts window scaler in the left-bottom corner instead right-bottom
*
{@link #NK_WINDOW_NO_INPUT WINDOW_NO_INPUT} - Prevents window of scaling, moving or getting focus
{@link #NK_WINDOW_DYNAMIC WINDOW_DYNAMIC} - special window type growing up in height while being filled to a certain maximum height
*
{@link #NK_WINDOW_ROM WINDOW_ROM} - sets the window into a read only mode and does not allow input changes
*
{@link #NK_WINDOW_HIDDEN WINDOW_HIDDEN} - Hides the window and stops any window interaction and drawing can be set by user input or by closing the window
*
{@link #NK_WINDOW_CLOSED WINDOW_CLOSED} - Directly closes and frees the window at the end of the frame
*
{@link #NK_WINDOW_MINIMIZED WINDOW_MINIMIZED} - marks the window as minimized
*
{@link #NK_WINDOW_REMOVE_ROM WINDOW_REMOVE_ROM} - Removes the read only mode at the end of the window
*
*/
public static final int
NK_WINDOW_PRIVATE = 1 << 11,
NK_WINDOW_DYNAMIC = NK_WINDOW_PRIVATE,
NK_WINDOW_ROM = 1 << 12,
NK_WINDOW_HIDDEN = 1 << 13,
NK_WINDOW_CLOSED = 1 << 14,
NK_WINDOW_MINIMIZED = 1 << 15,
NK_WINDOW_REMOVE_ROM = 1 << 16;
static { Library.loadSystem(System::load, System::loadLibrary, Nuklear.class, Platform.mapLibraryNameBundled("lwjgl_nuklear")); }
protected Nuklear() {
throw new UnsupportedOperationException();
}
// --- [ nk_init_fixed ] ---
/**
* Unsafe version of: {@link #nk_init_fixed init_fixed}
*
* @param size must contain the total size of {@code memory}
*/
public static native int nnk_init_fixed(long ctx, long memory, long size, long font);
/**
* Initializes context from single fixed size memory block.
*
*
Should be used if you want complete control over nuklears memory management. Especially recommended for system with little memory or systems with
* virtual memory. For the later case you can just allocate for example 16MB of virtual memory and only the required amount of memory will actually be
* committed.
*
*
IMPORTANT: make sure the passed memory block is aligned correctly for {@link NkDrawCommand}.
*
* @param ctx the nuklear context
* @param memory must point to a previously allocated memory block
* @param font must point to a previously initialized font handle
*/
@NativeType("int")
public static boolean nk_init_fixed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("void *") ByteBuffer memory, @Nullable @NativeType("struct nk_user_font const *") NkUserFont font) {
return nnk_init_fixed(ctx.address(), memAddress(memory), memory.remaining(), memAddressSafe(font)) != 0;
}
// --- [ nk_init ] ---
/** Unsafe version of: {@link #nk_init init} */
public static native int nnk_init(long ctx, long allocator, long font);
/**
* Initializes context with memory allocator callbacks for alloc and free.
*
*
Used internally for {@code nk_init_default} and provides a kitchen sink allocation interface to nuklear. Can be useful for cases like monitoring
* memory consumption.
*
* @param ctx the nuklear context
* @param allocator must point to a previously allocated memory allocator
* @param font must point to a previously initialized font handle
*/
@NativeType("int")
public static boolean nk_init(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_allocator *") NkAllocator allocator, @Nullable @NativeType("struct nk_user_font const *") NkUserFont font) {
return nnk_init(ctx.address(), allocator.address(), memAddressSafe(font)) != 0;
}
// --- [ nk_init_custom ] ---
/** Unsafe version of: {@link #nk_init_custom init_custom} */
public static native int nnk_init_custom(long ctx, long cmds, long pool, long font);
/**
* Initializes context from two buffers. One for draw commands the other for window/panel/table allocations.
*
* @param ctx the nuklear context
* @param cmds must point to a previously initialized memory buffer either fixed or dynamic to store draw commands into
* @param pool must point to a previously initialized memory buffer either fixed or dynamic to store windows, panels and tables
* @param font must point to a previously initialized font handle
*/
@NativeType("int")
public static boolean nk_init_custom(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_buffer *") NkBuffer cmds, @NativeType("struct nk_buffer *") NkBuffer pool, @Nullable @NativeType("struct nk_user_font const *") NkUserFont font) {
return nnk_init_custom(ctx.address(), cmds.address(), pool.address(), memAddressSafe(font)) != 0;
}
// --- [ nk_clear ] ---
/** Unsafe version of: {@link #nk_clear clear} */
public static native void nnk_clear(long ctx);
/**
* Called at the end of the frame to reset and prepare the context for the next frame.
*
*
Resets the context state at the end of the frame. This includes mostly garbage collector tasks like removing windows or table not called and
* therefore used anymore.
*
* @param ctx the nuklear context
*/
public static void nk_clear(@NativeType("struct nk_context *") NkContext ctx) {
nnk_clear(ctx.address());
}
// --- [ nk_free ] ---
/** Unsafe version of: {@link #nk_free free} */
public static native void nnk_free(long ctx);
/**
* Shutdown and free all memory allocated inside the context.
*
*
Frees all memory allocated by nuklear. Not needed if context was initialized with {@link #nk_init_fixed init_fixed}.
*
* @param ctx the nuklear context
*/
public static void nk_free(@NativeType("struct nk_context *") NkContext ctx) {
nnk_free(ctx.address());
}
// --- [ nk_set_user_data ] ---
/** Unsafe version of: {@link #nk_set_user_data set_user_data} */
public static native void nnk_set_user_data(long ctx, long handle);
/**
* Utility function to pass user data to draw command.
*
* @param ctx the nuklear context
* @param handle handle with either pointer or index to be passed into every draw commands
*/
public static void nk_set_user_data(@NativeType("struct nk_context *") NkContext ctx, @NativeType("nk_handle") NkHandle handle) {
nnk_set_user_data(ctx.address(), handle.address());
}
// --- [ nk_begin ] ---
/** Unsafe version of: {@link #nk_begin begin} */
public static native int nnk_begin(long ctx, long title, long bounds, int flags);
/**
* Starts a new window; needs to be called every frame for every window (unless hidden) or otherwise the window gets removed.
*
* @param ctx the nuklear context
* @param flags one or more of:
{@link #NK_WINDOW_PRIVATE WINDOW_PRIVATE}
{@link #NK_WINDOW_DYNAMIC WINDOW_DYNAMIC}
{@link #NK_WINDOW_ROM WINDOW_ROM}
{@link #NK_WINDOW_HIDDEN WINDOW_HIDDEN}
{@link #NK_WINDOW_CLOSED WINDOW_CLOSED}
{@link #NK_WINDOW_MINIMIZED WINDOW_MINIMIZED}
{@link #NK_WINDOW_REMOVE_ROM WINDOW_REMOVE_ROM}
*/
@NativeType("int")
public static boolean nk_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer title, @NativeType("struct nk_rect") NkRect bounds, @NativeType("nk_flags") int flags) {
if (CHECKS) {
checkNT1(title);
}
return nnk_begin(ctx.address(), memAddress(title), bounds.address(), flags) != 0;
}
/**
* Starts a new window; needs to be called every frame for every window (unless hidden) or otherwise the window gets removed.
*
* @param ctx the nuklear context
* @param flags one or more of:
{@link #NK_WINDOW_PRIVATE WINDOW_PRIVATE}
{@link #NK_WINDOW_DYNAMIC WINDOW_DYNAMIC}
{@link #NK_WINDOW_ROM WINDOW_ROM}
{@link #NK_WINDOW_HIDDEN WINDOW_HIDDEN}
{@link #NK_WINDOW_CLOSED WINDOW_CLOSED}
{@link #NK_WINDOW_MINIMIZED WINDOW_MINIMIZED}
{@link #NK_WINDOW_REMOVE_ROM WINDOW_REMOVE_ROM}
*/
@NativeType("int")
public static boolean nk_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence title, @NativeType("struct nk_rect") NkRect bounds, @NativeType("nk_flags") int flags) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_begin(ctx.address(), memAddress(titleEncoded), bounds.address(), flags) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_begin_titled ] ---
/** Unsafe version of: {@link #nk_begin_titled begin_titled} */
public static native int nnk_begin_titled(long ctx, long name, long title, long bounds, int flags);
/**
* Extended window start with separated title and identifier to allow multiple windows with same name but not title.
*
* @param ctx the nuklear context
* @param flags one or more of:
{@link #NK_WINDOW_PRIVATE WINDOW_PRIVATE}
{@link #NK_WINDOW_DYNAMIC WINDOW_DYNAMIC}
{@link #NK_WINDOW_ROM WINDOW_ROM}
{@link #NK_WINDOW_HIDDEN WINDOW_HIDDEN}
{@link #NK_WINDOW_CLOSED WINDOW_CLOSED}
{@link #NK_WINDOW_MINIMIZED WINDOW_MINIMIZED}
{@link #NK_WINDOW_REMOVE_ROM WINDOW_REMOVE_ROM}
*/
@NativeType("int")
public static boolean nk_begin_titled(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name, @NativeType("char const *") ByteBuffer title, @NativeType("struct nk_rect") NkRect bounds, @NativeType("nk_flags") int flags) {
if (CHECKS) {
checkNT1(name);
checkNT1(title);
}
return nnk_begin_titled(ctx.address(), memAddress(name), memAddress(title), bounds.address(), flags) != 0;
}
/**
* Extended window start with separated title and identifier to allow multiple windows with same name but not title.
*
* @param ctx the nuklear context
* @param flags one or more of:
{@link #NK_WINDOW_PRIVATE WINDOW_PRIVATE}
{@link #NK_WINDOW_DYNAMIC WINDOW_DYNAMIC}
{@link #NK_WINDOW_ROM WINDOW_ROM}
{@link #NK_WINDOW_HIDDEN WINDOW_HIDDEN}
{@link #NK_WINDOW_CLOSED WINDOW_CLOSED}
{@link #NK_WINDOW_MINIMIZED WINDOW_MINIMIZED}
{@link #NK_WINDOW_REMOVE_ROM WINDOW_REMOVE_ROM}
*/
@NativeType("int")
public static boolean nk_begin_titled(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name, @NativeType("char const *") CharSequence title, @NativeType("struct nk_rect") NkRect bounds, @NativeType("nk_flags") int flags) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_begin_titled(ctx.address(), memAddress(nameEncoded), memAddress(titleEncoded), bounds.address(), flags) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_end ] ---
/** Unsafe version of: {@link #nk_end end} */
public static native void nnk_end(long ctx);
/**
* Needs to be called at the end of the window building process to process scaling, scrollbars and general cleanup.
*
* @param ctx the nuklear context
*/
public static void nk_end(@NativeType("struct nk_context *") NkContext ctx) {
nnk_end(ctx.address());
}
// --- [ nk_window_find ] ---
/** Unsafe version of: {@link #nk_window_find window_find} */
public static native long nnk_window_find(long ctx, long name);
/**
* Finds and returns the window with give name.
*
* @param ctx the nuklear context
*/
@Nullable
@NativeType("struct nk_window *")
public static NkWindow nk_window_find(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name) {
if (CHECKS) {
checkNT1(name);
}
long __result = nnk_window_find(ctx.address(), memAddress(name));
return NkWindow.createSafe(__result);
}
/**
* Finds and returns the window with give name.
*
* @param ctx the nuklear context
*/
@Nullable
@NativeType("struct nk_window *")
public static NkWindow nk_window_find(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
long __result = nnk_window_find(ctx.address(), memAddress(nameEncoded));
return NkWindow.createSafe(__result);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_get_bounds ] ---
/** Unsafe version of: {@link #nk_window_get_bounds window_get_bounds} */
public static native void nnk_window_get_bounds(long ctx, long __result);
/**
* Returns a rectangle with screen position and size of the currently processed window.
*
* @param ctx the nuklear context
*/
@NativeType("struct nk_rect")
public static NkRect nk_window_get_bounds(@NativeType("struct nk_context const *") NkContext ctx, NkRect __result) {
nnk_window_get_bounds(ctx.address(), __result.address());
return __result;
}
// --- [ nk_window_get_position ] ---
/** Unsafe version of: {@link #nk_window_get_position window_get_position} */
public static native void nnk_window_get_position(long ctx, long __result);
/**
* Returns the position of the currently processed window.
*
* @param ctx the nuklear context
*/
@NativeType("struct nk_vec2")
public static NkVec2 nk_window_get_position(@NativeType("struct nk_context const *") NkContext ctx, NkVec2 __result) {
nnk_window_get_position(ctx.address(), __result.address());
return __result;
}
// --- [ nk_window_get_size ] ---
/** Unsafe version of: {@link #nk_window_get_size window_get_size} */
public static native void nnk_window_get_size(long ctx, long __result);
/**
* Returns the size with width and height of the currently processed window.
*
* @param ctx the nuklear context
*/
@NativeType("struct nk_vec2")
public static NkVec2 nk_window_get_size(@NativeType("struct nk_context const *") NkContext ctx, NkVec2 __result) {
nnk_window_get_size(ctx.address(), __result.address());
return __result;
}
// --- [ nk_window_get_width ] ---
/** Unsafe version of: {@link #nk_window_get_width window_get_width} */
public static native float nnk_window_get_width(long ctx);
/**
* Returns the width of the currently processed window.
*
* @param ctx the nuklear context
*/
public static float nk_window_get_width(@NativeType("struct nk_context const *") NkContext ctx) {
return nnk_window_get_width(ctx.address());
}
// --- [ nk_window_get_height ] ---
/** Unsafe version of: {@link #nk_window_get_height window_get_height} */
public static native float nnk_window_get_height(long ctx);
/**
* Returns the height of the currently processed window.
*
* @param ctx the nuklear context
*/
public static float nk_window_get_height(@NativeType("struct nk_context const *") NkContext ctx) {
return nnk_window_get_height(ctx.address());
}
// --- [ nk_window_get_panel ] ---
/** Unsafe version of: {@link #nk_window_get_panel window_get_panel} */
public static native long nnk_window_get_panel(long ctx);
/**
* Returns the underlying panel which contains all processing state of the current window.
*
* @param ctx the nuklear context
*/
@Nullable
@NativeType("struct nk_panel *")
public static NkPanel nk_window_get_panel(@NativeType("struct nk_context *") NkContext ctx) {
long __result = nnk_window_get_panel(ctx.address());
return NkPanel.createSafe(__result);
}
// --- [ nk_window_get_content_region ] ---
/** Unsafe version of: {@link #nk_window_get_content_region window_get_content_region} */
public static native void nnk_window_get_content_region(long ctx, long __result);
/**
* Returns the position and size of the currently visible and non-clipped space inside the currently processed window.
*
* @param ctx the nuklear context
*/
@NativeType("struct nk_rect")
public static NkRect nk_window_get_content_region(@NativeType("struct nk_context *") NkContext ctx, NkRect __result) {
nnk_window_get_content_region(ctx.address(), __result.address());
return __result;
}
// --- [ nk_window_get_content_region_min ] ---
/** Unsafe version of: {@link #nk_window_get_content_region_min window_get_content_region_min} */
public static native void nnk_window_get_content_region_min(long ctx, long __result);
/**
* Returns the upper rectangle position of the currently visible and non-clipped space inside the currently processed window.
*
* @param ctx the nuklear context
*/
@NativeType("struct nk_vec2")
public static NkVec2 nk_window_get_content_region_min(@NativeType("struct nk_context *") NkContext ctx, NkVec2 __result) {
nnk_window_get_content_region_min(ctx.address(), __result.address());
return __result;
}
// --- [ nk_window_get_content_region_max ] ---
/** Unsafe version of: {@link #nk_window_get_content_region_max window_get_content_region_max} */
public static native void nnk_window_get_content_region_max(long ctx, long __result);
/**
* Returns the upper rectangle position of the currently visible and non-clipped space inside the currently processed window.
*
* @param ctx the nuklear context
*/
@NativeType("struct nk_vec2")
public static NkVec2 nk_window_get_content_region_max(@NativeType("struct nk_context *") NkContext ctx, NkVec2 __result) {
nnk_window_get_content_region_max(ctx.address(), __result.address());
return __result;
}
// --- [ nk_window_get_content_region_size ] ---
/** Unsafe version of: {@link #nk_window_get_content_region_size window_get_content_region_size} */
public static native void nnk_window_get_content_region_size(long ctx, long __result);
/**
* Returns the size of the currently visible and non-clipped space inside the currently processed window.
*
* @param ctx the nuklear context
*/
@NativeType("struct nk_vec2")
public static NkVec2 nk_window_get_content_region_size(@NativeType("struct nk_context *") NkContext ctx, NkVec2 __result) {
nnk_window_get_content_region_size(ctx.address(), __result.address());
return __result;
}
// --- [ nk_window_get_canvas ] ---
/** Unsafe version of: {@link #nk_window_get_canvas window_get_canvas} */
public static native long nnk_window_get_canvas(long ctx);
/**
* Returns the draw command buffer. Can be used to draw custom widgets.
*
* @param ctx the nuklear context
*/
@Nullable
@NativeType("struct nk_command_buffer *")
public static NkCommandBuffer nk_window_get_canvas(@NativeType("struct nk_context *") NkContext ctx) {
long __result = nnk_window_get_canvas(ctx.address());
return NkCommandBuffer.createSafe(__result);
}
// --- [ nk_window_has_focus ] ---
/** Unsafe version of: {@link #nk_window_has_focus window_has_focus} */
public static native int nnk_window_has_focus(long ctx);
/**
* Returns if the currently processed window is currently active.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_has_focus(@NativeType("struct nk_context const *") NkContext ctx) {
return nnk_window_has_focus(ctx.address()) != 0;
}
// --- [ nk_window_is_collapsed ] ---
/** Unsafe version of: {@link #nk_window_is_collapsed window_is_collapsed} */
public static native int nnk_window_is_collapsed(long ctx, long name);
/**
* Returns if the window with given name is currently minimized/collapsed.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_collapsed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name) {
if (CHECKS) {
checkNT1(name);
}
return nnk_window_is_collapsed(ctx.address(), memAddress(name)) != 0;
}
/**
* Returns if the window with given name is currently minimized/collapsed.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_collapsed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
return nnk_window_is_collapsed(ctx.address(), memAddress(nameEncoded)) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_is_closed ] ---
/** Unsafe version of: {@link #nk_window_is_closed window_is_closed} */
public static native int nnk_window_is_closed(long ctx, long name);
/**
* Returns if the currently processed window was closed.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_closed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name) {
if (CHECKS) {
checkNT1(name);
}
return nnk_window_is_closed(ctx.address(), memAddress(name)) != 0;
}
/**
* Returns if the currently processed window was closed.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_closed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
return nnk_window_is_closed(ctx.address(), memAddress(nameEncoded)) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_is_hidden ] ---
/** Unsafe version of: {@link #nk_window_is_hidden window_is_hidden} */
public static native int nnk_window_is_hidden(long ctx, long name);
/**
* Returns if the currently processed window was hidden.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_hidden(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name) {
if (CHECKS) {
checkNT1(name);
}
return nnk_window_is_hidden(ctx.address(), memAddress(name)) != 0;
}
/**
* Returns if the currently processed window was hidden.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_hidden(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
return nnk_window_is_hidden(ctx.address(), memAddress(nameEncoded)) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_is_active ] ---
/** Unsafe version of: {@link #nk_window_is_active window_is_active} */
public static native int nnk_window_is_active(long ctx, long name);
/**
* Same as {@link #nk_window_has_focus window_has_focus} for some reason.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_active(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name) {
if (CHECKS) {
checkNT1(name);
}
return nnk_window_is_active(ctx.address(), memAddress(name)) != 0;
}
/**
* Same as {@link #nk_window_has_focus window_has_focus} for some reason.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_active(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
return nnk_window_is_active(ctx.address(), memAddress(nameEncoded)) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_is_hovered ] ---
/** Unsafe version of: {@link #nk_window_is_hovered window_is_hovered} */
public static native int nnk_window_is_hovered(long ctx);
/**
* Returns if the currently processed window is currently being hovered by mouse.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_hovered(@NativeType("struct nk_context *") NkContext ctx) {
return nnk_window_is_hovered(ctx.address()) != 0;
}
// --- [ nk_window_is_any_hovered ] ---
/** Unsafe version of: {@link #nk_window_is_any_hovered window_is_any_hovered} */
public static native int nnk_window_is_any_hovered(long ctx);
/**
* Return if any window currently hovered.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_window_is_any_hovered(@NativeType("struct nk_context *") NkContext ctx) {
return nnk_window_is_any_hovered(ctx.address()) != 0;
}
// --- [ nk_item_is_any_active ] ---
/** Unsafe version of: {@link #nk_item_is_any_active item_is_any_active} */
public static native int nnk_item_is_any_active(long ctx);
/**
* Returns if any window or widgets is currently hovered or active.
*
* @param ctx the nuklear context
*/
@NativeType("int")
public static boolean nk_item_is_any_active(@NativeType("struct nk_context *") NkContext ctx) {
return nnk_item_is_any_active(ctx.address()) != 0;
}
// --- [ nk_window_set_bounds ] ---
/** Unsafe version of: {@link #nk_window_set_bounds window_set_bounds} */
public static native void nnk_window_set_bounds(long ctx, long name, long bounds);
/**
* Updates position and size of the specified window.
*
* @param ctx the nuklear context
* @param name name of the window to modify both position and size
* @param bounds points to a {@code nk_rect} struct with the new position and size of the specified window
*/
public static void nk_window_set_bounds(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name, @NativeType("struct nk_rect") NkRect bounds) {
if (CHECKS) {
checkNT1(name);
}
nnk_window_set_bounds(ctx.address(), memAddress(name), bounds.address());
}
/**
* Updates position and size of the specified window.
*
* @param ctx the nuklear context
* @param name name of the window to modify both position and size
* @param bounds points to a {@code nk_rect} struct with the new position and size of the specified window
*/
public static void nk_window_set_bounds(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name, @NativeType("struct nk_rect") NkRect bounds) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
nnk_window_set_bounds(ctx.address(), memAddress(nameEncoded), bounds.address());
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_set_position ] ---
/** Unsafe version of: {@link #nk_window_set_position window_set_position} */
public static native void nnk_window_set_position(long ctx, long name, long position);
/**
* Updates position of the currently process window.
*
* @param ctx the nuklear context
* @param name name of the window to modify position of
* @param position points to a {@code nk_vec2} struct with the new position of currently active window
*/
public static void nk_window_set_position(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name, @NativeType("struct nk_vec2") NkVec2 position) {
if (CHECKS) {
checkNT1(name);
}
nnk_window_set_position(ctx.address(), memAddress(name), position.address());
}
/**
* Updates position of the currently process window.
*
* @param ctx the nuklear context
* @param name name of the window to modify position of
* @param position points to a {@code nk_vec2} struct with the new position of currently active window
*/
public static void nk_window_set_position(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name, @NativeType("struct nk_vec2") NkVec2 position) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
nnk_window_set_position(ctx.address(), memAddress(nameEncoded), position.address());
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_set_size ] ---
/** Unsafe version of: {@link #nk_window_set_size window_set_size} */
public static native void nnk_window_set_size(long ctx, long name, long size);
/**
* Updates the size of the specified window.
*
* @param ctx the nuklear context
* @param name name of the window to modify size of
* @param size points to a {@code nk_vec2} struct with the new size of currently active window
*/
public static void nk_window_set_size(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name, @NativeType("struct nk_vec2") NkVec2 size) {
if (CHECKS) {
checkNT1(name);
}
nnk_window_set_size(ctx.address(), memAddress(name), size.address());
}
/**
* Updates the size of the specified window.
*
* @param ctx the nuklear context
* @param name name of the window to modify size of
* @param size points to a {@code nk_vec2} struct with the new size of currently active window
*/
public static void nk_window_set_size(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name, @NativeType("struct nk_vec2") NkVec2 size) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
nnk_window_set_size(ctx.address(), memAddress(nameEncoded), size.address());
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_set_focus ] ---
/** Unsafe version of: {@link #nk_window_set_focus window_set_focus} */
public static native void nnk_window_set_focus(long ctx, long name);
/**
* Sets the specified window as active window.
*
* @param ctx the nuklear context
* @param name name of the window to be set active
*/
public static void nk_window_set_focus(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name) {
if (CHECKS) {
checkNT1(name);
}
nnk_window_set_focus(ctx.address(), memAddress(name));
}
/**
* Sets the specified window as active window.
*
* @param ctx the nuklear context
* @param name name of the window to be set active
*/
public static void nk_window_set_focus(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
nnk_window_set_focus(ctx.address(), memAddress(nameEncoded));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_close ] ---
/** Unsafe version of: {@link #nk_window_close window_close} */
public static native void nnk_window_close(long ctx, long name);
/**
* Closes the window with given window name which deletes the window at the end of the frame.
*
* @param ctx the nuklear context
*/
public static void nk_window_close(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name) {
if (CHECKS) {
checkNT1(name);
}
nnk_window_close(ctx.address(), memAddress(name));
}
/**
* Closes the window with given window name which deletes the window at the end of the frame.
*
* @param ctx the nuklear context
*/
public static void nk_window_close(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
nnk_window_close(ctx.address(), memAddress(nameEncoded));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_collapse ] ---
/** Unsafe version of: {@link #nk_window_collapse window_collapse} */
public static native void nnk_window_collapse(long ctx, long name, int c);
/**
* Collapses the window with given window name.
*
* @param ctx the nuklear context
* @param c one of:
{@link #NK_MINIMIZED MINIMIZED}
{@link #NK_MAXIMIZED MAXIMIZED}
*/
public static void nk_window_collapse(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name, @NativeType("enum nk_collapse_states") int c) {
if (CHECKS) {
checkNT1(name);
}
nnk_window_collapse(ctx.address(), memAddress(name), c);
}
/**
* Collapses the window with given window name.
*
* @param ctx the nuklear context
* @param c one of:
{@link #NK_MINIMIZED MINIMIZED}
{@link #NK_MAXIMIZED MAXIMIZED}
*/
public static void nk_window_collapse(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name, @NativeType("enum nk_collapse_states") int c) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
nnk_window_collapse(ctx.address(), memAddress(nameEncoded), c);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_collapse_if ] ---
/** Unsafe version of: {@link #nk_window_collapse_if window_collapse_if} */
public static native void nnk_window_collapse_if(long ctx, long name, int c, int cond);
/**
* Collapses the window with given window name if the given condition was met.
*
* @param ctx the nuklear context
* @param c one of:
{@link #NK_MINIMIZED MINIMIZED}
{@link #NK_MAXIMIZED MAXIMIZED}
*/
public static void nk_window_collapse_if(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name, @NativeType("enum nk_collapse_states") int c, @NativeType("int") boolean cond) {
if (CHECKS) {
checkNT1(name);
}
nnk_window_collapse_if(ctx.address(), memAddress(name), c, cond ? 1 : 0);
}
/**
* Collapses the window with given window name if the given condition was met.
*
* @param ctx the nuklear context
* @param c one of:
{@link #NK_MINIMIZED MINIMIZED}
{@link #NK_MAXIMIZED MAXIMIZED}
*/
public static void nk_window_collapse_if(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name, @NativeType("enum nk_collapse_states") int c, @NativeType("int") boolean cond) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
nnk_window_collapse_if(ctx.address(), memAddress(nameEncoded), c, cond ? 1 : 0);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_show ] ---
/** Unsafe version of: {@link #nk_window_show window_show} */
public static native void nnk_window_show(long ctx, long name, int s);
/**
* Hides a visible or reshows a hidden window.
*
* @param ctx the nuklear context
* @param s one of:
{@link #NK_HIDDEN HIDDEN}
{@link #NK_SHOWN SHOWN}
*/
public static void nk_window_show(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name, @NativeType("enum nk_show_states") int s) {
if (CHECKS) {
checkNT1(name);
}
nnk_window_show(ctx.address(), memAddress(name), s);
}
/**
* Hides a visible or reshows a hidden window.
*
* @param ctx the nuklear context
* @param s one of:
{@link #NK_HIDDEN HIDDEN}
{@link #NK_SHOWN SHOWN}
*/
public static void nk_window_show(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name, @NativeType("enum nk_show_states") int s) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
nnk_window_show(ctx.address(), memAddress(nameEncoded), s);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_window_show_if ] ---
/** Unsafe version of: {@link #nk_window_show_if window_show_if} */
public static native void nnk_window_show_if(long ctx, long name, int s, int cond);
/**
* Hides/shows a window depending on condition.
*
* @param ctx the nuklear context
* @param s one of:
{@link #NK_HIDDEN HIDDEN}
{@link #NK_SHOWN SHOWN}
*/
public static void nk_window_show_if(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name, @NativeType("enum nk_show_states") int s, @NativeType("int") boolean cond) {
if (CHECKS) {
checkNT1(name);
}
nnk_window_show_if(ctx.address(), memAddress(name), s, cond ? 1 : 0);
}
/**
* Hides/shows a window depending on condition.
*
* @param ctx the nuklear context
* @param s one of:
IMPORTANT: The passed height needs to include both your preferred row height as well as padding. No internal padding is added.
*
* @param ctx the nuklear context
* @param height new minimum row height to be used for auto generating the row height
*/
public static void nk_layout_set_min_row_height(@NativeType("struct nk_context *") NkContext ctx, float height) {
nnk_layout_set_min_row_height(ctx.address(), height);
}
// --- [ nk_layout_reset_min_row_height ] ---
/** Unsafe version of: {@link #nk_layout_reset_min_row_height layout_reset_min_row_height} */
public static native void nnk_layout_reset_min_row_height(long ctx);
/**
* Resets the currently used minimum row height back to font height + text padding + additional padding
* ({@code style_window.min_row_height_padding}).
*
* @param ctx the nuklear context
*/
public static void nk_layout_reset_min_row_height(@NativeType("struct nk_context *") NkContext ctx) {
nnk_layout_reset_min_row_height(ctx.address());
}
// --- [ nk_layout_widget_bounds ] ---
/** Unsafe version of: {@link #nk_layout_widget_bounds layout_widget_bounds} */
public static native void nnk_layout_widget_bounds(long ctx, long __result);
/**
* Returns the width of the next row allocate by one of the layouting functions.
*
* @param ctx the nuklear context
*/
@NativeType("struct nk_rect")
public static NkRect nk_layout_widget_bounds(@NativeType("struct nk_context *") NkContext ctx, NkRect __result) {
nnk_layout_widget_bounds(ctx.address(), __result.address());
return __result;
}
// --- [ nk_layout_ratio_from_pixel ] ---
/** Unsafe version of: {@link #nk_layout_ratio_from_pixel layout_ratio_from_pixel} */
public static native float nnk_layout_ratio_from_pixel(long ctx, float pixel_width);
/**
* Utility function to calculate window ratio from pixel size.
*
* @param ctx the nuklear context
* @param pixel_width pixel width to convert to window ratio
*/
public static float nk_layout_ratio_from_pixel(@NativeType("struct nk_context *") NkContext ctx, float pixel_width) {
return nnk_layout_ratio_from_pixel(ctx.address(), pixel_width);
}
// --- [ nk_layout_row_dynamic ] ---
/** Unsafe version of: {@link #nk_layout_row_dynamic layout_row_dynamic} */
public static native void nnk_layout_row_dynamic(long ctx, float height, int cols);
/**
* Sets current row layout to share horizontal space between {@code cols} number of widgets evenly. Once called all subsequent widget calls greater
* than {@code cols} will allocate a new row with same layout.
*
* @param ctx the nuklear context
* @param height holds height of each widget in row or zero for auto layouting
* @param cols number of widgets inside row
*/
public static void nk_layout_row_dynamic(@NativeType("struct nk_context *") NkContext ctx, float height, @NativeType("nk_int") int cols) {
nnk_layout_row_dynamic(ctx.address(), height, cols);
}
// --- [ nk_layout_row_static ] ---
/** Unsafe version of: {@link #nk_layout_row_static layout_row_static} */
public static native void nnk_layout_row_static(long ctx, float height, int item_width, int cols);
/**
* Sets current row layout to fill {@code cols} number of widgets in row with same {@code item_width} horizontal size. Once called all subsequent
* widget calls greater than {@code cols} will allocate a new row with same layout.
*
* @param ctx the nuklear context
* @param height holds row height to allocate from panel for widget height
* @param item_width holds width of each widget in row
* @param cols number of widgets inside row
*/
public static void nk_layout_row_static(@NativeType("struct nk_context *") NkContext ctx, float height, @NativeType("nk_int") int item_width, @NativeType("nk_int") int cols) {
nnk_layout_row_static(ctx.address(), height, item_width, cols);
}
// --- [ nk_layout_row_begin ] ---
/** Unsafe version of: {@link #nk_layout_row_begin layout_row_begin} */
public static native void nnk_layout_row_begin(long ctx, int fmt, float row_height, int cols);
/**
* Starts a new dynamic or fixed row with given height and columns.
*
* @param ctx the nuklear context
* @param fmt either {@link #NK_DYNAMIC DYNAMIC} for window ratio or {@link #NK_STATIC STATIC} for fixed size columns. One of:
{@link #NK_DYNAMIC DYNAMIC}
{@link #NK_STATIC STATIC}
* @param row_height holds height of each widget in row or zero for auto layouting
* @param cols number of widgets inside row
*/
public static void nk_layout_row_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_layout_format") int fmt, float row_height, @NativeType("nk_int") int cols) {
nnk_layout_row_begin(ctx.address(), fmt, row_height, cols);
}
// --- [ nk_layout_row_push ] ---
/** Unsafe version of: {@link #nk_layout_row_push layout_row_push} */
public static native void nnk_layout_row_push(long ctx, float value);
/**
* Specifies either window ratio or width of a single column.
*
* @param ctx the nuklear context
* @param value either a window ratio or fixed width depending on {@code fmt} in previous {@link #nk_layout_row_begin layout_row_begin} call
*/
public static void nk_layout_row_push(@NativeType("struct nk_context *") NkContext ctx, float value) {
nnk_layout_row_push(ctx.address(), value);
}
// --- [ nk_layout_row_end ] ---
/** Unsafe version of: {@link #nk_layout_row_end layout_row_end} */
public static native void nnk_layout_row_end(long ctx);
/**
* Finishes previously started row
*
* @param ctx the nuklear context
*/
public static void nk_layout_row_end(@NativeType("struct nk_context *") NkContext ctx) {
nnk_layout_row_end(ctx.address());
}
// --- [ nk_layout_row ] ---
/**
* Unsafe version of: {@link #nk_layout_row layout_row}
*
* @param cols number of widgets inside row
*/
public static native void nnk_layout_row(long ctx, int fmt, float height, int cols, long ratio);
/**
* Specifies row columns in array as either window ratio or size.
*
* @param ctx the nuklear context
* @param fmt either {@link #NK_DYNAMIC DYNAMIC} for window ratio or {@link #NK_STATIC STATIC} for fixed size columns. One of:
{@link #NK_DYNAMIC DYNAMIC}
{@link #NK_STATIC STATIC}
* @param height holds height of each widget in row or zero for auto layouting
*/
public static void nk_layout_row(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_layout_format") int fmt, float height, @NativeType("float const *") FloatBuffer ratio) {
nnk_layout_row(ctx.address(), fmt, height, ratio.remaining(), memAddress(ratio));
}
// --- [ nk_layout_row_template_begin ] ---
/** Unsafe version of: {@link #nk_layout_row_template_begin layout_row_template_begin} */
public static native void nnk_layout_row_template_begin(long ctx, float height);
/**
* Begins the row template declaration.
*
* @param ctx the nuklear context
* @param height holds height of each widget in row or zero for auto layouting
*/
public static void nk_layout_row_template_begin(@NativeType("struct nk_context *") NkContext ctx, float height) {
nnk_layout_row_template_begin(ctx.address(), height);
}
// --- [ nk_layout_row_template_push_dynamic ] ---
/** Unsafe version of: {@link #nk_layout_row_template_push_dynamic layout_row_template_push_dynamic} */
public static native void nnk_layout_row_template_push_dynamic(long ctx);
/**
* Adds a dynamic column that dynamically grows and can go to zero if not enough space.
*
* @param ctx the nuklear context
*/
public static void nk_layout_row_template_push_dynamic(@NativeType("struct nk_context *") NkContext ctx) {
nnk_layout_row_template_push_dynamic(ctx.address());
}
// --- [ nk_layout_row_template_push_variable ] ---
/** Unsafe version of: {@link #nk_layout_row_template_push_variable layout_row_template_push_variable} */
public static native void nnk_layout_row_template_push_variable(long ctx, float min_width);
/**
* Adds a variable column that dynamically grows but does not shrink below specified pixel width.
*
* @param ctx the nuklear context
* @param min_width holds the minimum pixel width the next column must be
*/
public static void nk_layout_row_template_push_variable(@NativeType("struct nk_context *") NkContext ctx, float min_width) {
nnk_layout_row_template_push_variable(ctx.address(), min_width);
}
// --- [ nk_layout_row_template_push_static ] ---
/** Unsafe version of: {@link #nk_layout_row_template_push_static layout_row_template_push_static} */
public static native void nnk_layout_row_template_push_static(long ctx, float width);
/**
* Adds a static column that does not grow and will always have the same size.
*
* @param ctx the nuklear context
* @param width holds the absolute pixel width value the next column must be
*/
public static void nk_layout_row_template_push_static(@NativeType("struct nk_context *") NkContext ctx, float width) {
nnk_layout_row_template_push_static(ctx.address(), width);
}
// --- [ nk_layout_row_template_end ] ---
/** Unsafe version of: {@link #nk_layout_row_template_end layout_row_template_end} */
public static native void nnk_layout_row_template_end(long ctx);
/**
* Marks the end of the row template.
*
* @param ctx the nuklear context
*/
public static void nk_layout_row_template_end(@NativeType("struct nk_context *") NkContext ctx) {
nnk_layout_row_template_end(ctx.address());
}
// --- [ nk_layout_space_begin ] ---
/** Unsafe version of: {@link #nk_layout_space_begin layout_space_begin} */
public static native void nnk_layout_space_begin(long ctx, int fmt, float height, int widget_count);
/**
* Begins a new layouting space that allows to specify each widgets position and size.
*
* @param ctx the nuklear context
* @param fmt either {@link #NK_DYNAMIC DYNAMIC} for window ratio or {@link #NK_STATIC STATIC} for fixed size columns. One of:
{@link #NK_DYNAMIC DYNAMIC}
{@link #NK_STATIC STATIC}
* @param height holds height of each widget in row or zero for auto layouting
* @param widget_count number of widgets inside row
*/
public static void nk_layout_space_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_layout_format") int fmt, float height, @NativeType("nk_int") int widget_count) {
nnk_layout_space_begin(ctx.address(), fmt, height, widget_count);
}
// --- [ nk_layout_space_push ] ---
/** Unsafe version of: {@link #nk_layout_space_push layout_space_push} */
public static native void nnk_layout_space_push(long ctx, long rect);
/**
* Pushes position and size of the next widget in own coordiante space either as pixel or ratio.
*
* @param ctx the nuklear context
* @param rect position and size in layout space local coordinates
*/
public static void nk_layout_space_push(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_rect") NkRect rect) {
nnk_layout_space_push(ctx.address(), rect.address());
}
// --- [ nk_layout_space_end ] ---
/** Unsafe version of: {@link #nk_layout_space_end layout_space_end} */
public static native void nnk_layout_space_end(long ctx);
/**
* Marks the end of the layout space.
*
* @param ctx the nuklear context
*/
public static void nk_layout_space_end(@NativeType("struct nk_context *") NkContext ctx) {
nnk_layout_space_end(ctx.address());
}
// --- [ nk_layout_space_bounds ] ---
/** Unsafe version of: {@link #nk_layout_space_bounds layout_space_bounds} */
public static native void nnk_layout_space_bounds(long ctx, long __result);
/**
* Returns total space allocated for {@code nk_layout_space}.
*
* @param ctx the nuklear context
*/
@NativeType("struct nk_rect")
public static NkRect nk_layout_space_bounds(@NativeType("struct nk_context *") NkContext ctx, NkRect __result) {
nnk_layout_space_bounds(ctx.address(), __result.address());
return __result;
}
// --- [ nk_layout_space_to_screen ] ---
/** Unsafe version of: {@link #nk_layout_space_to_screen layout_space_to_screen} */
public static native void nnk_layout_space_to_screen(long ctx, long ret);
/**
* Converts vector from {@code nk_layout_space} coordinate space into screen space.
*
* @param ctx the nuklear context
* @param ret position to convert from layout space into screen coordinate space
*/
@NativeType("struct nk_vec2")
public static NkVec2 nk_layout_space_to_screen(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_vec2") NkVec2 ret) {
nnk_layout_space_to_screen(ctx.address(), ret.address());
return ret;
}
// --- [ nk_layout_space_to_local ] ---
/** Unsafe version of: {@link #nk_layout_space_to_local layout_space_to_local} */
public static native void nnk_layout_space_to_local(long ctx, long ret);
/**
* Converts vector from layout space into screen space.
*
* @param ctx the nuklear context
* @param ret position to convert from screen space into layout coordinate space
*/
@NativeType("struct nk_vec2")
public static NkVec2 nk_layout_space_to_local(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_vec2") NkVec2 ret) {
nnk_layout_space_to_local(ctx.address(), ret.address());
return ret;
}
// --- [ nk_layout_space_rect_to_screen ] ---
/** Unsafe version of: {@link #nk_layout_space_rect_to_screen layout_space_rect_to_screen} */
public static native void nnk_layout_space_rect_to_screen(long ctx, long ret);
/**
* Converts rectangle from screen space into layout space.
*
* @param ctx the nuklear context
* @param ret rectangle to convert from layout space into screen space
*/
@NativeType("struct nk_rect")
public static NkRect nk_layout_space_rect_to_screen(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_rect") NkRect ret) {
nnk_layout_space_rect_to_screen(ctx.address(), ret.address());
return ret;
}
// --- [ nk_layout_space_rect_to_local ] ---
/** Unsafe version of: {@link #nk_layout_space_rect_to_local layout_space_rect_to_local} */
public static native void nnk_layout_space_rect_to_local(long ctx, long ret);
/**
* Converts rectangle from layout space into screen space.
*
* @param ctx the nuklear context
* @param ret rectangle to convert from screen space into layout space
*/
@NativeType("struct nk_rect")
public static NkRect nk_layout_space_rect_to_local(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_rect") NkRect ret) {
nnk_layout_space_rect_to_local(ctx.address(), ret.address());
return ret;
}
// --- [ nk_group_begin ] ---
/** Unsafe version of: {@link #nk_group_begin group_begin} */
public static native int nnk_group_begin(long ctx, long title, int flags);
/** @param ctx the nuklear context */
@NativeType("int")
public static boolean nk_group_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer title, @NativeType("nk_flags") int flags) {
if (CHECKS) {
checkNT1(title);
}
return nnk_group_begin(ctx.address(), memAddress(title), flags) != 0;
}
/** @param ctx the nuklear context */
@NativeType("int")
public static boolean nk_group_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence title, @NativeType("nk_flags") int flags) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_group_begin(ctx.address(), memAddress(titleEncoded), flags) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_group_begin_titled ] ---
/** Unsafe version of: {@link #nk_group_begin_titled group_begin_titled} */
public static native int nnk_group_begin_titled(long ctx, long name, long title, int flags);
/**
* @param ctx the nuklear context
* @param name must be an unique identifier for this group
* @param title group header title
* @param flags window flags defined in the nk_panel_flags section with a number of different group behaviors. One or more of:
{@link #NK_WINDOW_PRIVATE WINDOW_PRIVATE}
{@link #NK_WINDOW_DYNAMIC WINDOW_DYNAMIC}
{@link #NK_WINDOW_ROM WINDOW_ROM}
{@link #NK_WINDOW_HIDDEN WINDOW_HIDDEN}
{@link #NK_WINDOW_CLOSED WINDOW_CLOSED}
{@link #NK_WINDOW_MINIMIZED WINDOW_MINIMIZED}
{@link #NK_WINDOW_REMOVE_ROM WINDOW_REMOVE_ROM}
*
* @return {@code true} if visible and fillable with widgets or {@code false} otherwise
*/
@NativeType("int")
public static boolean nk_group_begin_titled(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer name, @NativeType("char const *") ByteBuffer title, @NativeType("nk_flags") int flags) {
if (CHECKS) {
checkNT1(name);
checkNT1(title);
}
return nnk_group_begin_titled(ctx.address(), memAddress(name), memAddress(title), flags) != 0;
}
/**
* @param ctx the nuklear context
* @param name must be an unique identifier for this group
* @param title group header title
* @param flags window flags defined in the nk_panel_flags section with a number of different group behaviors. One or more of:
{@link #NK_WINDOW_PRIVATE WINDOW_PRIVATE}
{@link #NK_WINDOW_DYNAMIC WINDOW_DYNAMIC}
{@link #NK_WINDOW_ROM WINDOW_ROM}
{@link #NK_WINDOW_HIDDEN WINDOW_HIDDEN}
{@link #NK_WINDOW_CLOSED WINDOW_CLOSED}
{@link #NK_WINDOW_MINIMIZED WINDOW_MINIMIZED}
{@link #NK_WINDOW_REMOVE_ROM WINDOW_REMOVE_ROM}
*
* @return {@code true} if visible and fillable with widgets or {@code false} otherwise
*/
@NativeType("int")
public static boolean nk_group_begin_titled(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence name, @NativeType("char const *") CharSequence title, @NativeType("nk_flags") int flags) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer nameEncoded = stack.UTF8(name);
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_group_begin_titled(ctx.address(), memAddress(nameEncoded), memAddress(titleEncoded), flags) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_group_scrolled_offset_begin ] ---
/** Unsafe version of: {@link #nk_group_scrolled_offset_begin group_scrolled_offset_begin} */
public static native int nnk_group_scrolled_offset_begin(long ctx, long x_offset, long y_offset, long title, int flags);
/** @param ctx the nuklear context */
@NativeType("int")
public static boolean nk_group_scrolled_offset_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("nk_uint *") IntBuffer x_offset, @NativeType("nk_uint *") IntBuffer y_offset, @NativeType("char const *") ByteBuffer title, @NativeType("nk_flags") int flags) {
if (CHECKS) {
check(x_offset, 1);
check(y_offset, 1);
checkNT1(title);
}
return nnk_group_scrolled_offset_begin(ctx.address(), memAddress(x_offset), memAddress(y_offset), memAddress(title), flags) != 0;
}
/** @param ctx the nuklear context */
@NativeType("int")
public static boolean nk_group_scrolled_offset_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("nk_uint *") IntBuffer x_offset, @NativeType("nk_uint *") IntBuffer y_offset, @NativeType("char const *") CharSequence title, @NativeType("nk_flags") int flags) {
if (CHECKS) {
check(x_offset, 1);
check(y_offset, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_group_scrolled_offset_begin(ctx.address(), memAddress(x_offset), memAddress(y_offset), memAddress(titleEncoded), flags) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_group_scrolled_begin ] ---
/** Unsafe version of: {@link #nk_group_scrolled_begin group_scrolled_begin} */
public static native int nnk_group_scrolled_begin(long ctx, long scroll, long title, int flags);
/** @param ctx the nuklear context */
@NativeType("int")
public static boolean nk_group_scrolled_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_scroll *") NkScroll scroll, @NativeType("char const *") ByteBuffer title, @NativeType("nk_flags") int flags) {
if (CHECKS) {
checkNT1(title);
}
return nnk_group_scrolled_begin(ctx.address(), scroll.address(), memAddress(title), flags) != 0;
}
/** @param ctx the nuklear context */
@NativeType("int")
public static boolean nk_group_scrolled_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_scroll *") NkScroll scroll, @NativeType("char const *") CharSequence title, @NativeType("nk_flags") int flags) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_group_scrolled_begin(ctx.address(), scroll.address(), memAddress(titleEncoded), flags) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_group_scrolled_end ] ---
/** Unsafe version of: {@link #nk_group_scrolled_end group_scrolled_end} */
public static native void nnk_group_scrolled_end(long ctx);
/** @param ctx the nuklear context */
public static void nk_group_scrolled_end(@NativeType("struct nk_context *") NkContext ctx) {
nnk_group_scrolled_end(ctx.address());
}
// --- [ nk_group_end ] ---
/** Unsafe version of: {@link #nk_group_end group_end} */
public static native void nnk_group_end(long ctx);
/** @param ctx the nuklear context */
public static void nk_group_end(@NativeType("struct nk_context *") NkContext ctx) {
nnk_group_end(ctx.address());
}
// --- [ nk_list_view_begin ] ---
/** Unsafe version of: {@link #nk_list_view_begin list_view_begin} */
public static native int nnk_list_view_begin(long ctx, long view, long title, int flags, int row_height, int row_count);
/** @param ctx the nuklear context */
@NativeType("int")
public static boolean nk_list_view_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_list_view *") NkListView view, @NativeType("char const *") ByteBuffer title, @NativeType("nk_flags") int flags, int row_height, int row_count) {
if (CHECKS) {
checkNT1(title);
}
return nnk_list_view_begin(ctx.address(), view.address(), memAddress(title), flags, row_height, row_count) != 0;
}
/** @param ctx the nuklear context */
@NativeType("int")
public static boolean nk_list_view_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_list_view *") NkListView view, @NativeType("char const *") CharSequence title, @NativeType("nk_flags") int flags, int row_height, int row_count) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_list_view_begin(ctx.address(), view.address(), memAddress(titleEncoded), flags, row_height, row_count) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_list_view_end ] ---
public static native void nnk_list_view_end(long view);
public static void nk_list_view_end(@NativeType("struct nk_list_view *") NkListView view) {
nnk_list_view_end(view.address());
}
// --- [ nk_tree_push_hashed ] ---
/**
* Unsafe version of: {@link #nk_tree_push_hashed tree_push_hashed}
*
* @param len size of passed memory block or string in {@code hash}
*/
public static native int nnk_tree_push_hashed(long ctx, int type, long title, int initial_state, long hash, int len, int seed);
/**
* Start a collapsable UI section with internal state management with full control over internal unique ID used to store state.
*
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param title label printed in the tree header
* @param initial_state initial tree state value out of {@code nk_collapse_states}. One of:
{@link #NK_MINIMIZED MINIMIZED}
{@link #NK_MAXIMIZED MAXIMIZED}
* @param hash memory block or string to generate the ID from
* @param seed seeding value if this function is called in a loop or default to 0
*/
@NativeType("int")
public static boolean nk_tree_push_hashed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("char const *") ByteBuffer title, @NativeType("enum nk_collapse_states") int initial_state, @NativeType("char const *") ByteBuffer hash, @NativeType("nk_int") int seed) {
if (CHECKS) {
checkNT1(title);
}
return nnk_tree_push_hashed(ctx.address(), type, memAddress(title), initial_state, memAddress(hash), hash.remaining(), seed) != 0;
}
/**
* Start a collapsable UI section with internal state management with full control over internal unique ID used to store state.
*
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param title label printed in the tree header
* @param initial_state initial tree state value out of {@code nk_collapse_states}. One of:
{@link #NK_MINIMIZED MINIMIZED}
{@link #NK_MAXIMIZED MAXIMIZED}
* @param hash memory block or string to generate the ID from
* @param seed seeding value if this function is called in a loop or default to 0
*/
@NativeType("int")
public static boolean nk_tree_push_hashed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("char const *") CharSequence title, @NativeType("enum nk_collapse_states") int initial_state, @NativeType("char const *") ByteBuffer hash, @NativeType("nk_int") int seed) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_tree_push_hashed(ctx.address(), type, memAddress(titleEncoded), initial_state, memAddress(hash), hash.remaining(), seed) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_tree_image_push_hashed ] ---
/**
* Unsafe version of: {@link #nk_tree_image_push_hashed tree_image_push_hashed}
*
* @param len size of passed memory block or string in {@code hash}
*/
public static native int nnk_tree_image_push_hashed(long ctx, int type, long img, long title, int initial_state, long hash, int len, int seed);
/**
* Start a collapsable UI section with internal state management with full control over internal unique ID used to store state.
*
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param img image to display inside the header on the left of the label
* @param title label printed in the tree header
* @param initial_state initial tree state value out of {@code nk_collapse_states}. One of:
{@link #NK_MINIMIZED MINIMIZED}
{@link #NK_MAXIMIZED MAXIMIZED}
* @param hash memory block or string to generate the ID from
* @param seed seeding value if this function is called in a loop or default to 0
*/
@NativeType("int")
public static boolean nk_tree_image_push_hashed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("struct nk_image") NkImage img, @NativeType("char const *") ByteBuffer title, @NativeType("enum nk_collapse_states") int initial_state, @NativeType("char const *") ByteBuffer hash, @NativeType("nk_int") int seed) {
if (CHECKS) {
checkNT1(title);
}
return nnk_tree_image_push_hashed(ctx.address(), type, img.address(), memAddress(title), initial_state, memAddress(hash), hash.remaining(), seed) != 0;
}
/**
* Start a collapsable UI section with internal state management with full control over internal unique ID used to store state.
*
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param img image to display inside the header on the left of the label
* @param title label printed in the tree header
* @param initial_state initial tree state value out of {@code nk_collapse_states}. One of:
{@link #NK_MINIMIZED MINIMIZED}
{@link #NK_MAXIMIZED MAXIMIZED}
* @param hash memory block or string to generate the ID from
* @param seed seeding value if this function is called in a loop or default to 0
*/
@NativeType("int")
public static boolean nk_tree_image_push_hashed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("struct nk_image") NkImage img, @NativeType("char const *") CharSequence title, @NativeType("enum nk_collapse_states") int initial_state, @NativeType("char const *") ByteBuffer hash, @NativeType("nk_int") int seed) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_tree_image_push_hashed(ctx.address(), type, img.address(), memAddress(titleEncoded), initial_state, memAddress(hash), hash.remaining(), seed) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_tree_pop ] ---
/** Unsafe version of: {@link #nk_tree_pop tree_pop} */
public static native void nnk_tree_pop(long ctx);
/**
* Ends a collapsable UI section
*
* @param ctx the nuklear context
*/
public static void nk_tree_pop(@NativeType("struct nk_context *") NkContext ctx) {
nnk_tree_pop(ctx.address());
}
// --- [ nk_tree_state_push ] ---
/** Unsafe version of: {@link #nk_tree_state_push tree_state_push} */
public static native int nnk_tree_state_push(long ctx, int type, long title, long state);
/**
* Start a collapsable UI section with external state management.
*
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param title label printed in the tree header
* @param state persistent state to update
*/
@NativeType("int")
public static boolean nk_tree_state_push(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("char const *") ByteBuffer title, @NativeType("enum nk_collapse_states *") IntBuffer state) {
if (CHECKS) {
checkNT1(title);
check(state, 1);
}
return nnk_tree_state_push(ctx.address(), type, memAddress(title), memAddress(state)) != 0;
}
/**
* Start a collapsable UI section with external state management.
*
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param title label printed in the tree header
* @param state persistent state to update
*/
@NativeType("int")
public static boolean nk_tree_state_push(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("char const *") CharSequence title, @NativeType("enum nk_collapse_states *") IntBuffer state) {
if (CHECKS) {
check(state, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_tree_state_push(ctx.address(), type, memAddress(titleEncoded), memAddress(state)) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_tree_state_image_push ] ---
/** Unsafe version of: {@link #nk_tree_state_image_push tree_state_image_push} */
public static native int nnk_tree_state_image_push(long ctx, int type, long image, long title, long state);
/**
* Start a collapsable UI section with image and label header and external state management.
*
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param image image to display inside the header on the left of the label
* @param title label printed in the tree header
*/
@NativeType("int")
public static boolean nk_tree_state_image_push(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("struct nk_image") NkImage image, @NativeType("char const *") ByteBuffer title, @NativeType("enum nk_collapse_states *") IntBuffer state) {
if (CHECKS) {
checkNT1(title);
check(state, 1);
}
return nnk_tree_state_image_push(ctx.address(), type, image.address(), memAddress(title), memAddress(state)) != 0;
}
/**
* Start a collapsable UI section with image and label header and external state management.
*
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param image image to display inside the header on the left of the label
* @param title label printed in the tree header
*/
@NativeType("int")
public static boolean nk_tree_state_image_push(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("struct nk_image") NkImage image, @NativeType("char const *") CharSequence title, @NativeType("enum nk_collapse_states *") IntBuffer state) {
if (CHECKS) {
check(state, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_tree_state_image_push(ctx.address(), type, image.address(), memAddress(titleEncoded), memAddress(state)) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_tree_state_pop ] ---
/** Unsafe version of: {@link #nk_tree_state_pop tree_state_pop} */
public static native void nnk_tree_state_pop(long ctx);
/**
* Ends a collapsable UI section.
*
* @param ctx the nuklear context
*/
public static void nk_tree_state_pop(@NativeType("struct nk_context *") NkContext ctx) {
nnk_tree_state_pop(ctx.address());
}
// --- [ nk_tree_element_push_hashed ] ---
/** Unsafe version of: {@link #nk_tree_element_push_hashed tree_element_push_hashed} */
public static native int nnk_tree_element_push_hashed(long ctx, int type, long title, int initial_state, long selected, long hash, int len, int seed);
/**
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param title label printed in the tree header
*/
@NativeType("int")
public static boolean nk_tree_element_push_hashed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("char const *") ByteBuffer title, @NativeType("enum nk_collapse_states") int initial_state, @NativeType("int *") IntBuffer selected, @NativeType("char const *") ByteBuffer hash, int seed) {
if (CHECKS) {
checkNT1(title);
check(selected, 1);
}
return nnk_tree_element_push_hashed(ctx.address(), type, memAddress(title), initial_state, memAddress(selected), memAddress(hash), hash.remaining(), seed) != 0;
}
/**
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param title label printed in the tree header
*/
@NativeType("int")
public static boolean nk_tree_element_push_hashed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("char const *") CharSequence title, @NativeType("enum nk_collapse_states") int initial_state, @NativeType("int *") IntBuffer selected, @NativeType("char const *") ByteBuffer hash, int seed) {
if (CHECKS) {
check(selected, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_tree_element_push_hashed(ctx.address(), type, memAddress(titleEncoded), initial_state, memAddress(selected), memAddress(hash), hash.remaining(), seed) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_tree_element_image_push_hashed ] ---
/** Unsafe version of: {@link #nk_tree_element_image_push_hashed tree_element_image_push_hashed} */
public static native int nnk_tree_element_image_push_hashed(long ctx, int type, long img, long title, int initial_state, long selected, long hash, int len, int seed);
/**
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param title label printed in the tree header
*/
@NativeType("int")
public static boolean nk_tree_element_image_push_hashed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("struct nk_image") NkImage img, @NativeType("char const *") ByteBuffer title, @NativeType("enum nk_collapse_states") int initial_state, @NativeType("int *") IntBuffer selected, @NativeType("char const *") ByteBuffer hash, int seed) {
if (CHECKS) {
checkNT1(title);
check(selected, 1);
}
return nnk_tree_element_image_push_hashed(ctx.address(), type, img.address(), memAddress(title), initial_state, memAddress(selected), memAddress(hash), hash.remaining(), seed) != 0;
}
/**
* @param ctx the nuklear context
* @param type value from the {@code nk_tree_type} section to visually mark a tree node header as either a collapseable UI section or tree node. One of:
{@link #NK_TREE_NODE TREE_NODE}
{@link #NK_TREE_TAB TREE_TAB}
* @param title label printed in the tree header
*/
@NativeType("int")
public static boolean nk_tree_element_image_push_hashed(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_tree_type") int type, @NativeType("struct nk_image") NkImage img, @NativeType("char const *") CharSequence title, @NativeType("enum nk_collapse_states") int initial_state, @NativeType("int *") IntBuffer selected, @NativeType("char const *") ByteBuffer hash, int seed) {
if (CHECKS) {
check(selected, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer titleEncoded = stack.UTF8(title);
return nnk_tree_element_image_push_hashed(ctx.address(), type, img.address(), memAddress(titleEncoded), initial_state, memAddress(selected), memAddress(hash), hash.remaining(), seed) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_tree_element_pop ] ---
/** Unsafe version of: {@link #nk_tree_element_pop tree_element_pop} */
public static native void nnk_tree_element_pop(long ctx);
/** @param ctx the nuklear context */
public static void nk_tree_element_pop(@NativeType("struct nk_context *") NkContext ctx) {
nnk_tree_element_pop(ctx.address());
}
// --- [ nk_text ] ---
/** Unsafe version of: {@link #nk_text text} */
public static native void nnk_text(long ctx, long str, int len, int alignment);
/**
* @param ctx the nuklear context
* @param alignment one of:
{@link #NK_TEXT_LEFT TEXT_LEFT}
{@link #NK_TEXT_CENTERED TEXT_CENTERED}
{@link #NK_TEXT_RIGHT TEXT_RIGHT}
*/
public static void nk_text(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer str, @NativeType("nk_flags") int alignment) {
nnk_text(ctx.address(), memAddress(str), str.remaining(), alignment);
}
/**
* @param ctx the nuklear context
* @param alignment one of:
{@link #NK_TEXT_LEFT TEXT_LEFT}
{@link #NK_TEXT_CENTERED TEXT_CENTERED}
{@link #NK_TEXT_RIGHT TEXT_RIGHT}
*/
public static void nk_text(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") CharSequence str, @NativeType("nk_flags") int alignment) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer strEncoded = stack.UTF8(str, false);
nnk_text(ctx.address(), memAddress(strEncoded), strEncoded.remaining(), alignment);
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_text_colored ] ---
/** Unsafe version of: {@link #nk_text_colored text_colored} */
public static native void nnk_text_colored(long ctx, long str, int len, int alignment, long color);
/**
* @param ctx the nuklear context
* @param alignment one of:
{@link #NK_TEXT_LEFT TEXT_LEFT}
{@link #NK_TEXT_CENTERED TEXT_CENTERED}
{@link #NK_TEXT_RIGHT TEXT_RIGHT}
*/
public static void nk_text_colored(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char const *") ByteBuffer str, @NativeType("nk_flags") int alignment, @NativeType("struct nk_color") NkColor color) {
nnk_text_colored(ctx.address(), memAddress(str), str.remaining(), alignment, color.address());
}
/**
* @param ctx the nuklear context
* @param alignment one of:
*/
@NativeType("nk_flags")
public static int nk_edit_string_zero_terminated(@NativeType("struct nk_context *") NkContext ctx, @NativeType("nk_flags") int flags, @NativeType("char *") CharSequence buffer, int max, @Nullable @NativeType("nk_plugin_filter") NkPluginFilterI filter) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer bufferEncoded = stack.UTF8(buffer);
return nnk_edit_string_zero_terminated(ctx.address(), flags, memAddress(bufferEncoded), max, memAddressSafe(filter));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_chart_begin ] ---
/** Unsafe version of: {@link #nk_chart_begin chart_begin} */
public static native int nnk_chart_begin(long ctx, int type, int num, float min, float max);
/**
* @param ctx the nuklear context
* @param type one of:
{@link #NK_CHART_LINES CHART_LINES}
{@link #NK_CHART_COLUMN CHART_COLUMN}
{@link #NK_CHART_MAX CHART_MAX}
*/
@NativeType("int")
public static boolean nk_chart_begin(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_chart_type") int type, int num, float min, float max) {
return nnk_chart_begin(ctx.address(), type, num, min, max) != 0;
}
// --- [ nk_chart_begin_colored ] ---
/** Unsafe version of: {@link #nk_chart_begin_colored chart_begin_colored} */
public static native int nnk_chart_begin_colored(long ctx, int type, long color, long active, int num, float min, float max);
/**
* @param ctx the nuklear context
* @param type one of:
{@link #NK_CHART_LINES CHART_LINES}
{@link #NK_CHART_COLUMN CHART_COLUMN}
{@link #NK_CHART_MAX CHART_MAX}
*/
@NativeType("int")
public static boolean nk_chart_begin_colored(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_chart_type") int type, @NativeType("struct nk_color") NkColor color, @NativeType("struct nk_color") NkColor active, int num, float min, float max) {
return nnk_chart_begin_colored(ctx.address(), type, color.address(), active.address(), num, min, max) != 0;
}
// --- [ nk_chart_add_slot ] ---
/** Unsafe version of: {@link #nk_chart_add_slot chart_add_slot} */
public static native void nnk_chart_add_slot(long ctx, int type, int count, float min_value, float max_value);
/**
* @param ctx the nuklear context
* @param type one of:
{@link #NK_CHART_LINES CHART_LINES}
{@link #NK_CHART_COLUMN CHART_COLUMN}
{@link #NK_CHART_MAX CHART_MAX}
*/
public static void nk_chart_add_slot(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_chart_type") int type, int count, float min_value, float max_value) {
nnk_chart_add_slot(ctx.address(), type, count, min_value, max_value);
}
// --- [ nk_chart_add_slot_colored ] ---
/** Unsafe version of: {@link #nk_chart_add_slot_colored chart_add_slot_colored} */
public static native void nnk_chart_add_slot_colored(long ctx, int type, long color, long active, int count, float min_value, float max_value);
/**
* @param ctx the nuklear context
* @param type one of:
{@link #NK_CHART_LINES CHART_LINES}
{@link #NK_CHART_COLUMN CHART_COLUMN}
{@link #NK_CHART_MAX CHART_MAX}
*/
public static void nk_chart_add_slot_colored(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_chart_type") int type, @NativeType("struct nk_color") NkColor color, @NativeType("struct nk_color") NkColor active, int count, float min_value, float max_value) {
nnk_chart_add_slot_colored(ctx.address(), type, color.address(), active.address(), count, min_value, max_value);
}
// --- [ nk_chart_push ] ---
/** Unsafe version of: {@link #nk_chart_push chart_push} */
public static native int nnk_chart_push(long ctx, float value);
/** @param ctx the nuklear context */
@NativeType("nk_flags")
public static int nk_chart_push(@NativeType("struct nk_context *") NkContext ctx, float value) {
return nnk_chart_push(ctx.address(), value);
}
// --- [ nk_chart_push_slot ] ---
/** Unsafe version of: {@link #nk_chart_push_slot chart_push_slot} */
public static native int nnk_chart_push_slot(long ctx, float value, int slot);
/** @param ctx the nuklear context */
@NativeType("nk_flags")
public static int nk_chart_push_slot(@NativeType("struct nk_context *") NkContext ctx, float value, int slot) {
return nnk_chart_push_slot(ctx.address(), value, slot);
}
// --- [ nk_chart_end ] ---
/** Unsafe version of: {@link #nk_chart_end chart_end} */
public static native void nnk_chart_end(long ctx);
/** @param ctx the nuklear context */
public static void nk_chart_end(@NativeType("struct nk_context *") NkContext ctx) {
nnk_chart_end(ctx.address());
}
// --- [ nk_plot ] ---
/** Unsafe version of: {@link #nk_plot plot} */
public static native void nnk_plot(long ctx, int type, long values, int count, int offset);
/**
* @param ctx the nuklear context
* @param type one of:
{@link #NK_CHART_LINES CHART_LINES}
{@link #NK_CHART_COLUMN CHART_COLUMN}
{@link #NK_CHART_MAX CHART_MAX}
*/
public static void nk_plot(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_chart_type") int type, @NativeType("float const *") FloatBuffer values, int count, int offset) {
if (CHECKS) {
check(values, offset + count);
}
nnk_plot(ctx.address(), type, memAddress(values), count, offset);
}
// --- [ nk_plot_function ] ---
/** Unsafe version of: {@link #nk_plot_function plot_function} */
public static native void nnk_plot_function(long ctx, int type, long userdata, long value_getter, int count, int offset);
/**
* @param ctx the nuklear context
* @param type one of:
{@link #NK_CHART_LINES CHART_LINES}
{@link #NK_CHART_COLUMN CHART_COLUMN}
{@link #NK_CHART_MAX CHART_MAX}
*/
public static void nk_plot_function(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_chart_type") int type, @NativeType("void *") long userdata, @NativeType("nk_value_getter") NkValueGetterI value_getter, int count, int offset) {
if (CHECKS) {
check(userdata);
}
nnk_plot_function(ctx.address(), type, userdata, value_getter.address(), count, offset);
}
// --- [ nk_popup_begin ] ---
/** Unsafe version of: {@link #nk_popup_begin popup_begin} */
public static native int nnk_popup_begin(long ctx, int type, long title, int flags, long rect);
/**
* @param ctx the nuklear context
* @param type one of:
*/
public static void nk_input_key(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_keys") int key, @NativeType("int") boolean down) {
nnk_input_key(ctx.address(), key, down ? 1 : 0);
}
// --- [ nk_input_button ] ---
/** Unsafe version of: {@link #nk_input_button input_button} */
public static native void nnk_input_button(long ctx, int id, int x, int y, int down);
/**
* Mirrors mouse button state with either pressed or released.
*
* @param ctx the nuklear context
* @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
public static void nk_input_button(@NativeType("struct nk_context *") NkContext ctx, @NativeType("enum nk_buttons") int id, int x, int y, @NativeType("int") boolean down) {
nnk_input_button(ctx.address(), id, x, y, down ? 1 : 0);
}
// --- [ nk_input_scroll ] ---
/** Unsafe version of: {@link #nk_input_scroll input_scroll} */
public static native void nnk_input_scroll(long ctx, long val);
/**
* Copies the last mouse scroll value to nuklear. Is generally a scroll value. So does not have to come from mouse and could also originate from
* touch for example.
*
* @param ctx the nuklear context
* @param val vector with both X- as well as Y-scroll value
*/
public static void nk_input_scroll(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_vec2") NkVec2 val) {
nnk_input_scroll(ctx.address(), val.address());
}
// --- [ nk_input_char ] ---
/** Unsafe version of: {@link #nk_input_char input_char} */
public static native void nnk_input_char(long ctx, byte c);
/**
* Adds a single ASCII text character into an internal text buffer.
*
* @param ctx the nuklear context
*/
public static void nk_input_char(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char") byte c) {
nnk_input_char(ctx.address(), c);
}
// --- [ nk_input_glyph ] ---
/** Unsafe version of: {@link #nk_input_glyph input_glyph} */
public static native void nnk_input_glyph(long ctx, long glyph);
/**
* Adds a single multi-byte UTF-8 character into an internal text buffer.
*
* @param ctx the nuklear context
*/
public static void nk_input_glyph(@NativeType("struct nk_context *") NkContext ctx, @NativeType("char *") ByteBuffer glyph) {
if (CHECKS) {
check(glyph, 4);
}
nnk_input_glyph(ctx.address(), memAddress(glyph));
}
// --- [ nk_input_unicode ] ---
/** Unsafe version of: {@link #nk_input_unicode input_unicode} */
public static native void nnk_input_unicode(long ctx, int unicode);
/**
* Adds a single unicode rune into an internal text buffer.
*
* @param ctx the nuklear context
*/
public static void nk_input_unicode(@NativeType("struct nk_context *") NkContext ctx, @NativeType("nk_rune") int unicode) {
nnk_input_unicode(ctx.address(), unicode);
}
// --- [ nk_input_end ] ---
/** Unsafe version of: {@link #nk_input_end input_end} */
public static native void nnk_input_end(long ctx);
/**
* Ends the input mirroring process by calculating state changes. Don't call any {@code nk_input_xxx} function referenced above after this call.
*
* @param ctx the nuklear context
*/
public static void nk_input_end(@NativeType("struct nk_context *") NkContext ctx) {
nnk_input_end(ctx.address());
}
// --- [ nk_style_default ] ---
/** Unsafe version of: {@link #nk_style_default style_default} */
public static native void nnk_style_default(long ctx);
/** @param ctx the nuklear context */
public static void nk_style_default(@NativeType("struct nk_context *") NkContext ctx) {
nnk_style_default(ctx.address());
}
// --- [ nk_style_from_table ] ---
/** Unsafe version of: {@link #nk_style_from_table style_from_table} */
public static native void nnk_style_from_table(long ctx, long table);
/** @param ctx the nuklear context */
public static void nk_style_from_table(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_color const *") NkColor.Buffer table) {
if (CHECKS) {
check(table, NK_COLOR_COUNT);
}
nnk_style_from_table(ctx.address(), table.address());
}
// --- [ nk_style_load_cursor ] ---
/** Unsafe version of: {@link #nk_style_load_cursor style_load_cursor} */
public static native void nnk_style_load_cursor(long ctx, int style, long cursor);
/**
* @param ctx the nuklear context
* @param style one of:
* - matches zero or more occurrences of the previous character
*
*/
@NativeType("int")
public static boolean nk_strfilter(@NativeType("char const *") CharSequence str, @NativeType("char const *") CharSequence regexp) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer strEncoded = stack.UTF8(str);
ByteBuffer regexpEncoded = stack.UTF8(regexp);
return nnk_strfilter(memAddress(strEncoded), memAddress(regexpEncoded)) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_strmatch_fuzzy_string ] ---
/** Unsafe version of: {@link #nk_strmatch_fuzzy_string strmatch_fuzzy_string} */
public static native int nnk_strmatch_fuzzy_string(long str, long pattern, long out_score);
/**
* Returns true if each character in {@code pattern} is found sequentially within {@code str} if found then {@code out_score} is also set. Score value
* has no intrinsic meaning. Range varies with {@code pattern}. Can only compare scores with same search pattern.
*/
@NativeType("int")
public static boolean nk_strmatch_fuzzy_string(@NativeType("char const *") ByteBuffer str, @NativeType("char const *") ByteBuffer pattern, @NativeType("int *") IntBuffer out_score) {
if (CHECKS) {
checkNT1(str);
checkNT1(pattern);
check(out_score, 1);
}
return nnk_strmatch_fuzzy_string(memAddress(str), memAddress(pattern), memAddress(out_score)) != 0;
}
/**
* Returns true if each character in {@code pattern} is found sequentially within {@code str} if found then {@code out_score} is also set. Score value
* has no intrinsic meaning. Range varies with {@code pattern}. Can only compare scores with same search pattern.
*/
@NativeType("int")
public static boolean nk_strmatch_fuzzy_string(@NativeType("char const *") CharSequence str, @NativeType("char const *") CharSequence pattern, @NativeType("int *") IntBuffer out_score) {
if (CHECKS) {
check(out_score, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer strEncoded = stack.UTF8(str);
ByteBuffer patternEncoded = stack.UTF8(pattern);
return nnk_strmatch_fuzzy_string(memAddress(strEncoded), memAddress(patternEncoded), memAddress(out_score)) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_strmatch_fuzzy_text ] ---
public static native int nnk_strmatch_fuzzy_text(long txt, int txt_len, long pattern, long out_score);
public static int nk_strmatch_fuzzy_text(@NativeType("char const *") ByteBuffer txt, @NativeType("char const *") ByteBuffer pattern, @NativeType("int *") IntBuffer out_score) {
if (CHECKS) {
checkNT1(pattern);
check(out_score, 1);
}
return nnk_strmatch_fuzzy_text(memAddress(txt), txt.remaining(), memAddress(pattern), memAddress(out_score));
}
public static int nk_strmatch_fuzzy_text(@NativeType("char const *") CharSequence txt, @NativeType("char const *") CharSequence pattern, @NativeType("int *") IntBuffer out_score) {
if (CHECKS) {
check(out_score, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer txtEncoded = stack.UTF8(txt, false);
ByteBuffer patternEncoded = stack.UTF8(pattern);
return nnk_strmatch_fuzzy_text(memAddress(txtEncoded), txtEncoded.remaining(), memAddress(patternEncoded), memAddress(out_score));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_utf_decode ] ---
public static native int nnk_utf_decode(long c, long u, int clen);
public static int nk_utf_decode(@NativeType("char const *") ByteBuffer c, @NativeType("nk_rune *") IntBuffer u) {
if (CHECKS) {
check(u, 1);
}
return nnk_utf_decode(memAddress(c), memAddress(u), c.remaining());
}
// --- [ nk_utf_encode ] ---
public static native int nnk_utf_encode(int u, long c, int clen);
public static int nk_utf_encode(@NativeType("nk_rune") int u, @NativeType("char *") ByteBuffer c) {
return nnk_utf_encode(u, memAddress(c), c.remaining());
}
// --- [ nk_utf_len ] ---
public static native int nnk_utf_len(long str, int byte_len);
public static int nk_utf_len(@NativeType("char const *") ByteBuffer str) {
return nnk_utf_len(memAddress(str), str.remaining());
}
// --- [ nk_utf_at ] ---
public static native long nnk_utf_at(long buffer, int length, int index, long unicode, long len);
@Nullable
@NativeType("char const *")
public static ByteBuffer nk_utf_at(@NativeType("char const *") ByteBuffer buffer, int index, @NativeType("nk_rune *") IntBuffer unicode) {
if (CHECKS) {
check(unicode, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
IntBuffer len = stack.callocInt(1);
long __result = nnk_utf_at(memAddress(buffer), buffer.remaining(), index, memAddress(unicode), memAddress(len));
return memByteBufferSafe(__result, len.get(0));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_buffer_init ] ---
public static native void nnk_buffer_init(long buffer, long allocator, long size);
public static void nk_buffer_init(@NativeType("struct nk_buffer *") NkBuffer buffer, @NativeType("struct nk_allocator const *") NkAllocator allocator, @NativeType("nk_size") long size) {
nnk_buffer_init(buffer.address(), allocator.address(), size);
}
// --- [ nk_buffer_init_fixed ] ---
public static native void nnk_buffer_init_fixed(long buffer, long memory, long size);
public static void nk_buffer_init_fixed(@NativeType("struct nk_buffer *") NkBuffer buffer, @NativeType("void *") ByteBuffer memory) {
nnk_buffer_init_fixed(buffer.address(), memAddress(memory), memory.remaining());
}
// --- [ nk_buffer_info ] ---
public static native void nnk_buffer_info(long status, long buffer);
public static void nk_buffer_info(@NativeType("struct nk_memory_status *") NkMemoryStatus status, @NativeType("struct nk_buffer *") NkBuffer buffer) {
nnk_buffer_info(status.address(), buffer.address());
}
// --- [ nk_buffer_push ] ---
/** Unsafe version of: {@link #nk_buffer_push buffer_push} */
public static native void nnk_buffer_push(long buffer, int type, long memory, long size, long align);
/** @param type one of:
{@link #NK_BUFFER_FRONT BUFFER_FRONT}
{@link #NK_BUFFER_BACK BUFFER_BACK}
{@link #NK_BUFFER_MAX BUFFER_MAX}
*/
public static void nk_buffer_push(@NativeType("struct nk_buffer *") NkBuffer buffer, @NativeType("enum nk_buffer_allocation_type") int type, @NativeType("void const *") ByteBuffer memory, @NativeType("nk_size") long align) {
nnk_buffer_push(buffer.address(), type, memAddress(memory), memory.remaining(), align);
}
// --- [ nk_buffer_mark ] ---
/** Unsafe version of: {@link #nk_buffer_mark buffer_mark} */
public static native void nnk_buffer_mark(long buffer, int type);
/** @param type one of:
{@link #NK_BUFFER_FRONT BUFFER_FRONT}
{@link #NK_BUFFER_BACK BUFFER_BACK}
{@link #NK_BUFFER_MAX BUFFER_MAX}
*/
public static void nk_buffer_mark(@NativeType("struct nk_buffer *") NkBuffer buffer, @NativeType("enum nk_buffer_allocation_type") int type) {
nnk_buffer_mark(buffer.address(), type);
}
// --- [ nk_buffer_reset ] ---
/** Unsafe version of: {@link #nk_buffer_reset buffer_reset} */
public static native void nnk_buffer_reset(long buffer, int type);
/** @param type one of:
{@link #NK_BUFFER_FRONT BUFFER_FRONT}
{@link #NK_BUFFER_BACK BUFFER_BACK}
{@link #NK_BUFFER_MAX BUFFER_MAX}
*/
public static void nk_buffer_reset(@NativeType("struct nk_buffer *") NkBuffer buffer, @NativeType("enum nk_buffer_allocation_type") int type) {
nnk_buffer_reset(buffer.address(), type);
}
// --- [ nk_buffer_clear ] ---
public static native void nnk_buffer_clear(long buffer);
public static void nk_buffer_clear(@NativeType("struct nk_buffer *") NkBuffer buffer) {
nnk_buffer_clear(buffer.address());
}
// --- [ nk_buffer_free ] ---
public static native void nnk_buffer_free(long buffer);
public static void nk_buffer_free(@NativeType("struct nk_buffer *") NkBuffer buffer) {
nnk_buffer_free(buffer.address());
}
// --- [ nk_buffer_memory ] ---
public static native long nnk_buffer_memory(long buffer);
@NativeType("void *")
public static long nk_buffer_memory(@NativeType("struct nk_buffer *") NkBuffer buffer) {
return nnk_buffer_memory(buffer.address());
}
// --- [ nk_buffer_memory_const ] ---
public static native long nnk_buffer_memory_const(long buffer);
@NativeType("void const *")
public static long nk_buffer_memory_const(@NativeType("struct nk_buffer const *") NkBuffer buffer) {
return nnk_buffer_memory_const(buffer.address());
}
// --- [ nk_buffer_total ] ---
public static native long nnk_buffer_total(long buffer);
@NativeType("nk_size")
public static long nk_buffer_total(@NativeType("struct nk_buffer *") NkBuffer buffer) {
return nnk_buffer_total(buffer.address());
}
// --- [ nk_str_init ] ---
public static native void nnk_str_init(long str, long allocator, long size);
public static void nk_str_init(@NativeType("struct nk_str *") NkStr str, @NativeType("struct nk_allocator const *") NkAllocator allocator, @NativeType("nk_size") long size) {
nnk_str_init(str.address(), allocator.address(), size);
}
// --- [ nk_str_init_fixed ] ---
public static native void nnk_str_init_fixed(long str, long memory, long size);
public static void nk_str_init_fixed(@NativeType("struct nk_str *") NkStr str, @NativeType("void *") ByteBuffer memory) {
nnk_str_init_fixed(str.address(), memAddress(memory), memory.remaining());
}
// --- [ nk_str_clear ] ---
public static native void nnk_str_clear(long str);
public static void nk_str_clear(@NativeType("struct nk_str *") NkStr str) {
nnk_str_clear(str.address());
}
// --- [ nk_str_free ] ---
public static native void nnk_str_free(long str);
public static void nk_str_free(@NativeType("struct nk_str *") NkStr str) {
nnk_str_free(str.address());
}
// --- [ nk_str_append_text_char ] ---
public static native int nnk_str_append_text_char(long s, long str, int len);
public static int nk_str_append_text_char(@NativeType("struct nk_str *") NkStr s, @NativeType("char const *") ByteBuffer str) {
return nnk_str_append_text_char(s.address(), memAddress(str), str.remaining());
}
// --- [ nk_str_append_str_char ] ---
public static native int nnk_str_append_str_char(long s, long str);
public static int nk_str_append_str_char(@NativeType("struct nk_str *") NkStr s, @NativeType("char const *") ByteBuffer str) {
if (CHECKS) {
checkNT1(str);
}
return nnk_str_append_str_char(s.address(), memAddress(str));
}
// --- [ nk_str_append_text_utf8 ] ---
public static native int nnk_str_append_text_utf8(long s, long str, int len);
public static int nk_str_append_text_utf8(@NativeType("struct nk_str *") NkStr s, @NativeType("char const *") ByteBuffer str) {
return nnk_str_append_text_utf8(s.address(), memAddress(str), str.remaining());
}
// --- [ nk_str_append_str_utf8 ] ---
public static native int nnk_str_append_str_utf8(long s, long str);
public static int nk_str_append_str_utf8(@NativeType("struct nk_str *") NkStr s, @NativeType("char const *") ByteBuffer str) {
if (CHECKS) {
checkNT1(str);
}
return nnk_str_append_str_utf8(s.address(), memAddress(str));
}
// --- [ nk_str_append_text_runes ] ---
public static native int nnk_str_append_text_runes(long s, long runes, int len);
public static int nk_str_append_text_runes(@NativeType("struct nk_str *") NkStr s, @NativeType("nk_rune const *") IntBuffer runes) {
return nnk_str_append_text_runes(s.address(), memAddress(runes), runes.remaining());
}
// --- [ nk_str_append_str_runes ] ---
public static native int nnk_str_append_str_runes(long s, long runes);
public static int nk_str_append_str_runes(@NativeType("struct nk_str *") NkStr s, @NativeType("nk_rune const *") IntBuffer runes) {
if (CHECKS) {
checkNT(runes);
}
return nnk_str_append_str_runes(s.address(), memAddress(runes));
}
// --- [ nk_str_insert_at_char ] ---
public static native int nnk_str_insert_at_char(long s, int pos, long str, int len);
public static int nk_str_insert_at_char(@NativeType("struct nk_str *") NkStr s, int pos, @NativeType("char const *") ByteBuffer str) {
return nnk_str_insert_at_char(s.address(), pos, memAddress(str), str.remaining());
}
// --- [ nk_str_insert_at_rune ] ---
public static native int nnk_str_insert_at_rune(long s, int pos, long str, int len);
public static int nk_str_insert_at_rune(@NativeType("struct nk_str *") NkStr s, int pos, @NativeType("char const *") ByteBuffer str) {
return nnk_str_insert_at_rune(s.address(), pos, memAddress(str), str.remaining());
}
// --- [ nk_str_insert_text_char ] ---
public static native int nnk_str_insert_text_char(long s, int pos, long str, int len);
public static int nk_str_insert_text_char(@NativeType("struct nk_str *") NkStr s, int pos, @NativeType("char const *") ByteBuffer str) {
return nnk_str_insert_text_char(s.address(), pos, memAddress(str), str.remaining());
}
// --- [ nk_str_insert_str_char ] ---
public static native int nnk_str_insert_str_char(long s, int pos, long str);
public static int nk_str_insert_str_char(@NativeType("struct nk_str *") NkStr s, int pos, @NativeType("char const *") ByteBuffer str) {
if (CHECKS) {
checkNT1(str);
}
return nnk_str_insert_str_char(s.address(), pos, memAddress(str));
}
// --- [ nk_str_insert_text_utf8 ] ---
public static native int nnk_str_insert_text_utf8(long s, int pos, long str, int len);
public static int nk_str_insert_text_utf8(@NativeType("struct nk_str *") NkStr s, int pos, @NativeType("char const *") ByteBuffer str) {
return nnk_str_insert_text_utf8(s.address(), pos, memAddress(str), str.remaining());
}
// --- [ nk_str_insert_str_utf8 ] ---
public static native int nnk_str_insert_str_utf8(long s, int pos, long str);
public static int nk_str_insert_str_utf8(@NativeType("struct nk_str *") NkStr s, int pos, @NativeType("char const *") ByteBuffer str) {
if (CHECKS) {
checkNT1(str);
}
return nnk_str_insert_str_utf8(s.address(), pos, memAddress(str));
}
// --- [ nk_str_insert_text_runes ] ---
public static native int nnk_str_insert_text_runes(long s, int pos, long runes, int len);
public static int nk_str_insert_text_runes(@NativeType("struct nk_str *") NkStr s, int pos, @NativeType("nk_rune const *") IntBuffer runes) {
return nnk_str_insert_text_runes(s.address(), pos, memAddress(runes), runes.remaining());
}
// --- [ nk_str_insert_str_runes ] ---
public static native int nnk_str_insert_str_runes(long s, int pos, long runes);
public static int nk_str_insert_str_runes(@NativeType("struct nk_str *") NkStr s, int pos, @NativeType("nk_rune const *") IntBuffer runes) {
if (CHECKS) {
checkNT(runes);
}
return nnk_str_insert_str_runes(s.address(), pos, memAddress(runes));
}
// --- [ nk_str_remove_chars ] ---
public static native void nnk_str_remove_chars(long s, int len);
public static void nk_str_remove_chars(@NativeType("struct nk_str *") NkStr s, int len) {
nnk_str_remove_chars(s.address(), len);
}
// --- [ nk_str_remove_runes ] ---
public static native void nnk_str_remove_runes(long str, int len);
public static void nk_str_remove_runes(@NativeType("struct nk_str *") NkStr str, int len) {
nnk_str_remove_runes(str.address(), len);
}
// --- [ nk_str_delete_chars ] ---
public static native void nnk_str_delete_chars(long s, int pos, int len);
public static void nk_str_delete_chars(@NativeType("struct nk_str *") NkStr s, int pos, int len) {
nnk_str_delete_chars(s.address(), pos, len);
}
// --- [ nk_str_delete_runes ] ---
public static native void nnk_str_delete_runes(long s, int pos, int len);
public static void nk_str_delete_runes(@NativeType("struct nk_str *") NkStr s, int pos, int len) {
nnk_str_delete_runes(s.address(), pos, len);
}
// --- [ nk_str_at_char ] ---
public static native long nnk_str_at_char(long s, int pos);
@Nullable
@NativeType("char *")
public static String nk_str_at_char(@NativeType("struct nk_str *") NkStr s, int pos) {
long __result = nnk_str_at_char(s.address(), pos);
return memUTF8Safe(__result);
}
// --- [ nk_str_at_rune ] ---
public static native long nnk_str_at_rune(long s, int pos, long unicode, long len);
@Nullable
@NativeType("char *")
public static ByteBuffer nk_str_at_rune(@NativeType("struct nk_str *") NkStr s, int pos, @NativeType("nk_rune *") IntBuffer unicode) {
if (CHECKS) {
check(unicode, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
IntBuffer len = stack.callocInt(1);
try {
long __result = nnk_str_at_rune(s.address(), pos, memAddress(unicode), memAddress(len));
return memByteBufferSafe(__result, len.get(0));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_str_rune_at ] ---
public static native int nnk_str_rune_at(long s, int pos);
@NativeType("nk_rune")
public static int nk_str_rune_at(@NativeType("struct nk_str const *") NkStr s, int pos) {
return nnk_str_rune_at(s.address(), pos);
}
// --- [ nk_str_at_char_const ] ---
public static native long nnk_str_at_char_const(long s, int pos);
@Nullable
@NativeType("char const *")
public static String nk_str_at_char_const(@NativeType("struct nk_str const *") NkStr s, int pos) {
long __result = nnk_str_at_char_const(s.address(), pos);
return memUTF8Safe(__result);
}
// --- [ nk_str_at_const ] ---
public static native long nnk_str_at_const(long s, int pos, long unicode, long len);
@Nullable
@NativeType("char const *")
public static ByteBuffer nk_str_at_const(@NativeType("struct nk_str const *") NkStr s, int pos, @NativeType("nk_rune *") IntBuffer unicode) {
if (CHECKS) {
check(unicode, 1);
}
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
IntBuffer len = stack.callocInt(1);
try {
long __result = nnk_str_at_const(s.address(), pos, memAddress(unicode), memAddress(len));
return memByteBufferSafe(__result, len.get(0));
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_str_get ] ---
public static native long nnk_str_get(long s);
@Nullable
@NativeType("char *")
public static String nk_str_get(@NativeType("struct nk_str *") NkStr s) {
long __result = nnk_str_get(s.address());
return memUTF8Safe(__result);
}
// --- [ nk_str_get_const ] ---
public static native long nnk_str_get_const(long s);
@Nullable
@NativeType("char const *")
public static String nk_str_get_const(@NativeType("struct nk_str const *") NkStr s) {
long __result = nnk_str_get_const(s.address());
return memUTF8Safe(__result);
}
// --- [ nk_str_len ] ---
public static native int nnk_str_len(long s);
public static int nk_str_len(@NativeType("struct nk_str *") NkStr s) {
return nnk_str_len(s.address());
}
// --- [ nk_str_len_char ] ---
public static native int nnk_str_len_char(long s);
public static int nk_str_len_char(@NativeType("struct nk_str *") NkStr s) {
return nnk_str_len_char(s.address());
}
// --- [ nk_filter_default ] ---
public static native int nnk_filter_default(long edit, int unicode);
@NativeType("int")
public static boolean nk_filter_default(@NativeType("struct nk_text_edit const *") NkTextEdit edit, @NativeType("nk_rune") int unicode) {
return nnk_filter_default(edit.address(), unicode) != 0;
}
// --- [ nk_filter_ascii ] ---
public static native int nnk_filter_ascii(long edit, int unicode);
@NativeType("int")
public static boolean nk_filter_ascii(@NativeType("struct nk_text_edit const *") NkTextEdit edit, @NativeType("nk_rune") int unicode) {
return nnk_filter_ascii(edit.address(), unicode) != 0;
}
// --- [ nk_filter_float ] ---
public static native int nnk_filter_float(long edit, int unicode);
@NativeType("int")
public static boolean nk_filter_float(@NativeType("struct nk_text_edit const *") NkTextEdit edit, @NativeType("nk_rune") int unicode) {
return nnk_filter_float(edit.address(), unicode) != 0;
}
// --- [ nk_filter_decimal ] ---
public static native int nnk_filter_decimal(long edit, int unicode);
@NativeType("int")
public static boolean nk_filter_decimal(@NativeType("struct nk_text_edit const *") NkTextEdit edit, @NativeType("nk_rune") int unicode) {
return nnk_filter_decimal(edit.address(), unicode) != 0;
}
// --- [ nk_filter_hex ] ---
public static native int nnk_filter_hex(long edit, int unicode);
@NativeType("int")
public static boolean nk_filter_hex(@NativeType("struct nk_text_edit const *") NkTextEdit edit, @NativeType("nk_rune") int unicode) {
return nnk_filter_hex(edit.address(), unicode) != 0;
}
// --- [ nk_filter_oct ] ---
public static native int nnk_filter_oct(long edit, int unicode);
@NativeType("int")
public static boolean nk_filter_oct(@NativeType("struct nk_text_edit const *") NkTextEdit edit, @NativeType("nk_rune") int unicode) {
return nnk_filter_oct(edit.address(), unicode) != 0;
}
// --- [ nk_filter_binary ] ---
public static native int nnk_filter_binary(long edit, int unicode);
@NativeType("int")
public static boolean nk_filter_binary(@NativeType("struct nk_text_edit const *") NkTextEdit edit, @NativeType("nk_rune") int unicode) {
return nnk_filter_binary(edit.address(), unicode) != 0;
}
// --- [ nk_textedit_init ] ---
public static native void nnk_textedit_init(long box, long allocator, long size);
public static void nk_textedit_init(@NativeType("struct nk_text_edit *") NkTextEdit box, @NativeType("struct nk_allocator *") NkAllocator allocator, @NativeType("nk_size") long size) {
nnk_textedit_init(box.address(), allocator.address(), size);
}
// --- [ nk_textedit_init_fixed ] ---
public static native void nnk_textedit_init_fixed(long box, long memory, long size);
public static void nk_textedit_init_fixed(@NativeType("struct nk_text_edit *") NkTextEdit box, @NativeType("void *") ByteBuffer memory) {
nnk_textedit_init_fixed(box.address(), memAddress(memory), memory.remaining());
}
// --- [ nk_textedit_free ] ---
public static native void nnk_textedit_free(long box);
public static void nk_textedit_free(@NativeType("struct nk_text_edit *") NkTextEdit box) {
nnk_textedit_free(box.address());
}
// --- [ nk_textedit_text ] ---
public static native void nnk_textedit_text(long box, long text, int total_len);
public static void nk_textedit_text(@NativeType("struct nk_text_edit *") NkTextEdit box, @NativeType("char const *") ByteBuffer text) {
nnk_textedit_text(box.address(), memAddress(text), text.remaining());
}
public static void nk_textedit_text(@NativeType("struct nk_text_edit *") NkTextEdit box, @NativeType("char const *") CharSequence text) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer textEncoded = stack.UTF8(text, false);
nnk_textedit_text(box.address(), memAddress(textEncoded), textEncoded.remaining());
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_textedit_delete ] ---
public static native void nnk_textedit_delete(long box, int where, int len);
public static void nk_textedit_delete(@NativeType("struct nk_text_edit *") NkTextEdit box, int where, int len) {
nnk_textedit_delete(box.address(), where, len);
}
// --- [ nk_textedit_delete_selection ] ---
public static native void nnk_textedit_delete_selection(long box);
public static void nk_textedit_delete_selection(@NativeType("struct nk_text_edit *") NkTextEdit box) {
nnk_textedit_delete_selection(box.address());
}
// --- [ nk_textedit_select_all ] ---
public static native void nnk_textedit_select_all(long box);
public static void nk_textedit_select_all(@NativeType("struct nk_text_edit *") NkTextEdit box) {
nnk_textedit_select_all(box.address());
}
// --- [ nk_textedit_cut ] ---
public static native int nnk_textedit_cut(long box);
@NativeType("int")
public static boolean nk_textedit_cut(@NativeType("struct nk_text_edit *") NkTextEdit box) {
return nnk_textedit_cut(box.address()) != 0;
}
// --- [ nk_textedit_paste ] ---
public static native int nnk_textedit_paste(long box, long ctext, int len);
@NativeType("int")
public static boolean nk_textedit_paste(@NativeType("struct nk_text_edit *") NkTextEdit box, @NativeType("char const *") ByteBuffer ctext) {
return nnk_textedit_paste(box.address(), memAddress(ctext), ctext.remaining()) != 0;
}
@NativeType("int")
public static boolean nk_textedit_paste(@NativeType("struct nk_text_edit *") NkTextEdit box, @NativeType("char const *") CharSequence ctext) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer ctextEncoded = stack.UTF8(ctext, false);
return nnk_textedit_paste(box.address(), memAddress(ctextEncoded), ctextEncoded.remaining()) != 0;
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_textedit_undo ] ---
public static native void nnk_textedit_undo(long box);
public static void nk_textedit_undo(@NativeType("struct nk_text_edit *") NkTextEdit box) {
nnk_textedit_undo(box.address());
}
// --- [ nk_textedit_redo ] ---
public static native void nnk_textedit_redo(long box);
public static void nk_textedit_redo(@NativeType("struct nk_text_edit *") NkTextEdit box) {
nnk_textedit_redo(box.address());
}
// --- [ nk_stroke_line ] ---
public static native void nnk_stroke_line(long b, float x0, float y0, float x1, float y1, float line_thickness, long color);
public static void nk_stroke_line(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, float x0, float y0, float x1, float y1, float line_thickness, @NativeType("struct nk_color") NkColor color) {
nnk_stroke_line(b.address(), x0, y0, x1, y1, line_thickness, color.address());
}
// --- [ nk_stroke_curve ] ---
public static native void nnk_stroke_curve(long b, float ax, float ay, float ctrl0x, float ctrl0y, float ctrl1x, float ctrl1y, float bx, float by, float line_thickness, long color);
public static void nk_stroke_curve(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, float ax, float ay, float ctrl0x, float ctrl0y, float ctrl1x, float ctrl1y, float bx, float by, float line_thickness, @NativeType("struct nk_color") NkColor color) {
nnk_stroke_curve(b.address(), ax, ay, ctrl0x, ctrl0y, ctrl1x, ctrl1y, bx, by, line_thickness, color.address());
}
// --- [ nk_stroke_rect ] ---
public static native void nnk_stroke_rect(long b, long rect, float rounding, float line_thickness, long color);
public static void nk_stroke_rect(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect, float rounding, float line_thickness, @NativeType("struct nk_color") NkColor color) {
nnk_stroke_rect(b.address(), rect.address(), rounding, line_thickness, color.address());
}
// --- [ nk_stroke_circle ] ---
public static native void nnk_stroke_circle(long b, long rect, float line_thickness, long color);
public static void nk_stroke_circle(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect, float line_thickness, @NativeType("struct nk_color") NkColor color) {
nnk_stroke_circle(b.address(), rect.address(), line_thickness, color.address());
}
// --- [ nk_stroke_arc ] ---
public static native void nnk_stroke_arc(long b, float cx, float cy, float radius, float a_min, float a_max, float line_thickness, long color);
public static void nk_stroke_arc(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, float cx, float cy, float radius, float a_min, float a_max, float line_thickness, @NativeType("struct nk_color") NkColor color) {
nnk_stroke_arc(b.address(), cx, cy, radius, a_min, a_max, line_thickness, color.address());
}
// --- [ nk_stroke_triangle ] ---
public static native void nnk_stroke_triangle(long b, float x0, float y0, float x1, float y1, float x2, float y2, float line_thichness, long color);
public static void nk_stroke_triangle(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, float x0, float y0, float x1, float y1, float x2, float y2, float line_thichness, @NativeType("struct nk_color") NkColor color) {
nnk_stroke_triangle(b.address(), x0, y0, x1, y1, x2, y2, line_thichness, color.address());
}
// --- [ nk_stroke_polyline ] ---
public static native void nnk_stroke_polyline(long b, long points, int point_count, float line_thickness, long col);
public static void nk_stroke_polyline(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("float *") FloatBuffer points, float line_thickness, @NativeType("struct nk_color") NkColor col) {
nnk_stroke_polyline(b.address(), memAddress(points), points.remaining(), line_thickness, col.address());
}
// --- [ nk_stroke_polygon ] ---
public static native void nnk_stroke_polygon(long b, long points, int point_count, float line_thickness, long color);
public static void nk_stroke_polygon(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("float *") FloatBuffer points, float line_thickness, @NativeType("struct nk_color") NkColor color) {
nnk_stroke_polygon(b.address(), memAddress(points), points.remaining(), line_thickness, color.address());
}
// --- [ nk_fill_rect ] ---
public static native void nnk_fill_rect(long b, long rect, float rounding, long color);
public static void nk_fill_rect(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect, float rounding, @NativeType("struct nk_color") NkColor color) {
nnk_fill_rect(b.address(), rect.address(), rounding, color.address());
}
// --- [ nk_fill_rect_multi_color ] ---
public static native void nnk_fill_rect_multi_color(long b, long rect, long left, long top, long right, long bottom);
public static void nk_fill_rect_multi_color(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect, @NativeType("struct nk_color") NkColor left, @NativeType("struct nk_color") NkColor top, @NativeType("struct nk_color") NkColor right, @NativeType("struct nk_color") NkColor bottom) {
nnk_fill_rect_multi_color(b.address(), rect.address(), left.address(), top.address(), right.address(), bottom.address());
}
// --- [ nk_fill_circle ] ---
public static native void nnk_fill_circle(long b, long rect, long color);
public static void nk_fill_circle(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect, @NativeType("struct nk_color") NkColor color) {
nnk_fill_circle(b.address(), rect.address(), color.address());
}
// --- [ nk_fill_arc ] ---
public static native void nnk_fill_arc(long b, float cx, float cy, float radius, float a_min, float a_max, long color);
public static void nk_fill_arc(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, float cx, float cy, float radius, float a_min, float a_max, @NativeType("struct nk_color") NkColor color) {
nnk_fill_arc(b.address(), cx, cy, radius, a_min, a_max, color.address());
}
// --- [ nk_fill_triangle ] ---
public static native void nnk_fill_triangle(long b, float x0, float y0, float x1, float y1, float x2, float y2, long color);
public static void nk_fill_triangle(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, float x0, float y0, float x1, float y1, float x2, float y2, @NativeType("struct nk_color") NkColor color) {
nnk_fill_triangle(b.address(), x0, y0, x1, y1, x2, y2, color.address());
}
// --- [ nk_fill_polygon ] ---
public static native void nnk_fill_polygon(long b, long points, int point_count, long color);
public static void nk_fill_polygon(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("float *") FloatBuffer points, @NativeType("struct nk_color") NkColor color) {
nnk_fill_polygon(b.address(), memAddress(points), points.remaining(), color.address());
}
// --- [ nk_draw_image ] ---
public static native void nnk_draw_image(long b, long rect, long img, long color);
public static void nk_draw_image(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect, @NativeType("struct nk_image const *") NkImage img, @NativeType("struct nk_color") NkColor color) {
nnk_draw_image(b.address(), rect.address(), img.address(), color.address());
}
// --- [ nk_draw_text ] ---
public static native void nnk_draw_text(long b, long rect, long string, int length, long font, long bg, long fg);
public static void nk_draw_text(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect, @NativeType("char const *") ByteBuffer string, @NativeType("struct nk_user_font const *") NkUserFont font, @NativeType("struct nk_color") NkColor bg, @NativeType("struct nk_color") NkColor fg) {
nnk_draw_text(b.address(), rect.address(), memAddress(string), string.remaining(), font.address(), bg.address(), fg.address());
}
public static void nk_draw_text(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect, @NativeType("char const *") CharSequence string, @NativeType("struct nk_user_font const *") NkUserFont font, @NativeType("struct nk_color") NkColor bg, @NativeType("struct nk_color") NkColor fg) {
MemoryStack stack = stackGet(); int stackPointer = stack.getPointer();
try {
ByteBuffer stringEncoded = stack.UTF8(string, false);
nnk_draw_text(b.address(), rect.address(), memAddress(stringEncoded), stringEncoded.remaining(), font.address(), bg.address(), fg.address());
} finally {
stack.setPointer(stackPointer);
}
}
// --- [ nk_push_scissor ] ---
public static native void nnk_push_scissor(long b, long rect);
public static void nk_push_scissor(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect) {
nnk_push_scissor(b.address(), rect.address());
}
// --- [ nk_push_custom ] ---
public static native void nnk_push_custom(long b, long rect, long callback, long usr);
public static void nk_push_custom(@NativeType("struct nk_command_buffer *") NkCommandBuffer b, @NativeType("struct nk_rect") NkRect rect, @NativeType("nk_command_custom_callback") NkCommandCustomCallbackI callback, @NativeType("nk_handle") NkHandle usr) {
nnk_push_custom(b.address(), rect.address(), callback.address(), usr.address());
}
// --- [ nk__next ] ---
/** Unsafe version of: {@link #nk__next _next} */
public static native long nnk__next(long ctx, long cmd);
/**
* Increments the draw command iterator to the next command inside the context draw command list.
*
* @param ctx the nuklear context
*/
@Nullable
@NativeType("struct nk_command const *")
public static NkCommand nk__next(@NativeType("struct nk_context *") NkContext ctx, @NativeType("struct nk_command const *") NkCommand cmd) {
long __result = nnk__next(ctx.address(), cmd.address());
return NkCommand.createSafe(__result);
}
// --- [ nk__begin ] ---
/** Unsafe version of: {@link #nk__begin _begin} */
public static native long nnk__begin(long ctx);
/**
* Returns the first draw command in the context draw command list to be drawn.
*
* @param ctx the nuklear context
*/
@Nullable
@NativeType("struct nk_command const *")
public static NkCommand nk__begin(@NativeType("struct nk_context *") NkContext ctx) {
long __result = nnk__begin(ctx.address());
return NkCommand.createSafe(__result);
}
// --- [ nk_input_has_mouse_click ] ---
/** Unsafe version of: {@link #nk_input_has_mouse_click input_has_mouse_click} */
public static native int nnk_input_has_mouse_click(long i, int id);
/** @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
@NativeType("int")
public static boolean nk_input_has_mouse_click(@NativeType("struct nk_input const *") NkInput i, @NativeType("enum nk_buttons") int id) {
return nnk_input_has_mouse_click(i.address(), id) != 0;
}
// --- [ nk_input_has_mouse_click_in_rect ] ---
/** Unsafe version of: {@link #nk_input_has_mouse_click_in_rect input_has_mouse_click_in_rect} */
public static native int nnk_input_has_mouse_click_in_rect(long i, int id, long rect);
/** @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
@NativeType("int")
public static boolean nk_input_has_mouse_click_in_rect(@NativeType("struct nk_input const *") NkInput i, @NativeType("enum nk_buttons") int id, @NativeType("struct nk_rect") NkRect rect) {
return nnk_input_has_mouse_click_in_rect(i.address(), id, rect.address()) != 0;
}
// --- [ nk_input_has_mouse_click_down_in_rect ] ---
/** Unsafe version of: {@link #nk_input_has_mouse_click_down_in_rect input_has_mouse_click_down_in_rect} */
public static native int nnk_input_has_mouse_click_down_in_rect(long i, int id, long rect, int down);
/** @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
@NativeType("int")
public static boolean nk_input_has_mouse_click_down_in_rect(@NativeType("struct nk_input const *") NkInput i, @NativeType("enum nk_buttons") int id, @NativeType("struct nk_rect") NkRect rect, int down) {
return nnk_input_has_mouse_click_down_in_rect(i.address(), id, rect.address(), down) != 0;
}
// --- [ nk_input_is_mouse_click_in_rect ] ---
/** Unsafe version of: {@link #nk_input_is_mouse_click_in_rect input_is_mouse_click_in_rect} */
public static native int nnk_input_is_mouse_click_in_rect(long i, int id, long rect);
/** @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
@NativeType("int")
public static boolean nk_input_is_mouse_click_in_rect(@NativeType("struct nk_input const *") NkInput i, @NativeType("enum nk_buttons") int id, @NativeType("struct nk_rect") NkRect rect) {
return nnk_input_is_mouse_click_in_rect(i.address(), id, rect.address()) != 0;
}
// --- [ nk_input_is_mouse_click_down_in_rect ] ---
/** Unsafe version of: {@link #nk_input_is_mouse_click_down_in_rect input_is_mouse_click_down_in_rect} */
public static native int nnk_input_is_mouse_click_down_in_rect(long i, int id, long b, int down);
/** @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
@NativeType("int")
public static boolean nk_input_is_mouse_click_down_in_rect(@NativeType("struct nk_input const *") NkInput i, @NativeType("enum nk_buttons") int id, @NativeType("struct nk_rect") NkRect b, int down) {
return nnk_input_is_mouse_click_down_in_rect(i.address(), id, b.address(), down) != 0;
}
// --- [ nk_input_any_mouse_click_in_rect ] ---
public static native int nnk_input_any_mouse_click_in_rect(long i, long rect);
@NativeType("int")
public static boolean nk_input_any_mouse_click_in_rect(@NativeType("struct nk_input const *") NkInput i, @NativeType("struct nk_rect") NkRect rect) {
return nnk_input_any_mouse_click_in_rect(i.address(), rect.address()) != 0;
}
// --- [ nk_input_is_mouse_prev_hovering_rect ] ---
public static native int nnk_input_is_mouse_prev_hovering_rect(long i, long rect);
@NativeType("int")
public static boolean nk_input_is_mouse_prev_hovering_rect(@NativeType("struct nk_input const *") NkInput i, @NativeType("struct nk_rect") NkRect rect) {
return nnk_input_is_mouse_prev_hovering_rect(i.address(), rect.address()) != 0;
}
// --- [ nk_input_is_mouse_hovering_rect ] ---
public static native int nnk_input_is_mouse_hovering_rect(long i, long rect);
@NativeType("int")
public static boolean nk_input_is_mouse_hovering_rect(@NativeType("struct nk_input const *") NkInput i, @NativeType("struct nk_rect") NkRect rect) {
return nnk_input_is_mouse_hovering_rect(i.address(), rect.address()) != 0;
}
// --- [ nk_input_mouse_clicked ] ---
/** Unsafe version of: {@link #nk_input_mouse_clicked input_mouse_clicked} */
public static native int nnk_input_mouse_clicked(long i, int id, long rect);
/** @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
@NativeType("int")
public static boolean nk_input_mouse_clicked(@NativeType("struct nk_input const *") NkInput i, @NativeType("enum nk_buttons") int id, @NativeType("struct nk_rect") NkRect rect) {
return nnk_input_mouse_clicked(i.address(), id, rect.address()) != 0;
}
// --- [ nk_input_is_mouse_down ] ---
/** Unsafe version of: {@link #nk_input_is_mouse_down input_is_mouse_down} */
public static native int nnk_input_is_mouse_down(long i, int id);
/** @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
@NativeType("int")
public static boolean nk_input_is_mouse_down(@NativeType("struct nk_input const *") NkInput i, @NativeType("enum nk_buttons") int id) {
return nnk_input_is_mouse_down(i.address(), id) != 0;
}
// --- [ nk_input_is_mouse_pressed ] ---
/** Unsafe version of: {@link #nk_input_is_mouse_pressed input_is_mouse_pressed} */
public static native int nnk_input_is_mouse_pressed(long i, int id);
/** @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
@NativeType("int")
public static boolean nk_input_is_mouse_pressed(@NativeType("struct nk_input const *") NkInput i, @NativeType("enum nk_buttons") int id) {
return nnk_input_is_mouse_pressed(i.address(), id) != 0;
}
// --- [ nk_input_is_mouse_released ] ---
/** Unsafe version of: {@link #nk_input_is_mouse_released input_is_mouse_released} */
public static native int nnk_input_is_mouse_released(long i, int id);
/** @param id one of:
{@link #NK_BUTTON_LEFT BUTTON_LEFT}
{@link #NK_BUTTON_MIDDLE BUTTON_MIDDLE}
{@link #NK_BUTTON_RIGHT BUTTON_RIGHT}
{@link #NK_BUTTON_DOUBLE BUTTON_DOUBLE}
*/
@NativeType("int")
public static boolean nk_input_is_mouse_released(@NativeType("struct nk_input const *") NkInput i, @NativeType("enum nk_buttons") int id) {
return nnk_input_is_mouse_released(i.address(), id) != 0;
}
// --- [ nk_input_is_key_pressed ] ---
/** Unsafe version of: {@link #nk_input_is_key_pressed input_is_key_pressed} */
public static native int nnk_input_is_key_pressed(long i, int key);
/** @param key one of: