|
@@ -1,4 +1,4 @@
|
|
|
-/** \file nuklear.h
|
|
|
+/** \file nuklear.h
|
|
|
* \brief main API and documentation file
|
|
|
*
|
|
|
* \details
|
|
@@ -422,7 +422,7 @@ NK_API nk_bool nk_init_fixed(struct nk_context*, void *memory, nk_size size, con
|
|
|
NK_API nk_bool nk_init(struct nk_context*, const struct nk_allocator*, const struct nk_user_font*);
|
|
|
|
|
|
/**
|
|
|
- * \brief Initializes a `nk_context` struct from two different either fixed or growing buffers.
|
|
|
+ * \brief Initializes a `nk_context` struct from two different either fixed or growing buffers.
|
|
|
*
|
|
|
* \details
|
|
|
* The first buffer is for allocating draw commands while the second buffer is
|
|
@@ -442,7 +442,7 @@ NK_API nk_bool nk_init(struct nk_context*, const struct nk_allocator*, const str
|
|
|
NK_API nk_bool nk_init_custom(struct nk_context*, struct nk_buffer *cmds, struct nk_buffer *pool, const struct nk_user_font*);
|
|
|
|
|
|
/**
|
|
|
- * \brief Resets the context state at the end of the frame.
|
|
|
+ * \brief Resets the context state at the end of the frame.
|
|
|
*
|
|
|
* \details
|
|
|
* This includes mostly garbage collector tasks like removing windows or table
|
|
@@ -652,7 +652,7 @@ NK_API void nk_input_key(struct nk_context*, enum nk_keys, nk_bool down);
|
|
|
NK_API void nk_input_button(struct nk_context*, enum nk_buttons, int x, int y, nk_bool down);
|
|
|
|
|
|
/**
|
|
|
- * \brief Copies the last mouse scroll value to nuklear.
|
|
|
+ * \brief Copies the last mouse scroll value to nuklear.
|
|
|
*
|
|
|
* \details
|
|
|
* Is generally a scroll value. So does not have to come from mouse and could
|
|
@@ -705,7 +705,7 @@ NK_API void nk_input_glyph(struct nk_context*, const nk_glyph);
|
|
|
/**
|
|
|
* \brief Converts a unicode rune into UTF-8 and copies the result
|
|
|
* into an internal text buffer.
|
|
|
- *
|
|
|
+ *
|
|
|
* \details
|
|
|
* \note
|
|
|
* Stores up to NK_INPUT_MAX bytes between `nk_input_begin` and `nk_input_end`.
|
|
@@ -1034,7 +1034,7 @@ NK_API const struct nk_command* nk__next(struct nk_context*, const struct nk_com
|
|
|
|
|
|
/**
|
|
|
* \brief Converts all internal draw commands into vertex draw commands and fills
|
|
|
- * three buffers with vertexes, vertex draw commands and vertex indices.
|
|
|
+ * three buffers with vertexes, vertex draw commands and vertex indices.
|
|
|
*
|
|
|
* \details
|
|
|
* The vertex format as well as some other configuration values have to be
|
|
@@ -1371,9 +1371,8 @@ NK_API void nk_end(struct nk_context *ctx);
|
|
|
*
|
|
|
* \returns a `nk_window` struct pointing to the identified window or NULL if
|
|
|
* no window with the given name was found
|
|
|
-
|
|
|
*/
|
|
|
-NK_API struct nk_window *nk_window_find(struct nk_context *ctx, const char *name);
|
|
|
+NK_API struct nk_window *nk_window_find(const struct nk_context *ctx, const char *name);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_get_bounds
|
|
@@ -1430,7 +1429,7 @@ NK_API struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);
|
|
|
* \returns a `nk_vec2` struct with window width and height
|
|
|
|
|
|
*/
|
|
|
-NK_API struct nk_vec2 nk_window_get_size(const struct nk_context*);
|
|
|
+NK_API struct nk_vec2 nk_window_get_size(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* nk_window_get_width
|
|
@@ -1448,7 +1447,7 @@ NK_API struct nk_vec2 nk_window_get_size(const struct nk_context*);
|
|
|
*
|
|
|
* \returns the current window width
|
|
|
*/
|
|
|
-NK_API float nk_window_get_width(const struct nk_context*);
|
|
|
+NK_API float nk_window_get_width(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_get_height
|
|
@@ -1467,7 +1466,7 @@ NK_API float nk_window_get_width(const struct nk_context*);
|
|
|
* \returns the current window height
|
|
|
|
|
|
*/
|
|
|
-NK_API float nk_window_get_height(const struct nk_context*);
|
|
|
+NK_API float nk_window_get_height(const struct nk_context* ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_get_panel
|
|
@@ -1488,7 +1487,7 @@ NK_API float nk_window_get_height(const struct nk_context*);
|
|
|
* \returns a pointer to window internal `nk_panel` state.
|
|
|
|
|
|
*/
|
|
|
-NK_API struct nk_panel* nk_window_get_panel(struct nk_context*);
|
|
|
+NK_API struct nk_panel* nk_window_get_panel(const struct nk_context* ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_get_content_region
|
|
@@ -1510,7 +1509,7 @@ NK_API struct nk_panel* nk_window_get_panel(struct nk_context*);
|
|
|
* of the visible space inside the current window
|
|
|
|
|
|
*/
|
|
|
-NK_API struct nk_rect nk_window_get_content_region(struct nk_context*);
|
|
|
+NK_API struct nk_rect nk_window_get_content_region(const struct nk_context* ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_get_content_region_min
|
|
@@ -1532,7 +1531,7 @@ NK_API struct nk_rect nk_window_get_content_region(struct nk_context*);
|
|
|
* of the visible space inside the current window
|
|
|
|
|
|
*/
|
|
|
-NK_API struct nk_vec2 nk_window_get_content_region_min(struct nk_context*);
|
|
|
+NK_API struct nk_vec2 nk_window_get_content_region_min(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_get_content_region_max
|
|
@@ -1554,7 +1553,7 @@ NK_API struct nk_vec2 nk_window_get_content_region_min(struct nk_context*);
|
|
|
* of the visible space inside the current window
|
|
|
|
|
|
*/
|
|
|
-NK_API struct nk_vec2 nk_window_get_content_region_max(struct nk_context*);
|
|
|
+NK_API struct nk_vec2 nk_window_get_content_region_max(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_get_content_region_size
|
|
@@ -1575,7 +1574,7 @@ NK_API struct nk_vec2 nk_window_get_content_region_max(struct nk_context*);
|
|
|
* \returns `nk_vec2` struct with size the visible space inside the current window
|
|
|
|
|
|
*/
|
|
|
-NK_API struct nk_vec2 nk_window_get_content_region_size(struct nk_context*);
|
|
|
+NK_API struct nk_vec2 nk_window_get_content_region_size(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_get_canvas
|
|
@@ -1595,9 +1594,8 @@ NK_API struct nk_vec2 nk_window_get_content_region_size(struct nk_context*);
|
|
|
*
|
|
|
* \returns a pointer to window internal `nk_command_buffer` struct used as
|
|
|
* drawing canvas. Can be used to do custom drawing.
|
|
|
-
|
|
|
*/
|
|
|
-NK_API struct nk_command_buffer* nk_window_get_canvas(struct nk_context*);
|
|
|
+NK_API struct nk_command_buffer* nk_window_get_canvas(const struct nk_context* ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_get_scroll
|
|
@@ -1616,7 +1614,7 @@ NK_API struct nk_command_buffer* nk_window_get_canvas(struct nk_context*);
|
|
|
* \param[in] offset_y | A pointer to the y offset output (or NULL to ignore)
|
|
|
|
|
|
*/
|
|
|
-NK_API void nk_window_get_scroll(struct nk_context*, nk_uint *offset_x, nk_uint *offset_y);
|
|
|
+NK_API void nk_window_get_scroll(const struct nk_context *ctx, nk_uint *offset_x, nk_uint *offset_y);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_has_focus
|
|
@@ -1634,7 +1632,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 nk_bool nk_window_has_focus(const struct nk_context*);
|
|
|
+NK_API nk_bool nk_window_has_focus(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_is_hovered
|
|
@@ -1652,7 +1650,7 @@ NK_API nk_bool nk_window_has_focus(const struct nk_context*);
|
|
|
* \returns `true(1)` if current window is hovered or `false(0)` otherwise
|
|
|
|
|
|
*/
|
|
|
-NK_API nk_bool nk_window_is_hovered(struct nk_context*);
|
|
|
+NK_API nk_bool nk_window_is_hovered(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_is_collapsed
|
|
@@ -1670,7 +1668,7 @@ NK_API nk_bool nk_window_is_hovered(struct nk_context*);
|
|
|
* found or is not minimized
|
|
|
|
|
|
*/
|
|
|
-NK_API nk_bool nk_window_is_collapsed(struct nk_context *ctx, const char *name);
|
|
|
+NK_API nk_bool nk_window_is_collapsed(const struct nk_context *ctx, const char *name);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_is_closed
|
|
@@ -1687,7 +1685,7 @@ NK_API nk_bool 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 nk_bool nk_window_is_closed(struct nk_context*, const char*);
|
|
|
+NK_API nk_bool nk_window_is_closed(const struct nk_context *ctx, const char* name);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_is_hidden
|
|
@@ -1704,7 +1702,7 @@ NK_API nk_bool 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 nk_bool nk_window_is_hidden(struct nk_context*, const char*);
|
|
|
+NK_API nk_bool nk_window_is_hidden(const struct nk_context *ctx, const char* name);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_is_active
|
|
@@ -1719,9 +1717,8 @@ NK_API nk_bool nk_window_is_hidden(struct nk_context*, const char*);
|
|
|
* \param[in] name | Identifier of window you want to check if it is active
|
|
|
*
|
|
|
* \returns `true(1)` if current window is active or `false(0)` window not found or not active
|
|
|
-
|
|
|
*/
|
|
|
-NK_API nk_bool nk_window_is_active(struct nk_context*, const char*);
|
|
|
+NK_API nk_bool nk_window_is_active(const struct nk_context *ctx, const char* name);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_is_any_hovered
|
|
@@ -1735,9 +1732,8 @@ NK_API nk_bool nk_window_is_active(struct nk_context*, const char*);
|
|
|
* \param[in] ctx | Must point to an previously initialized `nk_context` struct
|
|
|
*
|
|
|
* \returns `true(1)` if any window is hovered or `false(0)` otherwise
|
|
|
-
|
|
|
*/
|
|
|
-NK_API nk_bool nk_window_is_any_hovered(struct nk_context*);
|
|
|
+NK_API nk_bool nk_window_is_any_hovered(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_item_is_any_active
|
|
@@ -1755,7 +1751,7 @@ NK_API nk_bool 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 nk_bool nk_item_is_any_active(struct nk_context*);
|
|
|
+NK_API nk_bool nk_item_is_any_active(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_set_bounds
|
|
@@ -1771,7 +1767,7 @@ NK_API nk_bool nk_item_is_any_active(struct nk_context*);
|
|
|
* \param[in] bounds | Must point to a `nk_rect` struct with the new position and size
|
|
|
|
|
|
*/
|
|
|
-NK_API void nk_window_set_bounds(struct nk_context*, const char *name, struct nk_rect bounds);
|
|
|
+NK_API void nk_window_set_bounds(struct nk_context *ctx, const char *name, struct nk_rect bounds);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_set_position
|
|
@@ -1787,7 +1783,7 @@ NK_API void nk_window_set_bounds(struct nk_context*, const char *name, struct nk
|
|
|
* \param[in] pos | Must point to a `nk_vec2` struct with the new position
|
|
|
|
|
|
*/
|
|
|
-NK_API void nk_window_set_position(struct nk_context*, const char *name, struct nk_vec2 pos);
|
|
|
+NK_API void nk_window_set_position(struct nk_context *ctx, const char *name, struct nk_vec2 pos);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_set_size
|
|
@@ -1803,7 +1799,7 @@ NK_API void nk_window_set_position(struct nk_context*, const char *name, struct
|
|
|
* \param[in] size | Must point to a `nk_vec2` struct with new window size
|
|
|
|
|
|
*/
|
|
|
-NK_API void nk_window_set_size(struct nk_context*, const char *name, struct nk_vec2);
|
|
|
+NK_API void nk_window_set_size(struct nk_context *ctx, const char *name, struct nk_vec2 size);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_set_focus
|
|
@@ -1818,7 +1814,7 @@ NK_API void nk_window_set_size(struct nk_context*, const char *name, struct nk_v
|
|
|
* \param[in] name | Identifier of the window to set focus on
|
|
|
|
|
|
*/
|
|
|
-NK_API void nk_window_set_focus(struct nk_context*, const char *name);
|
|
|
+NK_API void nk_window_set_focus(struct nk_context *ctx, const char *name);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_set_scroll
|
|
@@ -1837,7 +1833,7 @@ NK_API void nk_window_set_focus(struct nk_context*, const char *name);
|
|
|
* \param[in] offset_y | The y offset to scroll to
|
|
|
|
|
|
*/
|
|
|
-NK_API void nk_window_set_scroll(struct nk_context*, nk_uint offset_x, nk_uint offset_y);
|
|
|
+NK_API void nk_window_set_scroll(struct nk_context *ctx, nk_uint offset_x, nk_uint offset_y);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_close
|
|
@@ -1868,7 +1864,7 @@ NK_API void nk_window_close(struct nk_context *ctx, const char *name);
|
|
|
* \param[in] state | value out of nk_collapse_states section
|
|
|
|
|
|
*/
|
|
|
-NK_API void nk_window_collapse(struct nk_context*, const char *name, enum nk_collapse_states state);
|
|
|
+NK_API void nk_window_collapse(struct nk_context *ctx, const char *name, enum nk_collapse_states state);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_collapse_if
|
|
@@ -1885,7 +1881,7 @@ NK_API void nk_window_collapse(struct nk_context*, const char *name, enum nk_col
|
|
|
* \param[in] cond | condition that has to be met to actually commit the collapse state change
|
|
|
|
|
|
*/
|
|
|
-NK_API void nk_window_collapse_if(struct nk_context*, const char *name, enum nk_collapse_states, int cond);
|
|
|
+NK_API void nk_window_collapse_if(struct nk_context *ctx, const char *name, enum nk_collapse_states state, int cond);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_show
|
|
@@ -1900,7 +1896,7 @@ NK_API void nk_window_collapse_if(struct nk_context*, const char *name, enum nk_
|
|
|
* \param[in] name | Identifier of the window to either collapse or maximize
|
|
|
* \param[in] state | state with either visible or hidden to modify the window with
|
|
|
*/
|
|
|
-NK_API void nk_window_show(struct nk_context*, const char *name, enum nk_show_states);
|
|
|
+NK_API void nk_window_show(struct nk_context *ctx, const char *name, enum nk_show_states state);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_show_if
|
|
@@ -1917,7 +1913,7 @@ NK_API void nk_window_show(struct nk_context*, const char *name, enum nk_show_st
|
|
|
* \param[in] cond | condition that has to be met to actually commit the visibility state change
|
|
|
|
|
|
*/
|
|
|
-NK_API void nk_window_show_if(struct nk_context*, const char *name, enum nk_show_states, int cond);
|
|
|
+NK_API void nk_window_show_if(struct nk_context *ctx, const char *name, enum nk_show_states state, int cond);
|
|
|
|
|
|
/**
|
|
|
* # # nk_window_show_if
|
|
@@ -2258,7 +2254,7 @@ NK_API void nk_layout_reset_min_row_height(struct nk_context*);
|
|
|
*
|
|
|
* \return `nk_rect` with both position and size of the next row
|
|
|
*/
|
|
|
-NK_API struct nk_rect nk_layout_widget_bounds(struct nk_context*);
|
|
|
+NK_API struct nk_rect nk_layout_widget_bounds(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* \brief Utility functions to calculate window ratio from pixel size
|
|
@@ -2273,7 +2269,7 @@ NK_API struct nk_rect nk_layout_widget_bounds(struct nk_context*);
|
|
|
*
|
|
|
* \returns `nk_rect` with both position and size of the next row
|
|
|
*/
|
|
|
-NK_API float nk_layout_ratio_from_pixel(struct nk_context*, float pixel_width);
|
|
|
+NK_API float nk_layout_ratio_from_pixel(const struct nk_context *ctx, float pixel_width);
|
|
|
|
|
|
/**
|
|
|
* \brief Sets current row layout to share horizontal space
|
|
@@ -2488,7 +2484,7 @@ NK_API void nk_layout_space_end(struct nk_context*);
|
|
|
*
|
|
|
* \returns `nk_rect` holding the total space allocated
|
|
|
*/
|
|
|
-NK_API struct nk_rect nk_layout_space_bounds(struct nk_context*);
|
|
|
+NK_API struct nk_rect nk_layout_space_bounds(const struct nk_context *ctx);
|
|
|
|
|
|
/**
|
|
|
* # # nk_layout_space_to_screen
|
|
@@ -2504,7 +2500,7 @@ NK_API struct nk_rect nk_layout_space_bounds(struct nk_context*);
|
|
|
*
|
|
|
* \returns transformed `nk_vec2` in screen space coordinates
|
|
|
*/
|
|
|
-NK_API struct nk_vec2 nk_layout_space_to_screen(struct nk_context*, struct nk_vec2);
|
|
|
+NK_API struct nk_vec2 nk_layout_space_to_screen(const struct nk_context* ctx, struct nk_vec2 vec);
|
|
|
|
|
|
/**
|
|
|
* # # nk_layout_space_to_local
|
|
@@ -2520,7 +2516,7 @@ NK_API struct nk_vec2 nk_layout_space_to_screen(struct nk_context*, struct nk_ve
|
|
|
*
|
|
|
* \returns transformed `nk_vec2` in layout space coordinates
|
|
|
*/
|
|
|
-NK_API struct nk_vec2 nk_layout_space_to_local(struct nk_context*, struct nk_vec2);
|
|
|
+NK_API struct nk_vec2 nk_layout_space_to_local(const struct nk_context *ctx, struct nk_vec2 vec);
|
|
|
|
|
|
/**
|
|
|
* # # nk_layout_space_rect_to_screen
|
|
@@ -2536,7 +2532,7 @@ NK_API struct nk_vec2 nk_layout_space_to_local(struct nk_context*, struct nk_vec
|
|
|
*
|
|
|
* \returns transformed `nk_rect` in screen space coordinates
|
|
|
*/
|
|
|
-NK_API struct nk_rect nk_layout_space_rect_to_screen(struct nk_context*, struct nk_rect);
|
|
|
+NK_API struct nk_rect nk_layout_space_rect_to_screen(const struct nk_context *ctx, struct nk_rect bounds);
|
|
|
|
|
|
/**
|
|
|
* # # nk_layout_space_rect_to_local
|
|
@@ -2552,7 +2548,7 @@ NK_API struct nk_rect nk_layout_space_rect_to_screen(struct nk_context*, struct
|
|
|
*
|
|
|
* \returns transformed `nk_rect` in layout space coordinates
|
|
|
*/
|
|
|
-NK_API struct nk_rect nk_layout_space_rect_to_local(struct nk_context*, struct nk_rect);
|
|
|
+NK_API struct nk_rect nk_layout_space_rect_to_local(const struct nk_context *ctx, struct nk_rect bounds);
|
|
|
|
|
|
/**
|
|
|
* # # nk_spacer
|
|
@@ -2566,7 +2562,7 @@ NK_API struct nk_rect nk_layout_space_rect_to_local(struct nk_context*, struct n
|
|
|
* \param[in] ctx | Must point to an previously initialized `nk_context` struct after call `nk_layout_space_begin`
|
|
|
*
|
|
|
*/
|
|
|
-NK_API void nk_spacer(struct nk_context* );
|
|
|
+NK_API void nk_spacer(struct nk_context *ctx);
|
|
|
|
|
|
|
|
|
/** =============================================================================
|
|
@@ -3099,15 +3095,15 @@ enum nk_widget_states {
|
|
|
NK_WIDGET_STATE_ACTIVE = NK_WIDGET_STATE_ACTIVED|NK_WIDGET_STATE_MODIFIED /**!< widget is currently activated */
|
|
|
};
|
|
|
NK_API enum nk_widget_layout_states nk_widget(struct nk_rect*, const struct nk_context*);
|
|
|
-NK_API enum nk_widget_layout_states nk_widget_fitting(struct nk_rect*, struct nk_context*, struct nk_vec2);
|
|
|
-NK_API struct nk_rect nk_widget_bounds(struct nk_context*);
|
|
|
-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 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 enum nk_widget_layout_states nk_widget_fitting(struct nk_rect*, const struct nk_context*, struct nk_vec2);
|
|
|
+NK_API struct nk_rect nk_widget_bounds(const struct nk_context*);
|
|
|
+NK_API struct nk_vec2 nk_widget_position(const struct nk_context*);
|
|
|
+NK_API struct nk_vec2 nk_widget_size(const struct nk_context*);
|
|
|
+NK_API float nk_widget_width(const struct nk_context*);
|
|
|
+NK_API float nk_widget_height(const struct nk_context*);
|
|
|
+NK_API nk_bool nk_widget_is_hovered(const struct nk_context*);
|
|
|
+NK_API nk_bool nk_widget_is_mouse_clicked(const struct nk_context*, enum nk_buttons);
|
|
|
+NK_API nk_bool nk_widget_has_mouse_click_down(const struct nk_context*, enum nk_buttons, nk_bool down);
|
|
|
NK_API void nk_spacing(struct nk_context*, int cols);
|
|
|
NK_API void nk_widget_disable_begin(struct nk_context* ctx);
|
|
|
NK_API void nk_widget_disable_end(struct nk_context* ctx);
|
|
@@ -3536,18 +3532,18 @@ NK_API void nk_plot_function(struct nk_context*, enum nk_chart_type, void *userd
|
|
|
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);
|
|
|
+NK_API void nk_popup_get_scroll(const struct nk_context*, nk_uint *offset_x, nk_uint *offset_y);
|
|
|
NK_API void nk_popup_set_scroll(struct nk_context*, nk_uint offset_x, nk_uint offset_y);
|
|
|
/* =============================================================================
|
|
|
*
|
|
|
* 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(struct nk_context*, const char *const *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(struct nk_context*, const char *const *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);
|
|
@@ -3678,7 +3674,7 @@ enum nk_style_cursor {
|
|
|
NK_API void nk_style_default(struct nk_context*);
|
|
|
NK_API void nk_style_from_table(struct nk_context*, const struct nk_color*);
|
|
|
NK_API void nk_style_load_cursor(struct nk_context*, enum nk_style_cursor, const struct nk_cursor*);
|
|
|
-NK_API void nk_style_load_all_cursors(struct nk_context*, struct nk_cursor*);
|
|
|
+NK_API void nk_style_load_all_cursors(struct nk_context*, const 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 nk_bool nk_style_set_cursor(struct nk_context*, enum nk_style_cursor);
|
|
@@ -3710,7 +3706,7 @@ NK_API struct nk_color nk_rgb_f(float r, float g, float b);
|
|
|
NK_API struct nk_color nk_rgb_fv(const float *rgb);
|
|
|
NK_API struct nk_color nk_rgb_cf(struct nk_colorf c);
|
|
|
NK_API struct nk_color nk_rgb_hex(const char *rgb);
|
|
|
-NK_API struct nk_color nk_rgb_factor(struct nk_color col, const float factor);
|
|
|
+NK_API struct nk_color nk_rgb_factor(struct nk_color col, float factor);
|
|
|
|
|
|
NK_API struct nk_color nk_rgba(int r, int g, int b, int a);
|
|
|
NK_API struct nk_color nk_rgba_u32(nk_uint);
|
|
@@ -3722,7 +3718,7 @@ NK_API struct nk_color nk_rgba_cf(struct nk_colorf c);
|
|
|
NK_API struct nk_color nk_rgba_hex(const char *rgb);
|
|
|
|
|
|
NK_API struct nk_colorf nk_hsva_colorf(float h, float s, float v, float a);
|
|
|
-NK_API struct nk_colorf nk_hsva_colorfv(float *c);
|
|
|
+NK_API struct nk_colorf nk_hsva_colorfv(const float *c);
|
|
|
NK_API void nk_colorf_hsva_f(float *out_h, float *out_s, float *out_v, float *out_a, struct nk_colorf in);
|
|
|
NK_API void nk_colorf_hsva_fv(float *hsva, struct nk_colorf in);
|
|
|
|
|
@@ -4122,7 +4118,7 @@ NK_API struct nk_font *nk_font_atlas_add_compressed(struct nk_font_atlas*, void
|
|
|
NK_API struct nk_font* nk_font_atlas_add_compressed_base85(struct nk_font_atlas*, const char *data, float height, const struct nk_font_config *config);
|
|
|
NK_API const void* nk_font_atlas_bake(struct nk_font_atlas*, int *width, int *height, enum nk_font_atlas_format);
|
|
|
NK_API void nk_font_atlas_end(struct nk_font_atlas*, nk_handle tex, struct nk_draw_null_texture*);
|
|
|
-NK_API const struct nk_font_glyph* nk_font_find_glyph(struct nk_font*, nk_rune unicode);
|
|
|
+NK_API const struct nk_font_glyph* nk_font_find_glyph(const struct nk_font*, nk_rune unicode);
|
|
|
NK_API void nk_font_atlas_cleanup(struct nk_font_atlas *atlas);
|
|
|
NK_API void nk_font_atlas_clear(struct nk_font_atlas*);
|
|
|
|
|
@@ -4207,7 +4203,7 @@ NK_API void nk_buffer_init_default(struct nk_buffer*);
|
|
|
#endif
|
|
|
NK_API void nk_buffer_init(struct nk_buffer*, const struct nk_allocator*, nk_size size);
|
|
|
NK_API void nk_buffer_init_fixed(struct nk_buffer*, void *memory, nk_size size);
|
|
|
-NK_API void nk_buffer_info(struct nk_memory_status*, struct nk_buffer*);
|
|
|
+NK_API void nk_buffer_info(struct nk_memory_status*, const struct nk_buffer*);
|
|
|
NK_API void nk_buffer_push(struct nk_buffer*, enum nk_buffer_allocation_type type, const void *memory, nk_size size, nk_size align);
|
|
|
NK_API void nk_buffer_mark(struct nk_buffer*, enum nk_buffer_allocation_type type);
|
|
|
NK_API void nk_buffer_reset(struct nk_buffer*, enum nk_buffer_allocation_type type);
|
|
@@ -4215,7 +4211,7 @@ NK_API void nk_buffer_clear(struct nk_buffer*);
|
|
|
NK_API void nk_buffer_free(struct nk_buffer*);
|
|
|
NK_API void *nk_buffer_memory(struct nk_buffer*);
|
|
|
NK_API const void *nk_buffer_memory_const(const struct nk_buffer*);
|
|
|
-NK_API nk_size nk_buffer_total(struct nk_buffer*);
|
|
|
+NK_API nk_size nk_buffer_total(const struct nk_buffer*);
|
|
|
|
|
|
/** ==============================================================
|
|
|
*
|
|
@@ -4270,8 +4266,8 @@ NK_API const char *nk_str_at_const(const struct nk_str*, int pos, nk_rune *unico
|
|
|
|
|
|
NK_API char *nk_str_get(struct nk_str*);
|
|
|
NK_API const char *nk_str_get_const(const struct nk_str*);
|
|
|
-NK_API int nk_str_len(struct nk_str*);
|
|
|
-NK_API int nk_str_len_char(struct nk_str*);
|
|
|
+NK_API int nk_str_len(const struct nk_str*);
|
|
|
+NK_API int nk_str_len_char(const struct nk_str*);
|
|
|
|
|
|
/**===============================================================
|
|
|
*
|
|
@@ -4648,8 +4644,8 @@ NK_API void nk_stroke_rect(struct nk_command_buffer*, struct nk_rect, float roun
|
|
|
NK_API void nk_stroke_circle(struct nk_command_buffer*, struct nk_rect, float line_thickness, struct nk_color);
|
|
|
NK_API void nk_stroke_arc(struct nk_command_buffer*, float cx, float cy, float radius, float a_min, float a_max, float line_thickness, struct nk_color);
|
|
|
NK_API void nk_stroke_triangle(struct nk_command_buffer*, float, float, float, float, float, float, float line_thichness, struct nk_color);
|
|
|
-NK_API void nk_stroke_polyline(struct nk_command_buffer*, float *points, int point_count, float line_thickness, struct nk_color col);
|
|
|
-NK_API void nk_stroke_polygon(struct nk_command_buffer*, float*, int point_count, float line_thickness, struct nk_color);
|
|
|
+NK_API void nk_stroke_polyline(struct nk_command_buffer*, const float *points, int point_count, float line_thickness, struct nk_color col);
|
|
|
+NK_API void nk_stroke_polygon(struct nk_command_buffer*, const float *points, int point_count, float line_thickness, struct nk_color);
|
|
|
|
|
|
/** filled shades */
|
|
|
NK_API void nk_fill_rect(struct nk_command_buffer*, struct nk_rect, float rounding, struct nk_color);
|
|
@@ -4657,7 +4653,7 @@ NK_API void nk_fill_rect_multi_color(struct nk_command_buffer*, struct nk_rect,
|
|
|
NK_API void nk_fill_circle(struct nk_command_buffer*, struct nk_rect, struct nk_color);
|
|
|
NK_API void nk_fill_arc(struct nk_command_buffer*, float cx, float cy, float radius, float a_min, float a_max, struct nk_color);
|
|
|
NK_API void nk_fill_triangle(struct nk_command_buffer*, float x0, float y0, float x1, float y1, float x2, float y2, struct nk_color);
|
|
|
-NK_API void nk_fill_polygon(struct nk_command_buffer*, float*, int point_count, struct nk_color);
|
|
|
+NK_API void nk_fill_polygon(struct nk_command_buffer*, const float *points, int point_count, struct nk_color);
|
|
|
|
|
|
/** misc */
|
|
|
NK_API void nk_draw_image(struct nk_command_buffer*, struct nk_rect, const struct nk_image*, struct nk_color);
|