mirror of
https://github.com/cimgui/cimgui.git
synced 2026-02-24 18:34:56 +00:00
Compare commits
8 Commits
1.92.6
...
docking_in
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8de229087f | ||
|
|
e41d6fb1e8 | ||
|
|
c0c044e22f | ||
|
|
2cb5b7d19b | ||
|
|
335ef09f52 | ||
|
|
ee8fbaaff4 | ||
|
|
1a15dc7bcd | ||
|
|
77f726c6ca |
36
backend_test/example_sdl_renderer3/CMakeLists.txt
Normal file
36
backend_test/example_sdl_renderer3/CMakeLists.txt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.30)
|
||||||
|
project(cimgui_sdlrenderer3 LANGUAGES C CXX)
|
||||||
|
|
||||||
|
set(CMAKE_C_STANDARD 11)
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
sdl3
|
||||||
|
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
|
||||||
|
GIT_TAG release-3.4.0
|
||||||
|
#GIT_SHALLOW TRUE
|
||||||
|
GIT_PROGRESS TRUE
|
||||||
|
)
|
||||||
|
|
||||||
|
set(SDL_TEST_LIBRARY OFF CACHE BOOL "" FORCE)
|
||||||
|
FetchContent_MakeAvailable(sdl3)
|
||||||
|
|
||||||
|
include(../cmake/GenerateCimguiBindings.cmake)
|
||||||
|
|
||||||
|
set(inclulist ${sdl3_SOURCE_DIR}/include)
|
||||||
|
GenerateCimguiBindings(cimgui_with_backend sdl3 sdlrenderer3 inclulist)
|
||||||
|
target_link_libraries(cimgui_with_backend PRIVATE SDL3::SDL3)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME}
|
||||||
|
main.c
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE SDL3::SDL3 cimgui_with_backend)
|
||||||
|
target_compile_definitions(
|
||||||
|
${PROJECT_NAME}
|
||||||
|
PRIVATE
|
||||||
|
CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1
|
||||||
|
CIMGUI_USE_SDL3=1
|
||||||
|
CIMGUI_USE_SDLRENDERER3=1
|
||||||
|
)
|
||||||
16
backend_test/example_sdl_renderer3/README.md
Normal file
16
backend_test/example_sdl_renderer3/README.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# SDLRenderer3
|
||||||
|
|
||||||
|
This example takes from `example_sdlgpu3`. We need to generate bindings for SDLRenderer3 backend because they are not native to `cimgui`. Then you can add the compiled library for linking in your application.
|
||||||
|
|
||||||
|
For the generation phase from cmake you need LuaJIT to be present.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
From the build directory of your choice:
|
||||||
|
|
||||||
|
`cmake path_to_example_sdlgpu3`
|
||||||
|
|
||||||
|
Then simply run:
|
||||||
|
|
||||||
|
`make`
|
||||||
|
|
||||||
158
backend_test/example_sdl_renderer3/main.c
Normal file
158
backend_test/example_sdl_renderer3/main.c
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
#include <assert.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
|
#include <cimgui.h>
|
||||||
|
#include <cimgui_impl.h>
|
||||||
|
|
||||||
|
#define igGetIO igGetIO_Nil
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
// Setup SDL library
|
||||||
|
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD)) {
|
||||||
|
fprintf(stderr, "Failed to init video! %s", SDL_GetError());
|
||||||
|
return 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Setup window and renderer
|
||||||
|
float main_scale = SDL_GetDisplayContentScale(SDL_GetPrimaryDisplay());
|
||||||
|
SDL_WindowFlags window_flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN | SDL_WINDOW_HIGH_PIXEL_DENSITY;
|
||||||
|
SDL_Window* window = NULL;
|
||||||
|
SDL_Renderer* renderer = NULL;
|
||||||
|
if (!SDL_CreateWindowAndRenderer("Dear ImGui SDL3 Renderer example", (int)(1280 * main_scale), (int)(720 * main_scale), window_flags, &window, &renderer))
|
||||||
|
{
|
||||||
|
printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
|
||||||
|
SDL_ShowWindow(window);
|
||||||
|
|
||||||
|
// Setup Dear ImGui context
|
||||||
|
igCreateContext(NULL);
|
||||||
|
ImGuiIO* io = igGetIO(); (void)io;
|
||||||
|
io->ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||||
|
io->ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
|
||||||
|
|
||||||
|
// Setup Dear ImGui style
|
||||||
|
igStyleColorsDark(NULL);
|
||||||
|
//igStyleColorsLight(NULL);
|
||||||
|
|
||||||
|
// Setup scaling
|
||||||
|
ImGuiStyle* style = igGetStyle();
|
||||||
|
ImGuiStyle_ScaleAllSizes(style, main_scale);
|
||||||
|
style->FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose)
|
||||||
|
io->ConfigDpiScaleFonts = true; // [Experimental] Automatically overwrite style.FontScaleDpi in Begin() when Monitor DPI changes. This will scale fonts but _NOT_ scale sizes/padding for now.
|
||||||
|
io->ConfigDpiScaleViewports = true; // [Experimental] Scale Dear ImGui and Platform Windows when Monitor DPI changes.
|
||||||
|
|
||||||
|
// Setup Platform/Renderer backends
|
||||||
|
ImGui_ImplSDL3_InitForSDLRenderer(window, renderer);
|
||||||
|
ImGui_ImplSDLRenderer3_Init(renderer);
|
||||||
|
|
||||||
|
// Our state
|
||||||
|
bool show_demo_window = true;
|
||||||
|
bool show_another_window = false;
|
||||||
|
ImVec4 clear_color;
|
||||||
|
clear_color.x = 0.45f;
|
||||||
|
clear_color.y = 0.55f;
|
||||||
|
clear_color.z = 0.60f;
|
||||||
|
clear_color.w = 1.00f;
|
||||||
|
|
||||||
|
// Main loop
|
||||||
|
bool done = false;
|
||||||
|
while (!done)
|
||||||
|
{
|
||||||
|
// Poll and handle events (inputs, window resize, etc.)
|
||||||
|
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
|
||||||
|
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
|
||||||
|
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
|
||||||
|
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
|
||||||
|
// [If using SDL_MAIN_USE_CALLBACKS: call ImGui_ImplSDL3_ProcessEvent() from your SDL_AppEvent() function]
|
||||||
|
SDL_Event event;
|
||||||
|
while (SDL_PollEvent(&event))
|
||||||
|
{
|
||||||
|
ImGui_ImplSDL3_ProcessEvent(&event);
|
||||||
|
if (event.type == SDL_EVENT_QUIT)
|
||||||
|
done = true;
|
||||||
|
if (event.type == SDL_EVENT_WINDOW_CLOSE_REQUESTED && event.window.windowID == SDL_GetWindowID(window))
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppIterate() function]
|
||||||
|
if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
|
||||||
|
{
|
||||||
|
SDL_Delay(10);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup Dear ImGui frame
|
||||||
|
SDL_SetRenderDrawColorFloat(renderer, clear_color.x, clear_color.y, clear_color.z, clear_color.w);
|
||||||
|
SDL_RenderClear(renderer);
|
||||||
|
ImGui_ImplSDLRenderer3_NewFrame();
|
||||||
|
ImGui_ImplSDL3_NewFrame();
|
||||||
|
igNewFrame();
|
||||||
|
|
||||||
|
// 1. Show the big demo window (Most of the sample code is in igShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
|
||||||
|
if (show_demo_window)
|
||||||
|
igShowDemoWindow(&show_demo_window);
|
||||||
|
|
||||||
|
// 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
|
||||||
|
{
|
||||||
|
static float f = 0.0f;
|
||||||
|
static int counter = 0;
|
||||||
|
|
||||||
|
igBegin("Hello, world!", NULL, 0); // Create a window called "Hello, world!" and append into it.
|
||||||
|
|
||||||
|
igText("This is some useful text."); // Display some text (you can use a format strings too)
|
||||||
|
igCheckbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
|
||||||
|
igCheckbox("Another Window", &show_another_window);
|
||||||
|
|
||||||
|
igSliderFloat("float", &f, 0.0f, 1.0f, "%.3f", 0); // Edit 1 float using a slider from 0.0f to 1.0f
|
||||||
|
igColorEdit4("clear color", (float*)&clear_color, 0); // Edit 3 floats representing a color
|
||||||
|
|
||||||
|
ImVec2 buttonSize;
|
||||||
|
buttonSize.x = 0;
|
||||||
|
buttonSize.y = 0;
|
||||||
|
if (igButton("Button", buttonSize)) // Buttons return true when clicked (most widgets return true when edited/activated)
|
||||||
|
counter++;
|
||||||
|
igSameLine(0.0f, -1.0f);
|
||||||
|
igText("counter = %d", counter);
|
||||||
|
|
||||||
|
igText("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io->Framerate, io->Framerate);
|
||||||
|
igEnd();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Show another simple window.
|
||||||
|
if (show_another_window)
|
||||||
|
{
|
||||||
|
igBegin("Another Window", &show_another_window, 0); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
|
||||||
|
igText("Hello from another window!");
|
||||||
|
ImVec2 buttonSize;
|
||||||
|
buttonSize.x = 0; buttonSize.y = 0;
|
||||||
|
if (igButton("Close Me", buttonSize))
|
||||||
|
show_another_window = false;
|
||||||
|
igEnd();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rendering
|
||||||
|
igRender();
|
||||||
|
ImDrawData* draw_data = igGetDrawData();
|
||||||
|
const bool is_minimized = (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f);
|
||||||
|
ImGui_ImplSDLRenderer3_RenderDrawData(draw_data, renderer);
|
||||||
|
SDL_RenderPresent(renderer);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cleanup
|
||||||
|
// [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppQuit() function]
|
||||||
|
ImGui_ImplSDL3_Shutdown();
|
||||||
|
ImGui_ImplSDLRenderer3_Shutdown();
|
||||||
|
igDestroyContext(NULL);
|
||||||
|
|
||||||
|
SDL_DestroyRenderer(renderer);
|
||||||
|
SDL_DestroyWindow(window);
|
||||||
|
SDL_Quit();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
1
cimgui.h
1
cimgui.h
@@ -1856,7 +1856,6 @@ typedef int ImGuiWindowBgClickFlags;
|
|||||||
typedef int ImGuiWindowRefreshFlags;
|
typedef int ImGuiWindowRefreshFlags;
|
||||||
typedef ImS16 ImGuiTableColumnIdx;
|
typedef ImS16 ImGuiTableColumnIdx;
|
||||||
typedef ImU16 ImGuiTableDrawChannelIdx;
|
typedef ImU16 ImGuiTableDrawChannelIdx;
|
||||||
extern ImGuiContext* GImGui;
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ImDrawTextFlags_None = 0,
|
ImDrawTextFlags_None = 0,
|
||||||
ImDrawTextFlags_CpuFineClip = 1 << 0,
|
ImDrawTextFlags_CpuFineClip = 1 << 0,
|
||||||
|
|||||||
@@ -1624,6 +1624,7 @@ function M.Parser()
|
|||||||
--try to guess a compiler error
|
--try to guess a compiler error
|
||||||
assert(not errstr:match" error")
|
assert(not errstr:match" error")
|
||||||
os.remove(errfile)
|
os.remove(errfile)
|
||||||
|
self.constants = defines
|
||||||
return defines
|
return defines
|
||||||
end
|
end
|
||||||
function par:do_parse()
|
function par:do_parse()
|
||||||
@@ -2072,6 +2073,10 @@ function M.Parser()
|
|||||||
print("--skip = vardef declaration:",it2)
|
print("--skip = vardef declaration:",it2)
|
||||||
it2 = ""
|
it2 = ""
|
||||||
end
|
end
|
||||||
|
if it2:match("%s*extern") then
|
||||||
|
print("--skip extern vardef declaration:",it2)
|
||||||
|
it2 = ""
|
||||||
|
end
|
||||||
end
|
end
|
||||||
--table.insert(outtabpre,it2)
|
--table.insert(outtabpre,it2)
|
||||||
--table.insert(outtab,it2)
|
--table.insert(outtab,it2)
|
||||||
@@ -2358,6 +2363,15 @@ function M.Parser()
|
|||||||
print(it.item)
|
print(it.item)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif it.re_name == "vardef_re" then
|
||||||
|
local it2 = it.item:gsub("constexpr","static const")
|
||||||
|
if it2:match"static const" then
|
||||||
|
local name, assig = it2:match("static const %s*.+%s+([%w_]+)%s*=%s*([^;]*);")
|
||||||
|
--print(it2,name,assig)
|
||||||
|
if name and assig then
|
||||||
|
self.constants[name] = assig
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
elseif it.re_name == "enum_re" then
|
elseif it.re_name == "enum_re" then
|
||||||
enums_for_table(it, outtab, enumsordered)
|
enums_for_table(it, outtab, enumsordered)
|
||||||
@@ -2913,7 +2927,8 @@ local function location(file,locpathT,defines,COMPILER,keepemptylines)
|
|||||||
if name and val then
|
if name and val then
|
||||||
--while defines[val] do val = defines[val] end
|
--while defines[val] do val = defines[val] end
|
||||||
--if val:match(number_re) or val:match(hex_re) then
|
--if val:match(number_re) or val:match(hex_re) then
|
||||||
table.insert(defines,{name , val})
|
--table.insert(defines,{name , val})
|
||||||
|
defines[name] = val
|
||||||
--end
|
--end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ if FREETYPE_GENERATION then
|
|||||||
end
|
end
|
||||||
|
|
||||||
if COMPILER == "gcc" or COMPILER == "clang" or COMPILER == "zig cc" then
|
if COMPILER == "gcc" or COMPILER == "clang" or COMPILER == "zig cc" then
|
||||||
CPRE = COMPILER..[[ -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]] .. CFLAGS
|
CPRE = COMPILER..[[ -E -dD -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]] .. CFLAGS
|
||||||
CTEST = COMPILER.." --version"
|
CTEST = COMPILER.." --version"
|
||||||
elseif COMPILER == "cl" then
|
elseif COMPILER == "cl" then
|
||||||
CPRE = COMPILER..[[ /E /DIMGUI_DISABLE_OBSOLETE_FUNCTIONS /DIMGUI_DEBUG_PARANOID /DIMGUI_API="" /DIMGUI_IMPL_API="" ]] .. CFLAGS
|
CPRE = COMPILER..[[ /E /d1PP /DIMGUI_DISABLE_OBSOLETE_FUNCTIONS /DIMGUI_DEBUG_PARANOID /DIMGUI_API="" /DIMGUI_IMPL_API="" ]] .. CFLAGS
|
||||||
CTEST = COMPILER
|
CTEST = COMPILER
|
||||||
else
|
else
|
||||||
print("Working without compiler ")
|
print("Working without compiler ")
|
||||||
@@ -398,7 +398,7 @@ local function parseImGuiHeader(header,names)
|
|||||||
parser.custom_function_post = custom_function_post
|
parser.custom_function_post = custom_function_post
|
||||||
parser.header_text_insert = header_text_insert
|
parser.header_text_insert = header_text_insert
|
||||||
local defines = parser:take_lines(CPRE..header,names,COMPILER)
|
local defines = parser:take_lines(CPRE..header,names,COMPILER)
|
||||||
|
--cpp2ffi.prtable("defines",defines)
|
||||||
return parser
|
return parser
|
||||||
end
|
end
|
||||||
--generation
|
--generation
|
||||||
@@ -441,7 +441,7 @@ structs_and_enums_table.templates_done = parser1.templates_done
|
|||||||
|
|
||||||
save_data("./output/structs_and_enums.lua",serializeTableF(structs_and_enums_table))
|
save_data("./output/structs_and_enums.lua",serializeTableF(structs_and_enums_table))
|
||||||
save_data("./output/typedefs_dict.lua",serializeTableF(parser1.typedefs_dict))
|
save_data("./output/typedefs_dict.lua",serializeTableF(parser1.typedefs_dict))
|
||||||
|
save_data("./output/constants.lua",serializeTableF(parser1.constants))
|
||||||
----------save fundefs in definitions.lua for using in bindings
|
----------save fundefs in definitions.lua for using in bindings
|
||||||
--DefsByStruct(pFP)
|
--DefsByStruct(pFP)
|
||||||
set_defines(parser1.defsT)
|
set_defines(parser1.defsT)
|
||||||
@@ -556,6 +556,7 @@ save_data("./output/definitions.json",json.encode(json_prepare(parser1.defsT),{d
|
|||||||
--structs_and_enums_table.templates_done = nil
|
--structs_and_enums_table.templates_done = nil
|
||||||
save_data("./output/structs_and_enums.json",json.encode(structs_and_enums_table))
|
save_data("./output/structs_and_enums.json",json.encode(structs_and_enums_table))
|
||||||
save_data("./output/typedefs_dict.json",json.encode(parser1.typedefs_dict))
|
save_data("./output/typedefs_dict.json",json.encode(parser1.typedefs_dict))
|
||||||
|
save_data("./output/constants.json",json.encode(parser1.constants))
|
||||||
if parser2 then
|
if parser2 then
|
||||||
save_data("./output/impl_definitions.json",json.encode(json_prepare(parser2.defsT),{dict_on_empty={defaults=true}}))
|
save_data("./output/impl_definitions.json",json.encode(json_prepare(parser2.defsT),{dict_on_empty={defaults=true}}))
|
||||||
end
|
end
|
||||||
|
|||||||
124
generator/output/constants.json
Normal file
124
generator/output/constants.json
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
{
|
||||||
|
"DOCKING_HOST_DRAW_CHANNEL_BG": "0",
|
||||||
|
"DOCKING_HOST_DRAW_CHANNEL_FG": "1",
|
||||||
|
"IMGUI_CHECKVERSION()": "ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))",
|
||||||
|
"IMGUI_DEBUG_LOG(...)": "ImGui::DebugLog(__VA_ARGS__)",
|
||||||
|
"IMGUI_DEBUG_LOG_ACTIVEID(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventActiveId) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_CLIPPER(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventClipper) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_DOCKING(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventDocking) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_ERROR(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventError) IMGUI_DEBUG_LOG(__VA_ARGS__); else g.DebugLogSkippedErrors++; } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_FOCUS(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventFocus) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_FONT(...)": "do { ImGuiContext* g2 = GImGui; if (g2 && g2->DebugLogFlags & ImGuiDebugLogFlags_EventFont) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_INPUTROUTING(...)": "do{if (g.DebugLogFlags & ImGuiDebugLogFlags_EventInputRouting)IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_IO(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventIO) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_NAV(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventNav) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_POPUP(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventPopup) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_SELECTION(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventSelection) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_LOG_VIEWPORT(...)": "do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventViewport) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
"IMGUI_DEBUG_PRINTF(_FMT,...)": "printf(_FMT, __VA_ARGS__)",
|
||||||
|
"IMGUI_FONT_SIZE_MAX": "(512.0f)",
|
||||||
|
"IMGUI_FONT_SIZE_THRESHOLD_FOR_LOADADVANCEXONLYMODE": "(128.0f)",
|
||||||
|
"IMGUI_PAYLOAD_TYPE_COLOR_3F": "\"_COL3F\"",
|
||||||
|
"IMGUI_PAYLOAD_TYPE_COLOR_4F": "\"_COL4F\"",
|
||||||
|
"IMGUI_PAYLOAD_TYPE_WINDOW": "\"_IMWINDOW\"",
|
||||||
|
"IMGUI_TABLE_MAX_COLUMNS": "512",
|
||||||
|
"IMGUI_TEST_ENGINE_ITEM_ADD(_ID,_BB,_ITEM_DATA)": "((void)0)",
|
||||||
|
"IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS)": "((void)g)",
|
||||||
|
"IMGUI_VERSION": "\"1.92.6\"",
|
||||||
|
"IMGUI_VERSION_NUM": "19261",
|
||||||
|
"IMGUI_WINDOW_HARD_MIN_SIZE": "4.0f",
|
||||||
|
"IMSTB_TEXTEDIT_CHARTYPE": "char",
|
||||||
|
"IMSTB_TEXTEDIT_GETWIDTH_NEWLINE": "(-1.0f)",
|
||||||
|
"IMSTB_TEXTEDIT_STRING": "ImGuiInputTextState",
|
||||||
|
"IMSTB_TEXTEDIT_UNDOCHARCOUNT": "999",
|
||||||
|
"IMSTB_TEXTEDIT_UNDOSTATECOUNT": "99",
|
||||||
|
"IM_ALLOC(_SIZE)": "ImGui::MemAlloc(_SIZE)",
|
||||||
|
"IM_ARRAYSIZE": "IM_COUNTOF",
|
||||||
|
"IM_ASSERT(_EXPR)": "assert(_EXPR)",
|
||||||
|
"IM_ASSERT_USER_ERROR(_EXPR,_MSG)": "do { if (!(_EXPR)) { if (ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } } } while (0)",
|
||||||
|
"IM_ASSERT_USER_ERROR_RET(_EXPR,_MSG)": "do { if (!(_EXPR)) { if (ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } return; } } while (0)",
|
||||||
|
"IM_ASSERT_USER_ERROR_RETV(_EXPR,_RETV,_MSG)": "do { if (!(_EXPR)) { if (ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } return _RETV; } } while (0)",
|
||||||
|
"IM_BITARRAY_CLEARBIT(_ARRAY,_N)": "((_ARRAY[(_N) >> 5] &= ~((ImU32)1 << ((_N) & 31))))",
|
||||||
|
"IM_BITARRAY_TESTBIT(_ARRAY,_N)": "((_ARRAY[(_N) >> 5] & ((ImU32)1 << ((_N) & 31))) != 0)",
|
||||||
|
"IM_COL32(R,G,B,A)": "(((ImU32)(A)<<IM_COL32_A_SHIFT) | ((ImU32)(B)<<IM_COL32_B_SHIFT) | ((ImU32)(G)<<IM_COL32_G_SHIFT) | ((ImU32)(R)<<IM_COL32_R_SHIFT))",
|
||||||
|
"IM_COL32_A_MASK": "0xFF000000",
|
||||||
|
"IM_COL32_A_SHIFT": "24",
|
||||||
|
"IM_COL32_BLACK": "IM_COL32(0,0,0,255)",
|
||||||
|
"IM_COL32_BLACK_TRANS": "IM_COL32(0,0,0,0)",
|
||||||
|
"IM_COL32_B_SHIFT": "16",
|
||||||
|
"IM_COL32_DISABLE": "IM_COL32(0,0,0,1)",
|
||||||
|
"IM_COL32_G_SHIFT": "8",
|
||||||
|
"IM_COL32_R_SHIFT": "0",
|
||||||
|
"IM_COL32_WHITE": "IM_COL32(255,255,255,255)",
|
||||||
|
"IM_COUNTOF(_ARR)": "((int)(sizeof(_ARR) / sizeof(*(_ARR))))",
|
||||||
|
"IM_DEBUG_BREAK()": "__asm__ volatile(\"int3;nop\")",
|
||||||
|
"IM_DRAWLIST_ARCFAST_SAMPLE_MAX": "IM_DRAWLIST_ARCFAST_TABLE_SIZE",
|
||||||
|
"IM_DRAWLIST_ARCFAST_TABLE_SIZE": "48",
|
||||||
|
"IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(_RAD,_MAXERROR)": "ImClamp(IM_ROUNDUP_TO_EVEN((int)ImCeil(IM_PI / ImAcos(1 - ImMin((_MAXERROR), (_RAD)) / (_RAD)))), IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MIN, IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MAX)",
|
||||||
|
"IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC_ERROR(_N,_RAD)": "((1 - ImCos(IM_PI / ImMax((float)(_N), IM_PI))) / (_RAD))",
|
||||||
|
"IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC_R(_N,_MAXERROR)": "((_MAXERROR) / (1 - ImCos(IM_PI / ImMax((float)(_N), IM_PI))))",
|
||||||
|
"IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MAX": "512",
|
||||||
|
"IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MIN": "4",
|
||||||
|
"IM_DRAWLIST_TEX_LINES_WIDTH_MAX": "(32)",
|
||||||
|
"IM_F32_TO_INT8_SAT(_VAL)": "((int)(ImSaturate(_VAL) * 255.0f + 0.5f))",
|
||||||
|
"IM_F32_TO_INT8_UNBOUND(_VAL)": "((int)((_VAL) * 255.0f + ((_VAL)>=0 ? 0.5f : -0.5f)))",
|
||||||
|
"IM_FMTARGS(FMT)": "__attribute__((format(gnu_printf, FMT, FMT+1)))",
|
||||||
|
"IM_FMTLIST(FMT)": "__attribute__((format(gnu_printf, FMT, 0)))",
|
||||||
|
"IM_FREE(_PTR)": "ImGui::MemFree(_PTR)",
|
||||||
|
"IM_MEMALIGN(_OFF,_ALIGN)": "(((_OFF) + ((_ALIGN) - 1)) & ~((_ALIGN) - 1))",
|
||||||
|
"IM_NEW(_TYPE)": "new(ImNewWrapper(), ImGui::MemAlloc(sizeof(_TYPE))) _TYPE",
|
||||||
|
"IM_NEWLINE": "\"\\r\\n\"",
|
||||||
|
"IM_PI": "3.14159265358979323846f",
|
||||||
|
"IM_PLACEMENT_NEW(_PTR)": "new(ImNewWrapper(), _PTR)",
|
||||||
|
"IM_PRIX64": "\"llX\"",
|
||||||
|
"IM_PRId64": "\"lld\"",
|
||||||
|
"IM_PRIu64": "\"llu\"",
|
||||||
|
"IM_ROUND(_VAL)": "((float)(int)((_VAL) + 0.5f))",
|
||||||
|
"IM_ROUNDUP_TO_EVEN(_V)": "((((_V) + 1) / 2) * 2)",
|
||||||
|
"IM_STATIC_ASSERT(_COND)": "static_assert(_COND, \"\")",
|
||||||
|
"IM_STRINGIFY(_EXPR)": "IM_STRINGIFY_HELPER(_EXPR)",
|
||||||
|
"IM_STRINGIFY_HELPER(_EXPR)": "#_EXPR",
|
||||||
|
"IM_TABSIZE": "(4)",
|
||||||
|
"IM_TRUNC(_VAL)": "((float)(int)(_VAL))",
|
||||||
|
"IM_UNICODE_CODEPOINT_INVALID": "0xFFFD",
|
||||||
|
"IM_UNICODE_CODEPOINT_MAX": "0xFFFF",
|
||||||
|
"IM_UNUSED(_VAR)": "((void)(_VAR))",
|
||||||
|
"ImAcos(X)": "acosf(X)",
|
||||||
|
"ImAtan2(Y,X)": "atan2f((Y), (X))",
|
||||||
|
"ImAtof(STR)": "atof(STR)",
|
||||||
|
"ImCeil(X)": "ceilf(X)",
|
||||||
|
"ImCos(X)": "cosf(X)",
|
||||||
|
"ImDrawCallback_ResetRenderState": "(ImDrawCallback)(-8)",
|
||||||
|
"ImFabs(X)": "fabsf(X)",
|
||||||
|
"ImFmod(X,Y)": "fmodf((X), (Y))",
|
||||||
|
"ImFontAtlasRectId_GenerationMask_": "(0x3FF00000)",
|
||||||
|
"ImFontAtlasRectId_GenerationShift_": "(20)",
|
||||||
|
"ImFontAtlasRectId_IndexMask_": "(0x0007FFFF)",
|
||||||
|
"ImFontAtlasRectId_Invalid": "-1",
|
||||||
|
"ImGuiKeyOwner_Any": "((ImGuiID)0)",
|
||||||
|
"ImGuiKeyOwner_NoOwner": "((ImGuiID)-1)",
|
||||||
|
"ImGuiKey_Aliases_BEGIN": "(ImGuiKey_Mouse_BEGIN)",
|
||||||
|
"ImGuiKey_Aliases_END": "(ImGuiKey_Mouse_END)",
|
||||||
|
"ImGuiKey_Gamepad_BEGIN": "(ImGuiKey_GamepadStart)",
|
||||||
|
"ImGuiKey_Gamepad_END": "(ImGuiKey_GamepadRStickDown + 1)",
|
||||||
|
"ImGuiKey_Keyboard_BEGIN": "(ImGuiKey_NamedKey_BEGIN)",
|
||||||
|
"ImGuiKey_Keyboard_END": "(ImGuiKey_GamepadStart)",
|
||||||
|
"ImGuiKey_LegacyNativeKey_BEGIN": "0",
|
||||||
|
"ImGuiKey_LegacyNativeKey_END": "512",
|
||||||
|
"ImGuiKey_Mouse_BEGIN": "(ImGuiKey_MouseLeft)",
|
||||||
|
"ImGuiKey_Mouse_END": "(ImGuiKey_MouseWheelY + 1)",
|
||||||
|
"ImGuiKey_NavGamepadActivate": "(g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceRight : ImGuiKey_GamepadFaceDown)",
|
||||||
|
"ImGuiKey_NavGamepadCancel": "(g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceDown : ImGuiKey_GamepadFaceRight)",
|
||||||
|
"ImGuiKey_NavGamepadInput": "ImGuiKey_GamepadFaceUp",
|
||||||
|
"ImGuiKey_NavGamepadMenu": "ImGuiKey_GamepadFaceLeft",
|
||||||
|
"ImGuiKey_NavGamepadTweakFast": "ImGuiKey_GamepadR1",
|
||||||
|
"ImGuiKey_NavGamepadTweakSlow": "ImGuiKey_GamepadL1",
|
||||||
|
"ImGuiKey_NavKeyboardTweakFast": "ImGuiMod_Shift",
|
||||||
|
"ImGuiKey_NavKeyboardTweakSlow": "ImGuiMod_Ctrl",
|
||||||
|
"ImGuiSelectionUserData_Invalid": "((ImGuiSelectionUserData)-1)",
|
||||||
|
"ImMemchr": "memchr",
|
||||||
|
"ImSin(X)": "sinf(X)",
|
||||||
|
"ImSqrt(X)": "sqrtf(X)",
|
||||||
|
"ImStrlen": "strlen",
|
||||||
|
"ImTextureID_Invalid": "((ImTextureID)0)"
|
||||||
|
}
|
||||||
124
generator/output/constants.lua
Normal file
124
generator/output/constants.lua
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
local t={
|
||||||
|
DOCKING_HOST_DRAW_CHANNEL_BG="0",
|
||||||
|
DOCKING_HOST_DRAW_CHANNEL_FG="1",
|
||||||
|
["IMGUI_CHECKVERSION()"]="ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))",
|
||||||
|
["IMGUI_DEBUG_LOG(...)"]="ImGui::DebugLog(__VA_ARGS__)",
|
||||||
|
["IMGUI_DEBUG_LOG_ACTIVEID(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventActiveId) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_CLIPPER(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventClipper) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_DOCKING(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventDocking) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_ERROR(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventError) IMGUI_DEBUG_LOG(__VA_ARGS__); else g.DebugLogSkippedErrors++; } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_FOCUS(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventFocus) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_FONT(...)"]="do { ImGuiContext* g2 = GImGui; if (g2 && g2->DebugLogFlags & ImGuiDebugLogFlags_EventFont) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_INPUTROUTING(...)"]="do{if (g.DebugLogFlags & ImGuiDebugLogFlags_EventInputRouting)IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_IO(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventIO) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_NAV(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventNav) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_POPUP(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventPopup) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_SELECTION(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventSelection) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_LOG_VIEWPORT(...)"]="do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventViewport) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)",
|
||||||
|
["IMGUI_DEBUG_PRINTF(_FMT,...)"]="printf(_FMT, __VA_ARGS__)",
|
||||||
|
IMGUI_FONT_SIZE_MAX="(512.0f)",
|
||||||
|
IMGUI_FONT_SIZE_THRESHOLD_FOR_LOADADVANCEXONLYMODE="(128.0f)",
|
||||||
|
IMGUI_PAYLOAD_TYPE_COLOR_3F="\"_COL3F\"",
|
||||||
|
IMGUI_PAYLOAD_TYPE_COLOR_4F="\"_COL4F\"",
|
||||||
|
IMGUI_PAYLOAD_TYPE_WINDOW="\"_IMWINDOW\"",
|
||||||
|
IMGUI_TABLE_MAX_COLUMNS="512",
|
||||||
|
["IMGUI_TEST_ENGINE_ITEM_ADD(_ID,_BB,_ITEM_DATA)"]="((void)0)",
|
||||||
|
["IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS)"]="((void)g)",
|
||||||
|
IMGUI_VERSION="\"1.92.6\"",
|
||||||
|
IMGUI_VERSION_NUM="19261",
|
||||||
|
IMGUI_WINDOW_HARD_MIN_SIZE="4.0f",
|
||||||
|
IMSTB_TEXTEDIT_CHARTYPE="char",
|
||||||
|
IMSTB_TEXTEDIT_GETWIDTH_NEWLINE="(-1.0f)",
|
||||||
|
IMSTB_TEXTEDIT_STRING="ImGuiInputTextState",
|
||||||
|
IMSTB_TEXTEDIT_UNDOCHARCOUNT="999",
|
||||||
|
IMSTB_TEXTEDIT_UNDOSTATECOUNT="99",
|
||||||
|
["IM_ALLOC(_SIZE)"]="ImGui::MemAlloc(_SIZE)",
|
||||||
|
IM_ARRAYSIZE="IM_COUNTOF",
|
||||||
|
["IM_ASSERT(_EXPR)"]="assert(_EXPR)",
|
||||||
|
["IM_ASSERT_USER_ERROR(_EXPR,_MSG)"]="do { if (!(_EXPR)) { if (ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } } } while (0)",
|
||||||
|
["IM_ASSERT_USER_ERROR_RET(_EXPR,_MSG)"]="do { if (!(_EXPR)) { if (ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } return; } } while (0)",
|
||||||
|
["IM_ASSERT_USER_ERROR_RETV(_EXPR,_RETV,_MSG)"]="do { if (!(_EXPR)) { if (ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } return _RETV; } } while (0)",
|
||||||
|
["IM_BITARRAY_CLEARBIT(_ARRAY,_N)"]="((_ARRAY[(_N) >> 5] &= ~((ImU32)1 << ((_N) & 31))))",
|
||||||
|
["IM_BITARRAY_TESTBIT(_ARRAY,_N)"]="((_ARRAY[(_N) >> 5] & ((ImU32)1 << ((_N) & 31))) != 0)",
|
||||||
|
["IM_COL32(R,G,B,A)"]="(((ImU32)(A)<<IM_COL32_A_SHIFT) | ((ImU32)(B)<<IM_COL32_B_SHIFT) | ((ImU32)(G)<<IM_COL32_G_SHIFT) | ((ImU32)(R)<<IM_COL32_R_SHIFT))",
|
||||||
|
IM_COL32_A_MASK="0xFF000000",
|
||||||
|
IM_COL32_A_SHIFT="24",
|
||||||
|
IM_COL32_BLACK="IM_COL32(0,0,0,255)",
|
||||||
|
IM_COL32_BLACK_TRANS="IM_COL32(0,0,0,0)",
|
||||||
|
IM_COL32_B_SHIFT="16",
|
||||||
|
IM_COL32_DISABLE="IM_COL32(0,0,0,1)",
|
||||||
|
IM_COL32_G_SHIFT="8",
|
||||||
|
IM_COL32_R_SHIFT="0",
|
||||||
|
IM_COL32_WHITE="IM_COL32(255,255,255,255)",
|
||||||
|
["IM_COUNTOF(_ARR)"]="((int)(sizeof(_ARR) / sizeof(*(_ARR))))",
|
||||||
|
["IM_DEBUG_BREAK()"]="__asm__ volatile(\"int3;nop\")",
|
||||||
|
IM_DRAWLIST_ARCFAST_SAMPLE_MAX="IM_DRAWLIST_ARCFAST_TABLE_SIZE",
|
||||||
|
IM_DRAWLIST_ARCFAST_TABLE_SIZE="48",
|
||||||
|
["IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(_RAD,_MAXERROR)"]="ImClamp(IM_ROUNDUP_TO_EVEN((int)ImCeil(IM_PI / ImAcos(1 - ImMin((_MAXERROR), (_RAD)) / (_RAD)))), IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MIN, IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MAX)",
|
||||||
|
["IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC_ERROR(_N,_RAD)"]="((1 - ImCos(IM_PI / ImMax((float)(_N), IM_PI))) / (_RAD))",
|
||||||
|
["IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC_R(_N,_MAXERROR)"]="((_MAXERROR) / (1 - ImCos(IM_PI / ImMax((float)(_N), IM_PI))))",
|
||||||
|
IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MAX="512",
|
||||||
|
IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_MIN="4",
|
||||||
|
IM_DRAWLIST_TEX_LINES_WIDTH_MAX="(32)",
|
||||||
|
["IM_F32_TO_INT8_SAT(_VAL)"]="((int)(ImSaturate(_VAL) * 255.0f + 0.5f))",
|
||||||
|
["IM_F32_TO_INT8_UNBOUND(_VAL)"]="((int)((_VAL) * 255.0f + ((_VAL)>=0 ? 0.5f : -0.5f)))",
|
||||||
|
["IM_FMTARGS(FMT)"]="__attribute__((format(gnu_printf, FMT, FMT+1)))",
|
||||||
|
["IM_FMTLIST(FMT)"]="__attribute__((format(gnu_printf, FMT, 0)))",
|
||||||
|
["IM_FREE(_PTR)"]="ImGui::MemFree(_PTR)",
|
||||||
|
["IM_MEMALIGN(_OFF,_ALIGN)"]="(((_OFF) + ((_ALIGN) - 1)) & ~((_ALIGN) - 1))",
|
||||||
|
["IM_NEW(_TYPE)"]="new(ImNewWrapper(), ImGui::MemAlloc(sizeof(_TYPE))) _TYPE",
|
||||||
|
IM_NEWLINE="\"\\r\\n\"",
|
||||||
|
IM_PI="3.14159265358979323846f",
|
||||||
|
["IM_PLACEMENT_NEW(_PTR)"]="new(ImNewWrapper(), _PTR)",
|
||||||
|
IM_PRIX64="\"llX\"",
|
||||||
|
IM_PRId64="\"lld\"",
|
||||||
|
IM_PRIu64="\"llu\"",
|
||||||
|
["IM_ROUND(_VAL)"]="((float)(int)((_VAL) + 0.5f))",
|
||||||
|
["IM_ROUNDUP_TO_EVEN(_V)"]="((((_V) + 1) / 2) * 2)",
|
||||||
|
["IM_STATIC_ASSERT(_COND)"]="static_assert(_COND, \"\")",
|
||||||
|
["IM_STRINGIFY(_EXPR)"]="IM_STRINGIFY_HELPER(_EXPR)",
|
||||||
|
["IM_STRINGIFY_HELPER(_EXPR)"]="#_EXPR",
|
||||||
|
IM_TABSIZE="(4)",
|
||||||
|
["IM_TRUNC(_VAL)"]="((float)(int)(_VAL))",
|
||||||
|
IM_UNICODE_CODEPOINT_INVALID="0xFFFD",
|
||||||
|
IM_UNICODE_CODEPOINT_MAX="0xFFFF",
|
||||||
|
["IM_UNUSED(_VAR)"]="((void)(_VAR))",
|
||||||
|
["ImAcos(X)"]="acosf(X)",
|
||||||
|
["ImAtan2(Y,X)"]="atan2f((Y), (X))",
|
||||||
|
["ImAtof(STR)"]="atof(STR)",
|
||||||
|
["ImCeil(X)"]="ceilf(X)",
|
||||||
|
["ImCos(X)"]="cosf(X)",
|
||||||
|
ImDrawCallback_ResetRenderState="(ImDrawCallback)(-8)",
|
||||||
|
["ImFabs(X)"]="fabsf(X)",
|
||||||
|
["ImFmod(X,Y)"]="fmodf((X), (Y))",
|
||||||
|
ImFontAtlasRectId_GenerationMask_="(0x3FF00000)",
|
||||||
|
ImFontAtlasRectId_GenerationShift_="(20)",
|
||||||
|
ImFontAtlasRectId_IndexMask_="(0x0007FFFF)",
|
||||||
|
ImFontAtlasRectId_Invalid="-1",
|
||||||
|
ImGuiKeyOwner_Any="((ImGuiID)0)",
|
||||||
|
ImGuiKeyOwner_NoOwner="((ImGuiID)-1)",
|
||||||
|
ImGuiKey_Aliases_BEGIN="(ImGuiKey_Mouse_BEGIN)",
|
||||||
|
ImGuiKey_Aliases_END="(ImGuiKey_Mouse_END)",
|
||||||
|
ImGuiKey_Gamepad_BEGIN="(ImGuiKey_GamepadStart)",
|
||||||
|
ImGuiKey_Gamepad_END="(ImGuiKey_GamepadRStickDown + 1)",
|
||||||
|
ImGuiKey_Keyboard_BEGIN="(ImGuiKey_NamedKey_BEGIN)",
|
||||||
|
ImGuiKey_Keyboard_END="(ImGuiKey_GamepadStart)",
|
||||||
|
ImGuiKey_LegacyNativeKey_BEGIN="0",
|
||||||
|
ImGuiKey_LegacyNativeKey_END="512",
|
||||||
|
ImGuiKey_Mouse_BEGIN="(ImGuiKey_MouseLeft)",
|
||||||
|
ImGuiKey_Mouse_END="(ImGuiKey_MouseWheelY + 1)",
|
||||||
|
ImGuiKey_NavGamepadActivate="(g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceRight : ImGuiKey_GamepadFaceDown)",
|
||||||
|
ImGuiKey_NavGamepadCancel="(g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceDown : ImGuiKey_GamepadFaceRight)",
|
||||||
|
ImGuiKey_NavGamepadInput="ImGuiKey_GamepadFaceUp",
|
||||||
|
ImGuiKey_NavGamepadMenu="ImGuiKey_GamepadFaceLeft",
|
||||||
|
ImGuiKey_NavGamepadTweakFast="ImGuiKey_GamepadR1",
|
||||||
|
ImGuiKey_NavGamepadTweakSlow="ImGuiKey_GamepadL1",
|
||||||
|
ImGuiKey_NavKeyboardTweakFast="ImGuiMod_Shift",
|
||||||
|
ImGuiKey_NavKeyboardTweakSlow="ImGuiMod_Ctrl",
|
||||||
|
ImGuiSelectionUserData_Invalid="((ImGuiSelectionUserData)-1)",
|
||||||
|
ImMemchr="memchr",
|
||||||
|
["ImSin(X)"]="sinf(X)",
|
||||||
|
["ImSqrt(X)"]="sqrtf(X)",
|
||||||
|
ImStrlen="strlen",
|
||||||
|
ImTextureID_Invalid="((ImTextureID)0)"}
|
||||||
|
return t
|
||||||
Reference in New Issue
Block a user