1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-20 01:34:20 +00:00
This commit is contained in:
璀境石 2026-01-10 00:22:45 +08:00 committed by GitHub
commit 9173d291cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 1 deletions

View file

@ -37,6 +37,9 @@
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty.
//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowIDStackToolWindow() will be empty.
//---- Platform and compiler specific options
//#define IMGUI_DISABLE_STDINT_EXACT_BIT_WIDTH_INTEGER // Disable use of stdint.h / cstdint if your environment does not support exact-bit-width integers. (This is unlikely to happen in modern desktop OS)
//---- Don't implement some functions to reduce linkage requirements.
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
//#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with Visual Studio] Implement default IME handler (require imm32.lib/.a, auto-link for Visual Studio, -limm32 on command-line for MinGW)

15
imgui.h
View file

@ -157,7 +157,18 @@ Index of this file:
//-----------------------------------------------------------------------------
// Scalar data types
typedef unsigned int ImGuiID;// A unique ID used by widgets (typically the result of hashing a stack of string)
#ifndef IMGUI_DISABLE_STDINT_EXACT_BIT_WIDTH_INTEGER
#include <stdint.h>
typedef int8_t ImS8; // 8-bit signed integer
typedef uint8_t ImU8; // 8-bit unsigned integer
typedef int16_t ImS16; // 16-bit signed integer
typedef uint16_t ImU16; // 16-bit unsigned integer
typedef int32_t ImS32; // 32-bit signed integer == int
typedef uint32_t ImU32; // 32-bit unsigned integer (often used to store packed colors)
typedef int64_t ImS64; // 64-bit signed integer
typedef uint64_t ImU64; // 64-bit unsigned integer
#else
// FIXME: Unfortunately, there are multiple data models, such as ILP32/LLP64, ILP64, LP64. Please adjust the following code according to the actual situation of your target platform.
typedef signed char ImS8; // 8-bit signed integer
typedef unsigned char ImU8; // 8-bit unsigned integer
typedef signed short ImS16; // 16-bit signed integer
@ -166,6 +177,8 @@ typedef signed int ImS32; // 32-bit signed integer == int
typedef unsigned int ImU32; // 32-bit unsigned integer (often used to store packed colors)
typedef signed long long ImS64; // 64-bit signed integer
typedef unsigned long long ImU64; // 64-bit unsigned integer
#endif
typedef ImU32 ImGuiID;// A unique ID used by widgets (typically the result of hashing a stack of string)
// Forward declarations: ImDrawList, ImFontAtlas layer
struct ImDrawChannel; // Temporary storage to output draw commands out of order, used by ImDrawListSplitter and ImDrawList::ChannelsSplit()

View file

@ -324,6 +324,12 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer
// Format specifiers, printing 64-bit hasn't been decently standardized...
// In a real application you should be using PRId64 and PRIu64 from <inttypes.h> (non-windows) and on Windows define them yourself.
#ifndef IMGUI_DISABLE_STDINT_EXACT_BIT_WIDTH_INTEGER
#include <inttypes.h>
#define IM_PRId64 PRId64
#define IM_PRIu64 PRIu64
#define IM_PRIX64 PRIX64
#else
#if defined(_MSC_VER) && !defined(__clang__)
#define IM_PRId64 "I64d"
#define IM_PRIu64 "I64u"
@ -333,6 +339,7 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer
#define IM_PRIu64 "llu"
#define IM_PRIX64 "llX"
#endif
#endif
//-----------------------------------------------------------------------------
// [SECTION] Generic helpers