|
|
@@ -177,6 +177,15 @@ extern "C" {
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
+#ifndef NK_BOOL
|
|
|
+ #ifdef NK_INCLUDE_STANDARD_BOOL
|
|
|
+ #include <stdbool.h>
|
|
|
+ #define NK_BOOL bool
|
|
|
+ #else
|
|
|
+ #define NK_BOOL int /* could be char, use int for drop-in replacement backwards compatibility */
|
|
|
+ #endif
|
|
|
+#endif
|
|
|
+
|
|
|
typedef NK_INT8 nk_char;
|
|
|
typedef NK_UINT8 nk_uchar;
|
|
|
typedef NK_UINT8 nk_byte;
|
|
|
@@ -186,6 +195,7 @@ typedef NK_INT32 nk_int;
|
|
|
typedef NK_UINT32 nk_uint;
|
|
|
typedef NK_SIZE_TYPE nk_size;
|
|
|
typedef NK_POINTER_TYPE nk_ptr;
|
|
|
+typedef NK_BOOL nk_bool;
|
|
|
|
|
|
typedef nk_uint nk_hash;
|
|
|
typedef nk_uint nk_flags;
|
|
|
@@ -203,6 +213,11 @@ NK_STATIC_ASSERT(sizeof(nk_flags) >= 4);
|
|
|
NK_STATIC_ASSERT(sizeof(nk_rune) >= 4);
|
|
|
NK_STATIC_ASSERT(sizeof(nk_size) >= sizeof(void*));
|
|
|
NK_STATIC_ASSERT(sizeof(nk_ptr) >= sizeof(void*));
|
|
|
+#ifdef NK_INCLUDE_STANDARD_BOOL
|
|
|
+NK_STATIC_ASSERT(sizeof(nk_bool) == sizeof(bool));
|
|
|
+#else
|
|
|
+NK_STATIC_ASSERT(sizeof(nk_bool) >= 2);
|
|
|
+#endif
|
|
|
|
|
|
/* ============================================================================
|
|
|
*
|
|
|
@@ -263,7 +278,7 @@ enum nk_tree_type {NK_TREE_NODE, NK_TREE_TAB};
|
|
|
|
|
|
typedef void*(*nk_plugin_alloc)(nk_handle, void *old, nk_size);
|
|
|
typedef void (*nk_plugin_free)(nk_handle, void *old);
|
|
|
-typedef int(*nk_plugin_filter)(const struct nk_text_edit*, nk_rune unicode);
|
|
|
+typedef nk_bool(*nk_plugin_filter)(const struct nk_text_edit*, nk_rune unicode);
|
|
|
typedef void(*nk_plugin_paste)(nk_handle, struct nk_text_edit*);
|
|
|
typedef void(*nk_plugin_copy)(nk_handle, const char*, int len);
|
|
|
|
|
|
@@ -343,7 +358,7 @@ enum nk_symbol_type {
|
|
|
/// Returns either `false(0)` on failure or `true(1)` on success.
|
|
|
///
|
|
|
*/
|
|
|
-NK_API int nk_init_default(struct nk_context*, const struct nk_user_font*);
|
|
|
+NK_API nk_bool nk_init_default(struct nk_context*, const struct nk_user_font*);
|
|
|
#endif
|
|
|
/*/// #### nk_init_fixed
|
|
|
/// Initializes a `nk_context` struct from single fixed size memory block
|
|
|
@@ -368,7 +383,7 @@ NK_API int nk_init_default(struct nk_context*, const struct nk_user_font*);
|
|
|
///
|
|
|
/// Returns either `false(0)` on failure or `true(1)` on success.
|
|
|
*/
|
|
|
-NK_API int nk_init_fixed(struct nk_context*, void *memory, nk_size size, const struct nk_user_font*);
|
|
|
+NK_API nk_bool nk_init_fixed(struct nk_context*, void *memory, nk_size size, const struct nk_user_font*);
|
|
|
/*/// #### nk_init
|
|
|
/// Initializes a `nk_context` struct with memory allocation callbacks for nuklear to allocate
|
|
|
/// memory from. Used internally for `nk_init_default` and provides a kitchen sink allocation
|
|
|
@@ -386,7 +401,7 @@ NK_API int nk_init_fixed(struct nk_context*, void *memory, nk_size size, const s
|
|
|
///
|
|
|
/// Returns either `false(0)` on failure or `true(1)` on success.
|
|
|
*/
|
|
|
-NK_API int nk_init(struct nk_context*, struct nk_allocator*, const struct nk_user_font*);
|
|
|
+NK_API nk_bool nk_init(struct nk_context*, struct nk_allocator*, const struct nk_user_font*);
|
|
|
/*/// #### nk_init_custom
|
|
|
/// Initializes a `nk_context` struct from two different either fixed or growing
|
|
|
/// buffers. The first buffer is for allocating draw commands while the second buffer is
|
|
|
@@ -405,7 +420,7 @@ NK_API int nk_init(struct nk_context*, struct nk_allocator*, const struct nk_use
|
|
|
///
|
|
|
/// Returns either `false(0)` on failure or `true(1)` on success.
|
|
|
*/
|
|
|
-NK_API int nk_init_custom(struct nk_context*, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font*);
|
|
|
+NK_API nk_bool nk_init_custom(struct nk_context*, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font*);
|
|
|
/*/// #### nk_clear
|
|
|
/// 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
|
|
|
@@ -587,7 +602,7 @@ NK_API void nk_input_motion(struct nk_context*, int x, int y);
|
|
|
/// Mirrors the state of a specific key to nuklear
|
|
|
///
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
-/// void nk_input_key(struct nk_context*, enum nk_keys key, int down);
|
|
|
+/// void nk_input_key(struct nk_context*, enum nk_keys key, nk_bool down);
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
///
|
|
|
/// Parameter | Description
|
|
|
@@ -596,12 +611,12 @@ NK_API void nk_input_motion(struct nk_context*, int x, int y);
|
|
|
/// __key__ | Must be any value specified in enum `nk_keys` that needs to be mirrored
|
|
|
/// __down__ | Must be 0 for key is up and 1 for key is down
|
|
|
*/
|
|
|
-NK_API void nk_input_key(struct nk_context*, enum nk_keys, int down);
|
|
|
+NK_API void nk_input_key(struct nk_context*, enum nk_keys, nk_bool down);
|
|
|
/*/// #### nk_input_button
|
|
|
/// Mirrors the state of a specific mouse button to nuklear
|
|
|
///
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
-/// void nk_input_button(struct nk_context *ctx, enum nk_buttons btn, int x, int y, int down);
|
|
|
+/// void nk_input_button(struct nk_context *ctx, enum nk_buttons btn, int x, int y, nk_bool down);
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
///
|
|
|
/// Parameter | Description
|
|
|
@@ -612,7 +627,7 @@ NK_API void nk_input_key(struct nk_context*, enum nk_keys, int down);
|
|
|
/// __y__ | Must contain an integer describing mouse cursor y-position on click up/down
|
|
|
/// __down__ | Must be 0 for key is up and 1 for key is down
|
|
|
*/
|
|
|
-NK_API void nk_input_button(struct nk_context*, enum nk_buttons, int x, int y, int down);
|
|
|
+NK_API void nk_input_button(struct nk_context*, enum nk_buttons, int x, int y, nk_bool down);
|
|
|
/*/// #### nk_input_scroll
|
|
|
/// 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
|
|
|
@@ -1260,7 +1275,7 @@ enum nk_panel_flags {
|
|
|
/// Returns `true(1)` if the window can be filled up with widgets from this point
|
|
|
/// until `nk_end` or `false(0)` otherwise for example if minimized
|
|
|
*/
|
|
|
-NK_API int nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags);
|
|
|
+NK_API nk_bool nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bounds, nk_flags flags);
|
|
|
/*/// #### nk_begin_titled
|
|
|
/// Extended window start with separated title and identifier to allow multiple
|
|
|
/// windows with same title but not name
|
|
|
@@ -1280,7 +1295,7 @@ NK_API int nk_begin(struct nk_context *ctx, const char *title, struct nk_rect bo
|
|
|
/// Returns `true(1)` if the window can be filled up with widgets from this point
|
|
|
/// until `nk_end` or `false(0)` otherwise for example if minimized
|
|
|
*/
|
|
|
-NK_API int nk_begin_titled(struct nk_context *ctx, const char *name, const char *title, struct nk_rect bounds, nk_flags flags);
|
|
|
+NK_API nk_bool nk_begin_titled(struct nk_context *ctx, const char *name, const char *title, struct nk_rect bounds, nk_flags flags);
|
|
|
/*/// #### nk_end
|
|
|
/// Needs to be called at the end of the window building process to process scaling, scrollbars and general cleanup.
|
|
|
/// All widget calls after this functions will result in asserts or no state changes
|
|
|
@@ -1532,7 +1547,7 @@ NK_API void nk_window_get_scroll(struct nk_context*, nk_uint *offset_x, nk_uint
|
|
|
///
|
|
|
/// Returns `false(0)` if current window is not active or `true(1)` if it is
|
|
|
*/
|
|
|
-NK_API int nk_window_has_focus(const struct nk_context*);
|
|
|
+NK_API nk_bool nk_window_has_focus(const struct nk_context*);
|
|
|
/*/// #### nk_window_is_hovered
|
|
|
/// Return if the current window is being hovered
|
|
|
/// !!! WARNING
|
|
|
@@ -1547,7 +1562,7 @@ NK_API int nk_window_has_focus(const struct nk_context*);
|
|
|
///
|
|
|
/// Returns `true(1)` if current window is hovered or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_window_is_hovered(struct nk_context*);
|
|
|
+NK_API nk_bool nk_window_is_hovered(struct nk_context*);
|
|
|
/*/// #### nk_window_is_collapsed
|
|
|
/// Returns if the window with given name is currently minimized/collapsed
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -1562,7 +1577,7 @@ NK_API int nk_window_is_hovered(struct nk_context*);
|
|
|
/// Returns `true(1)` if current window is minimized and `false(0)` if window not
|
|
|
/// found or is not minimized
|
|
|
*/
|
|
|
-NK_API int nk_window_is_collapsed(struct nk_context *ctx, const char *name);
|
|
|
+NK_API nk_bool nk_window_is_collapsed(struct nk_context *ctx, const char *name);
|
|
|
/*/// #### nk_window_is_closed
|
|
|
/// Returns if the window with given name was closed by calling `nk_close`
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -1576,7 +1591,7 @@ NK_API int nk_window_is_collapsed(struct nk_context *ctx, const char *name);
|
|
|
///
|
|
|
/// Returns `true(1)` if current window was closed or `false(0)` window not found or not closed
|
|
|
*/
|
|
|
-NK_API int nk_window_is_closed(struct nk_context*, const char*);
|
|
|
+NK_API nk_bool nk_window_is_closed(struct nk_context*, const char*);
|
|
|
/*/// #### nk_window_is_hidden
|
|
|
/// Returns if the window with given name is hidden
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -1590,7 +1605,7 @@ NK_API int nk_window_is_closed(struct nk_context*, const char*);
|
|
|
///
|
|
|
/// Returns `true(1)` if current window is hidden or `false(0)` window not found or visible
|
|
|
*/
|
|
|
-NK_API int nk_window_is_hidden(struct nk_context*, const char*);
|
|
|
+NK_API nk_bool nk_window_is_hidden(struct nk_context*, const char*);
|
|
|
/*/// #### nk_window_is_active
|
|
|
/// Same as nk_window_has_focus for some reason
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -1604,7 +1619,7 @@ NK_API int nk_window_is_hidden(struct nk_context*, const char*);
|
|
|
///
|
|
|
/// Returns `true(1)` if current window is active or `false(0)` window not found or not active
|
|
|
*/
|
|
|
-NK_API int nk_window_is_active(struct nk_context*, const char*);
|
|
|
+NK_API nk_bool nk_window_is_active(struct nk_context*, const char*);
|
|
|
/*/// #### nk_window_is_any_hovered
|
|
|
/// Returns if the any window is being hovered
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -1617,7 +1632,7 @@ NK_API int nk_window_is_active(struct nk_context*, const char*);
|
|
|
///
|
|
|
/// Returns `true(1)` if any window is hovered or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_window_is_any_hovered(struct nk_context*);
|
|
|
+NK_API nk_bool nk_window_is_any_hovered(struct nk_context*);
|
|
|
/*/// #### nk_item_is_any_active
|
|
|
/// Returns if the any window is being hovered or any widget is currently active.
|
|
|
/// Can be used to decide if input should be processed by UI or your specific input handling.
|
|
|
@@ -1632,7 +1647,7 @@ NK_API int nk_window_is_any_hovered(struct nk_context*);
|
|
|
///
|
|
|
/// Returns `true(1)` if any window is hovered or any item is active or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_item_is_any_active(struct nk_context*);
|
|
|
+NK_API nk_bool nk_item_is_any_active(struct nk_context*);
|
|
|
/*/// #### nk_window_set_bounds
|
|
|
/// Updates position and size of window with passed in name
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -2442,7 +2457,7 @@ NK_API struct nk_rect nk_layout_space_rect_to_local(struct nk_context*, struct n
|
|
|
///
|
|
|
/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_group_begin(struct nk_context*, const char *title, nk_flags);
|
|
|
+NK_API nk_bool nk_group_begin(struct nk_context*, const char *title, nk_flags);
|
|
|
/*/// #### nk_group_begin_titled
|
|
|
/// Starts a new widget group. Requires a previous layouting function to specify a pos/size.
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -2458,7 +2473,7 @@ NK_API int nk_group_begin(struct nk_context*, const char *title, nk_flags);
|
|
|
///
|
|
|
/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_group_begin_titled(struct nk_context*, const char *name, const char *title, nk_flags);
|
|
|
+NK_API nk_bool nk_group_begin_titled(struct nk_context*, const char *name, const char *title, nk_flags);
|
|
|
/*/// #### nk_group_end
|
|
|
/// Ends a widget group
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -2487,7 +2502,7 @@ NK_API void nk_group_end(struct nk_context*);
|
|
|
///
|
|
|
/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_group_scrolled_offset_begin(struct nk_context*, nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags);
|
|
|
+NK_API nk_bool nk_group_scrolled_offset_begin(struct nk_context*, nk_uint *x_offset, nk_uint *y_offset, const char *title, nk_flags flags);
|
|
|
/*/// #### nk_group_scrolled_begin
|
|
|
/// Starts a new widget group. requires a previous
|
|
|
/// layouting function to specify a size. Does not keep track of scrollbar.
|
|
|
@@ -2504,7 +2519,7 @@ NK_API int nk_group_scrolled_offset_begin(struct nk_context*, nk_uint *x_offset,
|
|
|
///
|
|
|
/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_group_scrolled_begin(struct nk_context*, struct nk_scroll *off, const char *title, nk_flags);
|
|
|
+NK_API nk_bool nk_group_scrolled_begin(struct nk_context*, struct nk_scroll *off, const char *title, nk_flags);
|
|
|
/*/// #### nk_group_scrolled_end
|
|
|
/// Ends a widget group after calling nk_group_scrolled_offset_begin or nk_group_scrolled_begin.
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -2672,7 +2687,7 @@ NK_API void nk_group_set_scroll(struct nk_context*, const char *id, nk_uint x_of
|
|
|
///
|
|
|
/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_tree_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);
|
|
|
+NK_API nk_bool nk_tree_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);
|
|
|
/*/// #### nk_tree_image_push
|
|
|
/// Start a collapsable UI section with image and label header
|
|
|
/// !!! WARNING
|
|
|
@@ -2736,7 +2751,7 @@ NK_API int nk_tree_push_hashed(struct nk_context*, enum nk_tree_type, const char
|
|
|
///
|
|
|
/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_tree_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);
|
|
|
+NK_API nk_bool nk_tree_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, const char *hash, int len,int seed);
|
|
|
/*/// #### nk_tree_pop
|
|
|
/// Ends a collapsabale UI section
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -2763,7 +2778,7 @@ NK_API void nk_tree_pop(struct nk_context*);
|
|
|
///
|
|
|
/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_tree_state_push(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states *state);
|
|
|
+NK_API nk_bool nk_tree_state_push(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states *state);
|
|
|
/*/// #### nk_tree_state_image_push
|
|
|
/// Start a collapsable UI section with image and label header and external state management
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -2780,7 +2795,7 @@ NK_API int nk_tree_state_push(struct nk_context*, enum nk_tree_type, const char
|
|
|
///
|
|
|
/// Returns `true(1)` if visible and fillable with widgets or `false(0)` otherwise
|
|
|
*/
|
|
|
-NK_API int nk_tree_state_image_push(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states *state);
|
|
|
+NK_API nk_bool nk_tree_state_image_push(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states *state);
|
|
|
/*/// #### nk_tree_state_pop
|
|
|
/// Ends a collapsabale UI section
|
|
|
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~c
|
|
|
@@ -2795,8 +2810,8 @@ NK_API void nk_tree_state_pop(struct nk_context*);
|
|
|
|
|
|
#define nk_tree_element_push(ctx, type, title, state, sel) nk_tree_element_push_hashed(ctx, type, title, state, sel, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__)
|
|
|
#define nk_tree_element_push_id(ctx, type, title, state, sel, id) nk_tree_element_push_hashed(ctx, type, title, state, sel, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id)
|
|
|
-NK_API int nk_tree_element_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, int *selected, const char *hash, int len, int seed);
|
|
|
-NK_API int nk_tree_element_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, int *selected, const char *hash, int len,int seed);
|
|
|
+NK_API nk_bool nk_tree_element_push_hashed(struct nk_context*, enum nk_tree_type, const char *title, enum nk_collapse_states initial_state, nk_bool *selected, const char *hash, int len, int seed);
|
|
|
+NK_API nk_bool nk_tree_element_image_push_hashed(struct nk_context*, enum nk_tree_type, struct nk_image, const char *title, enum nk_collapse_states initial_state, nk_bool *selected, const char *hash, int len,int seed);
|
|
|
NK_API void nk_tree_element_pop(struct nk_context*);
|
|
|
|
|
|
/* =============================================================================
|
|
|
@@ -2813,7 +2828,7 @@ struct nk_list_view {
|
|
|
nk_uint *scroll_pointer;
|
|
|
nk_uint scroll_value;
|
|
|
};
|
|
|
-NK_API int nk_list_view_begin(struct nk_context*, struct nk_list_view *out, const char *id, nk_flags, int row_height, int row_count);
|
|
|
+NK_API nk_bool nk_list_view_begin(struct nk_context*, struct nk_list_view *out, const char *id, nk_flags, int row_height, int row_count);
|
|
|
NK_API void nk_list_view_end(struct nk_list_view*);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
@@ -2842,9 +2857,9 @@ NK_API struct nk_vec2 nk_widget_position(struct nk_context*);
|
|
|
NK_API struct nk_vec2 nk_widget_size(struct nk_context*);
|
|
|
NK_API float nk_widget_width(struct nk_context*);
|
|
|
NK_API float nk_widget_height(struct nk_context*);
|
|
|
-NK_API int nk_widget_is_hovered(struct nk_context*);
|
|
|
-NK_API int nk_widget_is_mouse_clicked(struct nk_context*, enum nk_buttons);
|
|
|
-NK_API int nk_widget_has_mouse_click_down(struct nk_context*, enum nk_buttons, int down);
|
|
|
+NK_API nk_bool nk_widget_is_hovered(struct nk_context*);
|
|
|
+NK_API nk_bool nk_widget_is_mouse_clicked(struct nk_context*, enum nk_buttons);
|
|
|
+NK_API nk_bool nk_widget_has_mouse_click_down(struct nk_context*, enum nk_buttons, nk_bool down);
|
|
|
NK_API void nk_spacing(struct nk_context*, int cols);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
@@ -2896,66 +2911,66 @@ NK_API void nk_value_color_hex(struct nk_context*, const char *prefix, struct nk
|
|
|
* BUTTON
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_button_text(struct nk_context*, const char *title, int len);
|
|
|
-NK_API int nk_button_label(struct nk_context*, const char *title);
|
|
|
-NK_API int nk_button_color(struct nk_context*, struct nk_color);
|
|
|
-NK_API int nk_button_symbol(struct nk_context*, enum nk_symbol_type);
|
|
|
-NK_API int nk_button_image(struct nk_context*, struct nk_image img);
|
|
|
-NK_API int nk_button_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags text_alignment);
|
|
|
-NK_API int nk_button_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
-NK_API int nk_button_image_label(struct nk_context*, struct nk_image img, const char*, nk_flags text_alignment);
|
|
|
-NK_API int nk_button_image_text(struct nk_context*, struct nk_image img, const char*, int, nk_flags alignment);
|
|
|
-NK_API int nk_button_text_styled(struct nk_context*, const struct nk_style_button*, const char *title, int len);
|
|
|
-NK_API int nk_button_label_styled(struct nk_context*, const struct nk_style_button*, const char *title);
|
|
|
-NK_API int nk_button_symbol_styled(struct nk_context*, const struct nk_style_button*, enum nk_symbol_type);
|
|
|
-NK_API int nk_button_image_styled(struct nk_context*, const struct nk_style_button*, struct nk_image img);
|
|
|
-NK_API int nk_button_symbol_text_styled(struct nk_context*,const struct nk_style_button*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
-NK_API int nk_button_symbol_label_styled(struct nk_context *ctx, const struct nk_style_button *style, enum nk_symbol_type symbol, const char *title, nk_flags align);
|
|
|
-NK_API int nk_button_image_label_styled(struct nk_context*,const struct nk_style_button*, struct nk_image img, const char*, nk_flags text_alignment);
|
|
|
-NK_API int nk_button_image_text_styled(struct nk_context*,const struct nk_style_button*, struct nk_image img, const char*, int, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_button_text(struct nk_context*, const char *title, int len);
|
|
|
+NK_API nk_bool nk_button_label(struct nk_context*, const char *title);
|
|
|
+NK_API nk_bool nk_button_color(struct nk_context*, struct nk_color);
|
|
|
+NK_API nk_bool nk_button_symbol(struct nk_context*, enum nk_symbol_type);
|
|
|
+NK_API nk_bool nk_button_image(struct nk_context*, struct nk_image img);
|
|
|
+NK_API nk_bool nk_button_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags text_alignment);
|
|
|
+NK_API nk_bool nk_button_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_button_image_label(struct nk_context*, struct nk_image img, const char*, nk_flags text_alignment);
|
|
|
+NK_API nk_bool nk_button_image_text(struct nk_context*, struct nk_image img, const char*, int, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_button_text_styled(struct nk_context*, const struct nk_style_button*, const char *title, int len);
|
|
|
+NK_API nk_bool nk_button_label_styled(struct nk_context*, const struct nk_style_button*, const char *title);
|
|
|
+NK_API nk_bool nk_button_symbol_styled(struct nk_context*, const struct nk_style_button*, enum nk_symbol_type);
|
|
|
+NK_API nk_bool nk_button_image_styled(struct nk_context*, const struct nk_style_button*, struct nk_image img);
|
|
|
+NK_API nk_bool nk_button_symbol_text_styled(struct nk_context*,const struct nk_style_button*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_button_symbol_label_styled(struct nk_context *ctx, const struct nk_style_button *style, enum nk_symbol_type symbol, const char *title, nk_flags align);
|
|
|
+NK_API nk_bool nk_button_image_label_styled(struct nk_context*,const struct nk_style_button*, struct nk_image img, const char*, nk_flags text_alignment);
|
|
|
+NK_API nk_bool nk_button_image_text_styled(struct nk_context*,const struct nk_style_button*, struct nk_image img, const char*, int, nk_flags alignment);
|
|
|
NK_API void nk_button_set_behavior(struct nk_context*, enum nk_button_behavior);
|
|
|
-NK_API int nk_button_push_behavior(struct nk_context*, enum nk_button_behavior);
|
|
|
-NK_API int nk_button_pop_behavior(struct nk_context*);
|
|
|
+NK_API nk_bool nk_button_push_behavior(struct nk_context*, enum nk_button_behavior);
|
|
|
+NK_API nk_bool nk_button_pop_behavior(struct nk_context*);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
* CHECKBOX
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_check_label(struct nk_context*, const char*, int active);
|
|
|
-NK_API int nk_check_text(struct nk_context*, const char*, int,int active);
|
|
|
+NK_API nk_bool nk_check_label(struct nk_context*, const char*, nk_bool active);
|
|
|
+NK_API nk_bool nk_check_text(struct nk_context*, const char*, int, nk_bool active);
|
|
|
NK_API unsigned nk_check_flags_label(struct nk_context*, const char*, unsigned int flags, unsigned int value);
|
|
|
NK_API unsigned nk_check_flags_text(struct nk_context*, const char*, int, unsigned int flags, unsigned int value);
|
|
|
-NK_API int nk_checkbox_label(struct nk_context*, const char*, int *active);
|
|
|
-NK_API int nk_checkbox_text(struct nk_context*, const char*, int, int *active);
|
|
|
-NK_API int nk_checkbox_flags_label(struct nk_context*, const char*, unsigned int *flags, unsigned int value);
|
|
|
-NK_API int nk_checkbox_flags_text(struct nk_context*, const char*, int, unsigned int *flags, unsigned int value);
|
|
|
+NK_API nk_bool nk_checkbox_label(struct nk_context*, const char*, nk_bool *active);
|
|
|
+NK_API nk_bool nk_checkbox_text(struct nk_context*, const char*, int, nk_bool *active);
|
|
|
+NK_API nk_bool nk_checkbox_flags_label(struct nk_context*, const char*, unsigned int *flags, unsigned int value);
|
|
|
+NK_API nk_bool nk_checkbox_flags_text(struct nk_context*, const char*, int, unsigned int *flags, unsigned int value);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
* RADIO BUTTON
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_radio_label(struct nk_context*, const char*, int *active);
|
|
|
-NK_API int nk_radio_text(struct nk_context*, const char*, int, int *active);
|
|
|
-NK_API int nk_option_label(struct nk_context*, const char*, int active);
|
|
|
-NK_API int nk_option_text(struct nk_context*, const char*, int, int active);
|
|
|
+NK_API nk_bool nk_radio_label(struct nk_context*, const char*, nk_bool *active);
|
|
|
+NK_API nk_bool nk_radio_text(struct nk_context*, const char*, int, nk_bool *active);
|
|
|
+NK_API nk_bool nk_option_label(struct nk_context*, const char*, nk_bool active);
|
|
|
+NK_API nk_bool nk_option_text(struct nk_context*, const char*, int, nk_bool active);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
* SELECTABLE
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_selectable_label(struct nk_context*, const char*, nk_flags align, int *value);
|
|
|
-NK_API int nk_selectable_text(struct nk_context*, const char*, int, nk_flags align, int *value);
|
|
|
-NK_API int nk_selectable_image_label(struct nk_context*,struct nk_image, const char*, nk_flags align, int *value);
|
|
|
-NK_API int nk_selectable_image_text(struct nk_context*,struct nk_image, const char*, int, nk_flags align, int *value);
|
|
|
-NK_API int nk_selectable_symbol_label(struct nk_context*,enum nk_symbol_type, const char*, nk_flags align, int *value);
|
|
|
-NK_API int nk_selectable_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, int *value);
|
|
|
-
|
|
|
-NK_API int nk_select_label(struct nk_context*, const char*, nk_flags align, int value);
|
|
|
-NK_API int nk_select_text(struct nk_context*, const char*, int, nk_flags align, int value);
|
|
|
-NK_API int nk_select_image_label(struct nk_context*, struct nk_image,const char*, nk_flags align, int value);
|
|
|
-NK_API int nk_select_image_text(struct nk_context*, struct nk_image,const char*, int, nk_flags align, int value);
|
|
|
-NK_API int nk_select_symbol_label(struct nk_context*,enum nk_symbol_type, const char*, nk_flags align, int value);
|
|
|
-NK_API int nk_select_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, int value);
|
|
|
+NK_API nk_bool nk_selectable_label(struct nk_context*, const char*, nk_flags align, nk_bool *value);
|
|
|
+NK_API nk_bool nk_selectable_text(struct nk_context*, const char*, int, nk_flags align, nk_bool *value);
|
|
|
+NK_API nk_bool nk_selectable_image_label(struct nk_context*,struct nk_image, const char*, nk_flags align, nk_bool *value);
|
|
|
+NK_API nk_bool nk_selectable_image_text(struct nk_context*,struct nk_image, const char*, int, nk_flags align, nk_bool *value);
|
|
|
+NK_API nk_bool nk_selectable_symbol_label(struct nk_context*,enum nk_symbol_type, const char*, nk_flags align, nk_bool *value);
|
|
|
+NK_API nk_bool nk_selectable_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, nk_bool *value);
|
|
|
+
|
|
|
+NK_API nk_bool nk_select_label(struct nk_context*, const char*, nk_flags align, nk_bool value);
|
|
|
+NK_API nk_bool nk_select_text(struct nk_context*, const char*, int, nk_flags align, nk_bool value);
|
|
|
+NK_API nk_bool nk_select_image_label(struct nk_context*, struct nk_image,const char*, nk_flags align, nk_bool value);
|
|
|
+NK_API nk_bool nk_select_image_text(struct nk_context*, struct nk_image,const char*, int, nk_flags align, nk_bool value);
|
|
|
+NK_API nk_bool nk_select_symbol_label(struct nk_context*,enum nk_symbol_type, const char*, nk_flags align, nk_bool value);
|
|
|
+NK_API nk_bool nk_select_symbol_text(struct nk_context*,enum nk_symbol_type, const char*, int, nk_flags align, nk_bool value);
|
|
|
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
@@ -2964,15 +2979,15 @@ NK_API int nk_select_symbol_text(struct nk_context*,enum nk_symbol_type, const c
|
|
|
* ============================================================================= */
|
|
|
NK_API float nk_slide_float(struct nk_context*, float min, float val, float max, float step);
|
|
|
NK_API int nk_slide_int(struct nk_context*, int min, int val, int max, int step);
|
|
|
-NK_API int nk_slider_float(struct nk_context*, float min, float *val, float max, float step);
|
|
|
-NK_API int nk_slider_int(struct nk_context*, int min, int *val, int max, int step);
|
|
|
+NK_API nk_bool nk_slider_float(struct nk_context*, float min, float *val, float max, float step);
|
|
|
+NK_API nk_bool nk_slider_int(struct nk_context*, int min, int *val, int max, int step);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
* PROGRESSBAR
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_progress(struct nk_context*, nk_size *cur, nk_size max, int modifyable);
|
|
|
-NK_API nk_size nk_prog(struct nk_context*, nk_size cur, nk_size max, int modifyable);
|
|
|
+NK_API nk_bool nk_progress(struct nk_context*, nk_size *cur, nk_size max, nk_bool modifyable);
|
|
|
+NK_API nk_size nk_prog(struct nk_context*, nk_size cur, nk_size max, nk_bool modifyable);
|
|
|
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
@@ -2980,7 +2995,7 @@ NK_API nk_size nk_prog(struct nk_context*, nk_size cur, nk_size max, int modifya
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
NK_API struct nk_colorf nk_color_picker(struct nk_context*, struct nk_colorf, enum nk_color_format);
|
|
|
-NK_API int nk_color_pick(struct nk_context*, struct nk_colorf*, enum nk_color_format);
|
|
|
+NK_API nk_bool nk_color_pick(struct nk_context*, struct nk_colorf*, enum nk_color_format);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
* PROPERTIES
|
|
|
@@ -3142,7 +3157,7 @@ NK_API void nk_property_double(struct nk_context*, const char *name, double min,
|
|
|
///
|
|
|
/// Returns the new modified integer value
|
|
|
*/
|
|
|
-NK_API int nk_propertyi(struct nk_context*, const char *name, int min, int val, int max, int step, float inc_per_pixel);
|
|
|
+NK_API nk_bool nk_propertyi(struct nk_context*, const char *name, int min, int val, int max, int step, float inc_per_pixel);
|
|
|
/*/// #### nk_propertyf
|
|
|
/// Float property modifing a passed in value and returning the new value
|
|
|
/// !!! WARNING
|
|
|
@@ -3232,8 +3247,8 @@ NK_API void nk_edit_unfocus(struct nk_context*);
|
|
|
* CHART
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_chart_begin(struct nk_context*, enum nk_chart_type, int num, float min, float max);
|
|
|
-NK_API int nk_chart_begin_colored(struct nk_context*, enum nk_chart_type, struct nk_color, struct nk_color active, int num, float min, float max);
|
|
|
+NK_API nk_bool nk_chart_begin(struct nk_context*, enum nk_chart_type, int num, float min, float max);
|
|
|
+NK_API nk_bool nk_chart_begin_colored(struct nk_context*, enum nk_chart_type, struct nk_color, struct nk_color active, int num, float min, float max);
|
|
|
NK_API void nk_chart_add_slot(struct nk_context *ctx, const enum nk_chart_type, int count, float min_value, float max_value);
|
|
|
NK_API void nk_chart_add_slot_colored(struct nk_context *ctx, const enum nk_chart_type, struct nk_color, struct nk_color active, int count, float min_value, float max_value);
|
|
|
NK_API nk_flags nk_chart_push(struct nk_context*, float);
|
|
|
@@ -3246,7 +3261,7 @@ NK_API void nk_plot_function(struct nk_context*, enum nk_chart_type, void *userd
|
|
|
* POPUP
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_popup_begin(struct nk_context*, enum nk_popup_type, const char*, nk_flags, struct nk_rect bounds);
|
|
|
+NK_API nk_bool nk_popup_begin(struct nk_context*, enum nk_popup_type, const char*, nk_flags, struct nk_rect bounds);
|
|
|
NK_API void nk_popup_close(struct nk_context*);
|
|
|
NK_API void nk_popup_end(struct nk_context*);
|
|
|
NK_API void nk_popup_get_scroll(struct nk_context*, nk_uint *offset_x, nk_uint *offset_y);
|
|
|
@@ -3256,34 +3271,34 @@ NK_API void nk_popup_set_scroll(struct nk_context*, nk_uint offset_x, nk_uint of
|
|
|
* COMBOBOX
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_combo(struct nk_context*, const char **items, int count, int selected, int item_height, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_separator(struct nk_context*, const char *items_separated_by_separator, int separator, int selected, int count, int item_height, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_string(struct nk_context*, const char *items_separated_by_zeros, int selected, int count, int item_height, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_callback(struct nk_context*, void(*item_getter)(void*, int, const char**), void *userdata, int selected, int count, int item_height, struct nk_vec2 size);
|
|
|
-NK_API void nk_combobox(struct nk_context*, const char **items, int count, int *selected, int item_height, struct nk_vec2 size);
|
|
|
-NK_API void nk_combobox_string(struct nk_context*, const char *items_separated_by_zeros, int *selected, int count, int item_height, struct nk_vec2 size);
|
|
|
-NK_API void nk_combobox_separator(struct nk_context*, const char *items_separated_by_separator, int separator,int *selected, int count, int item_height, struct nk_vec2 size);
|
|
|
-NK_API void nk_combobox_callback(struct nk_context*, void(*item_getter)(void*, int, const char**), void*, int *selected, int count, int item_height, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo(struct nk_context*, const char **items, int count, nk_bool selected, int item_height, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_separator(struct nk_context*, const char *items_separated_by_separator, int separator, nk_bool selected, int count, int item_height, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_string(struct nk_context*, const char *items_separated_by_zeros, nk_bool selected, int count, int item_height, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_callback(struct nk_context*, void(*item_getter)(void*, int, const char**), void *userdata, nk_bool selected, int count, int item_height, struct nk_vec2 size);
|
|
|
+NK_API void nk_combobox(struct nk_context*, const char **items, int count, nk_bool *selected, int item_height, struct nk_vec2 size);
|
|
|
+NK_API void nk_combobox_string(struct nk_context*, const char *items_separated_by_zeros, nk_bool *selected, int count, int item_height, struct nk_vec2 size);
|
|
|
+NK_API void nk_combobox_separator(struct nk_context*, const char *items_separated_by_separator, int separator, nk_bool *selected, int count, int item_height, struct nk_vec2 size);
|
|
|
+NK_API void nk_combobox_callback(struct nk_context*, void(*item_getter)(void*, int, const char**), void*, nk_bool *selected, int count, int item_height, struct nk_vec2 size);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
* ABSTRACT COMBOBOX
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_combo_begin_text(struct nk_context*, const char *selected, int, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_begin_label(struct nk_context*, const char *selected, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_begin_color(struct nk_context*, struct nk_color color, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_begin_symbol(struct nk_context*, enum nk_symbol_type, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_begin_symbol_label(struct nk_context*, const char *selected, enum nk_symbol_type, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_begin_symbol_text(struct nk_context*, const char *selected, int, enum nk_symbol_type, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_begin_image(struct nk_context*, struct nk_image img, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_begin_image_label(struct nk_context*, const char *selected, struct nk_image, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_begin_image_text(struct nk_context*, const char *selected, int, struct nk_image, struct nk_vec2 size);
|
|
|
-NK_API int nk_combo_item_label(struct nk_context*, const char*, nk_flags alignment);
|
|
|
-NK_API int nk_combo_item_text(struct nk_context*, const char*,int, nk_flags alignment);
|
|
|
-NK_API int nk_combo_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);
|
|
|
-NK_API int nk_combo_item_image_text(struct nk_context*, struct nk_image, const char*, int,nk_flags alignment);
|
|
|
-NK_API int nk_combo_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);
|
|
|
-NK_API int nk_combo_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_combo_begin_text(struct nk_context*, const char *selected, int, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_begin_label(struct nk_context*, const char *selected, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_begin_color(struct nk_context*, struct nk_color color, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_begin_symbol(struct nk_context*, enum nk_symbol_type, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_begin_symbol_label(struct nk_context*, const char *selected, enum nk_symbol_type, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_begin_symbol_text(struct nk_context*, const char *selected, int, enum nk_symbol_type, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_begin_image(struct nk_context*, struct nk_image img, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_begin_image_label(struct nk_context*, const char *selected, struct nk_image, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_begin_image_text(struct nk_context*, const char *selected, int, struct nk_image, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_combo_item_label(struct nk_context*, const char*, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_combo_item_text(struct nk_context*, const char*,int, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_combo_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_combo_item_image_text(struct nk_context*, struct nk_image, const char*, int,nk_flags alignment);
|
|
|
+NK_API nk_bool nk_combo_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_combo_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
NK_API void nk_combo_close(struct nk_context*);
|
|
|
NK_API void nk_combo_end(struct nk_context*);
|
|
|
/* =============================================================================
|
|
|
@@ -3291,13 +3306,13 @@ NK_API void nk_combo_end(struct nk_context*);
|
|
|
* CONTEXTUAL
|
|
|
*
|
|
|
* ============================================================================= */
|
|
|
-NK_API int nk_contextual_begin(struct nk_context*, nk_flags, struct nk_vec2, struct nk_rect trigger_bounds);
|
|
|
-NK_API int nk_contextual_item_text(struct nk_context*, const char*, int,nk_flags align);
|
|
|
-NK_API int nk_contextual_item_label(struct nk_context*, const char*, nk_flags align);
|
|
|
-NK_API int nk_contextual_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);
|
|
|
-NK_API int nk_contextual_item_image_text(struct nk_context*, struct nk_image, const char*, int len, nk_flags alignment);
|
|
|
-NK_API int nk_contextual_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);
|
|
|
-NK_API int nk_contextual_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_contextual_begin(struct nk_context*, nk_flags, struct nk_vec2, struct nk_rect trigger_bounds);
|
|
|
+NK_API nk_bool nk_contextual_item_text(struct nk_context*, const char*, int,nk_flags align);
|
|
|
+NK_API nk_bool nk_contextual_item_label(struct nk_context*, const char*, nk_flags align);
|
|
|
+NK_API nk_bool nk_contextual_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_contextual_item_image_text(struct nk_context*, struct nk_image, const char*, int len, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_contextual_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_contextual_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
NK_API void nk_contextual_close(struct nk_context*);
|
|
|
NK_API void nk_contextual_end(struct nk_context*);
|
|
|
/* =============================================================================
|
|
|
@@ -3310,7 +3325,7 @@ NK_API void nk_tooltip(struct nk_context*, const char*);
|
|
|
NK_API void nk_tooltipf(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, ...) NK_PRINTF_VARARG_FUNC(2);
|
|
|
NK_API void nk_tooltipfv(struct nk_context*, NK_PRINTF_FORMAT_STRING const char*, va_list) NK_PRINTF_VALIST_FUNC(2);
|
|
|
#endif
|
|
|
-NK_API int nk_tooltip_begin(struct nk_context*, float width);
|
|
|
+NK_API nk_bool nk_tooltip_begin(struct nk_context*, float width);
|
|
|
NK_API void nk_tooltip_end(struct nk_context*);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
@@ -3319,20 +3334,20 @@ NK_API void nk_tooltip_end(struct nk_context*);
|
|
|
* ============================================================================= */
|
|
|
NK_API void nk_menubar_begin(struct nk_context*);
|
|
|
NK_API void nk_menubar_end(struct nk_context*);
|
|
|
-NK_API int nk_menu_begin_text(struct nk_context*, const char* title, int title_len, nk_flags align, struct nk_vec2 size);
|
|
|
-NK_API int nk_menu_begin_label(struct nk_context*, const char*, nk_flags align, struct nk_vec2 size);
|
|
|
-NK_API int nk_menu_begin_image(struct nk_context*, const char*, struct nk_image, struct nk_vec2 size);
|
|
|
-NK_API int nk_menu_begin_image_text(struct nk_context*, const char*, int,nk_flags align,struct nk_image, struct nk_vec2 size);
|
|
|
-NK_API int nk_menu_begin_image_label(struct nk_context*, const char*, nk_flags align,struct nk_image, struct nk_vec2 size);
|
|
|
-NK_API int nk_menu_begin_symbol(struct nk_context*, const char*, enum nk_symbol_type, struct nk_vec2 size);
|
|
|
-NK_API int nk_menu_begin_symbol_text(struct nk_context*, const char*, int,nk_flags align,enum nk_symbol_type, struct nk_vec2 size);
|
|
|
-NK_API int nk_menu_begin_symbol_label(struct nk_context*, const char*, nk_flags align,enum nk_symbol_type, struct nk_vec2 size);
|
|
|
-NK_API int nk_menu_item_text(struct nk_context*, const char*, int,nk_flags align);
|
|
|
-NK_API int nk_menu_item_label(struct nk_context*, const char*, nk_flags alignment);
|
|
|
-NK_API int nk_menu_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);
|
|
|
-NK_API int nk_menu_item_image_text(struct nk_context*, struct nk_image, const char*, int len, nk_flags alignment);
|
|
|
-NK_API int nk_menu_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
-NK_API int nk_menu_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_menu_begin_text(struct nk_context*, const char* title, int title_len, nk_flags align, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_menu_begin_label(struct nk_context*, const char*, nk_flags align, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_menu_begin_image(struct nk_context*, const char*, struct nk_image, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_menu_begin_image_text(struct nk_context*, const char*, int,nk_flags align,struct nk_image, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_menu_begin_image_label(struct nk_context*, const char*, nk_flags align,struct nk_image, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_menu_begin_symbol(struct nk_context*, const char*, enum nk_symbol_type, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_menu_begin_symbol_text(struct nk_context*, const char*, int,nk_flags align,enum nk_symbol_type, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_menu_begin_symbol_label(struct nk_context*, const char*, nk_flags align,enum nk_symbol_type, struct nk_vec2 size);
|
|
|
+NK_API nk_bool nk_menu_item_text(struct nk_context*, const char*, int,nk_flags align);
|
|
|
+NK_API nk_bool nk_menu_item_label(struct nk_context*, const char*, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_menu_item_image_label(struct nk_context*, struct nk_image, const char*, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_menu_item_image_text(struct nk_context*, struct nk_image, const char*, int len, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_menu_item_symbol_text(struct nk_context*, enum nk_symbol_type, const char*, int, nk_flags alignment);
|
|
|
+NK_API nk_bool nk_menu_item_symbol_label(struct nk_context*, enum nk_symbol_type, const char*, nk_flags alignment);
|
|
|
NK_API void nk_menu_close(struct nk_context*);
|
|
|
NK_API void nk_menu_end(struct nk_context*);
|
|
|
/* =============================================================================
|
|
|
@@ -3387,23 +3402,23 @@ NK_API void nk_style_load_cursor(struct nk_context*, enum nk_style_cursor, const
|
|
|
NK_API void nk_style_load_all_cursors(struct nk_context*, struct nk_cursor*);
|
|
|
NK_API const char* nk_style_get_color_by_name(enum nk_style_colors);
|
|
|
NK_API void nk_style_set_font(struct nk_context*, const struct nk_user_font*);
|
|
|
-NK_API int nk_style_set_cursor(struct nk_context*, enum nk_style_cursor);
|
|
|
+NK_API nk_bool nk_style_set_cursor(struct nk_context*, enum nk_style_cursor);
|
|
|
NK_API void nk_style_show_cursor(struct nk_context*);
|
|
|
NK_API void nk_style_hide_cursor(struct nk_context*);
|
|
|
|
|
|
-NK_API int nk_style_push_font(struct nk_context*, const struct nk_user_font*);
|
|
|
-NK_API int nk_style_push_float(struct nk_context*, float*, float);
|
|
|
-NK_API int nk_style_push_vec2(struct nk_context*, struct nk_vec2*, struct nk_vec2);
|
|
|
-NK_API int nk_style_push_style_item(struct nk_context*, struct nk_style_item*, struct nk_style_item);
|
|
|
-NK_API int nk_style_push_flags(struct nk_context*, nk_flags*, nk_flags);
|
|
|
-NK_API int nk_style_push_color(struct nk_context*, struct nk_color*, struct nk_color);
|
|
|
-
|
|
|
-NK_API int nk_style_pop_font(struct nk_context*);
|
|
|
-NK_API int nk_style_pop_float(struct nk_context*);
|
|
|
-NK_API int nk_style_pop_vec2(struct nk_context*);
|
|
|
-NK_API int nk_style_pop_style_item(struct nk_context*);
|
|
|
-NK_API int nk_style_pop_flags(struct nk_context*);
|
|
|
-NK_API int nk_style_pop_color(struct nk_context*);
|
|
|
+NK_API nk_bool nk_style_push_font(struct nk_context*, const struct nk_user_font*);
|
|
|
+NK_API nk_bool nk_style_push_float(struct nk_context*, float*, float);
|
|
|
+NK_API nk_bool nk_style_push_vec2(struct nk_context*, struct nk_vec2*, struct nk_vec2);
|
|
|
+NK_API nk_bool nk_style_push_style_item(struct nk_context*, struct nk_style_item*, struct nk_style_item);
|
|
|
+NK_API nk_bool nk_style_push_flags(struct nk_context*, nk_flags*, nk_flags);
|
|
|
+NK_API nk_bool nk_style_push_color(struct nk_context*, struct nk_color*, struct nk_color);
|
|
|
+
|
|
|
+NK_API nk_bool nk_style_pop_font(struct nk_context*);
|
|
|
+NK_API nk_bool nk_style_pop_float(struct nk_context*);
|
|
|
+NK_API nk_bool nk_style_pop_vec2(struct nk_context*);
|
|
|
+NK_API nk_bool nk_style_pop_style_item(struct nk_context*);
|
|
|
+NK_API nk_bool nk_style_pop_flags(struct nk_context*);
|
|
|
+NK_API nk_bool nk_style_pop_color(struct nk_context*);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
* COLOR
|
|
|
@@ -3477,7 +3492,7 @@ NK_API nk_handle nk_handle_id(int);
|
|
|
NK_API struct nk_image nk_image_handle(nk_handle);
|
|
|
NK_API struct nk_image nk_image_ptr(void*);
|
|
|
NK_API struct nk_image nk_image_id(int);
|
|
|
-NK_API int nk_image_is_subimage(const struct nk_image* img);
|
|
|
+NK_API nk_bool nk_image_is_subimage(const struct nk_image* img);
|
|
|
NK_API struct nk_image nk_subimage_ptr(void*, unsigned short w, unsigned short h, struct nk_rect sub_region);
|
|
|
NK_API struct nk_image nk_subimage_id(int, unsigned short w, unsigned short h, struct nk_rect sub_region);
|
|
|
NK_API struct nk_image nk_subimage_handle(nk_handle, unsigned short w, unsigned short h, struct nk_rect sub_region);
|
|
|
@@ -3895,7 +3910,7 @@ enum nk_buffer_allocation_type {
|
|
|
};
|
|
|
|
|
|
struct nk_buffer_marker {
|
|
|
- int active;
|
|
|
+ nk_bool active;
|
|
|
nk_size offset;
|
|
|
};
|
|
|
|
|
|
@@ -4083,13 +4098,13 @@ struct nk_text_edit {
|
|
|
};
|
|
|
|
|
|
/* filter function */
|
|
|
-NK_API int nk_filter_default(const struct nk_text_edit*, nk_rune unicode);
|
|
|
-NK_API int nk_filter_ascii(const struct nk_text_edit*, nk_rune unicode);
|
|
|
-NK_API int nk_filter_float(const struct nk_text_edit*, nk_rune unicode);
|
|
|
-NK_API int nk_filter_decimal(const struct nk_text_edit*, nk_rune unicode);
|
|
|
-NK_API int nk_filter_hex(const struct nk_text_edit*, nk_rune unicode);
|
|
|
-NK_API int nk_filter_oct(const struct nk_text_edit*, nk_rune unicode);
|
|
|
-NK_API int nk_filter_binary(const struct nk_text_edit*, nk_rune unicode);
|
|
|
+NK_API nk_bool nk_filter_default(const struct nk_text_edit*, nk_rune unicode);
|
|
|
+NK_API nk_bool nk_filter_ascii(const struct nk_text_edit*, nk_rune unicode);
|
|
|
+NK_API nk_bool nk_filter_float(const struct nk_text_edit*, nk_rune unicode);
|
|
|
+NK_API nk_bool nk_filter_decimal(const struct nk_text_edit*, nk_rune unicode);
|
|
|
+NK_API nk_bool nk_filter_hex(const struct nk_text_edit*, nk_rune unicode);
|
|
|
+NK_API nk_bool nk_filter_oct(const struct nk_text_edit*, nk_rune unicode);
|
|
|
+NK_API nk_bool nk_filter_binary(const struct nk_text_edit*, nk_rune unicode);
|
|
|
|
|
|
/* text editor */
|
|
|
#ifdef NK_INCLUDE_DEFAULT_ALLOCATOR
|
|
|
@@ -4102,8 +4117,8 @@ NK_API void nk_textedit_text(struct nk_text_edit*, const char*, int total_len);
|
|
|
NK_API void nk_textedit_delete(struct nk_text_edit*, int where, int len);
|
|
|
NK_API void nk_textedit_delete_selection(struct nk_text_edit*);
|
|
|
NK_API void nk_textedit_select_all(struct nk_text_edit*);
|
|
|
-NK_API int nk_textedit_cut(struct nk_text_edit*);
|
|
|
-NK_API int nk_textedit_paste(struct nk_text_edit*, char const*, int len);
|
|
|
+NK_API nk_bool nk_textedit_cut(struct nk_text_edit*);
|
|
|
+NK_API nk_bool nk_textedit_paste(struct nk_text_edit*, char const*, int len);
|
|
|
NK_API void nk_textedit_undo(struct nk_text_edit*);
|
|
|
NK_API void nk_textedit_redo(struct nk_text_edit*);
|
|
|
|
|
|
@@ -4382,7 +4397,7 @@ NK_API void nk_push_custom(struct nk_command_buffer*, struct nk_rect, nk_command
|
|
|
*
|
|
|
* ===============================================================*/
|
|
|
struct nk_mouse_button {
|
|
|
- int down;
|
|
|
+ nk_bool down;
|
|
|
unsigned int clicked;
|
|
|
struct nk_vec2 clicked_pos;
|
|
|
};
|
|
|
@@ -4398,7 +4413,7 @@ struct nk_mouse {
|
|
|
};
|
|
|
|
|
|
struct nk_key {
|
|
|
- int down;
|
|
|
+ nk_bool down;
|
|
|
unsigned int clicked;
|
|
|
};
|
|
|
struct nk_keyboard {
|
|
|
@@ -4412,21 +4427,21 @@ struct nk_input {
|
|
|
struct nk_mouse mouse;
|
|
|
};
|
|
|
|
|
|
-NK_API int nk_input_has_mouse_click(const struct nk_input*, enum nk_buttons);
|
|
|
-NK_API int nk_input_has_mouse_click_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect);
|
|
|
-NK_API int nk_input_has_mouse_click_down_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect, int down);
|
|
|
-NK_API int nk_input_is_mouse_click_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect);
|
|
|
-NK_API int nk_input_is_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id, struct nk_rect b, int down);
|
|
|
-NK_API int nk_input_any_mouse_click_in_rect(const struct nk_input*, struct nk_rect);
|
|
|
-NK_API int nk_input_is_mouse_prev_hovering_rect(const struct nk_input*, struct nk_rect);
|
|
|
-NK_API int nk_input_is_mouse_hovering_rect(const struct nk_input*, struct nk_rect);
|
|
|
-NK_API int nk_input_mouse_clicked(const struct nk_input*, enum nk_buttons, struct nk_rect);
|
|
|
-NK_API int nk_input_is_mouse_down(const struct nk_input*, enum nk_buttons);
|
|
|
-NK_API int nk_input_is_mouse_pressed(const struct nk_input*, enum nk_buttons);
|
|
|
-NK_API int nk_input_is_mouse_released(const struct nk_input*, enum nk_buttons);
|
|
|
-NK_API int nk_input_is_key_pressed(const struct nk_input*, enum nk_keys);
|
|
|
-NK_API int nk_input_is_key_released(const struct nk_input*, enum nk_keys);
|
|
|
-NK_API int nk_input_is_key_down(const struct nk_input*, enum nk_keys);
|
|
|
+NK_API nk_bool nk_input_has_mouse_click(const struct nk_input*, enum nk_buttons);
|
|
|
+NK_API nk_bool nk_input_has_mouse_click_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect);
|
|
|
+NK_API nk_bool nk_input_has_mouse_click_down_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect, nk_bool down);
|
|
|
+NK_API nk_bool nk_input_is_mouse_click_in_rect(const struct nk_input*, enum nk_buttons, struct nk_rect);
|
|
|
+NK_API nk_bool nk_input_is_mouse_click_down_in_rect(const struct nk_input *i, enum nk_buttons id, struct nk_rect b, nk_bool down);
|
|
|
+NK_API nk_bool nk_input_any_mouse_click_in_rect(const struct nk_input*, struct nk_rect);
|
|
|
+NK_API nk_bool nk_input_is_mouse_prev_hovering_rect(const struct nk_input*, struct nk_rect);
|
|
|
+NK_API nk_bool nk_input_is_mouse_hovering_rect(const struct nk_input*, struct nk_rect);
|
|
|
+NK_API nk_bool nk_input_mouse_clicked(const struct nk_input*, enum nk_buttons, struct nk_rect);
|
|
|
+NK_API nk_bool nk_input_is_mouse_down(const struct nk_input*, enum nk_buttons);
|
|
|
+NK_API nk_bool nk_input_is_mouse_pressed(const struct nk_input*, enum nk_buttons);
|
|
|
+NK_API nk_bool nk_input_is_mouse_released(const struct nk_input*, enum nk_buttons);
|
|
|
+NK_API nk_bool nk_input_is_key_pressed(const struct nk_input*, enum nk_keys);
|
|
|
+NK_API nk_bool nk_input_is_key_released(const struct nk_input*, enum nk_keys);
|
|
|
+NK_API nk_bool nk_input_is_key_down(const struct nk_input*, enum nk_keys);
|
|
|
|
|
|
/* ===============================================================
|
|
|
*
|
|
|
@@ -5099,7 +5114,7 @@ struct nk_popup_buffer {
|
|
|
nk_size parent;
|
|
|
nk_size last;
|
|
|
nk_size end;
|
|
|
- int active;
|
|
|
+ nk_bool active;
|
|
|
};
|
|
|
|
|
|
struct nk_menu_state {
|
|
|
@@ -5157,7 +5172,7 @@ struct nk_popup_state {
|
|
|
enum nk_panel_type type;
|
|
|
struct nk_popup_buffer buf;
|
|
|
nk_hash name;
|
|
|
- int active;
|
|
|
+ nk_bool active;
|
|
|
unsigned combo_count;
|
|
|
unsigned con_count, con_old;
|
|
|
unsigned active_con;
|