docs: Fix Warnings and Notes#925
Open
RobLoach wants to merge 2 commits intoImmediate-Mode-UI:masterfrom
Open
Conversation
Contributor
|
Looks good. |
Comment on lines
-1412
to
1411
| * !!! \warning | ||
| * Only call this function between calls `nk_begin_xxx` and `nk_end` | ||
| * \warning Only call this function between calls `nk_begin_xxx` and `nk_end` | ||
| * ```c | ||
| * struct nk_rect nk_window_get_bounds(const struct nk_context *ctx); | ||
| * ``` |
Contributor
There was a problem hiding this comment.
sleeptightAnsiC
suggested changes
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Could you please fix all occurrences of the issue I just mentioned?
You can use the diff from below. I already tried it locally. Hopefully, I haven't missed anything else.
diff
diff --git a/nuklear.h b/nuklear.h
index 2b7aa57..92e9849 100644
--- a/nuklear.h
+++ b/nuklear.h
@@ -1622,6 +1622,7 @@ NK_API struct nk_window *nk_window_find(const struct nk_context *ctx, const char
* \returns a rectangle with screen position and size of the currently processed window
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* struct nk_rect nk_window_get_bounds(const struct nk_context *ctx);
* ```
@@ -1640,6 +1641,7 @@ NK_API struct nk_rect nk_window_get_bounds(const struct nk_context *ctx);
* \returns the position of the currently processed window.
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);
* ```
@@ -1658,6 +1660,7 @@ NK_API struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);
* \returns the size with width and height of the currently processed window.
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* struct nk_vec2 nk_window_get_size(const struct nk_context *ctx);
* ```
@@ -1676,6 +1679,7 @@ NK_API struct nk_vec2 nk_window_get_size(const struct nk_context *ctx);
* \returns the width of the currently processed window.
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* float nk_window_get_width(const struct nk_context *ctx);
* ```
@@ -1693,6 +1697,7 @@ NK_API float nk_window_get_width(const struct nk_context *ctx);
* \returns the height of the currently processed window.
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* float nk_window_get_height(const struct nk_context *ctx);
* ```
@@ -1712,6 +1717,7 @@ NK_API float nk_window_get_height(const struct nk_context* ctx);
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
* \warning Do not keep the returned panel pointer around, it is only valid until `nk_end`
+ *
* ```c
* struct nk_panel* nk_window_get_panel(struct nk_context *ctx);
* ```
@@ -1849,6 +1855,7 @@ NK_API void nk_window_get_scroll(const struct nk_context *ctx, nk_uint *offset_x
* # # nk_window_has_focus
* \returns if the currently processed window is currently active
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* nk_bool nk_window_has_focus(const struct nk_context *ctx);
* ```
@@ -1866,6 +1873,7 @@ NK_API nk_bool nk_window_has_focus(const struct nk_context *ctx);
* # # nk_window_is_hovered
* Return if the current window is being hovered
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* nk_bool nk_window_is_hovered(struct nk_context *ctx);
* ```
diff --git a/src/nuklear.h b/src/nuklear.h
index 2f431e6..9ec94d4 100644
--- a/src/nuklear.h
+++ b/src/nuklear.h
@@ -1406,6 +1406,7 @@ NK_API struct nk_window *nk_window_find(const struct nk_context *ctx, const char
* \returns a rectangle with screen position and size of the currently processed window
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* struct nk_rect nk_window_get_bounds(const struct nk_context *ctx);
* ```
@@ -1424,6 +1425,7 @@ NK_API struct nk_rect nk_window_get_bounds(const struct nk_context *ctx);
* \returns the position of the currently processed window.
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);
* ```
@@ -1442,6 +1444,7 @@ NK_API struct nk_vec2 nk_window_get_position(const struct nk_context *ctx);
* \returns the size with width and height of the currently processed window.
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* struct nk_vec2 nk_window_get_size(const struct nk_context *ctx);
* ```
@@ -1460,6 +1463,7 @@ NK_API struct nk_vec2 nk_window_get_size(const struct nk_context *ctx);
* \returns the width of the currently processed window.
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* float nk_window_get_width(const struct nk_context *ctx);
* ```
@@ -1477,6 +1481,7 @@ NK_API float nk_window_get_width(const struct nk_context *ctx);
* \returns the height of the currently processed window.
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* float nk_window_get_height(const struct nk_context *ctx);
* ```
@@ -1496,6 +1501,7 @@ NK_API float nk_window_get_height(const struct nk_context* ctx);
*
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
* \warning Do not keep the returned panel pointer around, it is only valid until `nk_end`
+ *
* ```c
* struct nk_panel* nk_window_get_panel(struct nk_context *ctx);
* ```
@@ -1633,6 +1639,7 @@ NK_API void nk_window_get_scroll(const struct nk_context *ctx, nk_uint *offset_x
* # # nk_window_has_focus
* \returns if the currently processed window is currently active
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* nk_bool nk_window_has_focus(const struct nk_context *ctx);
* ```
@@ -1650,6 +1657,7 @@ NK_API nk_bool nk_window_has_focus(const struct nk_context *ctx);
* # # nk_window_is_hovered
* Return if the current window is being hovered
* \warning Only call this function between calls `nk_begin_xxx` and `nk_end`
+ *
* ```c
* nk_bool nk_window_is_hovered(struct nk_context *ctx);
* ```
RobLoach
commented
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes #917