Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions imconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,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)
Expand Down
15 changes: 14 additions & 1 deletion imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,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
Expand All @@ -160,6 +171,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()
Expand Down
7 changes: 7 additions & 0 deletions imgui_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,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"
Expand All @@ -335,6 +341,7 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer
#define IM_PRIu64 "llu"
#define IM_PRIX64 "llX"
#endif
#endif

//-----------------------------------------------------------------------------
// [SECTION] Generic helpers
Expand Down
Loading