You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Readme.md
+28-3Lines changed: 28 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,14 +28,15 @@ intended for easy integration with automated build pipelines.
28
28
29
29
# Recent changes
30
30
31
+
* v0.12 adds support for setting certain `PlatformIO` callbacks in the docking branch that were previously not usable from C due to their return types. See the `PlatformIO callbacks` section below for full details.
31
32
* v0.11 introduces a small-but-significant breaking change as the output file names are now `dcimgui` instead of `cimgui` (to disambiguate in cases where people are using multiple binding generators)
32
33
* v0.10 adds (somewhat experimental) support for comverting `imgui_internal.h`.
33
34
* v0.08 adds structure default values to metadata, and fixes a few bugs.
34
35
* v0.07 adds some new metadata elements, new examples and fixes a number of bugs (especially around metadata and backends).
35
36
* v0.06 fixes a small issue with ImGui v1.90.0 WIP where `ListBox()` and `ComboBox()` have deprecated variants that cause name clashes. Those variants are now renamed to `ImGui_ListBoxObsolete()` and `ImGui_ComboBoxObsolete()` respectively.
36
-
* v0.05 introduced significantly enhanced type information in the JSON output, and experimental support for generating bindings for ImGui backends
37
-
* Note that there are a number of small changes in the JSON format related to this that will require modification to code that consumes the JSON files - search [Changelog.txt](Changelog.txt) for `BREAKING CHANGE` for full details
38
-
* v0.04 introduced a number of bugfixes and other tweaks
37
+
* v0.05 introduced significantly enhanced type information in the JSON output, and experimental support for generating bindings for ImGui backends.
38
+
* Note that there are a number of small changes in the JSON format related to this that will require modification to code that consumes the JSON files - search [Changelog.txt](Changelog.txt) for `BREAKING CHANGE` for full details.
39
+
* v0.04 introduced a number of bugfixes and other tweaks.
39
40
40
41
You can see a full list of recent changes [here](Changelog.txt).
41
42
@@ -284,6 +285,30 @@ Templates are expanded into their concrete instantiations, so for example `ImVec
284
285
285
286
> See the note above about `ImVector_Construct` for an exception to this rule.
286
287
288
+
### PlatformIO callbacks
289
+
290
+
Some of the PlatformIO callbacks (at present only in the Docking branch of Dear ImGui) return structures, which means that they cannot be directly set to C functions - notably these four:
To avoid this issue, Dear Bindings provides corresponding setter functions that take a C function and automatically insert a C++ thunk that converts the return value appropriately.
Note that internally these functions have to allocate a small structure to store the thunk information. This gets stored in the `BackendLanguageUserData` member of `ImGuiIO`, so if you application is using that for other purposes you will not be able to use these functions (in that case, you'll need to either implement your own thunk with the data stored elsewhere, or get in touch to see if we can find another place to store this data).
309
+
310
+
Also, there is a (small) dynamic allocation associated with this, so if you need to ensure absolutely all memory is freed then when you finish with the ImGui context you should use the helper functions to set the callbacks to `null` - once all the callbacks are removed the allocated memory will be freed.
311
+
287
312
### Removed functionality
288
313
289
314
These minor features are removed, mostly because they either rely on C++ language features to function correctly or are helpers that don't make sense as part of the bindings.
0 commit comments