|
5 | 5 | // - Read FAQ at http://dearimgui.org/faq
|
6 | 6 | // - Newcomers, read 'Programmer guide' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
|
7 | 7 | // - Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp for demo code. All applications in examples/ are doing that.
|
8 |
| -// Read imgui.cpp for more details, documentation and comments. |
| 8 | +// Read imgui.cpp for details, links and comments. |
9 | 9 |
|
10 | 10 | // Resources:
|
11 | 11 | // - FAQ http://dearimgui.org/faq
|
@@ -65,7 +65,7 @@ Index of this file:
|
65 | 65 |
|
66 | 66 | // Define attributes of all API symbols declarations (e.g. for DLL under Windows)
|
67 | 67 | // IMGUI_API is used for core imgui functions, IMGUI_IMPL_API is used for the default bindings files (imgui_impl_xxx.h)
|
68 |
| -// Using dear imgui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility. |
| 68 | +// Using dear imgui via a shared library is not recommended, because we don't guarantee backward nor forward ABI compatibility (also function call overhead, as dear imgui is a call-heavy API) |
69 | 69 | #ifndef IMGUI_API
|
70 | 70 | #define IMGUI_API
|
71 | 71 | #endif
|
@@ -170,18 +170,23 @@ typedef int ImGuiTreeNodeFlags; // -> enum ImGuiTreeNodeFlags_ // Flags: f
|
170 | 170 | typedef int ImGuiWindowFlags; // -> enum ImGuiWindowFlags_ // Flags: for Begin(), BeginChild()
|
171 | 171 |
|
172 | 172 | // Other types
|
173 |
| -#ifndef ImTextureID // ImTextureID [configurable type: override in imconfig.h] |
| 173 | +#ifndef ImTextureID // ImTextureID [configurable type: override in imconfig.h with '#define ImTextureID xxx'] |
174 | 174 | typedef void* ImTextureID; // User data for rendering back-end to identify a texture. This is whatever to you want it to be! read the FAQ about ImTextureID for details.
|
175 | 175 | #endif
|
176 |
| -#ifndef ImWchar // ImWchar [configurable type: override in imconfig.h] |
177 |
| -#define ImWchar ImWchar16 // Storage for a single decoded character/code point, default to 16-bit. Set to ImWchar32 to support larger Unicode planes. Note that we generally support UTF-8 encoded string, this is storage for a decoded character. |
178 |
| -#endif |
179 | 176 | typedef unsigned int ImGuiID; // A unique ID used by widgets, typically hashed from a stack of string.
|
180 |
| -typedef unsigned short ImWchar16; // A single decoded U16 character/code point for keyboard input/display. We encode them as multi bytes UTF-8 when used in strings. |
181 |
| -typedef unsigned int ImWchar32; // A single decoded U32 character/code point for keyboard input/display. To enable, use '#define ImWchar ImWchar32' in imconfig.h. |
182 | 177 | typedef int (*ImGuiInputTextCallback)(ImGuiInputTextCallbackData *data);
|
183 | 178 | typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data);
|
184 | 179 |
|
| 180 | +// Decoded character types |
| 181 | +// (we generally use UTF-8 encoded string in the API. This is storage specifically for a decoded character used for keyboard input and display) |
| 182 | +typedef unsigned short ImWchar16; // A single decoded U16 character/code point. We encode them as multi bytes UTF-8 when used in strings. |
| 183 | +typedef unsigned int ImWchar32; // A single decoded U32 character/code point. We encode them as multi bytes UTF-8 when used in strings. |
| 184 | +#ifdef IMGUI_USE_WCHAR32 // ImWchar [configurable type: override in imconfig.h with '#define IMGUI_USE_WCHAR32' to support Unicode planes 1-16] |
| 185 | +typedef ImWchar32 ImWchar; |
| 186 | +#else |
| 187 | +typedef ImWchar16 ImWchar; |
| 188 | +#endif |
| 189 | + |
185 | 190 | // Basic scalar data types
|
186 | 191 | typedef signed char ImS8; // 8-bit signed integer
|
187 | 192 | typedef unsigned char ImU8; // 8-bit unsigned integer
|
|
0 commit comments