diff --git a/CMakeLists.txt b/CMakeLists.txt index 09cb2aa..26c5ca8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,10 @@ if(IMGUI_WCHAR32) target_compile_definitions(cimgui PUBLIC IMGUI_USE_WCHAR32) endif(IMGUI_WCHAR32) +if(CIMGUI_VARGS0) + target_compile_definitions(cimgui PUBLIC CIMGUI_VARGS0) +endif(CIMGUI_VARGS0) + add_definitions("-DIMGUI_USER_CONFIG=\"../cimconfig.h\"") target_compile_definitions(cimgui PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS=1) if (WIN32) diff --git a/README.md b/README.md index 4e3577d..d652a53 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ History: Initially cimgui was developed by Stephan Dilly as hand-written code but lately turned into an auto-generated version by sonoro1234 in order to keep up with imgui more easily (letting the user select the desired branch and commit) Notes: -* currently this wrapper is based on version [1.91.9 of Dear ImGui with internal api] +* currently this wrapper is based on version [1.92.0 of Dear ImGui with internal api] * only functions, structs and enums from imgui.h (an optionally imgui_internal.h) are wrapped. * if you are interested in imgui backends you should look [LuaJIT-ImGui](https://github.com/sonoro1234/LuaJIT-ImGui) project. * All naming is algorithmic except for those names that were coded in cimgui_overloads table (https://github.com/cimgui/cimgui/blob/master/generator/generator.lua#L60). In the official version this table is empty. @@ -24,7 +24,7 @@ Notes: * `git submodule update --init --recursive` (If already cloned) * compile * using makefile on linux/macOS/mingw (Or use CMake to generate project) - * cmake options are IMGUI_STATIC (compiling as static library), IMGUI_FREETYPE (for using Freetype2) and FREETYPE_PATH (Freetype2 cmake install location) and IMGUI_WCHAR32 + * cmake options are IMGUI_STATIC (compiling as static library), IMGUI_FREETYPE (for using Freetype2) and FREETYPE_PATH (Freetype2 cmake install location), IMGUI_WCHAR32 and CIMGUI_VARGS0 for compiling a function version without varargs for vararg functions (function name with 0 sufix) * or as in https://github.com/sonoro1234/LuaJIT-ImGui/tree/master/build For compiling with backends there are now examples with SDL2 and opengl3/vulkan in folder backend_test. diff --git a/backend_test/cmake/GenerateCimguiBindings.cmake b/backend_test/cmake/GenerateCimguiBindings.cmake new file mode 100644 index 0000000..f2eabda --- /dev/null +++ b/backend_test/cmake/GenerateCimguiBindings.cmake @@ -0,0 +1,94 @@ +# This downloads cimgui, configures it to generate the SDL3 and SDLGPU3 bindings, +# and adds it as a cmake target for you to link to. Feel free to copy this file +# into your project, or refit it to your needs. + +#include(CMakePrintHelpers) + +function(IncludesStr comp includes) + #cmake_print_variables(includes) + if("${comp}" STREQUAL "cl") + set(Ist "/I") + else() + set(Ist "-I") + endif() + set(incstr "") + foreach(inc ${${includes}}) + set(incstr ${incstr} ${Ist}${inc}) + endforeach() + set(incstr ${incstr} PARENT_SCOPE) +endfunction() + + + +function(GenerateCimguiBindings target platbk rendbk _inclist) + include(FetchContent) + set(FETCHCONTENT_QUIET OFF) + #cmake_print_variables(_inclist) + set(__inclist ${${_inclist}}) + #cmake_print_variables(__inclist) + # NOTE: In your own project, you may want to pin this project to a particular commit + FetchContent_Declare( + cimgui + EXCLUDE_FROM_ALL + GIT_REPOSITORY https://github.com/cimgui/cimgui.git + GIT_TAG docking_inter + GIT_SUBMODULES_RECURSE true + GIT_PROGRESS true + GIT_SHALLOW true + ) + + FetchContent_MakeAvailable(cimgui) + + file(READ ${cimgui_SOURCE_DIR}/cimgui_impl.h cimgui_impl) + + # We're checking to see if the cimgui_impl.h file already has required bindings, + # since this will be executed on each "configure" (whenever you run cmake) + string(TOUPPER ${platbk} PLATBK) + string(TOUPPER ${rendbk} RENDBK) + string(FIND "${cimgui_impl}" CIMGUI_USE_${RENDBK} rendbk_position) + string(FIND "${cimgui_impl}" CIMGUI_USE_${PLATBK} platbk_position) + # If we don't find it, rendbk_position will be -1 + if(rendbk_position EQUAL -1 OR platbk_position EQUAL -1) + #get compiler name + cmake_path(GET CMAKE_C_COMPILER FILENAME C_COMP) + cmake_path(REMOVE_EXTENSION C_COMP) + #get includes string + IncludesStr(${C_COMP} __inclist) + message(STATUS "incstr is ${incstr}") + execute_process( + COMMAND luajit generator.lua ${C_COMP} "internal noimstrv" ${platbk} ${rendbk} ${incstr} + WORKING_DIRECTORY ${cimgui_SOURCE_DIR}/generator + ERROR_VARIABLE error_command + RESULT_VARIABLE build_command_result + ) + if(NOT ${build_command_result} EQUAL 0) + message(STATUS "cimgui generation failed: Do you have LuaJIT?") + message(STATUS "cimgui generation failed: ${build_command_result}") + message(FATAL_ERROR "error_command: ${error_command}") + endif() + endif() + + add_library(${target} SHARED + ${cimgui_SOURCE_DIR}/cimgui.cpp + ${cimgui_SOURCE_DIR}/cimgui_impl.cpp + ${cimgui_SOURCE_DIR}/imgui/imgui.cpp + ${cimgui_SOURCE_DIR}/imgui/imgui_draw.cpp + ${cimgui_SOURCE_DIR}/imgui/imgui_demo.cpp + ${cimgui_SOURCE_DIR}/imgui/imgui_widgets.cpp + ${cimgui_SOURCE_DIR}/imgui/imgui_tables.cpp + ${cimgui_SOURCE_DIR}/imgui/backends/imgui_impl_${platbk}.cpp + ${cimgui_SOURCE_DIR}/imgui/backends/imgui_impl_${rendbk}.cpp + ) + + target_include_directories(${target} PUBLIC ${cimgui_SOURCE_DIR} ${cimgui_SOURCE_DIR}/generator/output) + target_include_directories(${target} PRIVATE ${cimgui_SOURCE_DIR}/imgui ${cimgui_SOURCE_DIR}/imgui/backends) + #for ASSERT working on Release mode + target_compile_definitions(${target} PUBLIC "-DIMGUI_USER_CONFIG=\"../cimconfig.h\"") + target_compile_definitions(${target} PUBLIC "-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1") + if (WIN32) + target_compile_definitions(${target} PUBLIC "-DIMGUI_IMPL_API=extern \"C\" __declspec\(dllexport\)") + else(WIN32) + target_compile_definitions(${target} PUBLIC "-DIMGUI_IMPL_API=extern \"C\" ") + endif(WIN32) + target_compile_features(${target} PRIVATE cxx_std_11) +endfunction() diff --git a/backend_test/example_glfw_dx11/CMakeLists.txt b/backend_test/example_glfw_dx11/CMakeLists.txt index b9f2ba3..f638a34 100644 --- a/backend_test/example_glfw_dx11/CMakeLists.txt +++ b/backend_test/example_glfw_dx11/CMakeLists.txt @@ -1,109 +1,45 @@ -Project(cimgui_glfwdx11) cmake_minimum_required(VERSION 3.11) -if(WIN32) # to mingw work as all the others - set(CMAKE_SHARED_LIBRARY_PREFIX "") -endif(WIN32) +project(cimgui_glfwdx11 LANGUAGES C CXX) -#run in build dir -set (CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}) +set(CMAKE_C_STANDARD 11) -set (CMAKE_CXX_STANDARD 11) - -# general settings -if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui/backends) - set(BAKENDS_FOLDER "../../imgui/backends/") -else() - set(BAKENDS_FOLDER "../../imgui/examples/") -endif() - -if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui/imgui_tables.cpp) - set(TABLES_SOURCE "../../imgui/imgui_tables.cpp") -else() - set(TABLES_SOURCE "") -endif() - -include_directories(../../imgui) -add_definitions("-DIMGUI_USER_CONFIG=\"../cimconfig.h\"") -add_definitions("-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1") - -include_directories(../../) -set(IMGUI_SOURCES -../../cimgui.cpp -../../imgui/imgui.cpp -../../imgui/imgui_draw.cpp -../../imgui/imgui_demo.cpp -../../imgui/imgui_widgets.cpp -${TABLES_SOURCE} -) - -set(IMGUI_LIBRARIES ) - -if (WIN32) - add_definitions("-DIMGUI_IMPL_API=extern \"C\" __declspec\(dllexport\)") -else(WIN32) - add_definitions("-DIMGUI_IMPL_API=extern \"C\" ") -endif(WIN32) - -add_compile_definitions("IMGUI_IMPL_OPENGL_LOADER_GL3W") - -# optional adding freetype -option(IMGUI_FREETYPE "add Freetype2" OFF) - -if(IMGUI_FREETYPE) - FIND_PACKAGE(freetype REQUIRED PATHS ${FREETYPE_PATH}) - list(APPEND IMGUI_LIBRARIES freetype) - list(APPEND IMGUI_SOURCES ../../imgui/misc/freetype/imgui_freetype.cpp) - add_definitions("-DCIMGUI_FREETYPE=1") -endif(IMGUI_FREETYPE) - -# dx11 -list(APPEND IMGUI_SOURCES ${BAKENDS_FOLDER}imgui_impl_dx11.cpp) - -if(WIN32) - list(APPEND IMGUI_LIBRARIES opengl32) -else(WIN32) # Unix - list(APPEND IMGUI_LIBRARIES GL) -endif(WIN32) - -# GLFW -list(APPEND IMGUI_SOURCES ${BAKENDS_FOLDER}imgui_impl_glfw.cpp) +include(FetchContent) set(GLFW_VERSION 3.3.8) -include(FetchContent) - FetchContent_Declare( +FetchContent_Declare( glfw - URL https://github.com/glfw/glfw/archive/refs/tags/${GLFW_VERSION}.tar.gz) + EXCLUDE_FROM_ALL + URL https://github.com/glfw/glfw/archive/refs/tags/${GLFW_VERSION}.tar.gz + GIT_PROGRESS true) -FetchContent_GetProperties(glfw) -if (NOT glfw_POPULATED) - set(FETCHCONTENT_QUIET NO) - FetchContent_Populate(glfw) - set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) - set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) - set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) - if (NOT STATIC_BUILD) +set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) +set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) +set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) +if (NOT STATIC_BUILD) set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) - endif() - add_subdirectory(${glfw_SOURCE_DIR} ${glfw_BINARY_DIR} EXCLUDE_FROM_ALL) endif() + +FetchContent_MakeAvailable(glfw) install(TARGETS glfw RUNTIME DESTINATION ${CMAKE_CURRENT_BINARY_DIR} LIBRARY DESTINATION ${CMAKE_CURRENT_BINARY_DIR} ) -#FIND_PACKAGE(glfw3 PATHS "C:/LuaGL/gitsources/BUILDS/GLFW/install") -if (NOT STATIC_BUILD) - add_library(cimgui SHARED ${IMGUI_SOURCES}) -else() - add_library(cimgui STATIC ${IMGUI_SOURCES}) -endif() +include(../cmake/GenerateCimguiBindings.cmake) -target_link_libraries(cimgui ${IMGUI_LIBRARIES} glfw) - - -# using library -add_executable(${PROJECT_NAME} main.c) -target_compile_definitions(${PROJECT_NAME} PUBLIC -DCIMGUI_USE_DX11 -DCIMGUI_USE_GLFW) -target_link_libraries(${PROJECT_NAME} d3d11 d3dcompiler.lib cimgui) +set(inclulist "") +GenerateCimguiBindings(cimgui_with_backend "glfw" dx11 inclulist) +target_link_libraries(cimgui_with_backend PRIVATE glfw d3dcompiler dwmapi) +add_executable(${PROJECT_NAME} + main.c +) +target_link_libraries(${PROJECT_NAME} PRIVATE glfw cimgui_with_backend d3d11 d3dcompiler dwmapi) +target_compile_definitions( + ${PROJECT_NAME} + PRIVATE + CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1 + CIMGUI_USE_GLFW=1 + CIMGUI_USE_DX11=1 +) diff --git a/backend_test/example_glfw_dx11/README.md b/backend_test/example_glfw_dx11/README.md index 2847783..b216407 100644 --- a/backend_test/example_glfw_dx11/README.md +++ b/backend_test/example_glfw_dx11/README.md @@ -1,6 +1,7 @@ +# GLFWDX11 -This example needs dx11 in generation before compile. (add dx11 to generator.bat(sh) and generate) +This example needs dx11 in generation before compile. +Generation will be done from cmake but you need LuaJIT in the system. `STATIC_BUILD` is the cmake variable to do static linking -Only tested with VC nmake. \ No newline at end of file diff --git a/backend_test/example_glfw_dx11/main.c b/backend_test/example_glfw_dx11/main.c index 38e59a0..f423268 100644 --- a/backend_test/example_glfw_dx11/main.c +++ b/backend_test/example_glfw_dx11/main.c @@ -1,4 +1,4 @@ -#define CIMGUI_DEFINE_ENUMS_AND_STRUCTS +//#define CIMGUI_DEFINE_ENUMS_AND_STRUCTS is done in cmake #include "cimgui.h" #include "cimgui_impl.h" #define D3D11_NO_HELPERS diff --git a/backend_test/example_glfw_opengl3/main.c b/backend_test/example_glfw_opengl3/main.c index d977c43..81fa47e 100644 --- a/backend_test/example_glfw_opengl3/main.c +++ b/backend_test/example_glfw_opengl3/main.c @@ -43,8 +43,9 @@ int main(int argc, char *argv[]) // just an extra window hint for resize glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE); + float main_scale = ImGui_ImplGlfw_GetContentScaleForMonitor(glfwGetPrimaryMonitor()); // Valid on GLFW 3.3+ only + window = glfwCreateWindow((int)(1280 * main_scale), (int)(800 * main_scale), "Dear ImGui GLFW+OpenGL3 example", NULL, NULL); - window = glfwCreateWindow(1024, 768, "Hello World!", NULL, NULL); if (!window) { printf("Failed to create window! Terminating!\n"); @@ -72,6 +73,15 @@ int main(int argc, char *argv[]) ioptr->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows #endif + + // Setup scaling + ImGuiStyle* style = igGetStyle(); + ImGuiStyle_ScaleAllSizes(style, main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again) + style->FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose) +#if GLFW_VERSION_MAJOR >= 3 && GLFW_VERSION_MINOR >= 3 + ioptr->ConfigDpiScaleFonts = true; // [Experimental] Automatically overwrite style.FontScaleDpi in Begin() when Monitor DPI changes. This will scale fonts but _NOT_ scale sizes/padding for now. + ioptr->ConfigDpiScaleViewports = true; // [Experimental] Scale Dear ImGui and Platform Windows when Monitor DPI changes. +#endif ImGui_ImplGlfw_InitForOpenGL(window, true); ImGui_ImplOpenGL3_Init(glsl_version); diff --git a/backend_test/example_sdl3_vulkan/CMakeLists.txt b/backend_test/example_sdl3_vulkan/CMakeLists.txt new file mode 100644 index 0000000..daaddb9 --- /dev/null +++ b/backend_test/example_sdl3_vulkan/CMakeLists.txt @@ -0,0 +1,100 @@ +cmake_minimum_required(VERSION 2.8) +Project(cimgui_sdl3_vk) +if(WIN32) # to make mingw work as all the others +set(CMAKE_SHARED_LIBRARY_PREFIX "") +endif(WIN32) +# general settings + + +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui/backends) + set(BACKENDS_FOLDER "../../imgui/backends/") +else() + set(BACKENDS_FOLDER "../../imgui/examples/") +endif() + +if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../imgui/imgui_tables.cpp) + set(TABLES_SOURCE "../../imgui/imgui_tables.cpp") +else() + set(TABLES_SOURCE "") +endif() + +include_directories(../../imgui ../../imgui/backends) + + +include_directories(../../) +set(IMGUI_SOURCES ../../cimgui.cpp +../../cimgui_impl.cpp +../../imgui/imgui.cpp +../../imgui/imgui_draw.cpp +../../imgui/imgui_demo.cpp +../../imgui/imgui_widgets.cpp +${TABLES_SOURCE} +) + +set(IMGUI_SOURCES_sdl) +set(IMGUI_LIBRARIES ) + + +#optional adding freetype +option(IMGUI_FREETYPE "add Freetype2" OFF) + +if(IMGUI_FREETYPE) + FIND_PACKAGE(freetype REQUIRED PATHS ${FREETYPE_PATH}) + list(APPEND IMGUI_LIBRARIES freetype) + list(APPEND IMGUI_SOURCES ../../imgui/misc/freetype/imgui_freetype.cpp) + add_definitions("-DCIMGUI_FREETYPE=1") +endif(IMGUI_FREETYPE) + +# vulkan +find_package(Vulkan REQUIRED FATAL_ERROR) +list(APPEND IMGUI_LIBRARIES Vulkan::Vulkan) +list(APPEND IMGUI_SOURCES ${BACKENDS_FOLDER}imgui_impl_vulkan.cpp) +include_directories(${Vulkan_INCLUDE_DIRS}) + +#sdl3 +list(APPEND IMGUI_SOURCES ${BACKENDS_FOLDER}imgui_impl_sdl3.cpp) +include(FetchContent) +Set(FETCHCONTENT_QUIET FALSE) + +FetchContent_Declare( + SDL3 + GIT_REPOSITORY https://github.com/libsdl-org/SDL.git + GIT_TAG release-3.2.8 + #GIT_SHALLOW TRUE + GIT_PROGRESS TRUE +) +FetchContent_GetProperties(SDL3) +if (NOT sdl3_POPULATED) + set(FETCHCONTENT_QUIET NO) + FetchContent_Populate(SDL3) + set(SDL_TEST OFF CACHE BOOL "" FORCE) + set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) + add_subdirectory(${sdl3_SOURCE_DIR} ${sdl3_BINARY_DIR}) +endif() +include_directories(${SDL3_SOURCE_DIR}/include) + + +#if dynamic SDL3 then install +# install(TARGETS SDL3 RUNTIME DESTINATION ${CMAKE_CURRENT_BINARY_DIR} + # LIBRARY DESTINATION ${CMAKE_CURRENT_BINARY_DIR} +# ) + +add_library(cimgui_sdl STATIC ${IMGUI_SOURCES}) +target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_USER_CONFIG=\"../cimconfig.h\"") +target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1") +target_compile_definitions(cimgui_sdl PUBLIC -DCIMGUI_USE_VULKAN -DCIMGUI_USE_SDL3) +if (WIN32) + target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_IMPL_API=extern \"C\" __declspec\(dllexport\)") +else(WIN32) + target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_IMPL_API=extern \"C\" ") +endif(WIN32) +#target_link_libraries(cimgui_sdl ${IMGUI_LIBRARIES} SDL3-static) + +#using library +add_executable(test_sdl main.c) +target_compile_definitions(test_sdl PUBLIC -DCIMGUI_USE_VULKAN -DCIMGUI_USE_SDL3) +if (MINGW) +target_link_options(test_sdl PRIVATE "-mconsole") +endif() +target_link_libraries(test_sdl SDL3-static cimgui_sdl ${IMGUI_LIBRARIES}) + diff --git a/backend_test/example_sdl3_vulkan/README.md b/backend_test/example_sdl3_vulkan/README.md new file mode 100644 index 0000000..7ac04b8 --- /dev/null +++ b/backend_test/example_sdl3_vulkan/README.md @@ -0,0 +1,2 @@ + +To build use `cmake path_to_example_sdl3_vulkan` and then `make install` diff --git a/backend_test/example_sdl3_vulkan/main.c b/backend_test/example_sdl3_vulkan/main.c new file mode 100644 index 0000000..10d2481 --- /dev/null +++ b/backend_test/example_sdl3_vulkan/main.c @@ -0,0 +1,630 @@ +#include // printf, fprintf +#include // abort +#include +#define SDL_MAIN_HANDLED +#include +#include +#include +// Volk headers +#ifdef IMGUI_IMPL_VULKAN_USE_VOLK +#define VOLK_IMPLEMENTATION +#include +#endif + +//this must be equal to that in imgui_impl_vulkan.h +#define IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE (1) // Minimum per atlas + +#define CIMGUI_DEFINE_ENUMS_AND_STRUCTS +#include +#include + +#ifdef IMGUI_HAS_IMSTR +#define igBegin igBegin_Str +#define igSliderFloat igSliderFloat_Str +#define igCheckbox igCheckbox_Str +#define igColorEdit3 igColorEdit3_Str +#define igButton igButton_Str +#endif + +#define igGetIO igGetIO_Nil + +#define IM_UNUSED(_VAR) ((void)(_VAR)) +#define IM_ASSERT(_EXPR) assert(_EXPR) +#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR)))) + +//#define APP_USE_UNLIMITED_FRAME_RATE +#ifdef _DEBUG +#define APP_USE_VULKAN_DEBUG_REPORT +#endif +#define APP_USE_VULKAN_DEBUG_REPORT +// Data +static VkAllocationCallbacks* g_Allocator = NULL; +static VkInstance g_Instance = VK_NULL_HANDLE; +static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE; +static VkDevice g_Device = VK_NULL_HANDLE; +static uint32_t g_QueueFamily = (uint32_t)-1; +static VkQueue g_Queue = VK_NULL_HANDLE; +static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE; +static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE; +static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE; + +static ImGui_ImplVulkanH_Window g_MainWindowData; +static uint32_t g_MinImageCount = 2; +static bool g_SwapChainRebuild = false; + +static void check_vk_result(VkResult err) +{ + if (err == VK_SUCCESS) + return; + fprintf(stderr, "[vulkan] Error: VkResult = %d\n", err); + if (err < 0) + abort(); +} + +static void check_vk_result_line(VkResult err,int line) +{ + if (err == VK_SUCCESS) + return; + fprintf(stderr, "[vulkan] Error: VkResult = %d in line: (%d)\n", err, line); + if (err < 0) + abort(); +} + +#ifdef APP_USE_VULKAN_DEBUG_REPORT +static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData) +{ + (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments + fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage); + return VK_FALSE; +} +#endif // APP_USE_VULKAN_DEBUG_REPORT +//* +static bool IsExtensionAvailable(VkExtensionProperties* properties, uint32_t properties_count, const char* extension) +{ + for(uint32_t i = 0 ; i < properties_count; i++){ + if (strcmp(properties[i].extensionName, extension) == 0) + return true; + } + return false; +} + +static void SetupVulkan(const char** extensions, uint32_t extensions_count) +{ + VkResult err; +#ifdef IMGUI_IMPL_VULKAN_USE_VOLK + volkInitialize(); +#endif + + // Create Vulkan Instance + { + VkInstanceCreateInfo create_info = {}; + create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; + + // Enumerate available extensions + uint32_t properties_count; + vkEnumerateInstanceExtensionProperties(NULL, &properties_count, NULL); + VkExtensionProperties* properties = (VkExtensionProperties*)malloc(properties_count * sizeof(VkExtensionProperties)); + err = vkEnumerateInstanceExtensionProperties(NULL, &properties_count, properties); + check_vk_result_line(err, __LINE__); + + // Enable required extensions + if (IsExtensionAvailable(properties, properties_count, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)){ + //instance_extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + extensions_count++; + extensions = realloc(extensions, extensions_count * sizeof(char*)); + assert(extensions); + extensions[extensions_count-1] = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME; + } +#ifdef VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME + if (IsExtensionAvailable(properties, properties_count, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME)) + { + //instance_extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME); + extensions_count++; + extensions = realloc(extensions, extensions_count * sizeof(char*)); + assert(extensions); + extensions[extensions_count-1] = VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME; + create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; + } +#endif + free(properties); + // Enabling validation layers +#ifdef APP_USE_VULKAN_DEBUG_REPORT + const char* layers[] = { "VK_LAYER_KHRONOS_validation" }; + create_info.enabledLayerCount = 1; + create_info.ppEnabledLayerNames = layers; + //instance_extensions.push_back("VK_EXT_debug_report"); + extensions_count++; + extensions = realloc(extensions, extensions_count * sizeof(char*)); + assert(extensions); + extensions[extensions_count-1] = "VK_EXT_debug_report"; +#endif + + // Create Vulkan Instance + create_info.enabledExtensionCount = extensions_count;//(uint32_t)instance_extensions.Size; + create_info.ppEnabledExtensionNames = extensions;//instance_extensions.Data; + err = vkCreateInstance(&create_info, g_Allocator, &g_Instance); + check_vk_result_line(err, __LINE__); +#ifdef IMGUI_IMPL_VULKAN_USE_VOLK + volkLoadInstance(g_Instance); +#endif + + // Setup the debug report callback +#ifdef APP_USE_VULKAN_DEBUG_REPORT + PFN_vkCreateDebugReportCallbackEXT f_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT"); + IM_ASSERT(f_vkCreateDebugReportCallbackEXT != NULL); + VkDebugReportCallbackCreateInfoEXT debug_report_ci = {}; + debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT; + debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT; + debug_report_ci.pfnCallback = debug_report; + debug_report_ci.pUserData = NULL; + err = f_vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport); + check_vk_result_line(err, __LINE__); +#endif + } + // Select Physical Device (GPU) + g_PhysicalDevice = ImGui_ImplVulkanH_SelectPhysicalDevice(g_Instance); + IM_ASSERT(g_PhysicalDevice != VK_NULL_HANDLE); + // Select graphics queue family + g_QueueFamily = ImGui_ImplVulkanH_SelectQueueFamilyIndex(g_PhysicalDevice); + IM_ASSERT(g_QueueFamily != (uint32_t)-1); + + // Create Logical Device (with 1 queue) + { + //ImVector device_extensions; + //device_extensions.push_back("VK_KHR_swapchain"); + uint32_t device_extensions_count = 1; + const char** device_extensions = (const char**)malloc(device_extensions_count * sizeof(char*)); + device_extensions[0] = "VK_KHR_swapchain"; + + // Enumerate physical device extension + uint32_t properties_count; + //ImVector properties; + vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, NULL, &properties_count, NULL); + //properties.resize(properties_count); + VkExtensionProperties* properties = (VkExtensionProperties*)malloc(properties_count * sizeof(VkExtensionProperties)); + vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, NULL, &properties_count, properties); +#ifdef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME + if (IsExtensionAvailable(properties, properties_count, VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)){ + //device_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME); + device_extensions_count++; + device_extensions = realloc(device_extensions, device_extensions_count * sizeof(const char*)); + assert(device_extensions); + device_extensions[device_extensions_count-1] = VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME; + } +#endif + + const float queue_priority[] = { 1.0f }; + VkDeviceQueueCreateInfo queue_info[1] = {}; + queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; + queue_info[0].queueFamilyIndex = g_QueueFamily; + queue_info[0].queueCount = 1; + queue_info[0].pQueuePriorities = queue_priority; + VkDeviceCreateInfo create_info = {}; + create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; + create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]); + create_info.pQueueCreateInfos = queue_info; + create_info.enabledExtensionCount = device_extensions_count; //(uint32_t)device_extensions.Size; + create_info.ppEnabledExtensionNames = device_extensions;//device_extensions.Data; + err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device); + check_vk_result_line(err, __LINE__); + vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue); + } + // Create Descriptor Pool + // If you wish to load e.g. additional textures you may need to alter pools sizes and maxSets. + { + VkDescriptorPoolSize pool_sizes[] = + { + { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE }, + }; + VkDescriptorPoolCreateInfo pool_info = {}; + pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; + pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; + pool_info.maxSets = 0; + //for (VkDescriptorPoolSize& pool_size : pool_sizes) + // pool_info.maxSets += pool_size.descriptorCount; + for(int i = 0; i < IM_ARRAYSIZE(pool_sizes); i++){ + VkDescriptorPoolSize pool_size = pool_sizes[i]; + pool_info.maxSets += pool_size.descriptorCount; + } + pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes); + pool_info.pPoolSizes = pool_sizes; + err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool); + check_vk_result_line(err, __LINE__); + } +} +//*/ +// All the ImGui_ImplVulkanH_XXX structures/functions are optional helpers used by the demo. +// Your real engine/app may not use them. +static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface, int width, int height) +{ + wd->Surface = surface; + + // Check for WSI support + VkBool32 res; + vkGetPhysicalDeviceSurfaceSupportKHR(g_PhysicalDevice, g_QueueFamily, wd->Surface, &res); + if (res != VK_TRUE) + { + fprintf(stderr, "Error no WSI support on physical device 0\n"); + exit(-1); + } + + // Select Surface Format + const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM }; + const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; + wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace); + + // Select Present Mode +#ifdef APP_USE_UNLIMITED_FRAME_RATE + VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR }; +#else + VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR }; +#endif + wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes)); + //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode); + + // Create SwapChain, RenderPass, Framebuffer, etc. + IM_ASSERT(g_MinImageCount >= 2); + ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, wd, g_QueueFamily, g_Allocator, width, height, g_MinImageCount); +} + +static void CleanupVulkan() +{ + vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator); + +#ifdef APP_USE_VULKAN_DEBUG_REPORT + // Remove the debug report callback + PFN_vkDestroyDebugReportCallbackEXT f_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT"); + f_vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator); +#endif // APP_USE_VULKAN_DEBUG_REPORT + + vkDestroyDevice(g_Device, g_Allocator); + vkDestroyInstance(g_Instance, g_Allocator); +} + +static void CleanupVulkanWindow() +{ + ImGui_ImplVulkanH_DestroyWindow(g_Instance, g_Device, &g_MainWindowData, g_Allocator); +} + +static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data) +{ + VkSemaphore image_acquired_semaphore = wd->FrameSemaphores.Data[wd->SemaphoreIndex].ImageAcquiredSemaphore; + VkSemaphore render_complete_semaphore = wd->FrameSemaphores.Data[wd->SemaphoreIndex].RenderCompleteSemaphore; + VkResult err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex); + if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR) + g_SwapChainRebuild = true; + if (err == VK_ERROR_OUT_OF_DATE_KHR) + return; + if (err != VK_SUBOPTIMAL_KHR) + check_vk_result_line(err, __LINE__); + + ImGui_ImplVulkanH_Frame* fd = &wd->Frames.Data[wd->FrameIndex]; + { + err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking + check_vk_result_line(err, __LINE__); + + err = vkResetFences(g_Device, 1, &fd->Fence); + check_vk_result_line(err, __LINE__); + } + { + err = vkResetCommandPool(g_Device, fd->CommandPool, 0); + check_vk_result_line(err, __LINE__); + VkCommandBufferBeginInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; + info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + err = vkBeginCommandBuffer(fd->CommandBuffer, &info); + check_vk_result_line(err, __LINE__); + } + { + VkRenderPassBeginInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; + info.renderPass = wd->RenderPass; + info.framebuffer = fd->Framebuffer; + info.renderArea.extent.width = wd->Width; + info.renderArea.extent.height = wd->Height; + info.clearValueCount = 1; + info.pClearValues = &wd->ClearValue; + vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE); + } + + // Record dear imgui primitives into command buffer + ImGui_ImplVulkan_RenderDrawData(draw_data, fd->CommandBuffer, VK_NULL_HANDLE); + + // Submit command buffer + vkCmdEndRenderPass(fd->CommandBuffer); + { + VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; + VkSubmitInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + info.waitSemaphoreCount = 1; + info.pWaitSemaphores = &image_acquired_semaphore; + info.pWaitDstStageMask = &wait_stage; + info.commandBufferCount = 1; + info.pCommandBuffers = &fd->CommandBuffer; + info.signalSemaphoreCount = 1; + info.pSignalSemaphores = &render_complete_semaphore; + + err = vkEndCommandBuffer(fd->CommandBuffer); + check_vk_result_line(err, __LINE__); + err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence); + check_vk_result_line(err, __LINE__); + } +} + +static void FramePresent(ImGui_ImplVulkanH_Window* wd) +{ + if (g_SwapChainRebuild) + return; + VkSemaphore render_complete_semaphore = wd->FrameSemaphores.Data[wd->SemaphoreIndex].RenderCompleteSemaphore; + VkPresentInfoKHR info = {}; + info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; + info.waitSemaphoreCount = 1; + info.pWaitSemaphores = &render_complete_semaphore; + info.swapchainCount = 1; + info.pSwapchains = &wd->Swapchain; + info.pImageIndices = &wd->FrameIndex; + VkResult err = vkQueuePresentKHR(g_Queue, &info); + if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR) + g_SwapChainRebuild = true; + if (err == VK_ERROR_OUT_OF_DATE_KHR) + return; + if (err != VK_SUBOPTIMAL_KHR) + check_vk_result_line(err, __LINE__); + wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores +} + +// Main code +int main(int argc, char* argv[]) +{ + //g_MainWindowData.ClearEnable = true; + //ImGui_ImplVulkanH_Window_Construct(&g_MainWindowData); + g_MainWindowData = *ImGui_ImplVulkanH_Window_ImGui_ImplVulkanH_Window(); + // Setup SDL + if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD)) + { + printf("Error: SDL_Init(): %s\n", SDL_GetError()); + return -1; + } + + // From 2.0.18: Enable native IME. +#ifdef SDL_HINT_IME_SHOW_UI + SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1"); +#endif + + // Create window with Vulkan graphics context + float main_scale = SDL_GetDisplayContentScale(SDL_GetPrimaryDisplay()); + SDL_WindowFlags window_flags = SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN | SDL_WINDOW_HIGH_PIXEL_DENSITY; + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+Vulkan example", (int)(1280 * main_scale), (int)(720 * main_scale), window_flags); + if (window == NULL) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + // Setup Vulkan + uint32_t extensions_count = 0; + const char *const *extensions_nude = SDL_Vulkan_GetInstanceExtensions(&extensions_count); + if (extensions_nude == NULL) { + printf("Error: SDL_Vulkan_GetInstanceExtensions(): %s\n", SDL_GetError()); + return -1; + } + const char** extensions = (const char**)malloc(extensions_count * sizeof(const char*)); + if (extensions == NULL) { + printf("Error allocating space for extensions array\n"); + return -1; + } + for (int i = 0; i < extensions_count; i++) { + extensions[i] = extensions_nude[i]; + } + SetupVulkan(extensions, extensions_count); + //leak?? but free crashes + // free(extensions); + // Create Window Surface + VkSurfaceKHR surface; + VkResult err; + if (SDL_Vulkan_CreateSurface(window, g_Instance, g_Allocator, &surface) == 0) + { + printf("Failed to create Vulkan surface.\n"); + return 1; + } + + // Create Framebuffers + int w, h; + SDL_GetWindowSize(window, &w, &h); + ImGui_ImplVulkanH_Window* wd = &g_MainWindowData; + SetupVulkanWindow(wd, surface, w, h); + SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + SDL_ShowWindow(window); + + // Setup Dear ImGui context + //IMGUI_CHECKVERSION(); + igCreateContext(NULL); + ImGuiIO* io = igGetIO(); (void)io; + io->ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io->ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + io->ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking + io->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows + //io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoTaskBarIcons; + //io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoMerge; + + // Setup Dear ImGui style + igStyleColorsDark(NULL); + //ImGui::StyleColorsLight(); + + // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones. + ImGuiStyle* style = igGetStyle(); + ImGuiStyle_ScaleAllSizes(style, main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again) + 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. + if (io->ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + style->WindowRounding = 0.0f; + style->Colors[ImGuiCol_WindowBg].w = 1.0f; + } + + // Setup Platform/Renderer backends + ImGui_ImplSDL3_InitForVulkan(window); + ImGui_ImplVulkan_InitInfo init_info = {}; + init_info.Instance = g_Instance; + init_info.PhysicalDevice = g_PhysicalDevice; + init_info.Device = g_Device; + init_info.QueueFamily = g_QueueFamily; + init_info.Queue = g_Queue; + init_info.PipelineCache = g_PipelineCache; + init_info.DescriptorPool = g_DescriptorPool; + init_info.RenderPass = wd->RenderPass; + init_info.Subpass = 0; + init_info.MinImageCount = g_MinImageCount; + init_info.ImageCount = wd->ImageCount; + init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT; + init_info.Allocator = g_Allocator; + init_info.CheckVkResultFn = check_vk_result; + ImGui_ImplVulkan_Init(&init_info); + + // Load Fonts + // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. + // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. + // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. + // - Read 'docs/FONTS.md' for more instructions and details. + // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! + //io.Fonts->AddFontDefault(); + //io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); + //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); + + // 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. + 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 (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED) + { + SDL_Delay(10); + continue; + } + + // Resize swap chain? + int fb_width, fb_height; + SDL_GetWindowSize(window, &fb_width, &fb_height); + if (fb_width > 0 && fb_height > 0 && (g_SwapChainRebuild || g_MainWindowData.Width != fb_width || g_MainWindowData.Height != fb_height)) + { + ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount); + ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData, g_QueueFamily, g_Allocator, fb_width, fb_height, g_MinImageCount); + g_MainWindowData.FrameIndex = 0; + g_SwapChainRebuild = false; + } + + // Start the Dear ImGui frame + ImGui_ImplVulkan_NewFrame(); + ImGui_ImplSDL3_NewFrame(); + igNewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! 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); + igText("This is some useful text"); + igCheckbox("Demo window", &show_demo_window); + igCheckbox("Another window", &show_another_window); + + igSliderFloat("Float", &f, 0.0f, 1.0f, "%.3f", 0); + igColorEdit3("clear color", (float*)&clear_color, 0); + + ImVec2 buttonSize; + buttonSize.x = 0; + buttonSize.y = 0; + if (igButton("Button", buttonSize)) + counter++; + igSameLine(0.0f, -1.0f); + igText("counter = %d", counter); + + igText("Application average %.3f ms/frame (%.1f FPS)", + 1000.0f / igGetIO()->Framerate, igGetIO()->Framerate); + igEnd(); + } + + // 3. Show another simple window. + if (show_another_window) + { + igBegin("imgui Another Window", &show_another_window, 0); + igText("Hello from imgui"); + ImVec2 buttonSize; + buttonSize.x = 0; buttonSize.y = 0; + if (igButton("Close me", buttonSize)) + { + show_another_window = false; + } + igEnd(); + } + + // Rendering + igRender(); + ImDrawData* main_draw_data = igGetDrawData(); + const bool main_is_minimized = (main_draw_data->DisplaySize.x <= 0.0f || main_draw_data->DisplaySize.y <= 0.0f); + wd->ClearValue.color.float32[0] = clear_color.x * clear_color.w; + wd->ClearValue.color.float32[1] = clear_color.y * clear_color.w; + wd->ClearValue.color.float32[2] = clear_color.z * clear_color.w; + wd->ClearValue.color.float32[3] = clear_color.w; + if (!main_is_minimized) + FrameRender(wd, main_draw_data); + + // Update and Render additional Platform Windows + if (io->ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + igUpdatePlatformWindows(); + igRenderPlatformWindowsDefault(NULL, NULL); + } + + // Present Main Platform Window + if (!main_is_minimized) + FramePresent(wd); + } + + // Cleanup + err = vkDeviceWaitIdle(g_Device); + check_vk_result_line(err, __LINE__); + ImGui_ImplVulkan_Shutdown(); + ImGui_ImplSDL3_Shutdown(); + igDestroyContext(NULL); + + CleanupVulkanWindow(); + CleanupVulkan(); + + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} diff --git a/backend_test/example_sdl_opengl3/main.c b/backend_test/example_sdl_opengl3/main.c index f7a5ab5..4327cc3 100644 --- a/backend_test/example_sdl_opengl3/main.c +++ b/backend_test/example_sdl_opengl3/main.c @@ -10,6 +10,10 @@ #include #include +#ifdef _WIN32 +#include // SetProcessDPIAware() +#endif + #ifdef IMGUI_HAS_IMSTR #define igBegin igBegin_Str #define igSliderFloat igSliderFloat_Str @@ -24,6 +28,9 @@ SDL_Window *window = NULL; int main(int argc, char* argv[]) { +#ifdef _WIN32 + SetProcessDPIAware(); +#endif if (SDL_Init(SDL_INIT_VIDEO) < 0) { SDL_Log("failed to init: %s", SDL_GetError()); @@ -54,11 +61,10 @@ int main(int argc, char* argv[]) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_DisplayMode current; SDL_GetCurrentDisplayMode(0, ¤t); - - window = SDL_CreateWindow( - "Hello", 0, 0, 1024, 768, - SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE - ); + float main_scale = ImGui_ImplSDL2_GetContentScaleForDisplay(0); + SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); + window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, (int)(1280 * main_scale), (int)(720 * main_scale), window_flags); + if (window == NULL) { SDL_Log("Failed to create window: %s", SDL_GetError()); return -1; @@ -83,6 +89,14 @@ int main(int argc, char* argv[]) ioptr->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows #endif + // Setup scaling + ImGuiStyle* style = igGetStyle(); + ImGuiStyle_ScaleAllSizes(style, main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again) + style->FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose) + ioptr->ConfigDpiScaleFonts = true; // [Experimental] Automatically overwrite style.FontScaleDpi in Begin() when Monitor DPI changes. This will scale fonts but _NOT_ scale sizes/padding for now. + ioptr->ConfigDpiScaleViewports = true; // [Experimental] Scale Dear ImGui and Platform Windows when Monitor DPI changes. + + ImGui_ImplSDL2_InitForOpenGL(window, gl_context); ImGui_ImplOpenGL3_Init(glsl_version); diff --git a/backend_test/example_sdl_vulkan/README.md b/backend_test/example_sdl_vulkan/README.md index 80f042d..5b09401 100644 --- a/backend_test/example_sdl_vulkan/README.md +++ b/backend_test/example_sdl_vulkan/README.md @@ -1,3 +1,2 @@ -This example needs vulkan generation before compilation: Vulkan SDK should be installed and then add "vulkan" to generator.bat and generate. To build use `cmake path_to_example_sdl_vulkan` and then `make install` diff --git a/backend_test/example_sdl_vulkan/main.c b/backend_test/example_sdl_vulkan/main.c index 2590079..666a17e 100644 --- a/backend_test/example_sdl_vulkan/main.c +++ b/backend_test/example_sdl_vulkan/main.c @@ -11,6 +11,10 @@ #include #endif +#ifdef _WIN32 +#include // SetProcessDPIAware() +#endif + //this must be equal to that in imgui_impl_vulkan.h #define IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE (1) // Minimum per atlas @@ -376,6 +380,9 @@ static void FramePresent(ImGui_ImplVulkanH_Window* wd) // Main code int main(int argc, char* argv[]) { +#ifdef _WIN32 + SetProcessDPIAware(); +#endif //g_MainWindowData.ClearEnable = true; //ImGui_ImplVulkanH_Window_Construct(&g_MainWindowData); g_MainWindowData = *ImGui_ImplVulkanH_Window_ImGui_ImplVulkanH_Window(); @@ -391,9 +398,10 @@ int main(int argc, char* argv[]) SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1"); #endif - // Create window with Vulkan graphics context + float main_scale = ImGui_ImplSDL2_GetContentScaleForDisplay(0); SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); - SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+Vulkan example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+Vulkan example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, (int)(1280 * main_scale), (int)(720 * main_scale), window_flags); + if (window == NULL) { printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); @@ -445,6 +453,10 @@ int main(int argc, char* argv[]) style->Colors[ImGuiCol_WindowBg].w = 1.0f; } + // Setup scaling + ImGuiStyle_ScaleAllSizes(style, main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again) + style->FontScaleDpi = main_scale; // Set initial font scale. (using io.ConfigDpiScaleFonts=true makes this unnecessary. We leave both here for documentation purpose) + // Setup Platform/Renderer backends ImGui_ImplSDL2_InitForVulkan(window); ImGui_ImplVulkan_InitInfo init_info = {}; diff --git a/backend_test/example_sdlgpu3/CMakeLists.txt b/backend_test/example_sdlgpu3/CMakeLists.txt new file mode 100644 index 0000000..b77460e --- /dev/null +++ b/backend_test/example_sdlgpu3/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.30) +project(cimgui_sdlgpu3 LANGUAGES C CXX) + +set(CMAKE_C_STANDARD 11) + +include(FetchContent) + +FetchContent_Declare( + sdl3 + URL https://github.com/libsdl-org/SDL/releases/download/release-3.2.8/SDL3-3.2.8.tar.gz +) + +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 sdlgpu3 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_SDLGPU3=1 +) diff --git a/backend_test/example_sdlgpu3/README.md b/backend_test/example_sdlgpu3/README.md new file mode 100644 index 0000000..1d91a4b --- /dev/null +++ b/backend_test/example_sdlgpu3/README.md @@ -0,0 +1,16 @@ +# SDLGPU3 + +This example is a little different from the others, because `cimgui` doesn't come with bindings for the SDLGPU3 backend out of the box. Instead, this example shows how to generate the necessary bindings during cmake's configure time, then add the compiled library as a target for your application to link to. + +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` + +and after + +`make` + diff --git a/backend_test/example_sdlgpu3/main.c b/backend_test/example_sdlgpu3/main.c new file mode 100644 index 0000000..9d4dcc1 --- /dev/null +++ b/backend_test/example_sdlgpu3/main.c @@ -0,0 +1,216 @@ +#include +#include +#include +#include + +#include +#include + +#include +#include + + +#define igGetIO igGetIO_Nil + +int main() { + if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD)) { + fprintf(stderr, "Failed to init video! %s", SDL_GetError()); + return 1; + }; + + 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; + window = SDL_CreateWindow("Dear ImGui SDL3+SDL_GPU example", (int)(1280 * main_scale), (int)(720 * main_scale), window_flags); + if (window == NULL) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); + SDL_ShowWindow(window); + + // Create GPU Device + SDL_GPUDevice* gpu_device = SDL_CreateGPUDevice(SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_METALLIB,true,NULL); + if (gpu_device == NULL) + { + printf("Error: SDL_CreateGPUDevice(): %s\n", SDL_GetError()); + return -1; + } + + // Claim window for GPU Device + if (!SDL_ClaimWindowForGPUDevice(gpu_device, window)) + { + printf("Error: SDL_ClaimWindowForGPUDevice(): %s\n", SDL_GetError()); + return -1; + } + SDL_SetGPUSwapchainParameters(gpu_device, window, SDL_GPU_SWAPCHAINCOMPOSITION_SDR, SDL_GPU_PRESENTMODE_MAILBOX); + + // Setup Dear ImGui context + //IMGUI_CHECKVERSION(); + igCreateContext(NULL); + ImGuiIO* io = igGetIO(); (void)io; + io->ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls + io->ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls + + // Setup Dear ImGui style + igStyleColorsDark(NULL); + //igStyleColorsLight(NULL); + // Setup scaling + ImGuiStyle* style = igGetStyle(); + ImGuiStyle_ScaleAllSizes(style, main_scale); // Bake a fixed style scale. (until we have a solution for dynamic style scaling, changing this requires resetting Style + calling this again) + 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_InitForSDLGPU(window); + ImGui_ImplSDLGPU3_InitInfo init_info;//= {}; + init_info.Device = gpu_device; + init_info.ColorTargetFormat = SDL_GetGPUSwapchainTextureFormat(gpu_device, window); + init_info.MSAASamples = SDL_GPU_SAMPLECOUNT_1; + ImGui_ImplSDLGPU3_Init(&init_info); + // finish loading data + + // 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; + } + + // Start the Dear ImGui frame + ImGui_ImplSDLGPU3_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); + + SDL_GPUCommandBuffer* command_buffer = SDL_AcquireGPUCommandBuffer(gpu_device); // Acquire a GPU command buffer + + SDL_GPUTexture* swapchain_texture; + SDL_AcquireGPUSwapchainTexture(command_buffer, window, &swapchain_texture, NULL, NULL); // Acquire a swapchain texture + + if (swapchain_texture != NULL && !is_minimized) + { + // This is mandatory: call Imgui_ImplSDLGPU3_PrepareDrawData() to upload the vertex/index buffer! + ImGui_ImplSDLGPU3_PrepareDrawData(draw_data, command_buffer); + + // Setup and start a render pass + SDL_GPUColorTargetInfo target_info ;//= {}; + target_info.texture = swapchain_texture; + target_info.clear_color.r = clear_color.x; + target_info.clear_color.g = clear_color.y; + target_info.clear_color.b = clear_color.z; + target_info.clear_color.a = clear_color.w; + target_info.load_op = SDL_GPU_LOADOP_CLEAR; + target_info.store_op = SDL_GPU_STOREOP_STORE; + target_info.mip_level = 0; + target_info.layer_or_depth_plane = 0; + target_info.cycle = false; + target_info.resolve_texture = NULL; + target_info.resolve_mip_level = 0; + target_info.resolve_layer = 0; + target_info.cycle_resolve_texture = false; + target_info.padding1 = 0; + target_info.padding2 = 0; + SDL_GPURenderPass* render_pass = SDL_BeginGPURenderPass(command_buffer, &target_info, 1, NULL); + + // Render ImGui + ImGui_ImplSDLGPU3_RenderDrawData(draw_data, command_buffer, render_pass, NULL); + + SDL_EndGPURenderPass(render_pass); + } + + // Submit the command buffer + SDL_SubmitGPUCommandBuffer(command_buffer); + } + + // Cleanup + // [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppQuit() function] + SDL_WaitForGPUIdle(gpu_device); + ImGui_ImplSDL3_Shutdown(); + ImGui_ImplSDLGPU3_Shutdown(); + igDestroyContext(NULL); + + SDL_ReleaseWindowFromGPUDevice(gpu_device, window); + SDL_DestroyGPUDevice(gpu_device); + SDL_DestroyWindow(window); + SDL_Quit(); + + return 0; +} diff --git a/cimgui.cpp b/cimgui.cpp index 481c2bf..3f2212d 100644 --- a/cimgui.cpp +++ b/cimgui.cpp @@ -1,5 +1,5 @@ //This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui -//based on imgui.h file version "1.91.9b" 19191 from Dear ImGui https://github.com/ocornut/imgui +//based on imgui.h file version "1.92.0" 19200 from Dear ImGui https://github.com/ocornut/imgui //with imgui_internal.h api //with imgui_freetype.h api @@ -36,6 +36,22 @@ CIMGUI_API ImVec4* ImVec4_ImVec4_Float(float _x,float _y,float _z,float _w) { return IM_NEW(ImVec4)(_x,_y,_z,_w); } +CIMGUI_API ImTextureRef* ImTextureRef_ImTextureRef_Nil(void) +{ + return IM_NEW(ImTextureRef)(); +} +CIMGUI_API void ImTextureRef_destroy(ImTextureRef* self) +{ + IM_DELETE(self); +} +CIMGUI_API ImTextureRef* ImTextureRef_ImTextureRef_TextureID(ImTextureID tex_id) +{ + return IM_NEW(ImTextureRef)(tex_id); +} +CIMGUI_API ImTextureID ImTextureRef_GetTexID(ImTextureRef* self) +{ + return self->GetTexID(); +} CIMGUI_API ImGuiContext* igCreateContext(ImFontAtlas* shared_font_atlas) { return ImGui::CreateContext(shared_font_atlas); @@ -236,10 +252,6 @@ CIMGUI_API void igSetWindowFocus_Nil() { return ImGui::SetWindowFocus(); } -CIMGUI_API void igSetWindowFontScale(float scale) -{ - return ImGui::SetWindowFontScale(scale); -} CIMGUI_API void igSetWindowPos_Str(const char* name,const ImVec2 pos,ImGuiCond cond) { return ImGui::SetWindowPos(name,pos,cond); @@ -296,14 +308,26 @@ CIMGUI_API void igSetScrollFromPosY_Float(float local_y,float center_y_ratio) { return ImGui::SetScrollFromPosY(local_y,center_y_ratio); } -CIMGUI_API void igPushFont(ImFont* font) +CIMGUI_API void igPushFont(ImFont* font,float font_size_base_unscaled) { - return ImGui::PushFont(font); + return ImGui::PushFont(font,font_size_base_unscaled); } CIMGUI_API void igPopFont() { return ImGui::PopFont(); } +CIMGUI_API ImFont* igGetFont() +{ + return ImGui::GetFont(); +} +CIMGUI_API float igGetFontSize() +{ + return ImGui::GetFontSize(); +} +CIMGUI_API ImFontBaked* igGetFontBaked() +{ + return ImGui::GetFontBaked(); +} CIMGUI_API void igPushStyleColor_U32(ImGuiCol idx,ImU32 col) { return ImGui::PushStyleColor(idx,col); @@ -368,14 +392,6 @@ CIMGUI_API void igPopTextWrapPos() { return ImGui::PopTextWrapPos(); } -CIMGUI_API ImFont* igGetFont() -{ - return ImGui::GetFont(); -} -CIMGUI_API float igGetFontSize() -{ - return ImGui::GetFontSize(); -} CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2 *pOut) { *pOut = ImGui::GetFontTexUvWhitePixel(); @@ -539,6 +555,12 @@ CIMGUI_API void igText(const char* fmt,...) ImGui::TextV(fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igText0(const char* fmt) +{ + return igText(fmt); +} +#endif CIMGUI_API void igTextV(const char* fmt,va_list args) { return ImGui::TextV(fmt,args); @@ -550,6 +572,12 @@ CIMGUI_API void igTextColored(const ImVec4 col,const char* fmt,...) ImGui::TextColoredV(col,fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igTextColored0(const ImVec4 col,const char* fmt) +{ + return igTextColored(col,fmt); +} +#endif CIMGUI_API void igTextColoredV(const ImVec4 col,const char* fmt,va_list args) { return ImGui::TextColoredV(col,fmt,args); @@ -561,6 +589,12 @@ CIMGUI_API void igTextDisabled(const char* fmt,...) ImGui::TextDisabledV(fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igTextDisabled0(const char* fmt) +{ + return igTextDisabled(fmt); +} +#endif CIMGUI_API void igTextDisabledV(const char* fmt,va_list args) { return ImGui::TextDisabledV(fmt,args); @@ -572,6 +606,12 @@ CIMGUI_API void igTextWrapped(const char* fmt,...) ImGui::TextWrappedV(fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igTextWrapped0(const char* fmt) +{ + return igTextWrapped(fmt); +} +#endif CIMGUI_API void igTextWrappedV(const char* fmt,va_list args) { return ImGui::TextWrappedV(fmt,args); @@ -583,6 +623,12 @@ CIMGUI_API void igLabelText(const char* label,const char* fmt,...) ImGui::LabelTextV(label,fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igLabelText0(const char* label,const char* fmt) +{ + return igLabelText(label,fmt); +} +#endif CIMGUI_API void igLabelTextV(const char* label,const char* fmt,va_list args) { return ImGui::LabelTextV(label,fmt,args); @@ -594,6 +640,12 @@ CIMGUI_API void igBulletText(const char* fmt,...) ImGui::BulletTextV(fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igBulletText0(const char* fmt) +{ + return igBulletText(fmt); +} +#endif CIMGUI_API void igBulletTextV(const char* fmt,va_list args) { return ImGui::BulletTextV(fmt,args); @@ -650,21 +702,21 @@ CIMGUI_API bool igTextLink(const char* label) { return ImGui::TextLink(label); } -CIMGUI_API void igTextLinkOpenURL(const char* label,const char* url) +CIMGUI_API bool igTextLinkOpenURL(const char* label,const char* url) { return ImGui::TextLinkOpenURL(label,url); } -CIMGUI_API void igImage(ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1) +CIMGUI_API void igImage(ImTextureRef tex_ref,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1) { - return ImGui::Image(user_texture_id,image_size,uv0,uv1); + return ImGui::Image(tex_ref,image_size,uv0,uv1); } -CIMGUI_API void igImageWithBg(ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col) +CIMGUI_API void igImageWithBg(ImTextureRef tex_ref,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col) { - return ImGui::ImageWithBg(user_texture_id,image_size,uv0,uv1,bg_col,tint_col); + return ImGui::ImageWithBg(tex_ref,image_size,uv0,uv1,bg_col,tint_col); } -CIMGUI_API bool igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col) +CIMGUI_API bool igImageButton(const char* str_id,ImTextureRef tex_ref,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col) { - return ImGui::ImageButton(str_id,user_texture_id,image_size,uv0,uv1,bg_col,tint_col); + return ImGui::ImageButton(str_id,tex_ref,image_size,uv0,uv1,bg_col,tint_col); } CIMGUI_API bool igBeginCombo(const char* label,const char* preview_value,ImGuiComboFlags flags) { @@ -882,6 +934,12 @@ CIMGUI_API bool igTreeNode_StrStr(const char* str_id,const char* fmt,...) va_end(args); return ret; } +#ifdef CIMGUI_VARGS0 +CIMGUI_API bool igTreeNode_StrStr0(const char* str_id,const char* fmt) +{ + return igTreeNode_StrStr(str_id,fmt); +} +#endif CIMGUI_API bool igTreeNode_Ptr(const void* ptr_id,const char* fmt,...) { va_list args; @@ -890,6 +948,12 @@ CIMGUI_API bool igTreeNode_Ptr(const void* ptr_id,const char* fmt,...) va_end(args); return ret; } +#ifdef CIMGUI_VARGS0 +CIMGUI_API bool igTreeNode_Ptr0(const void* ptr_id,const char* fmt) +{ + return igTreeNode_Ptr(ptr_id,fmt); +} +#endif CIMGUI_API bool igTreeNodeV_Str(const char* str_id,const char* fmt,va_list args) { return ImGui::TreeNodeV(str_id,fmt,args); @@ -910,6 +974,12 @@ CIMGUI_API bool igTreeNodeEx_StrStr(const char* str_id,ImGuiTreeNodeFlags flags, va_end(args); return ret; } +#ifdef CIMGUI_VARGS0 +CIMGUI_API bool igTreeNodeEx_StrStr0(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt) +{ + return igTreeNodeEx_StrStr(str_id,flags,fmt); +} +#endif CIMGUI_API bool igTreeNodeEx_Ptr(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt,...) { va_list args; @@ -918,6 +988,12 @@ CIMGUI_API bool igTreeNodeEx_Ptr(const void* ptr_id,ImGuiTreeNodeFlags flags,con va_end(args); return ret; } +#ifdef CIMGUI_VARGS0 +CIMGUI_API bool igTreeNodeEx_Ptr0(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt) +{ + return igTreeNodeEx_Ptr(ptr_id,flags,fmt); +} +#endif CIMGUI_API bool igTreeNodeExV_Str(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt,va_list args) { return ImGui::TreeNodeExV(str_id,flags,fmt,args); @@ -1077,6 +1153,12 @@ CIMGUI_API void igSetTooltip(const char* fmt,...) ImGui::SetTooltipV(fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igSetTooltip0(const char* fmt) +{ + return igSetTooltip(fmt); +} +#endif CIMGUI_API void igSetTooltipV(const char* fmt,va_list args) { return ImGui::SetTooltipV(fmt,args); @@ -1092,6 +1174,12 @@ CIMGUI_API void igSetItemTooltip(const char* fmt,...) ImGui::SetItemTooltipV(fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igSetItemTooltip0(const char* fmt) +{ + return igSetItemTooltip(fmt); +} +#endif CIMGUI_API void igSetItemTooltipV(const char* fmt,va_list args) { return ImGui::SetItemTooltipV(fmt,args); @@ -1292,6 +1380,19 @@ CIMGUI_API void igLogButtons() { return ImGui::LogButtons(); } +CIMGUI_API void igLogText(const char* fmt,...) +{ + va_list args; + va_start(args, fmt); + ImGui::LogTextV(fmt,args); + va_end(args); +} +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igLogText0(const char* fmt) +{ + return igLogText(fmt); +} +#endif CIMGUI_API void igLogTextV(const char* fmt,va_list args) { return ImGui::LogTextV(fmt,args); @@ -1643,6 +1744,12 @@ CIMGUI_API void igDebugLog(const char* fmt,...) ImGui::DebugLogV(fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igDebugLog0(const char* fmt) +{ + return igDebugLog(fmt); +} +#endif CIMGUI_API void igDebugLogV(const char* fmt,va_list args) { return ImGui::DebugLogV(fmt,args); @@ -2163,13 +2270,13 @@ CIMGUI_API void ImDrawList_PopClipRect(ImDrawList* self) { return self->PopClipRect(); } -CIMGUI_API void ImDrawList_PushTextureID(ImDrawList* self,ImTextureID texture_id) +CIMGUI_API void ImDrawList_PushTexture(ImDrawList* self,ImTextureRef tex_ref) { - return self->PushTextureID(texture_id); + return self->PushTexture(tex_ref); } -CIMGUI_API void ImDrawList_PopTextureID(ImDrawList* self) +CIMGUI_API void ImDrawList_PopTexture(ImDrawList* self) { - return self->PopTextureID(); + return self->PopTexture(); } CIMGUI_API void ImDrawList_GetClipRectMin(ImVec2 *pOut,ImDrawList* self) { @@ -2263,17 +2370,17 @@ CIMGUI_API void ImDrawList_AddConcavePolyFilled(ImDrawList* self,const ImVec2* p { return self->AddConcavePolyFilled(points,num_points,col); } -CIMGUI_API void ImDrawList_AddImage(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col) +CIMGUI_API void ImDrawList_AddImage(ImDrawList* self,ImTextureRef tex_ref,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col) { - return self->AddImage(user_texture_id,p_min,p_max,uv_min,uv_max,col); + return self->AddImage(tex_ref,p_min,p_max,uv_min,uv_max,col); } -CIMGUI_API void ImDrawList_AddImageQuad(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,const ImVec2 uv1,const ImVec2 uv2,const ImVec2 uv3,const ImVec2 uv4,ImU32 col) +CIMGUI_API void ImDrawList_AddImageQuad(ImDrawList* self,ImTextureRef tex_ref,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,const ImVec2 uv1,const ImVec2 uv2,const ImVec2 uv3,const ImVec2 uv4,ImU32 col) { - return self->AddImageQuad(user_texture_id,p1,p2,p3,p4,uv1,uv2,uv3,uv4,col); + return self->AddImageQuad(tex_ref,p1,p2,p3,p4,uv1,uv2,uv3,uv4,col); } -CIMGUI_API void ImDrawList_AddImageRounded(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col,float rounding,ImDrawFlags flags) +CIMGUI_API void ImDrawList_AddImageRounded(ImDrawList* self,ImTextureRef tex_ref,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col,float rounding,ImDrawFlags flags) { - return self->AddImageRounded(user_texture_id,p_min,p_max,uv_min,uv_max,col,rounding,flags); + return self->AddImageRounded(tex_ref,p_min,p_max,uv_min,uv_max,col,rounding,flags); } CIMGUI_API void ImDrawList_PathClear(ImDrawList* self) { @@ -2379,6 +2486,10 @@ CIMGUI_API void ImDrawList_PrimVtx(ImDrawList* self,const ImVec2 pos,const ImVec { return self->PrimVtx(pos,uv,col); } +CIMGUI_API void ImDrawList__SetDrawListSharedData(ImDrawList* self,ImDrawListSharedData* data) +{ + return self->_SetDrawListSharedData(data); +} CIMGUI_API void ImDrawList__ResetForNewFrame(ImDrawList* self) { return self->_ResetForNewFrame(); @@ -2399,17 +2510,17 @@ CIMGUI_API void ImDrawList__OnChangedClipRect(ImDrawList* self) { return self->_OnChangedClipRect(); } -CIMGUI_API void ImDrawList__OnChangedTextureID(ImDrawList* self) +CIMGUI_API void ImDrawList__OnChangedTexture(ImDrawList* self) { - return self->_OnChangedTextureID(); + return self->_OnChangedTexture(); } CIMGUI_API void ImDrawList__OnChangedVtxOffset(ImDrawList* self) { return self->_OnChangedVtxOffset(); } -CIMGUI_API void ImDrawList__SetTextureID(ImDrawList* self,ImTextureID texture_id) +CIMGUI_API void ImDrawList__SetTexture(ImDrawList* self,ImTextureRef tex_ref) { - return self->_SetTextureID(texture_id); + return self->_SetTexture(tex_ref); } CIMGUI_API int ImDrawList__CalcCircleAutoSegmentCount(ImDrawList* self,float radius) { @@ -2447,6 +2558,54 @@ CIMGUI_API void ImDrawData_ScaleClipRects(ImDrawData* self,const ImVec2 fb_scale { return self->ScaleClipRects(fb_scale); } +CIMGUI_API ImTextureData* ImTextureData_ImTextureData(void) +{ + return IM_NEW(ImTextureData)(); +} +CIMGUI_API void ImTextureData_destroy(ImTextureData* self) +{ + IM_DELETE(self); +} +CIMGUI_API void ImTextureData_Create(ImTextureData* self,ImTextureFormat format,int w,int h) +{ + return self->Create(format,w,h); +} +CIMGUI_API void ImTextureData_DestroyPixels(ImTextureData* self) +{ + return self->DestroyPixels(); +} +CIMGUI_API void* ImTextureData_GetPixels(ImTextureData* self) +{ + return self->GetPixels(); +} +CIMGUI_API void* ImTextureData_GetPixelsAt(ImTextureData* self,int x,int y) +{ + return self->GetPixelsAt(x,y); +} +CIMGUI_API int ImTextureData_GetSizeInBytes(ImTextureData* self) +{ + return self->GetSizeInBytes(); +} +CIMGUI_API int ImTextureData_GetPitch(ImTextureData* self) +{ + return self->GetPitch(); +} +CIMGUI_API void ImTextureData_GetTexRef(ImTextureRef *pOut,ImTextureData* self) +{ + *pOut = self->GetTexRef(); +} +CIMGUI_API ImTextureID ImTextureData_GetTexID(ImTextureData* self) +{ + return self->GetTexID(); +} +CIMGUI_API void ImTextureData_SetTexID(ImTextureData* self,ImTextureID tex_id) +{ + return self->SetTexID(tex_id); +} +CIMGUI_API void ImTextureData_SetStatus(ImTextureData* self,ImTextureStatus status) +{ + return self->SetStatus(status); +} CIMGUI_API ImFontConfig* ImFontConfig_ImFontConfig(void) { return IM_NEW(ImFontConfig)(); @@ -2455,6 +2614,14 @@ CIMGUI_API void ImFontConfig_destroy(ImFontConfig* self) { IM_DELETE(self); } +CIMGUI_API ImFontGlyph* ImFontGlyph_ImFontGlyph(void) +{ + return IM_NEW(ImFontGlyph)(); +} +CIMGUI_API void ImFontGlyph_destroy(ImFontGlyph* self) +{ + IM_DELETE(self); +} CIMGUI_API ImFontGlyphRangesBuilder* ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder(void) { return IM_NEW(ImFontGlyphRangesBuilder)(); @@ -2491,18 +2658,14 @@ CIMGUI_API void ImFontGlyphRangesBuilder_BuildRanges(ImFontGlyphRangesBuilder* s { return self->BuildRanges(out_ranges); } -CIMGUI_API ImFontAtlasCustomRect* ImFontAtlasCustomRect_ImFontAtlasCustomRect(void) +CIMGUI_API ImFontAtlasRect* ImFontAtlasRect_ImFontAtlasRect(void) { - return IM_NEW(ImFontAtlasCustomRect)(); + return IM_NEW(ImFontAtlasRect)(); } -CIMGUI_API void ImFontAtlasCustomRect_destroy(ImFontAtlasCustomRect* self) +CIMGUI_API void ImFontAtlasRect_destroy(ImFontAtlasRect* self) { IM_DELETE(self); } -CIMGUI_API bool ImFontAtlasCustomRect_IsPacked(ImFontAtlasCustomRect* self) -{ - return self->IsPacked(); -} CIMGUI_API ImFontAtlas* ImFontAtlas_ImFontAtlas(void) { return IM_NEW(ImFontAtlas)(); @@ -2535,6 +2698,18 @@ CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* { return self->AddFontFromMemoryCompressedBase85TTF(compressed_font_data_base85,size_pixels,font_cfg,glyph_ranges); } +CIMGUI_API void ImFontAtlas_RemoveFont(ImFontAtlas* self,ImFont* font) +{ + return self->RemoveFont(font); +} +CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* self) +{ + return self->Clear(); +} +CIMGUI_API void ImFontAtlas_CompactCache(ImFontAtlas* self) +{ + return self->CompactCache(); +} CIMGUI_API void ImFontAtlas_ClearInputData(ImFontAtlas* self) { return self->ClearInputData(); @@ -2547,81 +2722,49 @@ CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* self) { return self->ClearTexData(); } -CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* self) -{ - return self->Clear(); -} -CIMGUI_API bool ImFontAtlas_Build(ImFontAtlas* self) -{ - return self->Build(); -} -CIMGUI_API void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self,unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel) -{ - return self->GetTexDataAsAlpha8(out_pixels,out_width,out_height,out_bytes_per_pixel); -} -CIMGUI_API void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* self,unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel) -{ - return self->GetTexDataAsRGBA32(out_pixels,out_width,out_height,out_bytes_per_pixel); -} -CIMGUI_API bool ImFontAtlas_IsBuilt(ImFontAtlas* self) -{ - return self->IsBuilt(); -} -CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas* self,ImTextureID id) -{ - return self->SetTexID(id); -} CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesDefault(ImFontAtlas* self) { return self->GetGlyphRangesDefault(); } -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesGreek(ImFontAtlas* self) +CIMGUI_API ImFontAtlasRectId ImFontAtlas_AddCustomRect(ImFontAtlas* self,int width,int height,ImFontAtlasRect* out_r) { - return self->GetGlyphRangesGreek(); + return self->AddCustomRect(width,height,out_r); } -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesKorean(ImFontAtlas* self) +CIMGUI_API void ImFontAtlas_RemoveCustomRect(ImFontAtlas* self,ImFontAtlasRectId id) { - return self->GetGlyphRangesKorean(); + return self->RemoveCustomRect(id); } -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesJapanese(ImFontAtlas* self) +CIMGUI_API bool ImFontAtlas_GetCustomRect(ImFontAtlas* self,ImFontAtlasRectId id,ImFontAtlasRect* out_r) { - return self->GetGlyphRangesJapanese(); + return self->GetCustomRect(id,out_r); } -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self) +CIMGUI_API ImFontBaked* ImFontBaked_ImFontBaked(void) { - return self->GetGlyphRangesChineseFull(); + return IM_NEW(ImFontBaked)(); } -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(ImFontAtlas* self) +CIMGUI_API void ImFontBaked_destroy(ImFontBaked* self) { - return self->GetGlyphRangesChineseSimplifiedCommon(); + IM_DELETE(self); } -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesCyrillic(ImFontAtlas* self) +CIMGUI_API void ImFontBaked_ClearOutputData(ImFontBaked* self) { - return self->GetGlyphRangesCyrillic(); + return self->ClearOutputData(); } -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self) +CIMGUI_API ImFontGlyph* ImFontBaked_FindGlyph(ImFontBaked* self,ImWchar c) { - return self->GetGlyphRangesThai(); + return self->FindGlyph(c); } -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesVietnamese(ImFontAtlas* self) +CIMGUI_API ImFontGlyph* ImFontBaked_FindGlyphNoFallback(ImFontBaked* self,ImWchar c) { - return self->GetGlyphRangesVietnamese(); + return self->FindGlyphNoFallback(c); } -CIMGUI_API int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self,int width,int height) +CIMGUI_API float ImFontBaked_GetCharAdvance(ImFontBaked* self,ImWchar c) { - return self->AddCustomRectRegular(width,height); + return self->GetCharAdvance(c); } -CIMGUI_API int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self,ImFont* font,ImWchar id,int width,int height,float advance_x,const ImVec2 offset) +CIMGUI_API bool ImFontBaked_IsGlyphLoaded(ImFontBaked* self,ImWchar c) { - return self->AddCustomRectFontGlyph(font,id,width,height,advance_x,offset); -} -CIMGUI_API ImFontAtlasCustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self,int index) -{ - return self->GetCustomRectByIndex(index); -} -CIMGUI_API void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self,const ImFontAtlasCustomRect* rect,ImVec2* out_uv_min,ImVec2* out_uv_max) -{ - return self->CalcCustomRectUV(rect,out_uv_min,out_uv_max); + return self->IsGlyphLoaded(c); } CIMGUI_API ImFont* ImFont_ImFont(void) { @@ -2631,17 +2774,9 @@ CIMGUI_API void ImFont_destroy(ImFont* self) { IM_DELETE(self); } -CIMGUI_API ImFontGlyph* ImFont_FindGlyph(ImFont* self,ImWchar c) +CIMGUI_API bool ImFont_IsGlyphInFont(ImFont* self,ImWchar c) { - return self->FindGlyph(c); -} -CIMGUI_API ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self,ImWchar c) -{ - return self->FindGlyphNoFallback(c); -} -CIMGUI_API float ImFont_GetCharAdvance(ImFont* self,ImWchar c) -{ - return self->GetCharAdvance(c); + return self->IsGlyphInFont(c); } CIMGUI_API bool ImFont_IsLoaded(ImFont* self) { @@ -2651,41 +2786,33 @@ CIMGUI_API const char* ImFont_GetDebugName(ImFont* self) { return self->GetDebugName(); } +CIMGUI_API ImFontBaked* ImFont_GetFontBaked(ImFont* self,float font_size,float density) +{ + return self->GetFontBaked(font_size,density); +} CIMGUI_API void ImFont_CalcTextSizeA(ImVec2 *pOut,ImFont* self,float size,float max_width,float wrap_width,const char* text_begin,const char* text_end,const char** remaining) { *pOut = self->CalcTextSizeA(size,max_width,wrap_width,text_begin,text_end,remaining); } -CIMGUI_API const char* ImFont_CalcWordWrapPositionA(ImFont* self,float scale,const char* text,const char* text_end,float wrap_width) +CIMGUI_API const char* ImFont_CalcWordWrapPosition(ImFont* self,float size,const char* text,const char* text_end,float wrap_width) { - return self->CalcWordWrapPositionA(scale,text,text_end,wrap_width); + return self->CalcWordWrapPosition(size,text,text_end,wrap_width); } -CIMGUI_API void ImFont_RenderChar(ImFont* self,ImDrawList* draw_list,float size,const ImVec2 pos,ImU32 col,ImWchar c) +CIMGUI_API void ImFont_RenderChar(ImFont* self,ImDrawList* draw_list,float size,const ImVec2 pos,ImU32 col,ImWchar c,const ImVec4* cpu_fine_clip) { - return self->RenderChar(draw_list,size,pos,col,c); + return self->RenderChar(draw_list,size,pos,col,c,cpu_fine_clip); } CIMGUI_API void ImFont_RenderText(ImFont* self,ImDrawList* draw_list,float size,const ImVec2 pos,ImU32 col,const ImVec4 clip_rect,const char* text_begin,const char* text_end,float wrap_width,bool cpu_fine_clip) { return self->RenderText(draw_list,size,pos,col,clip_rect,text_begin,text_end,wrap_width,cpu_fine_clip); } -CIMGUI_API void ImFont_BuildLookupTable(ImFont* self) -{ - return self->BuildLookupTable(); -} CIMGUI_API void ImFont_ClearOutputData(ImFont* self) { return self->ClearOutputData(); } -CIMGUI_API void ImFont_GrowIndex(ImFont* self,int new_size) +CIMGUI_API void ImFont_AddRemapChar(ImFont* self,ImWchar from_codepoint,ImWchar to_codepoint) { - return self->GrowIndex(new_size); -} -CIMGUI_API void ImFont_AddGlyph(ImFont* self,const ImFontConfig* src_cfg,ImWchar c,float x0,float y0,float x1,float y1,float u0,float v0,float u1,float v1,float advance_x) -{ - return self->AddGlyph(src_cfg,c,x0,y0,x1,y1,u0,v0,u1,v1,advance_x); -} -CIMGUI_API void ImFont_AddRemapChar(ImFont* self,ImWchar dst,ImWchar src,bool overwrite_dst) -{ - return self->AddRemapChar(dst,src,overwrite_dst); + return self->AddRemapChar(from_codepoint,to_codepoint); } CIMGUI_API bool ImFont_IsGlyphRangeUnused(ImFont* self,unsigned int c_begin,unsigned int c_last) { @@ -2771,6 +2898,10 @@ CIMGUI_API char* igImStrdup(const char* str) { return ImStrdup(str); } +CIMGUI_API void* igImMemdup(const void* src,size_t size) +{ + return ImMemdup(src,size); +} CIMGUI_API char* igImStrdupcpy(char* dst,size_t* p_dst_size,const char* str) { return ImStrdupcpy(dst,p_dst_size,str); @@ -2827,6 +2958,12 @@ CIMGUI_API int igImFormatString(char* buf,size_t buf_size,const char* fmt,...) va_end(args); return ret; } +#ifdef CIMGUI_VARGS0 +CIMGUI_API int igImFormatString0(char* buf,size_t buf_size,const char* fmt) +{ + return igImFormatString(buf,buf_size,fmt); +} +#endif CIMGUI_API int igImFormatStringV(char* buf,size_t buf_size,const char* fmt,va_list args) { return ImFormatStringV(buf,buf_size,fmt,args); @@ -2838,6 +2975,12 @@ CIMGUI_API void igImFormatStringToTempBuffer(const char** out_buf,const char** o ImFormatStringToTempBufferV(out_buf,out_buf_end,fmt,args); va_end(args); } +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igImFormatStringToTempBuffer0(const char** out_buf,const char** out_buf_end,const char* fmt) +{ + return igImFormatStringToTempBuffer(out_buf,out_buf_end,fmt); +} +#endif CIMGUI_API void igImFormatStringToTempBufferV(const char** out_buf,const char** out_buf_end,const char* fmt,va_list args) { return ImFormatStringToTempBufferV(out_buf,out_buf_end,fmt,args); @@ -3026,6 +3169,14 @@ CIMGUI_API void igImFloor_Vec2(ImVec2 *pOut,const ImVec2 v) { *pOut = ImFloor(v); } +CIMGUI_API float igImTrunc64(float f) +{ + return ImTrunc64(f); +} +CIMGUI_API float igImRound64(float f) +{ + return ImRound64(f); +} CIMGUI_API int igImModPositive(int a,int b) { return ImModPositive(a,b); @@ -3110,6 +3261,18 @@ CIMGUI_API ImVec1* ImVec1_ImVec1_Float(float _x) { return IM_NEW(ImVec1)(_x); } +CIMGUI_API ImVec2i* ImVec2i_ImVec2i_Nil(void) +{ + return IM_NEW(ImVec2i)(); +} +CIMGUI_API void ImVec2i_destroy(ImVec2i* self) +{ + IM_DELETE(self); +} +CIMGUI_API ImVec2i* ImVec2i_ImVec2i_Int(int _x,int _y) +{ + return IM_NEW(ImVec2i)(_x,_y); +} CIMGUI_API ImVec2ih* ImVec2ih_ImVec2ih_Nil(void) { return IM_NEW(ImVec2ih)(); @@ -3774,10 +3937,6 @@ CIMGUI_API void ImGuiWindow_Rect(ImRect *pOut,ImGuiWindow* self) { *pOut = self->Rect(); } -CIMGUI_API float ImGuiWindow_CalcFontSize(ImGuiWindow* self) -{ - return self->CalcFontSize(); -} CIMGUI_API void ImGuiWindow_TitleBarRect(ImRect *pOut,ImGuiWindow* self) { *pOut = self->TitleBarRect(); @@ -3982,9 +4141,41 @@ CIMGUI_API void igSetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags) { return ImGui::SetNextWindowRefreshPolicy(flags); } -CIMGUI_API void igSetCurrentFont(ImFont* font) +CIMGUI_API void igRegisterUserTexture(ImTextureData* tex) { - return ImGui::SetCurrentFont(font); + return ImGui::RegisterUserTexture(tex); +} +CIMGUI_API void igUnregisterUserTexture(ImTextureData* tex) +{ + return ImGui::UnregisterUserTexture(tex); +} +CIMGUI_API void igRegisterFontAtlas(ImFontAtlas* atlas) +{ + return ImGui::RegisterFontAtlas(atlas); +} +CIMGUI_API void igUnregisterFontAtlas(ImFontAtlas* atlas) +{ + return ImGui::UnregisterFontAtlas(atlas); +} +CIMGUI_API void igSetCurrentFont(ImFont* font,float font_size_before_scaling,float font_size_after_scaling) +{ + return ImGui::SetCurrentFont(font,font_size_before_scaling,font_size_after_scaling); +} +CIMGUI_API void igUpdateCurrentFontSize(float restore_font_size_after_scaling) +{ + return ImGui::UpdateCurrentFontSize(restore_font_size_after_scaling); +} +CIMGUI_API void igSetFontRasterizerDensity(float rasterizer_density) +{ + return ImGui::SetFontRasterizerDensity(rasterizer_density); +} +CIMGUI_API float igGetFontRasterizerDensity() +{ + return ImGui::GetFontRasterizerDensity(); +} +CIMGUI_API float igGetRoundedFontSize(float size) +{ + return ImGui::GetRoundedFontSize(size); } CIMGUI_API ImFont* igGetDefaultFont() { @@ -3994,6 +4185,10 @@ CIMGUI_API void igPushPasswordFont() { return ImGui::PushPasswordFont(); } +CIMGUI_API void igPopPasswordFont() +{ + return ImGui::PopPasswordFont(); +} CIMGUI_API ImDrawList* igGetForegroundDrawList_WindowPtr(ImGuiWindow* window) { return ImGui::GetForegroundDrawList(window); @@ -4022,9 +4217,9 @@ CIMGUI_API void igUpdateInputEvents(bool trickle_fast_inputs) { return ImGui::UpdateInputEvents(trickle_fast_inputs); } -CIMGUI_API void igUpdateHoveredWindowAndCaptureFlags() +CIMGUI_API void igUpdateHoveredWindowAndCaptureFlags(const ImVec2 mouse_pos) { - return ImGui::UpdateHoveredWindowAndCaptureFlags(); + return ImGui::UpdateHoveredWindowAndCaptureFlags(mouse_pos); } CIMGUI_API void igFindHoveredWindowEx(const ImVec2 pos,bool find_first_and_in_any_viewport,ImGuiWindow** out_hovered_window,ImGuiWindow** out_hovered_window_under_moving_window) { @@ -4382,7 +4577,7 @@ CIMGUI_API void igNavMoveRequestResolveWithLastItem(ImGuiNavItemData* result) { return ImGui::NavMoveRequestResolveWithLastItem(result); } -CIMGUI_API void igNavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result,ImGuiTreeNodeStackData* tree_node_data) +CIMGUI_API void igNavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result,const ImGuiTreeNodeStackData* tree_node_data) { return ImGui::NavMoveRequestResolveWithPastTreeNode(result,tree_node_data); } @@ -4746,6 +4941,14 @@ CIMGUI_API void igTablePopBackgroundChannel() { return ImGui::TablePopBackgroundChannel(); } +CIMGUI_API void igTablePushColumnChannel(int column_n) +{ + return ImGui::TablePushColumnChannel(column_n); +} +CIMGUI_API void igTablePopColumnChannel() +{ + return ImGui::TablePopColumnChannel(); +} CIMGUI_API void igTableAngledHeadersRowEx(ImGuiID row_id,float angle,float max_label_width,const ImGuiTableHeaderData* data,int data_count) { return ImGui::TableAngledHeadersRowEx(row_id,angle,max_label_width,data,data_count); @@ -5010,9 +5213,9 @@ CIMGUI_API void igRenderTextClippedEx(ImDrawList* draw_list,const ImVec2 pos_min { return ImGui::RenderTextClippedEx(draw_list,pos_min,pos_max,text,text_end,text_size_if_known,align,clip_rect); } -CIMGUI_API void igRenderTextEllipsis(ImDrawList* draw_list,const ImVec2 pos_min,const ImVec2 pos_max,float clip_max_x,float ellipsis_max_x,const char* text,const char* text_end,const ImVec2* text_size_if_known) +CIMGUI_API void igRenderTextEllipsis(ImDrawList* draw_list,const ImVec2 pos_min,const ImVec2 pos_max,float ellipsis_max_x,const char* text,const char* text_end,const ImVec2* text_size_if_known) { - return ImGui::RenderTextEllipsis(draw_list,pos_min,pos_max,clip_max_x,ellipsis_max_x,text,text_end,text_size_if_known); + return ImGui::RenderTextEllipsis(draw_list,pos_min,pos_max,ellipsis_max_x,text,text_end,text_size_if_known); } CIMGUI_API void igRenderFrame(ImVec2 p_min,ImVec2 p_max,ImU32 fill_col,bool borders,float rounding) { @@ -5066,6 +5269,23 @@ CIMGUI_API void igTextEx(const char* text,const char* text_end,ImGuiTextFlags fl { return ImGui::TextEx(text,text_end,flags); } +CIMGUI_API void igTextAligned(float align_x,float size_x,const char* fmt,...) +{ + va_list args; + va_start(args, fmt); + ImGui::TextAlignedV(align_x,size_x,fmt,args); + va_end(args); +} +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igTextAligned0(float align_x,float size_x,const char* fmt) +{ + return igTextAligned(align_x,size_x,fmt); +} +#endif +CIMGUI_API void igTextAlignedV(float align_x,float size_x,const char* fmt,va_list args) +{ + return ImGui::TextAlignedV(align_x,size_x,fmt,args); +} CIMGUI_API bool igButtonEx(const char* label,const ImVec2 size_arg,ImGuiButtonFlags flags) { return ImGui::ButtonEx(label,size_arg,flags); @@ -5074,9 +5294,9 @@ CIMGUI_API bool igArrowButtonEx(const char* str_id,ImGuiDir dir,ImVec2 size_arg, { return ImGui::ArrowButtonEx(str_id,dir,size_arg,flags); } -CIMGUI_API bool igImageButtonEx(ImGuiID id,ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags) +CIMGUI_API bool igImageButtonEx(ImGuiID id,ImTextureRef tex_ref,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags) { - return ImGui::ImageButtonEx(id,user_texture_id,image_size,uv0,uv1,bg_col,tint_col,flags); + return ImGui::ImageButtonEx(id,tex_ref,image_size,uv0,uv1,bg_col,tint_col,flags); } CIMGUI_API void igSeparatorEx(ImGuiSeparatorFlags flags,float thickness) { @@ -5146,6 +5366,14 @@ CIMGUI_API bool igTreeNodeBehavior(ImGuiID id,ImGuiTreeNodeFlags flags,const cha { return ImGui::TreeNodeBehavior(id,flags,label,label_end); } +CIMGUI_API void igTreeNodeDrawLineToChildNode(const ImVec2 target_pos) +{ + return ImGui::TreeNodeDrawLineToChildNode(target_pos); +} +CIMGUI_API void igTreeNodeDrawLineToTreePop(const ImGuiTreeNodeStackData* data) +{ + return ImGui::TreeNodeDrawLineToTreePop(data); +} CIMGUI_API void igTreePushOverrideID(ImGuiID id) { return ImGui::TreePushOverrideID(id); @@ -5362,10 +5590,18 @@ CIMGUI_API void igDebugNodeFont(ImFont* font) { return ImGui::DebugNodeFont(font); } +CIMGUI_API void igDebugNodeFontGlyphesForSrcMask(ImFont* font,ImFontBaked* baked,int src_mask) +{ + return ImGui::DebugNodeFontGlyphesForSrcMask(font,baked,src_mask); +} CIMGUI_API void igDebugNodeFontGlyph(ImFont* font,const ImFontGlyph* glyph) { return ImGui::DebugNodeFontGlyph(font,glyph); } +CIMGUI_API void igDebugNodeTexture(ImTextureData* tex,int int_id,const ImFontAtlasRect* highlight_rect) +{ + return ImGui::DebugNodeTexture(tex,int_id,highlight_rect); +} CIMGUI_API void igDebugNodeStorage(ImGuiStorage* storage,const char* label) { return ImGui::DebugNodeStorage(storage,label); @@ -5422,58 +5658,250 @@ CIMGUI_API void igDebugRenderViewportThumbnail(ImDrawList* draw_list,ImGuiViewpo { return ImGui::DebugRenderViewportThumbnail(draw_list,viewport,bb); } -CIMGUI_API const ImFontBuilderIO* igImFontAtlasGetBuilderForStbTruetype() +CIMGUI_API ImFontLoader* ImFontLoader_ImFontLoader(void) { - return ImFontAtlasGetBuilderForStbTruetype(); + return IM_NEW(ImFontLoader)(); } -CIMGUI_API void igImFontAtlasUpdateSourcesPointers(ImFontAtlas* atlas) +CIMGUI_API void ImFontLoader_destroy(ImFontLoader* self) { - return ImFontAtlasUpdateSourcesPointers(atlas); + IM_DELETE(self); +} +CIMGUI_API const ImFontLoader* igImFontAtlasGetFontLoaderForStbTruetype() +{ + return ImFontAtlasGetFontLoaderForStbTruetype(); +} +CIMGUI_API int igImFontAtlasRectId_GetIndex(ImFontAtlasRectId id) +{ + return ImFontAtlasRectId_GetIndex(id); +} +CIMGUI_API int igImFontAtlasRectId_GetGeneration(ImFontAtlasRectId id) +{ + return ImFontAtlasRectId_GetGeneration(id); +} +CIMGUI_API ImFontAtlasRectId igImFontAtlasRectId_Make(int index_idx,int gen_idx) +{ + return ImFontAtlasRectId_Make(index_idx,gen_idx); +} +CIMGUI_API ImFontAtlasBuilder* ImFontAtlasBuilder_ImFontAtlasBuilder(void) +{ + return IM_NEW(ImFontAtlasBuilder)(); +} +CIMGUI_API void ImFontAtlasBuilder_destroy(ImFontAtlasBuilder* self) +{ + IM_DELETE(self); } CIMGUI_API void igImFontAtlasBuildInit(ImFontAtlas* atlas) { return ImFontAtlasBuildInit(atlas); } -CIMGUI_API void igImFontAtlasBuildSetupFont(ImFontAtlas* atlas,ImFont* font,ImFontConfig* src,float ascent,float descent) +CIMGUI_API void igImFontAtlasBuildDestroy(ImFontAtlas* atlas) { - return ImFontAtlasBuildSetupFont(atlas,font,src,ascent,descent); + return ImFontAtlasBuildDestroy(atlas); } -CIMGUI_API void igImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas,void* stbrp_context_opaque) +CIMGUI_API void igImFontAtlasBuildMain(ImFontAtlas* atlas) { - return ImFontAtlasBuildPackCustomRects(atlas,stbrp_context_opaque); + return ImFontAtlasBuildMain(atlas); } -CIMGUI_API void igImFontAtlasBuildFinish(ImFontAtlas* atlas) +CIMGUI_API void igImFontAtlasBuildSetupFontLoader(ImFontAtlas* atlas,const ImFontLoader* font_loader) { - return ImFontAtlasBuildFinish(atlas); + return ImFontAtlasBuildSetupFontLoader(atlas,font_loader); } -CIMGUI_API void igImFontAtlasBuildRender8bppRectFromString(ImFontAtlas* atlas,int x,int y,int w,int h,const char* in_str,char in_marker_char,unsigned char in_marker_pixel_value) +CIMGUI_API void igImFontAtlasBuildUpdatePointers(ImFontAtlas* atlas) { - return ImFontAtlasBuildRender8bppRectFromString(atlas,x,y,w,h,in_str,in_marker_char,in_marker_pixel_value); + return ImFontAtlasBuildUpdatePointers(atlas); } -CIMGUI_API void igImFontAtlasBuildRender32bppRectFromString(ImFontAtlas* atlas,int x,int y,int w,int h,const char* in_str,char in_marker_char,unsigned int in_marker_pixel_value) +CIMGUI_API void igImFontAtlasBuildRenderBitmapFromString(ImFontAtlas* atlas,int x,int y,int w,int h,const char* in_str,char in_marker_char) { - return ImFontAtlasBuildRender32bppRectFromString(atlas,x,y,w,h,in_str,in_marker_char,in_marker_pixel_value); + return ImFontAtlasBuildRenderBitmapFromString(atlas,x,y,w,h,in_str,in_marker_char); } -CIMGUI_API void igImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256],float in_multiply_factor) +CIMGUI_API void igImFontAtlasBuildClear(ImFontAtlas* atlas) { - return ImFontAtlasBuildMultiplyCalcLookupTable(out_table,in_multiply_factor); + return ImFontAtlasBuildClear(atlas); } -CIMGUI_API void igImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256],unsigned char* pixels,int x,int y,int w,int h,int stride) +CIMGUI_API ImTextureData* igImFontAtlasTextureAdd(ImFontAtlas* atlas,int w,int h) { - return ImFontAtlasBuildMultiplyRectAlpha8(table,pixels,x,y,w,h,stride); + return ImFontAtlasTextureAdd(atlas,w,h); } -CIMGUI_API void igImFontAtlasBuildGetOversampleFactors(const ImFontConfig* src,int* out_oversample_h,int* out_oversample_v) +CIMGUI_API void igImFontAtlasTextureMakeSpace(ImFontAtlas* atlas) { - return ImFontAtlasBuildGetOversampleFactors(src,out_oversample_h,out_oversample_v); + return ImFontAtlasTextureMakeSpace(atlas); +} +CIMGUI_API void igImFontAtlasTextureRepack(ImFontAtlas* atlas,int w,int h) +{ + return ImFontAtlasTextureRepack(atlas,w,h); +} +CIMGUI_API void igImFontAtlasTextureGrow(ImFontAtlas* atlas,int old_w,int old_h) +{ + return ImFontAtlasTextureGrow(atlas,old_w,old_h); +} +CIMGUI_API void igImFontAtlasTextureCompact(ImFontAtlas* atlas) +{ + return ImFontAtlasTextureCompact(atlas); +} +CIMGUI_API void igImFontAtlasTextureGetSizeEstimate(ImVec2i *pOut,ImFontAtlas* atlas) +{ + *pOut = ImFontAtlasTextureGetSizeEstimate(atlas); +} +CIMGUI_API void igImFontAtlasBuildSetupFontSpecialGlyphs(ImFontAtlas* atlas,ImFont* font,ImFontConfig* src) +{ + return ImFontAtlasBuildSetupFontSpecialGlyphs(atlas,font,src); +} +CIMGUI_API void igImFontAtlasBuildLegacyPreloadAllGlyphRanges(ImFontAtlas* atlas) +{ + return ImFontAtlasBuildLegacyPreloadAllGlyphRanges(atlas); +} +CIMGUI_API void igImFontAtlasBuildGetOversampleFactors(ImFontConfig* src,ImFontBaked* baked,int* out_oversample_h,int* out_oversample_v) +{ + return ImFontAtlasBuildGetOversampleFactors(src,baked,out_oversample_h,out_oversample_v); +} +CIMGUI_API void igImFontAtlasBuildDiscardBakes(ImFontAtlas* atlas,int unused_frames) +{ + return ImFontAtlasBuildDiscardBakes(atlas,unused_frames); +} +CIMGUI_API bool igImFontAtlasFontSourceInit(ImFontAtlas* atlas,ImFontConfig* src) +{ + return ImFontAtlasFontSourceInit(atlas,src); +} +CIMGUI_API void igImFontAtlasFontSourceAddToFont(ImFontAtlas* atlas,ImFont* font,ImFontConfig* src) +{ + return ImFontAtlasFontSourceAddToFont(atlas,font,src); +} +CIMGUI_API void igImFontAtlasFontDestroySourceData(ImFontAtlas* atlas,ImFontConfig* src) +{ + return ImFontAtlasFontDestroySourceData(atlas,src); +} +CIMGUI_API bool igImFontAtlasFontInitOutput(ImFontAtlas* atlas,ImFont* font) +{ + return ImFontAtlasFontInitOutput(atlas,font); +} +CIMGUI_API void igImFontAtlasFontDestroyOutput(ImFontAtlas* atlas,ImFont* font) +{ + return ImFontAtlasFontDestroyOutput(atlas,font); +} +CIMGUI_API void igImFontAtlasFontDiscardBakes(ImFontAtlas* atlas,ImFont* font,int unused_frames) +{ + return ImFontAtlasFontDiscardBakes(atlas,font,unused_frames); +} +CIMGUI_API ImGuiID igImFontAtlasBakedGetId(ImGuiID font_id,float baked_size,float rasterizer_density) +{ + return ImFontAtlasBakedGetId(font_id,baked_size,rasterizer_density); +} +CIMGUI_API ImFontBaked* igImFontAtlasBakedGetOrAdd(ImFontAtlas* atlas,ImFont* font,float font_size,float font_rasterizer_density) +{ + return ImFontAtlasBakedGetOrAdd(atlas,font,font_size,font_rasterizer_density); +} +CIMGUI_API ImFontBaked* igImFontAtlasBakedGetClosestMatch(ImFontAtlas* atlas,ImFont* font,float font_size,float font_rasterizer_density) +{ + return ImFontAtlasBakedGetClosestMatch(atlas,font,font_size,font_rasterizer_density); +} +CIMGUI_API ImFontBaked* igImFontAtlasBakedAdd(ImFontAtlas* atlas,ImFont* font,float font_size,float font_rasterizer_density,ImGuiID baked_id) +{ + return ImFontAtlasBakedAdd(atlas,font,font_size,font_rasterizer_density,baked_id); +} +CIMGUI_API void igImFontAtlasBakedDiscard(ImFontAtlas* atlas,ImFont* font,ImFontBaked* baked) +{ + return ImFontAtlasBakedDiscard(atlas,font,baked); +} +CIMGUI_API ImFontGlyph* igImFontAtlasBakedAddFontGlyph(ImFontAtlas* atlas,ImFontBaked* baked,ImFontConfig* src,const ImFontGlyph* in_glyph) +{ + return ImFontAtlasBakedAddFontGlyph(atlas,baked,src,in_glyph); +} +CIMGUI_API void igImFontAtlasBakedDiscardFontGlyph(ImFontAtlas* atlas,ImFont* font,ImFontBaked* baked,ImFontGlyph* glyph) +{ + return ImFontAtlasBakedDiscardFontGlyph(atlas,font,baked,glyph); +} +CIMGUI_API void igImFontAtlasBakedSetFontGlyphBitmap(ImFontAtlas* atlas,ImFontBaked* baked,ImFontConfig* src,ImFontGlyph* glyph,ImTextureRect* r,const unsigned char* src_pixels,ImTextureFormat src_fmt,int src_pitch) +{ + return ImFontAtlasBakedSetFontGlyphBitmap(atlas,baked,src,glyph,r,src_pixels,src_fmt,src_pitch); +} +CIMGUI_API void igImFontAtlasPackInit(ImFontAtlas* atlas) +{ + return ImFontAtlasPackInit(atlas); +} +CIMGUI_API ImFontAtlasRectId igImFontAtlasPackAddRect(ImFontAtlas* atlas,int w,int h,ImFontAtlasRectEntry* overwrite_entry) +{ + return ImFontAtlasPackAddRect(atlas,w,h,overwrite_entry); +} +CIMGUI_API ImTextureRect* igImFontAtlasPackGetRect(ImFontAtlas* atlas,ImFontAtlasRectId id) +{ + return ImFontAtlasPackGetRect(atlas,id); +} +CIMGUI_API ImTextureRect* igImFontAtlasPackGetRectSafe(ImFontAtlas* atlas,ImFontAtlasRectId id) +{ + return ImFontAtlasPackGetRectSafe(atlas,id); +} +CIMGUI_API void igImFontAtlasPackDiscardRect(ImFontAtlas* atlas,ImFontAtlasRectId id) +{ + return ImFontAtlasPackDiscardRect(atlas,id); +} +CIMGUI_API void igImFontAtlasUpdateNewFrame(ImFontAtlas* atlas,int frame_count,bool renderer_has_textures) +{ + return ImFontAtlasUpdateNewFrame(atlas,frame_count,renderer_has_textures); +} +CIMGUI_API void igImFontAtlasAddDrawListSharedData(ImFontAtlas* atlas,ImDrawListSharedData* data) +{ + return ImFontAtlasAddDrawListSharedData(atlas,data); +} +CIMGUI_API void igImFontAtlasRemoveDrawListSharedData(ImFontAtlas* atlas,ImDrawListSharedData* data) +{ + return ImFontAtlasRemoveDrawListSharedData(atlas,data); +} +CIMGUI_API void igImFontAtlasUpdateDrawListsTextures(ImFontAtlas* atlas,ImTextureRef old_tex,ImTextureRef new_tex) +{ + return ImFontAtlasUpdateDrawListsTextures(atlas,old_tex,new_tex); +} +CIMGUI_API void igImFontAtlasUpdateDrawListsSharedData(ImFontAtlas* atlas) +{ + return ImFontAtlasUpdateDrawListsSharedData(atlas); +} +CIMGUI_API void igImFontAtlasTextureBlockConvert(const unsigned char* src_pixels,ImTextureFormat src_fmt,int src_pitch,unsigned char* dst_pixels,ImTextureFormat dst_fmt,int dst_pitch,int w,int h) +{ + return ImFontAtlasTextureBlockConvert(src_pixels,src_fmt,src_pitch,dst_pixels,dst_fmt,dst_pitch,w,h); +} +CIMGUI_API void igImFontAtlasTextureBlockPostProcess(ImFontAtlasPostProcessData* data) +{ + return ImFontAtlasTextureBlockPostProcess(data); +} +CIMGUI_API void igImFontAtlasTextureBlockPostProcessMultiply(ImFontAtlasPostProcessData* data,float multiply_factor) +{ + return ImFontAtlasTextureBlockPostProcessMultiply(data,multiply_factor); +} +CIMGUI_API void igImFontAtlasTextureBlockFill(ImTextureData* dst_tex,int dst_x,int dst_y,int w,int h,ImU32 col) +{ + return ImFontAtlasTextureBlockFill(dst_tex,dst_x,dst_y,w,h,col); +} +CIMGUI_API void igImFontAtlasTextureBlockCopy(ImTextureData* src_tex,int src_x,int src_y,ImTextureData* dst_tex,int dst_x,int dst_y,int w,int h) +{ + return ImFontAtlasTextureBlockCopy(src_tex,src_x,src_y,dst_tex,dst_x,dst_y,w,h); +} +CIMGUI_API void igImFontAtlasTextureBlockQueueUpload(ImFontAtlas* atlas,ImTextureData* tex,int x,int y,int w,int h) +{ + return ImFontAtlasTextureBlockQueueUpload(atlas,tex,x,y,w,h); +} +CIMGUI_API int igImTextureDataGetFormatBytesPerPixel(ImTextureFormat format) +{ + return ImTextureDataGetFormatBytesPerPixel(format); +} +CIMGUI_API const char* igImTextureDataGetStatusName(ImTextureStatus status) +{ + return ImTextureDataGetStatusName(status); +} +CIMGUI_API const char* igImTextureDataGetFormatName(ImTextureFormat format) +{ + return ImTextureDataGetFormatName(format); +} +CIMGUI_API void igImFontAtlasDebugLogTextureRequests(ImFontAtlas* atlas) +{ + return ImFontAtlasDebugLogTextureRequests(atlas); } CIMGUI_API bool igImFontAtlasGetMouseCursorTexData(ImFontAtlas* atlas,ImGuiMouseCursor cursor_type,ImVec2* out_offset,ImVec2* out_size,ImVec2 out_uv_border[2],ImVec2 out_uv_fill[2]) { return ImFontAtlasGetMouseCursorTexData(atlas,cursor_type,out_offset,out_size,out_uv_border,out_uv_fill); } #ifdef IMGUI_ENABLE_FREETYPE -CIMGUI_API const ImFontBuilderIO* ImGuiFreeType_GetBuilderForFreeType() +CIMGUI_API const ImFontLoader* ImGuiFreeType_GetFontLoader() { - return ImGuiFreeType::GetBuilderForFreeType(); + return ImGuiFreeType::GetFontLoader(); } CIMGUI_API void ImGuiFreeType_SetAllocatorFunctions(void*(*alloc_func)(size_t sz,void* user_data),void(*free_func)(void* ptr,void* user_data),void* user_data) @@ -5481,21 +5909,17 @@ CIMGUI_API void ImGuiFreeType_SetAllocatorFunctions(void*(*alloc_func)(size_t sz return ImGuiFreeType::SetAllocatorFunctions(alloc_func,free_func,user_data); } +CIMGUI_API bool ImGuiFreeType_DebugEditFontLoaderFlags(ImGuiFreeTypeLoaderFlags* p_font_loader_flags) +{ + return ImGuiFreeType::DebugEditFontLoaderFlags(p_font_loader_flags); +} + #endif /////////////////////////////manual written functions -CIMGUI_API void igLogText(const char *fmt, ...) -{ - char buffer[256]; - va_list args; - va_start(args, fmt); - vsnprintf(buffer, 256, fmt, args); - va_end(args); - ImGui::LogText("%s", buffer); -} CIMGUI_API void ImGuiTextBuffer_appendf(ImGuiTextBuffer *self, const char *fmt, ...) { va_list args; diff --git a/cimgui.h b/cimgui.h index 57efe4d..8294bd1 100644 --- a/cimgui.h +++ b/cimgui.h @@ -1,5 +1,5 @@ //This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui -//based on imgui.h file version "1.91.9b" 19191 from Dear ImGui https://github.com/ocornut/imgui +//based on imgui.h file version "1.92.0" 19200 from Dear ImGui https://github.com/ocornut/imgui //with imgui_internal.h api //with imgui_freetype.h api #ifndef CIMGUI_INCLUDED @@ -50,10 +50,15 @@ typedef struct ImDrawListSplitter ImDrawListSplitter; typedef struct ImDrawVert ImDrawVert; typedef struct ImFont ImFont; typedef struct ImFontAtlas ImFontAtlas; -typedef struct ImFontBuilderIO ImFontBuilderIO; +typedef struct ImFontAtlasBuilder ImFontAtlasBuilder; +typedef struct ImFontAtlasRect ImFontAtlasRect; +typedef struct ImFontBaked ImFontBaked; typedef struct ImFontConfig ImFontConfig; typedef struct ImFontGlyph ImFontGlyph; typedef struct ImFontGlyphRangesBuilder ImFontGlyphRangesBuilder; +typedef struct ImFontLoader ImFontLoader; +typedef struct ImTextureData ImTextureData; +typedef struct ImTextureRect ImTextureRect; typedef struct ImColor ImColor; typedef struct ImGuiContext ImGuiContext; typedef struct ImGuiIO ImGuiIO; @@ -81,6 +86,8 @@ typedef struct ImBitVector ImBitVector; typedef struct ImRect ImRect; typedef struct ImGuiTextIndex ImGuiTextIndex; typedef struct ImDrawDataBuilder ImDrawDataBuilder; +typedef struct ImFontAtlasPostProcessData ImFontAtlasPostProcessData; +typedef struct ImFontAtlasRectEntry ImFontAtlasRectEntry; typedef struct ImGuiBoxSelectState ImGuiBoxSelectState; typedef struct ImGuiColorMod ImGuiColorMod; typedef struct ImGuiContextHook ImGuiContextHook; @@ -121,6 +128,7 @@ typedef struct ImGuiWindow ImGuiWindow; typedef struct ImGuiWindowTempData ImGuiWindowTempData; typedef struct ImGuiWindowSettings ImGuiWindowSettings; typedef struct STB_TexteditState STB_TexteditState; +typedef struct stbrp_node stbrp_node; typedef unsigned int ImGuiID; typedef signed char ImS8; typedef unsigned char ImU8; @@ -139,10 +147,15 @@ struct ImDrawListSplitter; struct ImDrawVert; struct ImFont; struct ImFontAtlas; -struct ImFontBuilderIO; +struct ImFontAtlasBuilder; +struct ImFontAtlasRect; +struct ImFontBaked; struct ImFontConfig; struct ImFontGlyph; struct ImFontGlyphRangesBuilder; +struct ImFontLoader; +struct ImTextureData; +struct ImTextureRect; struct ImColor; struct ImGuiContext; struct ImGuiIO; @@ -175,6 +188,7 @@ typedef int ImGuiStyleVar; typedef int ImGuiTableBgTarget; typedef int ImDrawFlags; typedef int ImDrawListFlags; +typedef int ImFontFlags; typedef int ImFontAtlasFlags; typedef int ImGuiBackendFlags; typedef int ImGuiButtonFlags; @@ -231,6 +245,12 @@ struct ImVec4 float x, y, z, w; }; typedef ImU64 ImTextureID; +typedef struct ImTextureRef ImTextureRef; +struct ImTextureRef +{ + ImTextureData* _TexData; + ImTextureID _TexID; +}; typedef enum { ImGuiWindowFlags_None = 0, ImGuiWindowFlags_NoTitleBar = 1 << 0, @@ -327,8 +347,11 @@ typedef enum { ImGuiTreeNodeFlags_SpanLabelWidth = 1 << 13, ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14, ImGuiTreeNodeFlags_LabelSpanAllColumns = 1 << 15, - ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 17, + ImGuiTreeNodeFlags_NavLeftJumpsToParent = 1 << 17, ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog, + ImGuiTreeNodeFlags_DrawLinesNone = 1 << 18, + ImGuiTreeNodeFlags_DrawLinesFull = 1 << 19, + ImGuiTreeNodeFlags_DrawLinesToNodes = 1 << 20, }ImGuiTreeNodeFlags_; typedef enum { ImGuiPopupFlags_None = 0, @@ -623,13 +646,13 @@ ImGuiKey_ReservedForModShift=664, ImGuiKey_ReservedForModAlt=665, ImGuiKey_ReservedForModSuper=666, ImGuiKey_NamedKey_END=667, +ImGuiKey_NamedKey_COUNT=ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN, ImGuiMod_None=0, ImGuiMod_Ctrl=1 << 12, ImGuiMod_Shift=1 << 13, ImGuiMod_Alt=1 << 14, ImGuiMod_Super=1 << 15, ImGuiMod_Mask_=0xF000, -ImGuiKey_NamedKey_COUNT=ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN, }ImGuiKey; typedef enum { ImGuiInputFlags_None = 0, @@ -660,6 +683,7 @@ typedef enum { ImGuiBackendFlags_HasMouseCursors = 1 << 1, ImGuiBackendFlags_HasSetMousePos = 1 << 2, ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3, + ImGuiBackendFlags_RendererHasTextures = 1 << 4, }ImGuiBackendFlags_; typedef enum { ImGuiCol_Text, @@ -695,6 +719,7 @@ typedef enum { ImGuiCol_ResizeGrip, ImGuiCol_ResizeGripHovered, ImGuiCol_ResizeGripActive, + ImGuiCol_InputTextCursor, ImGuiCol_TabHovered, ImGuiCol_Tab, ImGuiCol_TabSelected, @@ -713,6 +738,7 @@ typedef enum { ImGuiCol_TableRowBgAlt, ImGuiCol_TextLink, ImGuiCol_TextSelectedBg, + ImGuiCol_TreeLines, ImGuiCol_DragDropTarget, ImGuiCol_NavCursor, ImGuiCol_NavWindowingHighlight, @@ -750,6 +776,8 @@ typedef enum { ImGuiStyleVar_TabBarOverlineSize, ImGuiStyleVar_TableAngledHeadersAngle, ImGuiStyleVar_TableAngledHeadersTextAlign, + ImGuiStyleVar_TreeLinesSize, + ImGuiStyleVar_TreeLinesRounding, ImGuiStyleVar_ButtonTextAlign, ImGuiStyleVar_SelectableTextAlign, ImGuiStyleVar_SeparatorTextBorderSize, @@ -938,6 +966,9 @@ struct ImGuiTableColumnSortSpecs }; struct ImGuiStyle { + float FontSizeBase; + float FontScaleMain; + float FontScaleDpi; float Alpha; float DisabledAlpha; ImVec2 WindowPadding; @@ -974,6 +1005,9 @@ struct ImGuiStyle float TabBarOverlineSize; float TableAngledHeadersAngle; ImVec2 TableAngledHeadersTextAlign; + ImGuiTreeNodeFlags TreeLinesFlags; + float TreeLinesSize; + float TreeLinesRounding; ImGuiDir ColorButtonPosition; ImVec2 ButtonTextAlign; ImVec2 SelectableTextAlign; @@ -994,6 +1028,8 @@ struct ImGuiStyle float HoverDelayNormal; ImGuiHoveredFlags HoverFlagsForTooltipMouse; ImGuiHoveredFlags HoverFlagsForTooltipNav; + float _MainScale; + float _NextFrameFontSizeBase; }; struct ImGuiKeyData { @@ -1009,16 +1045,15 @@ struct ImGuiIO ImGuiConfigFlags ConfigFlags; ImGuiBackendFlags BackendFlags; ImVec2 DisplaySize; + ImVec2 DisplayFramebufferScale; float DeltaTime; float IniSavingRate; const char* IniFilename; const char* LogFilename; void* UserData; ImFontAtlas*Fonts; - float FontGlobalScale; - bool FontAllowUserScaling; ImFont* FontDefault; - ImVec2 DisplayFramebufferScale; + bool FontAllowUserScaling; bool ConfigNavSwapGamepadButtons; bool ConfigNavMoveSetMousePos; bool ConfigNavCaptureKeyboard; @@ -1184,7 +1219,7 @@ struct ImGuiListClipper int DisplayEnd; int ItemsCount; float ItemsHeight; - float StartPosY; + double StartPosY; double StartSeekOffsetY; void* TempData; }; @@ -1254,7 +1289,7 @@ typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* c struct ImDrawCmd { ImVec4 ClipRect; - ImTextureID TextureId; + ImTextureRef TexRef; unsigned int VtxOffset; unsigned int IdxOffset; unsigned int ElemCount; @@ -1273,7 +1308,7 @@ typedef struct ImDrawCmdHeader ImDrawCmdHeader; struct ImDrawCmdHeader { ImVec4 ClipRect; - ImTextureID TextureId; + ImTextureRef TexRef; unsigned int VtxOffset; }; typedef struct ImVector_ImDrawCmd {int Size;int Capacity;ImDrawCmd* Data;} ImVector_ImDrawCmd; @@ -1322,7 +1357,7 @@ typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_Im typedef struct ImVector_ImVec4 {int Size;int Capacity;ImVec4* Data;} ImVector_ImVec4; -typedef struct ImVector_ImTextureID {int Size;int Capacity;ImTextureID* Data;} ImVector_ImTextureID; +typedef struct ImVector_ImTextureRef {int Size;int Capacity;ImTextureRef* Data;} ImVector_ImTextureRef; typedef struct ImVector_ImU8 {int Size;int Capacity;ImU8* Data;} ImVector_ImU8; @@ -1340,13 +1375,15 @@ struct ImDrawList ImDrawCmdHeader _CmdHeader; ImDrawListSplitter _Splitter; ImVector_ImVec4 _ClipRectStack; - ImVector_ImTextureID _TextureIdStack; + ImVector_ImTextureRef _TextureStack; ImVector_ImU8 _CallbacksDataBuf; float _FringeScale; const char* _OwnerName; }; typedef struct ImVector_ImDrawListPtr {int Size;int Capacity;ImDrawList** Data;} ImVector_ImDrawListPtr; +typedef struct ImVector_ImTextureDataPtr {int Size;int Capacity;ImTextureData** Data;} ImVector_ImTextureDataPtr; + struct ImDrawData { bool Valid; @@ -1358,38 +1395,83 @@ struct ImDrawData ImVec2 DisplaySize; ImVec2 FramebufferScale; ImGuiViewport* OwnerViewport; + ImVector_ImTextureDataPtr* Textures; +}; +typedef enum { + ImTextureFormat_RGBA32, + ImTextureFormat_Alpha8, +}ImTextureFormat; +typedef enum { + ImTextureStatus_OK, + ImTextureStatus_Destroyed, + ImTextureStatus_WantCreate, + ImTextureStatus_WantUpdates, + ImTextureStatus_WantDestroy, +}ImTextureStatus; +struct ImTextureRect +{ + unsigned short x, y; + unsigned short w, h; +}; +typedef struct ImVector_ImTextureRect {int Size;int Capacity;ImTextureRect* Data;} ImVector_ImTextureRect; + +struct ImTextureData +{ + int UniqueID; + ImTextureStatus Status; + void* BackendUserData; + ImTextureID TexID; + ImTextureFormat Format; + int Width; + int Height; + int BytesPerPixel; + unsigned char* Pixels; + ImTextureRect UsedRect; + ImTextureRect UpdateRect; + ImVector_ImTextureRect Updates; + int UnusedFrames; + unsigned short RefCount; + bool UseColors; + bool WantDestroyNextFrame; }; struct ImFontConfig { + char Name[40]; void* FontData; int FontDataSize; bool FontDataOwnedByAtlas; bool MergeMode; bool PixelSnapH; - int FontNo; - int OversampleH; - int OversampleV; + bool PixelSnapV; + ImS8 FontNo; + ImS8 OversampleH; + ImS8 OversampleV; float SizePixels; - ImVec2 GlyphOffset; const ImWchar* GlyphRanges; + const ImWchar* GlyphExcludeRanges; + ImVec2 GlyphOffset; float GlyphMinAdvanceX; float GlyphMaxAdvanceX; float GlyphExtraAdvanceX; - unsigned int FontBuilderFlags; + unsigned int FontLoaderFlags; float RasterizerMultiply; float RasterizerDensity; ImWchar EllipsisChar; - char Name[40]; + ImFontFlags Flags; ImFont* DstFont; + const ImFontLoader* FontLoader; + void* FontLoaderData; }; struct ImFontGlyph { unsigned int Colored : 1; unsigned int Visible : 1; - unsigned int Codepoint : 30; + unsigned int SourceIdx : 4; + unsigned int Codepoint : 26; float AdvanceX; float X0, Y0, X1, Y1; float U0, V0, U1, V1; + int PackId; }; typedef struct ImVector_ImU32 {int Size;int Capacity;ImU32* Data;} ImVector_ImU32; @@ -1397,16 +1479,12 @@ struct ImFontGlyphRangesBuilder { ImVector_ImU32 UsedChars; }; -typedef struct ImFontAtlasCustomRect ImFontAtlasCustomRect; -struct ImFontAtlasCustomRect +typedef int ImFontAtlasRectId; +struct ImFontAtlasRect { - unsigned short X, Y; - unsigned short Width, Height; - unsigned int GlyphID : 31; - unsigned int GlyphColored : 1; - float GlyphAdvanceX; - ImVec2 GlyphOffset; - ImFont* Font; + unsigned short x, y; + unsigned short w, h; + ImVec2 uv0, uv1; }; typedef enum { ImFontAtlasFlags_None = 0, @@ -1416,34 +1494,42 @@ typedef enum { }ImFontAtlasFlags_; typedef struct ImVector_ImFontPtr {int Size;int Capacity;ImFont** Data;} ImVector_ImFontPtr; -typedef struct ImVector_ImFontAtlasCustomRect {int Size;int Capacity;ImFontAtlasCustomRect* Data;} ImVector_ImFontAtlasCustomRect; - typedef struct ImVector_ImFontConfig {int Size;int Capacity;ImFontConfig* Data;} ImVector_ImFontConfig; +typedef struct ImVector_ImDrawListSharedDataPtr {int Size;int Capacity;ImDrawListSharedData** Data;} ImVector_ImDrawListSharedDataPtr; + struct ImFontAtlas { ImFontAtlasFlags Flags; - ImTextureID TexID; - int TexDesiredWidth; + ImTextureFormat TexDesiredFormat; int TexGlyphPadding; + int TexMinWidth; + int TexMinHeight; + int TexMaxWidth; + int TexMaxHeight; void* UserData; + ImTextureRef TexRef; + ImTextureData* TexData; + ImVector_ImTextureDataPtr TexList; bool Locked; - bool TexReady; + bool RendererHasTextures; + bool TexIsBuilt; bool TexPixelsUseColors; - unsigned char* TexPixelsAlpha8; - unsigned int* TexPixelsRGBA32; - int TexWidth; - int TexHeight; ImVec2 TexUvScale; ImVec2 TexUvWhitePixel; ImVector_ImFontPtr Fonts; - ImVector_ImFontAtlasCustomRect CustomRects; ImVector_ImFontConfig Sources; ImVec4 TexUvLines[(32) + 1]; - const ImFontBuilderIO* FontBuilderIO; - unsigned int FontBuilderFlags; - int PackIdMouseCursors; - int PackIdLines; + int TexNextUniqueID; + int FontNextUniqueID; + ImVector_ImDrawListSharedDataPtr DrawListSharedDatas; + ImFontAtlasBuilder* Builder; + const ImFontLoader* FontLoader; + const char* FontLoaderName; + void* FontLoaderData; + unsigned int FontLoaderFlags; + int RefCount; + ImGuiContext* OwnerContext; }; typedef struct ImVector_float {int Size;int Capacity;float* Data;} ImVector_float; @@ -1451,27 +1537,46 @@ typedef struct ImVector_ImU16 {int Size;int Capacity;ImU16* Data;} ImVector_ImU1 typedef struct ImVector_ImFontGlyph {int Size;int Capacity;ImFontGlyph* Data;} ImVector_ImFontGlyph; -struct ImFont +struct ImFontBaked { ImVector_float IndexAdvanceX; float FallbackAdvanceX; - float FontSize; + float Size; + float RasterizerDensity; ImVector_ImU16 IndexLookup; ImVector_ImFontGlyph Glyphs; - ImFontGlyph* FallbackGlyph; + int FallbackGlyphIndex; + float Ascent, Descent; + unsigned int MetricsTotalSurface:26; + unsigned int WantDestroy:1; + unsigned int LockLoadingFallback:1; + int LastUsedFrame; + ImGuiID BakedId; + ImFont* ContainerFont; + void* FontLoaderDatas; +}; +typedef enum { + ImFontFlags_None = 0, + ImFontFlags_NoLoadError = 1 << 1, + ImFontFlags_NoLoadGlyphs = 1 << 2, + ImFontFlags_LockBakedSizes = 1 << 3, +}ImFontFlags_; +typedef struct ImVector_ImFontConfigPtr {int Size;int Capacity;ImFontConfig** Data;} ImVector_ImFontConfigPtr; + +struct ImFont +{ + ImFontBaked* LastBaked; ImFontAtlas* ContainerAtlas; - ImFontConfig* Sources; - short SourcesCount; - short EllipsisCharCount; + ImFontFlags Flags; + float CurrentRasterizerDensity; + ImGuiID FontId; + float LegacySize; + ImVector_ImFontConfigPtr Sources; ImWchar EllipsisChar; ImWchar FallbackChar; - float EllipsisWidth; - float EllipsisCharStep; - float Scale; - float Ascent, Descent; - int MetricsTotalSurface; - bool DirtyLookupTables; ImU8 Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX +1)/8192/8]; + bool EllipsisAutoBake; + ImGuiStorage RemapPairs; }; typedef enum { ImGuiViewportFlags_None = 0, @@ -1485,6 +1590,7 @@ struct ImGuiViewport ImGuiViewportFlags Flags; ImVec2 Pos; ImVec2 Size; + ImVec2 FramebufferScale; ImVec2 WorkPos; ImVec2 WorkSize; void* PlatformHandle; @@ -1500,19 +1606,27 @@ struct ImGuiPlatformIO void (*Platform_SetImeDataFn)(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data); void* Platform_ImeUserData; ImWchar Platform_LocaleDecimalPoint; + int Renderer_TextureMaxWidth; + int Renderer_TextureMaxHeight; void* Renderer_RenderState; + ImVector_ImTextureDataPtr Textures; }; struct ImGuiPlatformImeData { bool WantVisible; + bool WantTextInput; ImVec2 InputPos; float InputLineHeight; + ImGuiID ViewportId; }; struct ImBitVector; struct ImRect; struct ImGuiTextIndex; struct ImDrawDataBuilder; struct ImDrawListSharedData; +struct ImFontAtlasBuilder; +struct ImFontAtlasPostProcessData; +struct ImFontAtlasRectEntry; struct ImGuiBoxSelectState; struct ImGuiColorMod; struct ImGuiContext; @@ -1570,6 +1684,8 @@ typedef int ImGuiTextFlags; typedef int ImGuiTooltipFlags; typedef int ImGuiTypingSelectFlags; typedef int ImGuiWindowRefreshFlags; +typedef ImS16 ImGuiTableColumnIdx; +typedef ImU16 ImGuiTableDrawChannelIdx; extern ImGuiContext* GImGui; typedef FILE* ImFileHandle; typedef struct ImVec1 ImVec1; @@ -1577,6 +1693,11 @@ struct ImVec1 { float x; }; +typedef struct ImVec2i ImVec2i; +struct ImVec2i +{ + int x, y; +}; typedef struct ImVec2ih ImVec2ih; struct ImVec2ih { @@ -1604,6 +1725,7 @@ struct ImDrawListSharedData { ImVec2 TexUvWhitePixel; const ImVec4* TexUvLines; + ImFontAtlas* FontAtlas; ImFont* Font; float FontSize; float FontScale; @@ -1613,6 +1735,8 @@ struct ImDrawListSharedData ImDrawListFlags InitialFlags; ImVec4 ClipRectFullscreen; ImVector_ImVec2 TempBuffer; + ImVector_ImDrawListPtr DrawLists; + ImGuiContext* Context; ImVec2 ArcFastVtx[48]; float ArcFastRadiusCutoff; ImU8 CircleSegmentCounts[64]; @@ -1622,6 +1746,13 @@ struct ImDrawDataBuilder ImVector_ImDrawListPtr* Layers[2]; ImVector_ImDrawListPtr LayerData1; }; +typedef struct ImFontStackData ImFontStackData; +struct ImFontStackData +{ + ImFont* Font; + float FontSizeBeforeScaling; + float FontSizeAfterScaling; +}; struct ImGuiStyleVarInfo { ImU32 Count : 8; @@ -1662,6 +1793,7 @@ typedef enum { ImGuiItemFlags_AllowOverlap = 1 << 14, ImGuiItemFlags_NoNavDisableMouseHover = 1 << 15, ImGuiItemFlags_NoMarkEdited = 1 << 16, + ImGuiItemFlags_NoFocus = 1 << 17, ImGuiItemFlags_Inputable = 1 << 20, ImGuiItemFlags_HasSelectionUserData = 1 << 21, ImGuiItemFlags_IsMultiSelect = 1 << 22, @@ -1707,6 +1839,7 @@ typedef enum { ImGuiButtonFlags_NoHoveredOnFocus = 1 << 19, ImGuiButtonFlags_NoSetKeyOwner = 1 << 20, ImGuiButtonFlags_NoTestKeyOwner = 1 << 21, + ImGuiButtonFlags_NoFocus = 1 << 22, ImGuiButtonFlags_PressedOnMask_ = ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHold, ImGuiButtonFlags_PressedOnDefault_ = ImGuiButtonFlags_PressedOnClickRelease, }ImGuiButtonFlagsPrivate_; @@ -1728,9 +1861,11 @@ typedef enum { ImGuiSelectableFlags_NoSetKeyOwner = 1 << 27, }ImGuiSelectableFlagsPrivate_; typedef enum { + ImGuiTreeNodeFlags_NoNavFocus = 1 << 27, ImGuiTreeNodeFlags_ClipLabelForTrailingButton = 1 << 28, ImGuiTreeNodeFlags_UpsideDownArrow = 1 << 29, ImGuiTreeNodeFlags_OpenOnMask_ = ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_OpenOnArrow, + ImGuiTreeNodeFlags_DrawLinesMask_ = ImGuiTreeNodeFlags_DrawLinesNone | ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes, }ImGuiTreeNodeFlagsPrivate_; typedef enum { ImGuiSeparatorFlags_None = 0, @@ -1917,6 +2052,9 @@ struct ImGuiTreeNodeStackData ImGuiTreeNodeFlags TreeFlags; ImGuiItemFlags ItemFlags; ImRect NavRect; + float DrawLinesX1; + float DrawLinesToNodesY2; + ImGuiTableColumnIdx DrawLinesTableColumn; }; struct ImGuiErrorRecoveryState { @@ -2384,10 +2522,12 @@ struct ImGuiMetricsConfig bool ShowDrawCmdMesh; bool ShowDrawCmdBoundingBoxes; bool ShowTextEncodingViewer; + bool ShowTextureUsedRect; int ShowWindowsRectsType; int ShowTablesRectsType; int HighlightMonitorIdx; ImGuiID HighlightViewportID; + bool ShowFontPreview; }; typedef struct ImGuiStackLevelInfo ImGuiStackLevelInfo; struct ImGuiStackLevelInfo @@ -2421,6 +2561,8 @@ struct ImGuiContextHook ImGuiContextHookCallback Callback; void* UserData; }; +typedef struct ImVector_ImFontAtlasPtr {int Size;int Capacity;ImFontAtlas** Data;} ImVector_ImFontAtlasPtr; + typedef struct ImVector_ImGuiInputEvent {int Size;int Capacity;ImGuiInputEvent* Data;} ImVector_ImGuiInputEvent; typedef struct ImVector_ImGuiWindowPtr {int Size;int Capacity;ImGuiWindow** Data;} ImVector_ImGuiWindowPtr; @@ -2431,6 +2573,8 @@ typedef struct ImVector_ImGuiColorMod {int Size;int Capacity;ImGuiColorMod* Data typedef struct ImVector_ImGuiStyleMod {int Size;int Capacity;ImGuiStyleMod* Data;} ImVector_ImGuiStyleMod; +typedef struct ImVector_ImFontStackData {int Size;int Capacity;ImFontStackData* Data;} ImVector_ImFontStackData; + typedef struct ImVector_ImGuiFocusScopeData {int Size;int Capacity;ImGuiFocusScopeData* Data;} ImVector_ImGuiFocusScopeData; typedef struct ImVector_ImGuiItemFlags {int Size;int Capacity;ImGuiItemFlags* Data;} ImVector_ImGuiItemFlags; @@ -2480,14 +2624,16 @@ typedef struct ImVector_ImGuiContextHook {int Size;int Capacity;ImGuiContextHook struct ImGuiContext { bool Initialized; - bool FontAtlasOwnedByContext; ImGuiIO IO; ImGuiPlatformIO PlatformIO; ImGuiStyle Style; + ImVector_ImFontAtlasPtr FontAtlases; ImFont* Font; + ImFontBaked* FontBaked; float FontSize; - float FontBaseSize; - float FontScale; + float FontSizeBase; + float FontBakedScale; + float FontRasterizerDensity; float CurrentDpiScale; ImDrawListSharedData DrawListSharedData; double Time; @@ -2573,7 +2719,7 @@ struct ImGuiContext ImGuiCol DebugFlashStyleColorIdx; ImVector_ImGuiColorMod ColorStack; ImVector_ImGuiStyleMod StyleVarStack; - ImVector_ImFontPtr FontStack; + ImVector_ImFontStackData FontStack; ImVector_ImGuiFocusScopeData FocusScopeStack; ImVector_ImGuiItemFlags ItemFlagsStack; ImVector_ImGuiGroupData GroupStack; @@ -2629,6 +2775,7 @@ struct ImGuiContext ImGuiKeyChord NavJustMovedToKeyMods; bool NavJustMovedToIsTabbing; bool NavJustMovedToHasSelectionData; + bool ConfigNavWindowingWithGamepad; ImGuiKeyChord ConfigNavWindowingKeyNext; ImGuiKeyChord ConfigNavWindowingKeyPrev; ImGuiWindow* NavWindowingTarget; @@ -2636,6 +2783,7 @@ struct ImGuiContext ImGuiWindow* NavWindowingListWindow; float NavWindowingTimer; float NavWindowingHighlightAlpha; + ImGuiInputSource NavWindowingInputSource; bool NavWindowingToggleLayer; ImGuiKey NavWindowingToggleKey; ImVec2 NavWindowingAccumDeltaPos; @@ -2688,7 +2836,8 @@ struct ImGuiContext ImVec2 MouseLastValidPos; ImGuiInputTextState InputTextState; ImGuiInputTextDeactivatedState InputTextDeactivatedState; - ImFont InputTextPasswordFont; + ImFontBaked InputTextPasswordFontBackupBaked; + ImFontFlags InputTextPasswordFontBackupFlags; ImGuiID TempInputId; ImGuiDataTypeStorage DataTypeZeroValue; int BeginMenuDepth; @@ -2720,6 +2869,7 @@ struct ImGuiContext ImGuiTypingSelectState TypingSelectState; ImGuiPlatformImeData PlatformImeData; ImGuiPlatformImeData PlatformImeDataPrev; + ImVector_ImTextureDataPtr UserTextures; bool SettingsLoaded; float SettingsDirtyTimer; ImGuiTextBuffer SettingsIniData; @@ -2805,6 +2955,7 @@ struct ImGuiWindowTempData ImGuiMenuColumns MenuColumns; int TreeDepth; ImU32 TreeHasStackDataDepthMask; + ImU32 TreeRecordsClippedNodesY2Mask; ImVector_ImGuiWindowPtr ChildWindows; ImGuiStorage* StateStorage; ImGuiOldColumns* CurrentColumns; @@ -2989,8 +3140,6 @@ struct ImGuiTabBar ImVec2 BackupCursorPos; ImGuiTextBuffer TabsNames; }; -typedef ImS16 ImGuiTableColumnIdx; -typedef ImU16 ImGuiTableDrawChannelIdx; struct ImGuiTableColumn { ImGuiTableColumnFlags Flags; @@ -3224,25 +3373,91 @@ struct ImGuiTableSettings ImGuiTableColumnIdx ColumnsCountMax; bool WantApply; }; -struct ImFontBuilderIO +struct ImFontLoader { - bool (*FontBuilder_Build)(ImFontAtlas* atlas); + const char* Name; + bool (*LoaderInit)(ImFontAtlas* atlas); + void (*LoaderShutdown)(ImFontAtlas* atlas); + bool (*FontSrcInit)(ImFontAtlas* atlas, ImFontConfig* src); + void (*FontSrcDestroy)(ImFontAtlas* atlas, ImFontConfig* src); + bool (*FontSrcContainsGlyph)(ImFontAtlas* atlas, ImFontConfig* src, ImWchar codepoint); + bool (*FontBakedInit)(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src); + void (*FontBakedDestroy)(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src); + bool (*FontBakedLoadGlyph)(ImFontAtlas* atlas, ImFontConfig* src, ImFontBaked* baked, void* loader_data_for_baked_src, ImWchar codepoint, ImFontGlyph* out_glyph); + size_t FontBakedSrcLoaderDataSize; +}; +struct ImFontAtlasRectEntry +{ + int TargetIndex : 20; + int Generation : 10; + unsigned int IsUsed : 1; +}; +struct ImFontAtlasPostProcessData +{ + ImFontAtlas* FontAtlas; + ImFont* Font; + ImFontConfig* FontSrc; + ImFontBaked* FontBaked; + ImFontGlyph* Glyph; + void* Pixels; + ImTextureFormat Format; + int Pitch; + int Width; + int Height; +}; +struct stbrp_node; +typedef stbrp_node stbrp_node_im; +typedef struct stbrp_context_opaque stbrp_context_opaque; +struct stbrp_context_opaque +{ char data[80]; +}; +typedef struct ImVector_stbrp_node_im {int Size;int Capacity;stbrp_node_im* Data;} ImVector_stbrp_node_im; + +typedef struct ImVector_ImFontAtlasRectEntry {int Size;int Capacity;ImFontAtlasRectEntry* Data;} ImVector_ImFontAtlasRectEntry; + +typedef struct ImVector_ImFontBakedPtr {int Size;int Capacity;ImFontBaked** Data;} ImVector_ImFontBakedPtr; + +typedef struct ImStableVector_ImFontBaked__32 {int Size;int Capacity;ImVector_ImFontBakedPtr Blocks;} ImStableVector_ImFontBaked__32; + +struct ImFontAtlasBuilder +{ + stbrp_context_opaque PackContext; + ImVector_stbrp_node_im PackNodes; + ImVector_ImTextureRect Rects; + ImVector_ImFontAtlasRectEntry RectsIndex; + ImVector_unsigned_char TempBuffer; + int RectsIndexFreeListStart; + int RectsPackedCount; + int RectsPackedSurface; + int RectsDiscardedCount; + int RectsDiscardedSurface; + int FrameCount; + ImVec2i MaxRectSize; + ImVec2i MaxRectBounds; + bool LockDisableResize; + bool PreloadedAllGlyphsRanges; + ImStableVector_ImFontBaked__32 BakedPool; + ImGuiStorage BakedMap; + int BakedDiscardedCount; + ImFontAtlasRectId PackIdMouseCursors; + ImFontAtlasRectId PackIdLinesTexData; }; #ifdef IMGUI_ENABLE_FREETYPE struct ImFontAtlas; -struct ImFontBuilderIO; +struct ImFontLoader; +typedef unsigned int ImGuiFreeTypeLoaderFlags; typedef enum { - ImGuiFreeTypeBuilderFlags_NoHinting = 1 << 0, - ImGuiFreeTypeBuilderFlags_NoAutoHint = 1 << 1, - ImGuiFreeTypeBuilderFlags_ForceAutoHint = 1 << 2, - ImGuiFreeTypeBuilderFlags_LightHinting = 1 << 3, - ImGuiFreeTypeBuilderFlags_MonoHinting = 1 << 4, - ImGuiFreeTypeBuilderFlags_Bold = 1 << 5, - ImGuiFreeTypeBuilderFlags_Oblique = 1 << 6, - ImGuiFreeTypeBuilderFlags_Monochrome = 1 << 7, - ImGuiFreeTypeBuilderFlags_LoadColor = 1 << 8, - ImGuiFreeTypeBuilderFlags_Bitmap = 1 << 9 -}ImGuiFreeTypeBuilderFlags; + ImGuiFreeTypeLoaderFlags_NoHinting = 1 << 0, + ImGuiFreeTypeLoaderFlags_NoAutoHint = 1 << 1, + ImGuiFreeTypeLoaderFlags_ForceAutoHint = 1 << 2, + ImGuiFreeTypeLoaderFlags_LightHinting = 1 << 3, + ImGuiFreeTypeLoaderFlags_MonoHinting = 1 << 4, + ImGuiFreeTypeLoaderFlags_Bold = 1 << 5, + ImGuiFreeTypeLoaderFlags_Oblique = 1 << 6, + ImGuiFreeTypeLoaderFlags_Monochrome = 1 << 7, + ImGuiFreeTypeLoaderFlags_LoadColor = 1 << 8, + ImGuiFreeTypeLoaderFlags_Bitmap = 1 << 9, +}ImGuiFreeTypeLoaderFlags_; #endif #define ImDrawCallback_ResetRenderState (ImDrawCallback)(-8) @@ -3263,15 +3478,20 @@ typedef ImPool ImPool_ImGuiTable; typedef ImSpan ImSpan_ImGuiTableCellData; typedef ImSpan ImSpan_ImGuiTableColumn; typedef ImSpan ImSpan_ImGuiTableColumnIdx; +typedef ImStableVector ImStableVector_ImFontBaked__32; typedef ImVector ImVector_ImDrawChannel; typedef ImVector ImVector_ImDrawCmd; typedef ImVector ImVector_ImDrawIdx; typedef ImVector ImVector_ImDrawListPtr; +typedef ImVector ImVector_ImDrawListSharedDataPtr; typedef ImVector ImVector_ImDrawVert; typedef ImVector ImVector_ImFontPtr; -typedef ImVector ImVector_ImFontAtlasCustomRect; +typedef ImVector ImVector_ImFontAtlasPtr; +typedef ImVector ImVector_ImFontAtlasRectEntry; typedef ImVector ImVector_ImFontConfig; +typedef ImVector ImVector_ImFontConfigPtr; typedef ImVector ImVector_ImFontGlyph; +typedef ImVector ImVector_ImFontStackData; typedef ImVector ImVector_ImGuiColorMod; typedef ImVector ImVector_ImGuiContextHook; typedef ImVector ImVector_ImGuiFocusScopeData; @@ -3303,7 +3523,9 @@ typedef ImVector ImVector_ImGuiTreeNodeStackData; typedef ImVector ImVector_ImGuiViewportPPtr; typedef ImVector ImVector_ImGuiWindowPtr; typedef ImVector ImVector_ImGuiWindowStackData; -typedef ImVector ImVector_ImTextureID; +typedef ImVector ImVector_ImTextureDataPtr; +typedef ImVector ImVector_ImTextureRect; +typedef ImVector ImVector_ImTextureRef; typedef ImVector ImVector_ImU16; typedef ImVector ImVector_ImU32; typedef ImVector ImVector_ImU8; @@ -3313,6 +3535,7 @@ typedef ImVector ImVector_ImWchar; typedef ImVector ImVector_char; typedef ImVector ImVector_float; typedef ImVector ImVector_int; +typedef ImVector ImVector_stbrp_node_im; typedef ImVector ImVector_unsigned_char; #endif //CIMGUI_DEFINE_ENUMS_AND_STRUCTS CIMGUI_API ImVec2* ImVec2_ImVec2_Nil(void); @@ -3321,6 +3544,10 @@ CIMGUI_API ImVec2* ImVec2_ImVec2_Float(float _x,float _y); CIMGUI_API ImVec4* ImVec4_ImVec4_Nil(void); CIMGUI_API void ImVec4_destroy(ImVec4* self); CIMGUI_API ImVec4* ImVec4_ImVec4_Float(float _x,float _y,float _z,float _w); +CIMGUI_API ImTextureRef* ImTextureRef_ImTextureRef_Nil(void); +CIMGUI_API void ImTextureRef_destroy(ImTextureRef* self); +CIMGUI_API ImTextureRef* ImTextureRef_ImTextureRef_TextureID(ImTextureID tex_id); +CIMGUI_API ImTextureID ImTextureRef_GetTexID(ImTextureRef* self); CIMGUI_API ImGuiContext* igCreateContext(ImFontAtlas* shared_font_atlas); CIMGUI_API void igDestroyContext(ImGuiContext* ctx); CIMGUI_API ImGuiContext* igGetCurrentContext(void); @@ -3371,7 +3598,6 @@ CIMGUI_API void igSetWindowPos_Vec2(const ImVec2 pos,ImGuiCond cond); CIMGUI_API void igSetWindowSize_Vec2(const ImVec2 size,ImGuiCond cond); CIMGUI_API void igSetWindowCollapsed_Bool(bool collapsed,ImGuiCond cond); CIMGUI_API void igSetWindowFocus_Nil(void); -CIMGUI_API void igSetWindowFontScale(float scale); CIMGUI_API void igSetWindowPos_Str(const char* name,const ImVec2 pos,ImGuiCond cond); CIMGUI_API void igSetWindowSize_Str(const char* name,const ImVec2 size,ImGuiCond cond); CIMGUI_API void igSetWindowCollapsed_Str(const char* name,bool collapsed,ImGuiCond cond); @@ -3386,8 +3612,11 @@ CIMGUI_API void igSetScrollHereX(float center_x_ratio); CIMGUI_API void igSetScrollHereY(float center_y_ratio); CIMGUI_API void igSetScrollFromPosX_Float(float local_x,float center_x_ratio); CIMGUI_API void igSetScrollFromPosY_Float(float local_y,float center_y_ratio); -CIMGUI_API void igPushFont(ImFont* font); +CIMGUI_API void igPushFont(ImFont* font,float font_size_base_unscaled); CIMGUI_API void igPopFont(void); +CIMGUI_API ImFont* igGetFont(void); +CIMGUI_API float igGetFontSize(void); +CIMGUI_API ImFontBaked* igGetFontBaked(void); CIMGUI_API void igPushStyleColor_U32(ImGuiCol idx,ImU32 col); CIMGUI_API void igPushStyleColor_Vec4(ImGuiCol idx,const ImVec4 col); CIMGUI_API void igPopStyleColor(int count); @@ -3404,8 +3633,6 @@ CIMGUI_API void igSetNextItemWidth(float item_width); CIMGUI_API float igCalcItemWidth(void); CIMGUI_API void igPushTextWrapPos(float wrap_local_pos_x); CIMGUI_API void igPopTextWrapPos(void); -CIMGUI_API ImFont* igGetFont(void); -CIMGUI_API float igGetFontSize(void); CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2 *pOut); CIMGUI_API ImU32 igGetColorU32_Col(ImGuiCol idx,float alpha_mul); CIMGUI_API ImU32 igGetColorU32_Vec4(const ImVec4 col); @@ -3446,16 +3673,34 @@ CIMGUI_API ImGuiID igGetID_Ptr(const void* ptr_id); CIMGUI_API ImGuiID igGetID_Int(int int_id); CIMGUI_API void igTextUnformatted(const char* text,const char* text_end); CIMGUI_API void igText(const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igText0(const char* fmt); +#endif CIMGUI_API void igTextV(const char* fmt,va_list args); CIMGUI_API void igTextColored(const ImVec4 col,const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igTextColored0(const ImVec4 col,const char* fmt); +#endif CIMGUI_API void igTextColoredV(const ImVec4 col,const char* fmt,va_list args); CIMGUI_API void igTextDisabled(const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igTextDisabled0(const char* fmt); +#endif CIMGUI_API void igTextDisabledV(const char* fmt,va_list args); CIMGUI_API void igTextWrapped(const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igTextWrapped0(const char* fmt); +#endif CIMGUI_API void igTextWrappedV(const char* fmt,va_list args); CIMGUI_API void igLabelText(const char* label,const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igLabelText0(const char* label,const char* fmt); +#endif CIMGUI_API void igLabelTextV(const char* label,const char* fmt,va_list args); CIMGUI_API void igBulletText(const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igBulletText0(const char* fmt); +#endif CIMGUI_API void igBulletTextV(const char* fmt,va_list args); CIMGUI_API void igSeparatorText(const char* label); CIMGUI_API bool igButton(const char* label,const ImVec2 size); @@ -3470,10 +3715,10 @@ CIMGUI_API bool igRadioButton_IntPtr(const char* label,int* v,int v_button); CIMGUI_API void igProgressBar(float fraction,const ImVec2 size_arg,const char* overlay); CIMGUI_API void igBullet(void); CIMGUI_API bool igTextLink(const char* label); -CIMGUI_API void igTextLinkOpenURL(const char* label,const char* url); -CIMGUI_API void igImage(ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1); -CIMGUI_API void igImageWithBg(ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col); -CIMGUI_API bool igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col); +CIMGUI_API bool igTextLinkOpenURL(const char* label,const char* url); +CIMGUI_API void igImage(ImTextureRef tex_ref,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1); +CIMGUI_API void igImageWithBg(ImTextureRef tex_ref,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col); +CIMGUI_API bool igImageButton(const char* str_id,ImTextureRef tex_ref,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col); CIMGUI_API bool igBeginCombo(const char* label,const char* preview_value,ImGuiComboFlags flags); CIMGUI_API void igEndCombo(void); CIMGUI_API bool igCombo_Str_arr(const char* label,int* current_item,const char* const items[],int items_count,int popup_max_height_in_items); @@ -3527,12 +3772,24 @@ CIMGUI_API bool igColorButton(const char* desc_id,const ImVec4 col,ImGuiColorEdi CIMGUI_API void igSetColorEditOptions(ImGuiColorEditFlags flags); CIMGUI_API bool igTreeNode_Str(const char* label); CIMGUI_API bool igTreeNode_StrStr(const char* str_id,const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API bool igTreeNode_StrStr0(const char* str_id,const char* fmt); +#endif CIMGUI_API bool igTreeNode_Ptr(const void* ptr_id,const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API bool igTreeNode_Ptr0(const void* ptr_id,const char* fmt); +#endif CIMGUI_API bool igTreeNodeV_Str(const char* str_id,const char* fmt,va_list args); CIMGUI_API bool igTreeNodeV_Ptr(const void* ptr_id,const char* fmt,va_list args); CIMGUI_API bool igTreeNodeEx_Str(const char* label,ImGuiTreeNodeFlags flags); CIMGUI_API bool igTreeNodeEx_StrStr(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API bool igTreeNodeEx_StrStr0(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt); +#endif CIMGUI_API bool igTreeNodeEx_Ptr(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API bool igTreeNodeEx_Ptr0(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt); +#endif CIMGUI_API bool igTreeNodeExV_Str(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt,va_list args); CIMGUI_API bool igTreeNodeExV_Ptr(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt,va_list args); CIMGUI_API void igTreePush_Str(const char* str_id); @@ -3572,9 +3829,15 @@ CIMGUI_API bool igMenuItem_BoolPtr(const char* label,const char* shortcut,bool* CIMGUI_API bool igBeginTooltip(void); CIMGUI_API void igEndTooltip(void); CIMGUI_API void igSetTooltip(const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igSetTooltip0(const char* fmt); +#endif CIMGUI_API void igSetTooltipV(const char* fmt,va_list args); CIMGUI_API bool igBeginItemTooltip(void); CIMGUI_API void igSetItemTooltip(const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igSetItemTooltip0(const char* fmt); +#endif CIMGUI_API void igSetItemTooltipV(const char* fmt,va_list args); CIMGUI_API bool igBeginPopup(const char* str_id,ImGuiWindowFlags flags); CIMGUI_API bool igBeginPopupModal(const char* name,bool* p_open,ImGuiWindowFlags flags); @@ -3625,6 +3888,10 @@ CIMGUI_API void igLogToFile(int auto_open_depth,const char* filename); CIMGUI_API void igLogToClipboard(int auto_open_depth); CIMGUI_API void igLogFinish(void); CIMGUI_API void igLogButtons(void); +CIMGUI_API void igLogText(const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igLogText0(const char* fmt); +#endif CIMGUI_API void igLogTextV(const char* fmt,va_list args); CIMGUI_API bool igBeginDragDropSource(ImGuiDragDropFlags flags); CIMGUI_API bool igSetDragDropPayload(const char* type,const void* data,size_t sz,ImGuiCond cond); @@ -3712,6 +3979,9 @@ CIMGUI_API void igDebugFlashStyleColor(ImGuiCol idx); CIMGUI_API void igDebugStartItemPicker(void); CIMGUI_API bool igDebugCheckVersionAndDataLayout(const char* version_str,size_t sz_io,size_t sz_style,size_t sz_vec2,size_t sz_vec4,size_t sz_drawvert,size_t sz_drawidx); CIMGUI_API void igDebugLog(const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igDebugLog0(const char* fmt); +#endif CIMGUI_API void igDebugLogV(const char* fmt,va_list args); CIMGUI_API void igSetAllocatorFunctions(ImGuiMemAllocFunc alloc_func,ImGuiMemFreeFunc free_func,void* user_data); CIMGUI_API void igGetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func,ImGuiMemFreeFunc* p_free_func,void** p_user_data); @@ -3842,8 +4112,8 @@ CIMGUI_API void ImDrawList_destroy(ImDrawList* self); CIMGUI_API void ImDrawList_PushClipRect(ImDrawList* self,const ImVec2 clip_rect_min,const ImVec2 clip_rect_max,bool intersect_with_current_clip_rect); CIMGUI_API void ImDrawList_PushClipRectFullScreen(ImDrawList* self); CIMGUI_API void ImDrawList_PopClipRect(ImDrawList* self); -CIMGUI_API void ImDrawList_PushTextureID(ImDrawList* self,ImTextureID texture_id); -CIMGUI_API void ImDrawList_PopTextureID(ImDrawList* self); +CIMGUI_API void ImDrawList_PushTexture(ImDrawList* self,ImTextureRef tex_ref); +CIMGUI_API void ImDrawList_PopTexture(ImDrawList* self); CIMGUI_API void ImDrawList_GetClipRectMin(ImVec2 *pOut,ImDrawList* self); CIMGUI_API void ImDrawList_GetClipRectMax(ImVec2 *pOut,ImDrawList* self); CIMGUI_API void ImDrawList_AddLine(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,ImU32 col,float thickness); @@ -3867,9 +4137,9 @@ CIMGUI_API void ImDrawList_AddBezierQuadratic(ImDrawList* self,const ImVec2 p1,c CIMGUI_API void ImDrawList_AddPolyline(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col,ImDrawFlags flags,float thickness); CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col); CIMGUI_API void ImDrawList_AddConcavePolyFilled(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col); -CIMGUI_API void ImDrawList_AddImage(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col); -CIMGUI_API void ImDrawList_AddImageQuad(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,const ImVec2 uv1,const ImVec2 uv2,const ImVec2 uv3,const ImVec2 uv4,ImU32 col); -CIMGUI_API void ImDrawList_AddImageRounded(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col,float rounding,ImDrawFlags flags); +CIMGUI_API void ImDrawList_AddImage(ImDrawList* self,ImTextureRef tex_ref,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col); +CIMGUI_API void ImDrawList_AddImageQuad(ImDrawList* self,ImTextureRef tex_ref,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,const ImVec2 uv1,const ImVec2 uv2,const ImVec2 uv3,const ImVec2 uv4,ImU32 col); +CIMGUI_API void ImDrawList_AddImageRounded(ImDrawList* self,ImTextureRef tex_ref,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col,float rounding,ImDrawFlags flags); CIMGUI_API void ImDrawList_PathClear(ImDrawList* self); CIMGUI_API void ImDrawList_PathLineTo(ImDrawList* self,const ImVec2 pos); CIMGUI_API void ImDrawList_PathLineToMergeDuplicate(ImDrawList* self,const ImVec2 pos); @@ -3896,14 +4166,15 @@ CIMGUI_API void ImDrawList_PrimQuadUV(ImDrawList* self,const ImVec2 a,const ImVe CIMGUI_API void ImDrawList_PrimWriteVtx(ImDrawList* self,const ImVec2 pos,const ImVec2 uv,ImU32 col); CIMGUI_API void ImDrawList_PrimWriteIdx(ImDrawList* self,ImDrawIdx idx); CIMGUI_API void ImDrawList_PrimVtx(ImDrawList* self,const ImVec2 pos,const ImVec2 uv,ImU32 col); +CIMGUI_API void ImDrawList__SetDrawListSharedData(ImDrawList* self,ImDrawListSharedData* data); CIMGUI_API void ImDrawList__ResetForNewFrame(ImDrawList* self); CIMGUI_API void ImDrawList__ClearFreeMemory(ImDrawList* self); CIMGUI_API void ImDrawList__PopUnusedDrawCmd(ImDrawList* self); CIMGUI_API void ImDrawList__TryMergeDrawCmds(ImDrawList* self); CIMGUI_API void ImDrawList__OnChangedClipRect(ImDrawList* self); -CIMGUI_API void ImDrawList__OnChangedTextureID(ImDrawList* self); +CIMGUI_API void ImDrawList__OnChangedTexture(ImDrawList* self); CIMGUI_API void ImDrawList__OnChangedVtxOffset(ImDrawList* self); -CIMGUI_API void ImDrawList__SetTextureID(ImDrawList* self,ImTextureID texture_id); +CIMGUI_API void ImDrawList__SetTexture(ImDrawList* self,ImTextureRef tex_ref); CIMGUI_API int ImDrawList__CalcCircleAutoSegmentCount(ImDrawList* self,float radius); CIMGUI_API void ImDrawList__PathArcToFastEx(ImDrawList* self,const ImVec2 center,float radius,int a_min_sample,int a_max_sample,int a_step); CIMGUI_API void ImDrawList__PathArcToN(ImDrawList* self,const ImVec2 center,float radius,float a_min,float a_max,int num_segments); @@ -3913,8 +4184,22 @@ CIMGUI_API void ImDrawData_Clear(ImDrawData* self); CIMGUI_API void ImDrawData_AddDrawList(ImDrawData* self,ImDrawList* draw_list); CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* self); CIMGUI_API void ImDrawData_ScaleClipRects(ImDrawData* self,const ImVec2 fb_scale); +CIMGUI_API ImTextureData* ImTextureData_ImTextureData(void); +CIMGUI_API void ImTextureData_destroy(ImTextureData* self); +CIMGUI_API void ImTextureData_Create(ImTextureData* self,ImTextureFormat format,int w,int h); +CIMGUI_API void ImTextureData_DestroyPixels(ImTextureData* self); +CIMGUI_API void* ImTextureData_GetPixels(ImTextureData* self); +CIMGUI_API void* ImTextureData_GetPixelsAt(ImTextureData* self,int x,int y); +CIMGUI_API int ImTextureData_GetSizeInBytes(ImTextureData* self); +CIMGUI_API int ImTextureData_GetPitch(ImTextureData* self); +CIMGUI_API void ImTextureData_GetTexRef(ImTextureRef *pOut,ImTextureData* self); +CIMGUI_API ImTextureID ImTextureData_GetTexID(ImTextureData* self); +CIMGUI_API void ImTextureData_SetTexID(ImTextureData* self,ImTextureID tex_id); +CIMGUI_API void ImTextureData_SetStatus(ImTextureData* self,ImTextureStatus status); CIMGUI_API ImFontConfig* ImFontConfig_ImFontConfig(void); CIMGUI_API void ImFontConfig_destroy(ImFontConfig* self); +CIMGUI_API ImFontGlyph* ImFontGlyph_ImFontGlyph(void); +CIMGUI_API void ImFontGlyph_destroy(ImFontGlyph* self); CIMGUI_API ImFontGlyphRangesBuilder* ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder(void); CIMGUI_API void ImFontGlyphRangesBuilder_destroy(ImFontGlyphRangesBuilder* self); CIMGUI_API void ImFontGlyphRangesBuilder_Clear(ImFontGlyphRangesBuilder* self); @@ -3924,9 +4209,8 @@ CIMGUI_API void ImFontGlyphRangesBuilder_AddChar(ImFontGlyphRangesBuilder* self, CIMGUI_API void ImFontGlyphRangesBuilder_AddText(ImFontGlyphRangesBuilder* self,const char* text,const char* text_end); CIMGUI_API void ImFontGlyphRangesBuilder_AddRanges(ImFontGlyphRangesBuilder* self,const ImWchar* ranges); CIMGUI_API void ImFontGlyphRangesBuilder_BuildRanges(ImFontGlyphRangesBuilder* self,ImVector_ImWchar* out_ranges); -CIMGUI_API ImFontAtlasCustomRect* ImFontAtlasCustomRect_ImFontAtlasCustomRect(void); -CIMGUI_API void ImFontAtlasCustomRect_destroy(ImFontAtlasCustomRect* self); -CIMGUI_API bool ImFontAtlasCustomRect_IsPacked(ImFontAtlasCustomRect* self); +CIMGUI_API ImFontAtlasRect* ImFontAtlasRect_ImFontAtlasRect(void); +CIMGUI_API void ImFontAtlasRect_destroy(ImFontAtlasRect* self); CIMGUI_API ImFontAtlas* ImFontAtlas_ImFontAtlas(void); CIMGUI_API void ImFontAtlas_destroy(ImFontAtlas* self); CIMGUI_API ImFont* ImFontAtlas_AddFont(ImFontAtlas* self,const ImFontConfig* font_cfg); @@ -3935,44 +4219,35 @@ CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* self,const char* CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* self,void* font_data,int font_data_size,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges); CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* self,const void* compressed_font_data,int compressed_font_data_size,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges); CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* self,const char* compressed_font_data_base85,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges); +CIMGUI_API void ImFontAtlas_RemoveFont(ImFontAtlas* self,ImFont* font); +CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* self); +CIMGUI_API void ImFontAtlas_CompactCache(ImFontAtlas* self); CIMGUI_API void ImFontAtlas_ClearInputData(ImFontAtlas* self); CIMGUI_API void ImFontAtlas_ClearFonts(ImFontAtlas* self); CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* self); -CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* self); -CIMGUI_API bool ImFontAtlas_Build(ImFontAtlas* self); -CIMGUI_API void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self,unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel); -CIMGUI_API void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* self,unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel); -CIMGUI_API bool ImFontAtlas_IsBuilt(ImFontAtlas* self); -CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas* self,ImTextureID id); CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesDefault(ImFontAtlas* self); -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesGreek(ImFontAtlas* self); -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesKorean(ImFontAtlas* self); -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesJapanese(ImFontAtlas* self); -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self); -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(ImFontAtlas* self); -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesCyrillic(ImFontAtlas* self); -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self); -CIMGUI_API const ImWchar* ImFontAtlas_GetGlyphRangesVietnamese(ImFontAtlas* self); -CIMGUI_API int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self,int width,int height); -CIMGUI_API int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self,ImFont* font,ImWchar id,int width,int height,float advance_x,const ImVec2 offset); -CIMGUI_API ImFontAtlasCustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self,int index); -CIMGUI_API void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self,const ImFontAtlasCustomRect* rect,ImVec2* out_uv_min,ImVec2* out_uv_max); +CIMGUI_API ImFontAtlasRectId ImFontAtlas_AddCustomRect(ImFontAtlas* self,int width,int height,ImFontAtlasRect* out_r); +CIMGUI_API void ImFontAtlas_RemoveCustomRect(ImFontAtlas* self,ImFontAtlasRectId id); +CIMGUI_API bool ImFontAtlas_GetCustomRect(ImFontAtlas* self,ImFontAtlasRectId id,ImFontAtlasRect* out_r); +CIMGUI_API ImFontBaked* ImFontBaked_ImFontBaked(void); +CIMGUI_API void ImFontBaked_destroy(ImFontBaked* self); +CIMGUI_API void ImFontBaked_ClearOutputData(ImFontBaked* self); +CIMGUI_API ImFontGlyph* ImFontBaked_FindGlyph(ImFontBaked* self,ImWchar c); +CIMGUI_API ImFontGlyph* ImFontBaked_FindGlyphNoFallback(ImFontBaked* self,ImWchar c); +CIMGUI_API float ImFontBaked_GetCharAdvance(ImFontBaked* self,ImWchar c); +CIMGUI_API bool ImFontBaked_IsGlyphLoaded(ImFontBaked* self,ImWchar c); CIMGUI_API ImFont* ImFont_ImFont(void); CIMGUI_API void ImFont_destroy(ImFont* self); -CIMGUI_API ImFontGlyph* ImFont_FindGlyph(ImFont* self,ImWchar c); -CIMGUI_API ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self,ImWchar c); -CIMGUI_API float ImFont_GetCharAdvance(ImFont* self,ImWchar c); +CIMGUI_API bool ImFont_IsGlyphInFont(ImFont* self,ImWchar c); CIMGUI_API bool ImFont_IsLoaded(ImFont* self); CIMGUI_API const char* ImFont_GetDebugName(ImFont* self); +CIMGUI_API ImFontBaked* ImFont_GetFontBaked(ImFont* self,float font_size,float density); CIMGUI_API void ImFont_CalcTextSizeA(ImVec2 *pOut,ImFont* self,float size,float max_width,float wrap_width,const char* text_begin,const char* text_end,const char** remaining); -CIMGUI_API const char* ImFont_CalcWordWrapPositionA(ImFont* self,float scale,const char* text,const char* text_end,float wrap_width); -CIMGUI_API void ImFont_RenderChar(ImFont* self,ImDrawList* draw_list,float size,const ImVec2 pos,ImU32 col,ImWchar c); +CIMGUI_API const char* ImFont_CalcWordWrapPosition(ImFont* self,float size,const char* text,const char* text_end,float wrap_width); +CIMGUI_API void ImFont_RenderChar(ImFont* self,ImDrawList* draw_list,float size,const ImVec2 pos,ImU32 col,ImWchar c,const ImVec4* cpu_fine_clip); CIMGUI_API void ImFont_RenderText(ImFont* self,ImDrawList* draw_list,float size,const ImVec2 pos,ImU32 col,const ImVec4 clip_rect,const char* text_begin,const char* text_end,float wrap_width,bool cpu_fine_clip); -CIMGUI_API void ImFont_BuildLookupTable(ImFont* self); CIMGUI_API void ImFont_ClearOutputData(ImFont* self); -CIMGUI_API void ImFont_GrowIndex(ImFont* self,int new_size); -CIMGUI_API void ImFont_AddGlyph(ImFont* self,const ImFontConfig* src_cfg,ImWchar c,float x0,float y0,float x1,float y1,float u0,float v0,float u1,float v1,float advance_x); -CIMGUI_API void ImFont_AddRemapChar(ImFont* self,ImWchar dst,ImWchar src,bool overwrite_dst); +CIMGUI_API void ImFont_AddRemapChar(ImFont* self,ImWchar from_codepoint,ImWchar to_codepoint); CIMGUI_API bool ImFont_IsGlyphRangeUnused(ImFont* self,unsigned int c_begin,unsigned int c_last); CIMGUI_API ImGuiViewport* ImGuiViewport_ImGuiViewport(void); CIMGUI_API void ImGuiViewport_destroy(ImGuiViewport* self); @@ -3994,6 +4269,7 @@ CIMGUI_API int igImStricmp(const char* str1,const char* str2); CIMGUI_API int igImStrnicmp(const char* str1,const char* str2,size_t count); CIMGUI_API void igImStrncpy(char* dst,const char* src,size_t count); CIMGUI_API char* igImStrdup(const char* str); +CIMGUI_API void* igImMemdup(const void* src,size_t size); CIMGUI_API char* igImStrdupcpy(char* dst,size_t* p_dst_size,const char* str); CIMGUI_API const char* igImStrchrRange(const char* str_begin,const char* str_end,char c); CIMGUI_API const char* igImStreolRange(const char* str,const char* str_end); @@ -4007,8 +4283,14 @@ CIMGUI_API bool igImCharIsBlankA(char c); CIMGUI_API bool igImCharIsBlankW(unsigned int c); CIMGUI_API bool igImCharIsXdigitA(char c); CIMGUI_API int igImFormatString(char* buf,size_t buf_size,const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API int igImFormatString0(char* buf,size_t buf_size,const char* fmt); +#endif CIMGUI_API int igImFormatStringV(char* buf,size_t buf_size,const char* fmt,va_list args); CIMGUI_API void igImFormatStringToTempBuffer(const char** out_buf,const char** out_buf_end,const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igImFormatStringToTempBuffer0(const char** out_buf,const char** out_buf_end,const char* fmt); +#endif CIMGUI_API void igImFormatStringToTempBufferV(const char** out_buf,const char** out_buf_end,const char* fmt,va_list args); CIMGUI_API const char* igImParseFormatFindStart(const char* format); CIMGUI_API const char* igImParseFormatFindEnd(const char* format); @@ -4056,6 +4338,8 @@ CIMGUI_API float igImTrunc_Float(float f); CIMGUI_API void igImTrunc_Vec2(ImVec2 *pOut,const ImVec2 v); CIMGUI_API float igImFloor_Float(float f); CIMGUI_API void igImFloor_Vec2(ImVec2 *pOut,const ImVec2 v); +CIMGUI_API float igImTrunc64(float f); +CIMGUI_API float igImRound64(float f); CIMGUI_API int igImModPositive(int a,int b); CIMGUI_API float igImDot(const ImVec2 a,const ImVec2 b); CIMGUI_API void igImRotate(ImVec2 *pOut,const ImVec2 v,float cos_a,float sin_a); @@ -4077,6 +4361,9 @@ CIMGUI_API bool igImTriangleIsClockwise(const ImVec2 a,const ImVec2 b,const ImVe CIMGUI_API ImVec1* ImVec1_ImVec1_Nil(void); CIMGUI_API void ImVec1_destroy(ImVec1* self); CIMGUI_API ImVec1* ImVec1_ImVec1_Float(float _x); +CIMGUI_API ImVec2i* ImVec2i_ImVec2i_Nil(void); +CIMGUI_API void ImVec2i_destroy(ImVec2i* self); +CIMGUI_API ImVec2i* ImVec2i_ImVec2i_Int(int _x,int _y); CIMGUI_API ImVec2ih* ImVec2ih_ImVec2ih_Nil(void); CIMGUI_API void ImVec2ih_destroy(ImVec2ih* self); CIMGUI_API ImVec2ih* ImVec2ih_ImVec2ih_short(short _x,short _y); @@ -4243,7 +4530,6 @@ CIMGUI_API ImGuiID ImGuiWindow_GetID_Int(ImGuiWindow* self,int n); CIMGUI_API ImGuiID ImGuiWindow_GetIDFromPos(ImGuiWindow* self,const ImVec2 p_abs); CIMGUI_API ImGuiID ImGuiWindow_GetIDFromRectangle(ImGuiWindow* self,const ImRect r_abs); CIMGUI_API void ImGuiWindow_Rect(ImRect *pOut,ImGuiWindow* self); -CIMGUI_API float ImGuiWindow_CalcFontSize(ImGuiWindow* self); CIMGUI_API void ImGuiWindow_TitleBarRect(ImRect *pOut,ImGuiWindow* self); CIMGUI_API void ImGuiWindow_MenuBarRect(ImRect *pOut,ImGuiWindow* self); CIMGUI_API ImGuiTabItem* ImGuiTabItem_ImGuiTabItem(void); @@ -4295,9 +4581,18 @@ CIMGUI_API void igBringWindowToDisplayBehind(ImGuiWindow* window,ImGuiWindow* ab CIMGUI_API int igFindWindowDisplayIndex(ImGuiWindow* window); CIMGUI_API ImGuiWindow* igFindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window); CIMGUI_API void igSetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags); -CIMGUI_API void igSetCurrentFont(ImFont* font); +CIMGUI_API void igRegisterUserTexture(ImTextureData* tex); +CIMGUI_API void igUnregisterUserTexture(ImTextureData* tex); +CIMGUI_API void igRegisterFontAtlas(ImFontAtlas* atlas); +CIMGUI_API void igUnregisterFontAtlas(ImFontAtlas* atlas); +CIMGUI_API void igSetCurrentFont(ImFont* font,float font_size_before_scaling,float font_size_after_scaling); +CIMGUI_API void igUpdateCurrentFontSize(float restore_font_size_after_scaling); +CIMGUI_API void igSetFontRasterizerDensity(float rasterizer_density); +CIMGUI_API float igGetFontRasterizerDensity(void); +CIMGUI_API float igGetRoundedFontSize(float size); CIMGUI_API ImFont* igGetDefaultFont(void); CIMGUI_API void igPushPasswordFont(void); +CIMGUI_API void igPopPasswordFont(void); CIMGUI_API ImDrawList* igGetForegroundDrawList_WindowPtr(ImGuiWindow* window); CIMGUI_API ImDrawList* igGetBackgroundDrawList_ViewportPtr(ImGuiViewport* viewport); CIMGUI_API ImDrawList* igGetForegroundDrawList_ViewportPtr(ImGuiViewport* viewport); @@ -4305,7 +4600,7 @@ CIMGUI_API void igAddDrawListToDrawDataEx(ImDrawData* draw_data,ImVector_ImDrawL CIMGUI_API void igInitialize(void); CIMGUI_API void igShutdown(void); CIMGUI_API void igUpdateInputEvents(bool trickle_fast_inputs); -CIMGUI_API void igUpdateHoveredWindowAndCaptureFlags(void); +CIMGUI_API void igUpdateHoveredWindowAndCaptureFlags(const ImVec2 mouse_pos); CIMGUI_API void igFindHoveredWindowEx(const ImVec2 pos,bool find_first_and_in_any_viewport,ImGuiWindow** out_hovered_window,ImGuiWindow** out_hovered_window_under_moving_window); CIMGUI_API void igStartMouseMovingWindow(ImGuiWindow* window); CIMGUI_API void igUpdateMouseMovingWindowNewFrame(void); @@ -4395,7 +4690,7 @@ CIMGUI_API bool igNavMoveRequestButNoResultYet(void); CIMGUI_API void igNavMoveRequestSubmit(ImGuiDir move_dir,ImGuiDir clip_dir,ImGuiNavMoveFlags move_flags,ImGuiScrollFlags scroll_flags); CIMGUI_API void igNavMoveRequestForward(ImGuiDir move_dir,ImGuiDir clip_dir,ImGuiNavMoveFlags move_flags,ImGuiScrollFlags scroll_flags); CIMGUI_API void igNavMoveRequestResolveWithLastItem(ImGuiNavItemData* result); -CIMGUI_API void igNavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result,ImGuiTreeNodeStackData* tree_node_data); +CIMGUI_API void igNavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result,const ImGuiTreeNodeStackData* tree_node_data); CIMGUI_API void igNavMoveRequestCancel(void); CIMGUI_API void igNavMoveRequestApplyResult(void); CIMGUI_API void igNavMoveRequestTryWrapping(ImGuiWindow* window,ImGuiNavMoveFlags move_flags); @@ -4486,6 +4781,8 @@ CIMGUI_API float igTableGetHeaderRowHeight(void); CIMGUI_API float igTableGetHeaderAngledMaxLabelWidth(void); CIMGUI_API void igTablePushBackgroundChannel(void); CIMGUI_API void igTablePopBackgroundChannel(void); +CIMGUI_API void igTablePushColumnChannel(int column_n); +CIMGUI_API void igTablePopColumnChannel(void); CIMGUI_API void igTableAngledHeadersRowEx(ImGuiID row_id,float angle,float max_label_width,const ImGuiTableHeaderData* data,int data_count); CIMGUI_API ImGuiTable* igGetCurrentTable(void); CIMGUI_API ImGuiTable* igTableFindByID(ImGuiID id); @@ -4552,7 +4849,7 @@ CIMGUI_API void igRenderText(ImVec2 pos,const char* text,const char* text_end,bo CIMGUI_API void igRenderTextWrapped(ImVec2 pos,const char* text,const char* text_end,float wrap_width); CIMGUI_API void igRenderTextClipped(const ImVec2 pos_min,const ImVec2 pos_max,const char* text,const char* text_end,const ImVec2* text_size_if_known,const ImVec2 align,const ImRect* clip_rect); CIMGUI_API void igRenderTextClippedEx(ImDrawList* draw_list,const ImVec2 pos_min,const ImVec2 pos_max,const char* text,const char* text_end,const ImVec2* text_size_if_known,const ImVec2 align,const ImRect* clip_rect); -CIMGUI_API void igRenderTextEllipsis(ImDrawList* draw_list,const ImVec2 pos_min,const ImVec2 pos_max,float clip_max_x,float ellipsis_max_x,const char* text,const char* text_end,const ImVec2* text_size_if_known); +CIMGUI_API void igRenderTextEllipsis(ImDrawList* draw_list,const ImVec2 pos_min,const ImVec2 pos_max,float ellipsis_max_x,const char* text,const char* text_end,const ImVec2* text_size_if_known); CIMGUI_API void igRenderFrame(ImVec2 p_min,ImVec2 p_max,ImU32 fill_col,bool borders,float rounding); CIMGUI_API void igRenderFrameBorder(ImVec2 p_min,ImVec2 p_max,float rounding); CIMGUI_API void igRenderColorRectWithAlphaCheckerboard(ImDrawList* draw_list,ImVec2 p_min,ImVec2 p_max,ImU32 fill_col,float grid_step,ImVec2 grid_off,float rounding,ImDrawFlags flags); @@ -4566,9 +4863,14 @@ CIMGUI_API void igRenderArrowPointingAt(ImDrawList* draw_list,ImVec2 pos,ImVec2 CIMGUI_API void igRenderRectFilledRangeH(ImDrawList* draw_list,const ImRect rect,ImU32 col,float x_start_norm,float x_end_norm,float rounding); CIMGUI_API void igRenderRectFilledWithHole(ImDrawList* draw_list,const ImRect outer,const ImRect inner,ImU32 col,float rounding); CIMGUI_API void igTextEx(const char* text,const char* text_end,ImGuiTextFlags flags); +CIMGUI_API void igTextAligned(float align_x,float size_x,const char* fmt,...); +#ifdef CIMGUI_VARGS0 +CIMGUI_API void igTextAligned0(float align_x,float size_x,const char* fmt); +#endif +CIMGUI_API void igTextAlignedV(float align_x,float size_x,const char* fmt,va_list args); CIMGUI_API bool igButtonEx(const char* label,const ImVec2 size_arg,ImGuiButtonFlags flags); CIMGUI_API bool igArrowButtonEx(const char* str_id,ImGuiDir dir,ImVec2 size_arg,ImGuiButtonFlags flags); -CIMGUI_API bool igImageButtonEx(ImGuiID id,ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags); +CIMGUI_API bool igImageButtonEx(ImGuiID id,ImTextureRef tex_ref,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags); CIMGUI_API void igSeparatorEx(ImGuiSeparatorFlags flags,float thickness); CIMGUI_API void igSeparatorTextEx(ImGuiID id,const char* label,const char* label_end,float extra_width); CIMGUI_API bool igCheckboxFlags_S64Ptr(const char* label,ImS64* flags,ImS64 flags_value); @@ -4586,6 +4888,8 @@ CIMGUI_API bool igDragBehavior(ImGuiID id,ImGuiDataType data_type,void* p_v,floa CIMGUI_API bool igSliderBehavior(const ImRect bb,ImGuiID id,ImGuiDataType data_type,void* p_v,const void* p_min,const void* p_max,const char* format,ImGuiSliderFlags flags,ImRect* out_grab_bb); CIMGUI_API bool igSplitterBehavior(const ImRect bb,ImGuiID id,ImGuiAxis axis,float* size1,float* size2,float min_size1,float min_size2,float hover_extend,float hover_visibility_delay,ImU32 bg_col); CIMGUI_API bool igTreeNodeBehavior(ImGuiID id,ImGuiTreeNodeFlags flags,const char* label,const char* label_end); +CIMGUI_API void igTreeNodeDrawLineToChildNode(const ImVec2 target_pos); +CIMGUI_API void igTreeNodeDrawLineToTreePop(const ImGuiTreeNodeStackData* data); CIMGUI_API void igTreePushOverrideID(ImGuiID id); CIMGUI_API bool igTreeNodeGetOpen(ImGuiID storage_id); CIMGUI_API void igTreeNodeSetOpen(ImGuiID storage_id,bool open); @@ -4640,7 +4944,9 @@ CIMGUI_API void igDebugNodeColumns(ImGuiOldColumns* columns); CIMGUI_API void igDebugNodeDrawList(ImGuiWindow* window,ImGuiViewportP* viewport,const ImDrawList* draw_list,const char* label); CIMGUI_API void igDebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList* out_draw_list,const ImDrawList* draw_list,const ImDrawCmd* draw_cmd,bool show_mesh,bool show_aabb); CIMGUI_API void igDebugNodeFont(ImFont* font); +CIMGUI_API void igDebugNodeFontGlyphesForSrcMask(ImFont* font,ImFontBaked* baked,int src_mask); CIMGUI_API void igDebugNodeFontGlyph(ImFont* font,const ImFontGlyph* glyph); +CIMGUI_API void igDebugNodeTexture(ImTextureData* tex,int int_id,const ImFontAtlasRect* highlight_rect); CIMGUI_API void igDebugNodeStorage(ImGuiStorage* storage,const char* label); CIMGUI_API void igDebugNodeTabBar(ImGuiTabBar* tab_bar,const char* label); CIMGUI_API void igDebugNodeTable(ImGuiTable* table); @@ -4655,27 +4961,74 @@ CIMGUI_API void igDebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows,i CIMGUI_API void igDebugNodeViewport(ImGuiViewportP* viewport); CIMGUI_API void igDebugRenderKeyboardPreview(ImDrawList* draw_list); CIMGUI_API void igDebugRenderViewportThumbnail(ImDrawList* draw_list,ImGuiViewportP* viewport,const ImRect bb); -CIMGUI_API const ImFontBuilderIO* igImFontAtlasGetBuilderForStbTruetype(void); -CIMGUI_API void igImFontAtlasUpdateSourcesPointers(ImFontAtlas* atlas); +CIMGUI_API ImFontLoader* ImFontLoader_ImFontLoader(void); +CIMGUI_API void ImFontLoader_destroy(ImFontLoader* self); +CIMGUI_API const ImFontLoader* igImFontAtlasGetFontLoaderForStbTruetype(void); +CIMGUI_API int igImFontAtlasRectId_GetIndex(ImFontAtlasRectId id); +CIMGUI_API int igImFontAtlasRectId_GetGeneration(ImFontAtlasRectId id); +CIMGUI_API ImFontAtlasRectId igImFontAtlasRectId_Make(int index_idx,int gen_idx); +CIMGUI_API ImFontAtlasBuilder* ImFontAtlasBuilder_ImFontAtlasBuilder(void); +CIMGUI_API void ImFontAtlasBuilder_destroy(ImFontAtlasBuilder* self); CIMGUI_API void igImFontAtlasBuildInit(ImFontAtlas* atlas); -CIMGUI_API void igImFontAtlasBuildSetupFont(ImFontAtlas* atlas,ImFont* font,ImFontConfig* src,float ascent,float descent); -CIMGUI_API void igImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas,void* stbrp_context_opaque); -CIMGUI_API void igImFontAtlasBuildFinish(ImFontAtlas* atlas); -CIMGUI_API void igImFontAtlasBuildRender8bppRectFromString(ImFontAtlas* atlas,int x,int y,int w,int h,const char* in_str,char in_marker_char,unsigned char in_marker_pixel_value); -CIMGUI_API void igImFontAtlasBuildRender32bppRectFromString(ImFontAtlas* atlas,int x,int y,int w,int h,const char* in_str,char in_marker_char,unsigned int in_marker_pixel_value); -CIMGUI_API void igImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256],float in_multiply_factor); -CIMGUI_API void igImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256],unsigned char* pixels,int x,int y,int w,int h,int stride); -CIMGUI_API void igImFontAtlasBuildGetOversampleFactors(const ImFontConfig* src,int* out_oversample_h,int* out_oversample_v); +CIMGUI_API void igImFontAtlasBuildDestroy(ImFontAtlas* atlas); +CIMGUI_API void igImFontAtlasBuildMain(ImFontAtlas* atlas); +CIMGUI_API void igImFontAtlasBuildSetupFontLoader(ImFontAtlas* atlas,const ImFontLoader* font_loader); +CIMGUI_API void igImFontAtlasBuildUpdatePointers(ImFontAtlas* atlas); +CIMGUI_API void igImFontAtlasBuildRenderBitmapFromString(ImFontAtlas* atlas,int x,int y,int w,int h,const char* in_str,char in_marker_char); +CIMGUI_API void igImFontAtlasBuildClear(ImFontAtlas* atlas); +CIMGUI_API ImTextureData* igImFontAtlasTextureAdd(ImFontAtlas* atlas,int w,int h); +CIMGUI_API void igImFontAtlasTextureMakeSpace(ImFontAtlas* atlas); +CIMGUI_API void igImFontAtlasTextureRepack(ImFontAtlas* atlas,int w,int h); +CIMGUI_API void igImFontAtlasTextureGrow(ImFontAtlas* atlas,int old_w,int old_h); +CIMGUI_API void igImFontAtlasTextureCompact(ImFontAtlas* atlas); +CIMGUI_API void igImFontAtlasTextureGetSizeEstimate(ImVec2i *pOut,ImFontAtlas* atlas); +CIMGUI_API void igImFontAtlasBuildSetupFontSpecialGlyphs(ImFontAtlas* atlas,ImFont* font,ImFontConfig* src); +CIMGUI_API void igImFontAtlasBuildLegacyPreloadAllGlyphRanges(ImFontAtlas* atlas); +CIMGUI_API void igImFontAtlasBuildGetOversampleFactors(ImFontConfig* src,ImFontBaked* baked,int* out_oversample_h,int* out_oversample_v); +CIMGUI_API void igImFontAtlasBuildDiscardBakes(ImFontAtlas* atlas,int unused_frames); +CIMGUI_API bool igImFontAtlasFontSourceInit(ImFontAtlas* atlas,ImFontConfig* src); +CIMGUI_API void igImFontAtlasFontSourceAddToFont(ImFontAtlas* atlas,ImFont* font,ImFontConfig* src); +CIMGUI_API void igImFontAtlasFontDestroySourceData(ImFontAtlas* atlas,ImFontConfig* src); +CIMGUI_API bool igImFontAtlasFontInitOutput(ImFontAtlas* atlas,ImFont* font); +CIMGUI_API void igImFontAtlasFontDestroyOutput(ImFontAtlas* atlas,ImFont* font); +CIMGUI_API void igImFontAtlasFontDiscardBakes(ImFontAtlas* atlas,ImFont* font,int unused_frames); +CIMGUI_API ImGuiID igImFontAtlasBakedGetId(ImGuiID font_id,float baked_size,float rasterizer_density); +CIMGUI_API ImFontBaked* igImFontAtlasBakedGetOrAdd(ImFontAtlas* atlas,ImFont* font,float font_size,float font_rasterizer_density); +CIMGUI_API ImFontBaked* igImFontAtlasBakedGetClosestMatch(ImFontAtlas* atlas,ImFont* font,float font_size,float font_rasterizer_density); +CIMGUI_API ImFontBaked* igImFontAtlasBakedAdd(ImFontAtlas* atlas,ImFont* font,float font_size,float font_rasterizer_density,ImGuiID baked_id); +CIMGUI_API void igImFontAtlasBakedDiscard(ImFontAtlas* atlas,ImFont* font,ImFontBaked* baked); +CIMGUI_API ImFontGlyph* igImFontAtlasBakedAddFontGlyph(ImFontAtlas* atlas,ImFontBaked* baked,ImFontConfig* src,const ImFontGlyph* in_glyph); +CIMGUI_API void igImFontAtlasBakedDiscardFontGlyph(ImFontAtlas* atlas,ImFont* font,ImFontBaked* baked,ImFontGlyph* glyph); +CIMGUI_API void igImFontAtlasBakedSetFontGlyphBitmap(ImFontAtlas* atlas,ImFontBaked* baked,ImFontConfig* src,ImFontGlyph* glyph,ImTextureRect* r,const unsigned char* src_pixels,ImTextureFormat src_fmt,int src_pitch); +CIMGUI_API void igImFontAtlasPackInit(ImFontAtlas* atlas); +CIMGUI_API ImFontAtlasRectId igImFontAtlasPackAddRect(ImFontAtlas* atlas,int w,int h,ImFontAtlasRectEntry* overwrite_entry); +CIMGUI_API ImTextureRect* igImFontAtlasPackGetRect(ImFontAtlas* atlas,ImFontAtlasRectId id); +CIMGUI_API ImTextureRect* igImFontAtlasPackGetRectSafe(ImFontAtlas* atlas,ImFontAtlasRectId id); +CIMGUI_API void igImFontAtlasPackDiscardRect(ImFontAtlas* atlas,ImFontAtlasRectId id); +CIMGUI_API void igImFontAtlasUpdateNewFrame(ImFontAtlas* atlas,int frame_count,bool renderer_has_textures); +CIMGUI_API void igImFontAtlasAddDrawListSharedData(ImFontAtlas* atlas,ImDrawListSharedData* data); +CIMGUI_API void igImFontAtlasRemoveDrawListSharedData(ImFontAtlas* atlas,ImDrawListSharedData* data); +CIMGUI_API void igImFontAtlasUpdateDrawListsTextures(ImFontAtlas* atlas,ImTextureRef old_tex,ImTextureRef new_tex); +CIMGUI_API void igImFontAtlasUpdateDrawListsSharedData(ImFontAtlas* atlas); +CIMGUI_API void igImFontAtlasTextureBlockConvert(const unsigned char* src_pixels,ImTextureFormat src_fmt,int src_pitch,unsigned char* dst_pixels,ImTextureFormat dst_fmt,int dst_pitch,int w,int h); +CIMGUI_API void igImFontAtlasTextureBlockPostProcess(ImFontAtlasPostProcessData* data); +CIMGUI_API void igImFontAtlasTextureBlockPostProcessMultiply(ImFontAtlasPostProcessData* data,float multiply_factor); +CIMGUI_API void igImFontAtlasTextureBlockFill(ImTextureData* dst_tex,int dst_x,int dst_y,int w,int h,ImU32 col); +CIMGUI_API void igImFontAtlasTextureBlockCopy(ImTextureData* src_tex,int src_x,int src_y,ImTextureData* dst_tex,int dst_x,int dst_y,int w,int h); +CIMGUI_API void igImFontAtlasTextureBlockQueueUpload(ImFontAtlas* atlas,ImTextureData* tex,int x,int y,int w,int h); +CIMGUI_API int igImTextureDataGetFormatBytesPerPixel(ImTextureFormat format); +CIMGUI_API const char* igImTextureDataGetStatusName(ImTextureStatus status); +CIMGUI_API const char* igImTextureDataGetFormatName(ImTextureFormat format); +CIMGUI_API void igImFontAtlasDebugLogTextureRequests(ImFontAtlas* atlas); CIMGUI_API bool igImFontAtlasGetMouseCursorTexData(ImFontAtlas* atlas,ImGuiMouseCursor cursor_type,ImVec2* out_offset,ImVec2* out_size,ImVec2 out_uv_border[2],ImVec2 out_uv_fill[2]); #ifdef IMGUI_ENABLE_FREETYPE -CIMGUI_API const ImFontBuilderIO* ImGuiFreeType_GetBuilderForFreeType(void); +CIMGUI_API const ImFontLoader* ImGuiFreeType_GetFontLoader(void); CIMGUI_API void ImGuiFreeType_SetAllocatorFunctions(void*(*alloc_func)(size_t sz,void* user_data),void(*free_func)(void* ptr,void* user_data),void* user_data); +CIMGUI_API bool ImGuiFreeType_DebugEditFontLoaderFlags(ImGuiFreeTypeLoaderFlags* p_font_loader_flags); #endif /////////////////////////hand written functions -//no LogTextV -CIMGUI_API void igLogText(const char *fmt, ...); //no appendfV CIMGUI_API void ImGuiTextBuffer_appendf(ImGuiTextBuffer *self, const char *fmt, ...); //for getting FLT_MAX in bindings diff --git a/cimgui_impl.h b/cimgui_impl.h index 77763cf..73aa91f 100644 --- a/cimgui_impl.h +++ b/cimgui_impl.h @@ -1,3 +1,5 @@ +#ifndef CIMGUI_IMPL_DEFINED +#define CIMGUI_IMPL_DEFINED #ifdef CIMGUI_USE_GLFW #ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS @@ -23,6 +25,8 @@ CIMGUI_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window,int key,int scanco CIMGUI_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window,unsigned int c); CIMGUI_API void ImGui_ImplGlfw_MonitorCallback(GLFWmonitor* monitor,int event); CIMGUI_API void ImGui_ImplGlfw_Sleep(int milliseconds); +CIMGUI_API float ImGui_ImplGlfw_GetContentScaleForWindow(GLFWwindow* window); +CIMGUI_API float ImGui_ImplGlfw_GetContentScaleForMonitor(GLFWmonitor* monitor); #endif #ifdef CIMGUI_USE_OPENGL3 @@ -30,10 +34,9 @@ CIMGUI_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version); CIMGUI_API void ImGui_ImplOpenGL3_Shutdown(void); CIMGUI_API void ImGui_ImplOpenGL3_NewFrame(void); CIMGUI_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data); -CIMGUI_API bool ImGui_ImplOpenGL3_CreateFontsTexture(void); -CIMGUI_API void ImGui_ImplOpenGL3_DestroyFontsTexture(void); CIMGUI_API bool ImGui_ImplOpenGL3_CreateDeviceObjects(void); CIMGUI_API void ImGui_ImplOpenGL3_DestroyDeviceObjects(void); +CIMGUI_API void ImGui_ImplOpenGL3_UpdateTexture(ImTextureData* tex); #endif #ifdef CIMGUI_USE_OPENGL2 @@ -41,10 +44,9 @@ CIMGUI_API bool ImGui_ImplOpenGL2_Init(void); CIMGUI_API void ImGui_ImplOpenGL2_Shutdown(void); CIMGUI_API void ImGui_ImplOpenGL2_NewFrame(void); CIMGUI_API void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data); -CIMGUI_API bool ImGui_ImplOpenGL2_CreateFontsTexture(void); -CIMGUI_API void ImGui_ImplOpenGL2_DestroyFontsTexture(void); CIMGUI_API bool ImGui_ImplOpenGL2_CreateDeviceObjects(void); CIMGUI_API void ImGui_ImplOpenGL2_DestroyDeviceObjects(void); +CIMGUI_API void ImGui_ImplOpenGL2_UpdateTexture(ImTextureData* tex); #endif #ifdef CIMGUI_USE_SDL2 @@ -68,6 +70,8 @@ CIMGUI_API bool ImGui_ImplSDL2_InitForOther(SDL_Window* window); CIMGUI_API void ImGui_ImplSDL2_Shutdown(void); CIMGUI_API void ImGui_ImplSDL2_NewFrame(void); CIMGUI_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event); +CIMGUI_API float ImGui_ImplSDL2_GetContentScaleForWindow(SDL_Window* window); +CIMGUI_API float ImGui_ImplSDL2_GetContentScaleForDisplay(int display_index); CIMGUI_API void ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode mode,struct _SDL_GameController** manual_gamepads_array,int manual_gamepads_count); #endif @@ -181,9 +185,8 @@ CIMGUI_API bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info); CIMGUI_API void ImGui_ImplVulkan_Shutdown(void); CIMGUI_API void ImGui_ImplVulkan_NewFrame(void); CIMGUI_API void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data,VkCommandBuffer command_buffer,VkPipeline pipeline); -CIMGUI_API bool ImGui_ImplVulkan_CreateFontsTexture(void); -CIMGUI_API void ImGui_ImplVulkan_DestroyFontsTexture(void); CIMGUI_API void ImGui_ImplVulkan_SetMinImageCount(uint32_t min_image_count); +CIMGUI_API void ImGui_ImplVulkan_UpdateTexture(ImTextureData* tex); CIMGUI_API VkDescriptorSet ImGui_ImplVulkan_AddTexture(VkSampler sampler,VkImageView image_view,VkImageLayout image_layout); CIMGUI_API void ImGui_ImplVulkan_RemoveTexture(VkDescriptorSet descriptor_set); CIMGUI_API bool ImGui_ImplVulkan_LoadFunctions(uint32_t api_version,PFN_vkVoidFunction(*loader_func)(const char* function_name,void* user_data),void* user_data); @@ -197,3 +200,4 @@ CIMGUI_API int ImGui_ImplVulkanH_GetMinImageCountFromPresentMode(VkPresentModeKH CIMGUI_API ImGui_ImplVulkanH_Window* ImGui_ImplVulkanH_Window_ImGui_ImplVulkanH_Window(void); #endif +#endif //CIMGUI_IMPL_DEFINED diff --git a/generator/cimgui_template.cpp b/generator/cimgui_template.cpp index 586fa85..7d1c6c1 100644 --- a/generator/cimgui_template.cpp +++ b/generator/cimgui_template.cpp @@ -12,16 +12,7 @@ /////////////////////////////manual written functions -CIMGUI_API void igLogText(const char *fmt, ...) -{ - char buffer[256]; - va_list args; - va_start(args, fmt); - vsnprintf(buffer, 256, fmt, args); - va_end(args); - ImGui::LogText("%s", buffer); -} CIMGUI_API void ImGuiTextBuffer_appendf(ImGuiTextBuffer *self, const char *fmt, ...) { va_list args; diff --git a/generator/cimgui_template.h b/generator/cimgui_template.h index d66489d..5beae90 100644 --- a/generator/cimgui_template.h +++ b/generator/cimgui_template.h @@ -46,8 +46,6 @@ typedef union SDL_Event SDL_Event; #include "auto_funcs.h" /////////////////////////hand written functions -//no LogTextV -CIMGUI_API void igLogText(const char *fmt, ...); //no appendfV CIMGUI_API void ImGuiTextBuffer_appendf(ImGuiTextBuffer *self, const char *fmt, ...); //for getting FLT_MAX in bindings diff --git a/generator/cpp2ffi.lua b/generator/cpp2ffi.lua index 7636f7e..b4b6e7a 100644 --- a/generator/cpp2ffi.lua +++ b/generator/cpp2ffi.lua @@ -774,7 +774,9 @@ local function parseFunction(self,stname,itt,namespace,locat) local noname_counter = 0 for i,ar in ipairs(argsTa) do --avoid var name without space type&name -> type& name - ar = ar:gsub("(%S)&(%S)","%1& %2") + -- also do type &name -> type& name + --ar = ar:gsub("(%S)&(%S)","%1& %2") + ar = ar:gsub("(%S)%s*&(%S)","%1& %2") local typ,name,retf,sigf,reftoptr,defa,ar1 local has_cdecl = ar:match"__cdecl" if has_cdecl then ar = ar:gsub("__cdecl","") end @@ -974,6 +976,7 @@ local function REPLACE_TEXTUREID(FP) end end end + local function ADDIMSTR_S(FP) local defsT = FP.defsT local newcdefs = {} @@ -1267,6 +1270,7 @@ local function printItems(items) end end ------------- +local numerr = 0 --for popen error file function M.Parser() local par = {} local cdefs ={} @@ -1310,7 +1314,9 @@ function M.Parser() if self.COMMENTS_GENERATION then cmd_line = cmd_line .. (compiler=="cl" and " /C " or " -C ") end - local pipe,err = io.popen(cmd_line,"r") + numerr = numerr + 1 + local errfile = "err"..numerr..".txt" + local pipe,err = io.popen(cmd_line.." 2>"..errfile,"r") if not pipe then error("could not execute COMPILER "..err) end @@ -1320,8 +1326,18 @@ function M.Parser() self:insert(line, tostring(loca)..":"..tostring(loca2)) table.insert(preprocessed,line)-- end - save_data("preprocesed.h",table.concat(preprocessed,"\n")) pipe:close() + --print(#preprocessed, "lines processed") + save_data("preprocesed.h",table.concat(preprocessed,"\n")) + + local f = assert(io.open(errfile,"r")) + local errstr = f:read"*a" + f:close() + --print(#errstr,"errstr") + print(errstr) + --try to guess a compiler error + assert(not errstr:match" error") + os.remove(errfile) return defines end function par:do_parse() @@ -2139,6 +2155,7 @@ function M.Parser() function par:dump_alltypes() for k,v in pairs(self.alltypes) do print(k, typetoStr(k) ) end end + function par:compute_overloads() -- if self.IMGUI_HAS_TEXTURES then -- print"----------replacing ImTextureID with ImTextureUserID" @@ -2618,6 +2635,21 @@ local function location(file,locpathT,defines,COMPILER,keepemptylines) end M.location = location ---------------------- C writing functions +local function paramListWithoutDots(params) + i, j = string.find(params, "%.%.%.") + while i > 1 do + i = i - 1 + c = string.sub(params,i,i) + if c == "," then + return string.sub(params, 1, i-1) .. params:sub(j+1) + elseif c == "(" then + return string.sub(params, 1, i) .. params:sub(j+1) + end + end + + error("paramListWithoutDots failed") + return "()" +end local function ImGui_f_implementation(def) local outtab = {} local ptret = def.retref and "&" or "" @@ -2638,14 +2670,24 @@ local function ImGui_f_implementation(def) if def.ret~="void" then table.insert(outtab," return ret;\n") end + table.insert(outtab,"}\n") + -- For variadic functions we add a function implementation with zero argumets, for compatibility with languages such as C#. + table.insert(outtab, "#ifdef CIMGUI_VARGS0\n") + table.insert(outtab, "CIMGUI_API".." "..def.ret.." "..def.ov_cimguiname.."0"..paramListWithoutDots(def.args).."\n") + table.insert(outtab, "{\n") + table.insert(outtab, " return "..def.ov_cimguiname..paramListWithoutDots(def.call_args)..";\n") + table.insert(outtab, "}\n") + table.insert(outtab, "#endif\n") elseif def.nonUDT then if def.nonUDT == 1 then table.insert(outtab," *pOut = "..namespace..def.funcname..def.call_args..";\n") end + table.insert(outtab,"}\n") else --standard ImGui table.insert(outtab," return "..ptret..namespace..def.funcname..def.call_args..";\n") + table.insert(outtab,"}\n") end - table.insert(outtab,"}\n") + --table.insert(outtab,"}\n") return table.concat(outtab, "") end local function struct_f_implementation(def) @@ -2797,6 +2839,12 @@ local function func_header_generate_funcs(FP) if def.stname == "" or def.is_static_function then --ImGui namespace or top level table.insert(outtab,"CIMGUI_API "..def.ret.." ".. def.ov_cimguiname ..(empty and "(void)" or def.args)..";"..addcoment.."\n") + if def.isvararg then + -- For variadic functions we add a function implementation with zero argumets, for compatibility with languages such as C#. + table.insert(outtab, "#ifdef CIMGUI_VARGS0\n") + table.insert(outtab, "CIMGUI_API".." "..def.ret.." "..def.ov_cimguiname.."0"..paramListWithoutDots(def.args)..";\n") + table.insert(outtab, "#endif\n") + end else table.insert(outtab,"CIMGUI_API "..def.ret.." "..def.ov_cimguiname..def.args..";"..addcoment.."\n") end diff --git a/generator/generator.lua b/generator/generator.lua index 4aab94e..9aa62ba 100644 --- a/generator/generator.lua +++ b/generator/generator.lua @@ -78,7 +78,7 @@ print("CPRE",CPRE) --this table has the functions to be skipped in generation -------------------------------------------------------------------------- local cimgui_manuals = { - igLogText = true, + -- igLogText = true, ImGuiTextBuffer_appendf = true, --igColorConvertRGBtoHSV = true, --igColorConvertHSVtoRGB = true @@ -460,9 +460,10 @@ if #implementations > 0 then parser2 = cpp2ffi.Parser() local config = dofile(CONFIG_GENERATOR_PATH) --"./config_generator.lua" - local impl_str = "" + local impl_str = "#ifndef CIMGUI_IMPL_DEFINED\n#define CIMGUI_IMPL_DEFINED\n" local impl_str_cpp = {} for i,impl in ipairs(implementations) do + print("------------implementation:",impl) table.insert(impl_str_cpp, "\n#ifdef CIMGUI_USE_" .. string.upper(impl)) table.insert(impl_str_cpp, [[#include "imgui_impl_]]..impl..[[.h"]]) table.insert(impl_str_cpp, "#endif") @@ -480,11 +481,11 @@ if #implementations > 0 then extra_includes = extra_includes .. include_cmd .. inc .. " " end end - parser2.cimgui_inherited = dofile([[../../cimgui/generator/output/structs_and_enums.lua]]) + parser2.cimgui_inherited = dofile([[./output/structs_and_enums.lua]]) local defines = parser2:take_lines(CPRE..extra_defines..extra_includes..source, {locati}, COMPILER) local parser3 = cpp2ffi.Parser() - parser3.cimgui_inherited = dofile([[../../cimgui/generator/output/structs_and_enums.lua]]) + parser3.cimgui_inherited = dofile([[./output/structs_and_enums.lua]]) parser3:take_lines(CPRE..extra_defines..extra_includes..source, {locati}, COMPILER) parser3:do_parse() local cfuncsstr = func_header_impl_generate(parser3) @@ -501,7 +502,7 @@ if #implementations > 0 then end impl_str = impl_str.. table.concat(outtab)..cfuncsstr .. "\n#endif\n" end - + impl_str = impl_str .. "#endif //CIMGUI_IMPL_DEFINED\n" parser2:do_parse() save_data("./output/cimgui_impl.h",impl_str) @@ -512,6 +513,11 @@ if #implementations > 0 then local cppstr = read_data"./cimgui_impl_template.cpp" cppstr = cppstr:gsub("GENERATED_PLACEHOLDER", impl_str_cpp) save_data("./output/cimgui_impl.cpp",cppstr) + + copyfile("./output/cimgui_impl.h", "../cimgui_impl.h") + copyfile("./output/cimgui_impl.cpp", "../cimgui_impl.cpp") + os.remove("./output/cimgui_impl.h") + os.remove("./output/cimgui_impl.cpp") end -- #implementations > 0 then @@ -543,11 +549,7 @@ end --]] -------------------copy C files to repo root copyfile("./output/cimgui.h", "../cimgui.h") -copyfile("./output/cimgui_impl.h", "../cimgui_impl.h") -copyfile("./output/cimgui_impl.cpp", "../cimgui_impl.cpp") copyfile("./output/cimgui.cpp", "../cimgui.cpp") os.remove("./output/cimgui.h") -os.remove("./output/cimgui_impl.h") -os.remove("./output/cimgui_impl.cpp") os.remove("./output/cimgui.cpp") print"all done!!" diff --git a/generator/generator.sh b/generator/generator.sh index 9e0e81d..06b8915 100755 --- a/generator/generator.sh +++ b/generator/generator.sh @@ -25,7 +25,7 @@ POSITIONAL_ARGS=() TARGETS="internal noimstrv" -CFLAGS="glfw opengl3 opengl2 sdl2 sdl3 vulkan" +CFLAGS="glfw opengl3 opengl2 sdl2 sdl3" help() { cat <" + } + ], "ImVector": [ { "name": "Size", @@ -11166,16 +11837,24 @@ "ImGuiTableColumn": true, "ImGuiTableColumnIdx": true }, + "ImStableVector": { + "ImFontBaked,32": true + }, "ImVector": { "ImDrawChannel": true, "ImDrawCmd": true, "ImDrawIdx": true, "ImDrawList*": true, + "ImDrawListSharedData*": true, "ImDrawVert": true, "ImFont*": true, - "ImFontAtlasCustomRect": true, + "ImFontAtlas*": true, + "ImFontAtlasRectEntry": true, + "ImFontBaked*": true, "ImFontConfig": true, + "ImFontConfig*": true, "ImFontGlyph": true, + "ImFontStackData": true, "ImGuiColorMod": true, "ImGuiContextHook": true, "ImGuiFocusScopeData": true, @@ -11210,7 +11889,9 @@ "ImGuiViewportP*": true, "ImGuiWindow*": true, "ImGuiWindowStackData": true, - "ImTextureID": true, + "ImTextureData*": true, + "ImTextureRect": true, + "ImTextureRef": true, "ImU16": true, "ImU32": true, "ImU8": true, @@ -11220,6 +11901,7 @@ "char": true, "float": true, "int": true, + "stbrp_node_im": true, "unsigned char": true } }, @@ -11229,6 +11911,7 @@ "ImPool": "T", "ImSpan": "T", "ImSpanAllocator": "int CHUNKS", + "ImStableVector": "typename T, int BLOCK_SIZE", "ImVector": "T" } } \ No newline at end of file diff --git a/generator/output/structs_and_enums.lua b/generator/output/structs_and_enums.lua index 39f1fa2..64e9898 100644 --- a/generator/output/structs_and_enums.lua +++ b/generator/output/structs_and_enums.lua @@ -95,6 +95,23 @@ local t={ calc_value=4, name="ImFontAtlasFlags_NoBakedLines", value="1 << 2"}}, + ImFontFlags_={ + [1]={ + calc_value=0, + name="ImFontFlags_None", + value="0"}, + [2]={ + calc_value=2, + name="ImFontFlags_NoLoadError", + value="1 << 1"}, + [3]={ + calc_value=4, + name="ImFontFlags_NoLoadGlyphs", + value="1 << 2"}, + [4]={ + calc_value=8, + name="ImFontFlags_LockBakedSizes", + value="1 << 3"}}, ImGuiActivateFlags_={ [1]={ calc_value=0, @@ -153,7 +170,11 @@ local t={ [5]={ calc_value=8, name="ImGuiBackendFlags_RendererHasVtxOffset", - value="1 << 3"}}, + value="1 << 3"}, + [6]={ + calc_value=16, + name="ImGuiBackendFlags_RendererHasTextures", + value="1 << 4"}}, ImGuiButtonFlagsPrivate_={ [1]={ calc_value=16, @@ -216,10 +237,14 @@ local t={ name="ImGuiButtonFlags_NoTestKeyOwner", value="1 << 21"}, [16]={ + calc_value=4194304, + name="ImGuiButtonFlags_NoFocus", + value="1 << 22"}, + [17]={ calc_value=1008, name="ImGuiButtonFlags_PressedOnMask_", value="ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHold"}, - [17]={ + [18]={ calc_value=32, name="ImGuiButtonFlags_PressedOnDefault_", value="ImGuiButtonFlags_PressedOnClickRelease"}}, @@ -424,100 +449,108 @@ local t={ value="32"}, [34]={ calc_value=33, - name="ImGuiCol_TabHovered", + name="ImGuiCol_InputTextCursor", value="33"}, [35]={ calc_value=34, - name="ImGuiCol_Tab", + name="ImGuiCol_TabHovered", value="34"}, [36]={ calc_value=35, - name="ImGuiCol_TabSelected", + name="ImGuiCol_Tab", value="35"}, [37]={ calc_value=36, - name="ImGuiCol_TabSelectedOverline", + name="ImGuiCol_TabSelected", value="36"}, [38]={ calc_value=37, - name="ImGuiCol_TabDimmed", + name="ImGuiCol_TabSelectedOverline", value="37"}, [39]={ calc_value=38, - name="ImGuiCol_TabDimmedSelected", + name="ImGuiCol_TabDimmed", value="38"}, [40]={ calc_value=39, - name="ImGuiCol_TabDimmedSelectedOverline", + name="ImGuiCol_TabDimmedSelected", value="39"}, [41]={ calc_value=40, - name="ImGuiCol_PlotLines", + name="ImGuiCol_TabDimmedSelectedOverline", value="40"}, [42]={ calc_value=41, - name="ImGuiCol_PlotLinesHovered", + name="ImGuiCol_PlotLines", value="41"}, [43]={ calc_value=42, - name="ImGuiCol_PlotHistogram", + name="ImGuiCol_PlotLinesHovered", value="42"}, [44]={ calc_value=43, - name="ImGuiCol_PlotHistogramHovered", + name="ImGuiCol_PlotHistogram", value="43"}, [45]={ calc_value=44, - name="ImGuiCol_TableHeaderBg", + name="ImGuiCol_PlotHistogramHovered", value="44"}, [46]={ calc_value=45, - name="ImGuiCol_TableBorderStrong", + name="ImGuiCol_TableHeaderBg", value="45"}, [47]={ calc_value=46, - name="ImGuiCol_TableBorderLight", + name="ImGuiCol_TableBorderStrong", value="46"}, [48]={ calc_value=47, - name="ImGuiCol_TableRowBg", + name="ImGuiCol_TableBorderLight", value="47"}, [49]={ calc_value=48, - name="ImGuiCol_TableRowBgAlt", + name="ImGuiCol_TableRowBg", value="48"}, [50]={ calc_value=49, - name="ImGuiCol_TextLink", + name="ImGuiCol_TableRowBgAlt", value="49"}, [51]={ calc_value=50, - name="ImGuiCol_TextSelectedBg", + name="ImGuiCol_TextLink", value="50"}, [52]={ calc_value=51, - name="ImGuiCol_DragDropTarget", + name="ImGuiCol_TextSelectedBg", value="51"}, [53]={ calc_value=52, - name="ImGuiCol_NavCursor", + name="ImGuiCol_TreeLines", value="52"}, [54]={ calc_value=53, - name="ImGuiCol_NavWindowingHighlight", + name="ImGuiCol_DragDropTarget", value="53"}, [55]={ calc_value=54, - name="ImGuiCol_NavWindowingDimBg", + name="ImGuiCol_NavCursor", value="54"}, [56]={ calc_value=55, - name="ImGuiCol_ModalWindowDimBg", + name="ImGuiCol_NavWindowingHighlight", value="55"}, [57]={ calc_value=56, + name="ImGuiCol_NavWindowingDimBg", + value="56"}, + [58]={ + calc_value=57, + name="ImGuiCol_ModalWindowDimBg", + value="57"}, + [59]={ + calc_value=58, name="ImGuiCol_COUNT", - value="56"}}, + value="58"}}, ImGuiColorEditFlags_={ [1]={ calc_value=0, @@ -1019,46 +1052,46 @@ local t={ calc_value=3, name="ImGuiFocusedFlags_RootAndChildWindows", value="ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows"}}, - ImGuiFreeTypeBuilderFlags={ + ImGuiFreeTypeLoaderFlags_={ [1]={ calc_value=1, - name="ImGuiFreeTypeBuilderFlags_NoHinting", + name="ImGuiFreeTypeLoaderFlags_NoHinting", value="1 << 0"}, [2]={ calc_value=2, - name="ImGuiFreeTypeBuilderFlags_NoAutoHint", + name="ImGuiFreeTypeLoaderFlags_NoAutoHint", value="1 << 1"}, [3]={ calc_value=4, - name="ImGuiFreeTypeBuilderFlags_ForceAutoHint", + name="ImGuiFreeTypeLoaderFlags_ForceAutoHint", value="1 << 2"}, [4]={ calc_value=8, - name="ImGuiFreeTypeBuilderFlags_LightHinting", + name="ImGuiFreeTypeLoaderFlags_LightHinting", value="1 << 3"}, [5]={ calc_value=16, - name="ImGuiFreeTypeBuilderFlags_MonoHinting", + name="ImGuiFreeTypeLoaderFlags_MonoHinting", value="1 << 4"}, [6]={ calc_value=32, - name="ImGuiFreeTypeBuilderFlags_Bold", + name="ImGuiFreeTypeLoaderFlags_Bold", value="1 << 5"}, [7]={ calc_value=64, - name="ImGuiFreeTypeBuilderFlags_Oblique", + name="ImGuiFreeTypeLoaderFlags_Oblique", value="1 << 6"}, [8]={ calc_value=128, - name="ImGuiFreeTypeBuilderFlags_Monochrome", + name="ImGuiFreeTypeLoaderFlags_Monochrome", value="1 << 7"}, [9]={ calc_value=256, - name="ImGuiFreeTypeBuilderFlags_LoadColor", + name="ImGuiFreeTypeLoaderFlags_LoadColor", value="1 << 8"}, [10]={ calc_value=512, - name="ImGuiFreeTypeBuilderFlags_Bitmap", + name="ImGuiFreeTypeLoaderFlags_Bitmap", value="1 << 9"}}, ImGuiHoveredFlagsPrivate_={ [1]={ @@ -1494,18 +1527,22 @@ local t={ name="ImGuiItemFlags_NoMarkEdited", value="1 << 16"}, [8]={ + calc_value=131072, + name="ImGuiItemFlags_NoFocus", + value="1 << 17"}, + [9]={ calc_value=1048576, name="ImGuiItemFlags_Inputable", value="1 << 20"}, - [9]={ + [10]={ calc_value=2097152, name="ImGuiItemFlags_HasSelectionUserData", value="1 << 21"}, - [10]={ + [11]={ calc_value=4194304, name="ImGuiItemFlags_IsMultiSelect", value="1 << 22"}, - [11]={ + [12]={ calc_value=16, name="ImGuiItemFlags_Default_", value="ImGuiItemFlags_AutoClosePopups"}}, @@ -2221,33 +2258,33 @@ local t={ name="ImGuiKey_NamedKey_END", value="667"}, [159]={ + calc_value=155, + name="ImGuiKey_NamedKey_COUNT", + value="ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN"}, + [160]={ calc_value=0, name="ImGuiMod_None", value="0"}, - [160]={ + [161]={ calc_value=4096, name="ImGuiMod_Ctrl", value="1 << 12"}, - [161]={ + [162]={ calc_value=8192, name="ImGuiMod_Shift", value="1 << 13"}, - [162]={ + [163]={ calc_value=16384, name="ImGuiMod_Alt", value="1 << 14"}, - [163]={ + [164]={ calc_value=32768, name="ImGuiMod_Super", value="1 << 15"}, - [164]={ + [165]={ calc_value=61440, name="ImGuiMod_Mask_", - value="0xF000"}, - [165]={ - calc_value=155, - name="ImGuiKey_NamedKey_COUNT", - value="ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN"}}, + value="0xF000"}}, ImGuiLayoutType_={ [1]={ calc_value=0, @@ -3071,28 +3108,36 @@ local t={ value="28"}, [30]={ calc_value=29, - name="ImGuiStyleVar_ButtonTextAlign", + name="ImGuiStyleVar_TreeLinesSize", value="29"}, [31]={ calc_value=30, - name="ImGuiStyleVar_SelectableTextAlign", + name="ImGuiStyleVar_TreeLinesRounding", value="30"}, [32]={ calc_value=31, - name="ImGuiStyleVar_SeparatorTextBorderSize", + name="ImGuiStyleVar_ButtonTextAlign", value="31"}, [33]={ calc_value=32, - name="ImGuiStyleVar_SeparatorTextAlign", + name="ImGuiStyleVar_SelectableTextAlign", value="32"}, [34]={ calc_value=33, - name="ImGuiStyleVar_SeparatorTextPadding", + name="ImGuiStyleVar_SeparatorTextBorderSize", value="33"}, [35]={ calc_value=34, + name="ImGuiStyleVar_SeparatorTextAlign", + value="34"}, + [36]={ + calc_value=35, + name="ImGuiStyleVar_SeparatorTextPadding", + value="35"}, + [37]={ + calc_value=36, name="ImGuiStyleVar_COUNT", - value="34"}}, + value="36"}}, ImGuiTabBarFlagsPrivate_={ [1]={ calc_value=1048576, @@ -3521,17 +3566,25 @@ local t={ value="1 << 1"}}, ImGuiTreeNodeFlagsPrivate_={ [1]={ + calc_value=134217728, + name="ImGuiTreeNodeFlags_NoNavFocus", + value="1 << 27"}, + [2]={ calc_value=268435456, name="ImGuiTreeNodeFlags_ClipLabelForTrailingButton", value="1 << 28"}, - [2]={ + [3]={ calc_value=536870912, name="ImGuiTreeNodeFlags_UpsideDownArrow", value="1 << 29"}, - [3]={ + [4]={ calc_value=192, name="ImGuiTreeNodeFlags_OpenOnMask_", - value="ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_OpenOnArrow"}}, + value="ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_OpenOnArrow"}, + [5]={ + calc_value=1835008, + name="ImGuiTreeNodeFlags_DrawLinesMask_", + value="ImGuiTreeNodeFlags_DrawLinesNone | ImGuiTreeNodeFlags_DrawLinesFull | ImGuiTreeNodeFlags_DrawLinesToNodes"}}, ImGuiTreeNodeFlags_={ [1]={ calc_value=0, @@ -3603,12 +3656,24 @@ local t={ value="1 << 15"}, [18]={ calc_value=131072, - name="ImGuiTreeNodeFlags_NavLeftJumpsBackHere", + name="ImGuiTreeNodeFlags_NavLeftJumpsToParent", value="1 << 17"}, [19]={ calc_value=26, name="ImGuiTreeNodeFlags_CollapsingHeader", - value="ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog"}}, + value="ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog"}, + [20]={ + calc_value=262144, + name="ImGuiTreeNodeFlags_DrawLinesNone", + value="1 << 18"}, + [21]={ + calc_value=524288, + name="ImGuiTreeNodeFlags_DrawLinesFull", + value="1 << 19"}, + [22]={ + calc_value=1048576, + name="ImGuiTreeNodeFlags_DrawLinesToNodes", + value="1 << 20"}}, ImGuiTypingSelectFlags_={ [1]={ calc_value=0, @@ -3768,7 +3833,37 @@ local t={ [4]={ calc_value=4, name="ImGuiWindowRefreshFlags_RefreshOnFocus", - value="1 << 2"}}}, + value="1 << 2"}}, + ImTextureFormat={ + [1]={ + calc_value=0, + name="ImTextureFormat_RGBA32", + value="0"}, + [2]={ + calc_value=1, + name="ImTextureFormat_Alpha8", + value="1"}}, + ImTextureStatus={ + [1]={ + calc_value=0, + name="ImTextureStatus_OK", + value="0"}, + [2]={ + calc_value=1, + name="ImTextureStatus_Destroyed", + value="1"}, + [3]={ + calc_value=2, + name="ImTextureStatus_WantCreate", + value="2"}, + [4]={ + calc_value=3, + name="ImTextureStatus_WantUpdates", + value="3"}, + [5]={ + calc_value=4, + name="ImTextureStatus_WantDestroy", + value="4"}}}, enumtypes={ ImGuiDir="int", ImGuiKey="int", @@ -3776,193 +3871,206 @@ local t={ ImGuiMouseSource="int", ImGuiSortDirection="ImU8"}, locations={ - ImBitVector="imgui_internal:616", - ImColor="imgui:2783", - ImDrawChannel="imgui:3030", - ImDrawCmd="imgui:2987", - ImDrawCmdHeader="imgui:3022", - ImDrawData="imgui:3246", - ImDrawDataBuilder="imgui_internal:807", - ImDrawFlags_="imgui:3055", - ImDrawList="imgui:3093", - ImDrawListFlags_="imgui:3075", - ImDrawListSharedData="imgui_internal:784", - ImDrawListSplitter="imgui:3038", - ImDrawVert="imgui:3007", - ImFont="imgui:3474", - ImFontAtlas="imgui:3370", - ImFontAtlasCustomRect="imgui:3329", - ImFontAtlasFlags_="imgui:3345", - ImFontBuilderIO="imgui_internal:3583", - ImFontConfig="imgui:3271", - ImFontGlyph="imgui:3302", - ImFontGlyphRangesBuilder="imgui:3314", - ImGuiActivateFlags_="imgui_internal:1574", - ImGuiAxis="imgui_internal:1053", - ImGuiBackendFlags_="imgui:1606", - ImGuiBoxSelectState="imgui_internal:1763", - ImGuiButtonFlagsPrivate_="imgui_internal:943", - ImGuiButtonFlags_="imgui:1733", - ImGuiChildFlags_="imgui:1118", - ImGuiCol_="imgui:1616", - ImGuiColorEditFlags_="imgui:1744", - ImGuiColorMod="imgui_internal:828", - ImGuiComboFlagsPrivate_="imgui_internal:968", - ImGuiComboFlags_="imgui:1266", - ImGuiComboPreviewData="imgui_internal:1067", - ImGuiCond_="imgui:1858", - ImGuiConfigFlags_="imgui:1586", - ImGuiContext="imgui_internal:2063", - ImGuiContextHook="imgui_internal:2048", - ImGuiContextHookType="imgui_internal:2046", - ImGuiDataTypeInfo="imgui_internal:854", - ImGuiDataTypePrivate_="imgui_internal:863", - ImGuiDataTypeStorage="imgui_internal:848", - ImGuiDataType_="imgui:1393", - ImGuiDeactivatedItemData="imgui_internal:1342", - ImGuiDebugAllocEntry="imgui_internal:1983", - ImGuiDebugAllocInfo="imgui_internal:1990", - ImGuiDebugLogFlags_="imgui_internal:1961", - ImGuiDir="imgui:1411", - ImGuiDragDropFlags_="imgui:1365", - ImGuiErrorRecoveryState="imgui_internal:1298", - ImGuiFocusRequestFlags_="imgui_internal:1013", - ImGuiFocusScopeData="imgui_internal:1660", - ImGuiFocusedFlags_="imgui:1313", - ImGuiFreeTypeBuilderFlags="imgui_freetype:26", - ImGuiGroupData="imgui_internal:1080", - ImGuiHoveredFlagsPrivate_="imgui_internal:926", - ImGuiHoveredFlags_="imgui:1327", - ImGuiIDStackTool="imgui_internal:2028", - ImGuiIO="imgui:2240", - ImGuiInputEvent="imgui_internal:1435", - ImGuiInputEventAppFocused="imgui_internal:1433", - ImGuiInputEventKey="imgui_internal:1431", - ImGuiInputEventMouseButton="imgui_internal:1430", - ImGuiInputEventMousePos="imgui_internal:1428", - ImGuiInputEventMouseWheel="imgui_internal:1429", - ImGuiInputEventText="imgui_internal:1432", - ImGuiInputEventType="imgui_internal:1405", - ImGuiInputFlagsPrivate_="imgui_internal:1501", - ImGuiInputFlags_="imgui:1563", - ImGuiInputSource="imgui_internal:1417", - ImGuiInputTextCallbackData="imgui:2481", - ImGuiInputTextDeactivatedState="imgui_internal:1116", - ImGuiInputTextFlagsPrivate_="imgui_internal:934", - ImGuiInputTextFlags_="imgui:1152", - ImGuiInputTextState="imgui_internal:1138", - ImGuiItemFlagsPrivate_="imgui_internal:876", - ImGuiItemFlags_="imgui:1139", - ImGuiItemStatusFlags_="imgui_internal:900", - ImGuiKey="imgui:1435", - ImGuiKeyData="imgui:2232", - ImGuiKeyOwnerData="imgui_internal:1488", - ImGuiKeyRoutingData="imgui_internal:1462", - ImGuiKeyRoutingTable="imgui_internal:1476", - ImGuiLastItemData="imgui_internal:1270", - ImGuiLayoutType_="imgui_internal:1034", - ImGuiListClipper="imgui:2689", - ImGuiListClipperData="imgui_internal:1558", - ImGuiListClipperRange="imgui_internal:1545", - ImGuiLocEntry="imgui_internal:1934", - ImGuiLocKey="imgui_internal:1919", - ImGuiLogFlags_="imgui_internal:1041", - ImGuiMenuColumns="imgui_internal:1098", - ImGuiMetricsConfig="imgui_internal:2000", - ImGuiMouseButton_="imgui:1816", - ImGuiMouseCursor_="imgui:1826", - ImGuiMouseSource="imgui:1847", - ImGuiMultiSelectFlags_="imgui:2841", - ImGuiMultiSelectIO="imgui:2868", - ImGuiMultiSelectState="imgui_internal:1820", - ImGuiMultiSelectTempData="imgui_internal:1795", - ImGuiNavItemData="imgui_internal:1643", - ImGuiNavLayer="imgui_internal:1635", - ImGuiNavMoveFlags_="imgui_internal:1613", - ImGuiNavRenderCursorFlags_="imgui_internal:1599", - ImGuiNextItemData="imgui_internal:1249", - ImGuiNextItemDataFlags_="imgui_internal:1239", - ImGuiNextWindowData="imgui_internal:1212", - ImGuiNextWindowDataFlags_="imgui_internal:1195", - ImGuiOldColumnData="imgui_internal:1728", - ImGuiOldColumnFlags_="imgui_internal:1708", - ImGuiOldColumns="imgui_internal:1738", - ImGuiOnceUponAFrame="imgui:2559", - ImGuiPayload="imgui:2524", - ImGuiPlatformIO="imgui:3573", - ImGuiPlatformImeData="imgui:3611", - ImGuiPlotType="imgui_internal:1060", - ImGuiPopupData="imgui_internal:1362", - ImGuiPopupFlags_="imgui:1231", - ImGuiPopupPositionPolicy="imgui_internal:1354", - ImGuiPtrOrIndex="imgui_internal:1332", - ImGuiScrollFlags_="imgui_internal:1585", - ImGuiSelectableFlagsPrivate_="imgui_internal:981", - ImGuiSelectableFlags_="imgui:1249", - ImGuiSelectionBasicStorage="imgui:2914", - ImGuiSelectionExternalStorage="imgui:2937", - ImGuiSelectionRequest="imgui:2888", - ImGuiSelectionRequestType="imgui:2880", - ImGuiSeparatorFlags_="imgui_internal:1002", - ImGuiSettingsHandler="imgui_internal:1899", - ImGuiShrinkWidthItem="imgui_internal:1325", - ImGuiSizeCallbackData="imgui:2515", - ImGuiSliderFlagsPrivate_="imgui_internal:974", - ImGuiSliderFlags_="imgui:1800", - ImGuiSortDirection="imgui:1422", - ImGuiStackLevelInfo="imgui_internal:2016", - ImGuiStorage="imgui:2632", - ImGuiStoragePair="imgui:2615", - ImGuiStyle="imgui:2145", - ImGuiStyleMod="imgui_internal:835", - ImGuiStyleVarInfo="imgui_internal:819", - ImGuiStyleVar_="imgui:1692", - ImGuiTabBar="imgui_internal:2656", - ImGuiTabBarFlagsPrivate_="imgui_internal:2619", - ImGuiTabBarFlags_="imgui:1281", - ImGuiTabItem="imgui_internal:2637", - ImGuiTabItemFlagsPrivate_="imgui_internal:2627", - ImGuiTabItemFlags_="imgui:1298", - ImGuiTable="imgui_internal:2803", - ImGuiTableBgTarget_="imgui:1999", - ImGuiTableCellData="imgui_internal:2771", - ImGuiTableColumn="imgui_internal:2711", - ImGuiTableColumnFlags_="imgui:1946", - ImGuiTableColumnSettings="imgui_internal:2951", - ImGuiTableColumnSortSpecs="imgui:2021", - ImGuiTableFlags_="imgui:1893", - ImGuiTableHeaderData="imgui_internal:2780", - ImGuiTableInstanceData="imgui_internal:2790", - ImGuiTableRowFlags_="imgui:1984", - ImGuiTableSettings="imgui_internal:2975", - ImGuiTableSortSpecs="imgui:2011", - ImGuiTableTempData="imgui_internal:2928", - ImGuiTextBuffer="imgui:2594", - ImGuiTextFilter="imgui:2567", - ImGuiTextFlags_="imgui_internal:1020", - ImGuiTextIndex="imgui_internal:736", - ImGuiTextRange="imgui:2577", - ImGuiTooltipFlags_="imgui_internal:1026", - ImGuiTreeNodeFlagsPrivate_="imgui_internal:995", - ImGuiTreeNodeFlags_="imgui:1194", - ImGuiTreeNodeStackData="imgui_internal:1289", - ImGuiTypingSelectFlags_="imgui_internal:1671", - ImGuiTypingSelectRequest="imgui_internal:1679", - ImGuiTypingSelectState="imgui_internal:1690", - ImGuiViewport="imgui:3548", - ImGuiViewportFlags_="imgui:3533", - ImGuiViewportP="imgui_internal:1848", - ImGuiWindow="imgui_internal:2486", - ImGuiWindowFlags_="imgui:1069", - ImGuiWindowRefreshFlags_="imgui_internal:1186", - ImGuiWindowSettings="imgui_internal:1885", - ImGuiWindowStackData="imgui_internal:1316", - ImGuiWindowTempData="imgui_internal:2434", - ImRect="imgui_internal:538", - ImVec1="imgui_internal:520", - ImVec2="imgui:279", - ImVec2ih="imgui_internal:528", - ImVec4="imgui:292"}, + ImBitVector="imgui_internal:636", + ImColor="imgui:2890", + ImDrawChannel="imgui:3138", + ImDrawCmd="imgui:3094", + ImDrawCmdHeader="imgui:3130", + ImDrawData="imgui:3359", + ImDrawDataBuilder="imgui_internal:864", + ImDrawFlags_="imgui:3163", + ImDrawList="imgui:3201", + ImDrawListFlags_="imgui:3183", + ImDrawListSharedData="imgui_internal:837", + ImDrawListSplitter="imgui:3146", + ImDrawVert="imgui:3115", + ImFont="imgui:3774", + ImFontAtlas="imgui:3579", + ImFontAtlasBuilder="imgui_internal:3767", + ImFontAtlasFlags_="imgui:3552", + ImFontAtlasPostProcessData="imgui_internal:3740", + ImFontAtlasRect="imgui:3542", + ImFontAtlasRectEntry="imgui_internal:3732", + ImFontBaked="imgui:3727", + ImFontConfig="imgui:3464", + ImFontFlags_="imgui:3761", + ImFontGlyph="imgui:3504", + ImFontGlyphRangesBuilder="imgui:3520", + ImFontLoader="imgui_internal:3684", + ImFontStackData="imgui_internal:872", + ImGuiActivateFlags_="imgui_internal:1645", + ImGuiAxis="imgui_internal:1121", + ImGuiBackendFlags_="imgui:1687", + ImGuiBoxSelectState="imgui_internal:1834", + ImGuiButtonFlagsPrivate_="imgui_internal:1008", + ImGuiButtonFlags_="imgui:1819", + ImGuiChildFlags_="imgui:1191", + ImGuiCol_="imgui:1698", + ImGuiColorEditFlags_="imgui:1830", + ImGuiColorMod="imgui_internal:892", + ImGuiComboFlagsPrivate_="imgui_internal:1034", + ImGuiComboFlags_="imgui:1346", + ImGuiComboPreviewData="imgui_internal:1135", + ImGuiCond_="imgui:1944", + ImGuiConfigFlags_="imgui:1667", + ImGuiContext="imgui_internal:2136", + ImGuiContextHook="imgui_internal:2121", + ImGuiContextHookType="imgui_internal:2119", + ImGuiDataTypeInfo="imgui_internal:918", + ImGuiDataTypePrivate_="imgui_internal:927", + ImGuiDataTypeStorage="imgui_internal:912", + ImGuiDataType_="imgui:1473", + ImGuiDeactivatedItemData="imgui_internal:1413", + ImGuiDebugAllocEntry="imgui_internal:2054", + ImGuiDebugAllocInfo="imgui_internal:2061", + ImGuiDebugLogFlags_="imgui_internal:2032", + ImGuiDir="imgui:1491", + ImGuiDragDropFlags_="imgui:1445", + ImGuiErrorRecoveryState="imgui_internal:1369", + ImGuiFocusRequestFlags_="imgui_internal:1081", + ImGuiFocusScopeData="imgui_internal:1731", + ImGuiFocusedFlags_="imgui:1393", + ImGuiFreeTypeLoaderFlags_="imgui_freetype:29", + ImGuiGroupData="imgui_internal:1148", + ImGuiHoveredFlagsPrivate_="imgui_internal:991", + ImGuiHoveredFlags_="imgui:1407", + ImGuiIDStackTool="imgui_internal:2101", + ImGuiIO="imgui:2340", + ImGuiInputEvent="imgui_internal:1506", + ImGuiInputEventAppFocused="imgui_internal:1504", + ImGuiInputEventKey="imgui_internal:1502", + ImGuiInputEventMouseButton="imgui_internal:1501", + ImGuiInputEventMousePos="imgui_internal:1499", + ImGuiInputEventMouseWheel="imgui_internal:1500", + ImGuiInputEventText="imgui_internal:1503", + ImGuiInputEventType="imgui_internal:1476", + ImGuiInputFlagsPrivate_="imgui_internal:1572", + ImGuiInputFlags_="imgui:1644", + ImGuiInputSource="imgui_internal:1488", + ImGuiInputTextCallbackData="imgui:2582", + ImGuiInputTextDeactivatedState="imgui_internal:1184", + ImGuiInputTextFlagsPrivate_="imgui_internal:999", + ImGuiInputTextFlags_="imgui:1225", + ImGuiInputTextState="imgui_internal:1206", + ImGuiItemFlagsPrivate_="imgui_internal:940", + ImGuiItemFlags_="imgui:1212", + ImGuiItemStatusFlags_="imgui_internal:965", + ImGuiKey="imgui:1515", + ImGuiKeyData="imgui:2332", + ImGuiKeyOwnerData="imgui_internal:1559", + ImGuiKeyRoutingData="imgui_internal:1533", + ImGuiKeyRoutingTable="imgui_internal:1547", + ImGuiLastItemData="imgui_internal:1338", + ImGuiLayoutType_="imgui_internal:1102", + ImGuiListClipper="imgui:2790", + ImGuiListClipperData="imgui_internal:1629", + ImGuiListClipperRange="imgui_internal:1616", + ImGuiLocEntry="imgui_internal:2005", + ImGuiLocKey="imgui_internal:1990", + ImGuiLogFlags_="imgui_internal:1109", + ImGuiMenuColumns="imgui_internal:1166", + ImGuiMetricsConfig="imgui_internal:2071", + ImGuiMouseButton_="imgui:1902", + ImGuiMouseCursor_="imgui:1912", + ImGuiMouseSource="imgui:1933", + ImGuiMultiSelectFlags_="imgui:2948", + ImGuiMultiSelectIO="imgui:2975", + ImGuiMultiSelectState="imgui_internal:1891", + ImGuiMultiSelectTempData="imgui_internal:1866", + ImGuiNavItemData="imgui_internal:1714", + ImGuiNavLayer="imgui_internal:1706", + ImGuiNavMoveFlags_="imgui_internal:1684", + ImGuiNavRenderCursorFlags_="imgui_internal:1670", + ImGuiNextItemData="imgui_internal:1317", + ImGuiNextItemDataFlags_="imgui_internal:1307", + ImGuiNextWindowData="imgui_internal:1280", + ImGuiNextWindowDataFlags_="imgui_internal:1263", + ImGuiOldColumnData="imgui_internal:1799", + ImGuiOldColumnFlags_="imgui_internal:1779", + ImGuiOldColumns="imgui_internal:1809", + ImGuiOnceUponAFrame="imgui:2660", + ImGuiPayload="imgui:2625", + ImGuiPlatformIO="imgui:3885", + ImGuiPlatformImeData="imgui:3935", + ImGuiPlotType="imgui_internal:1128", + ImGuiPopupData="imgui_internal:1433", + ImGuiPopupFlags_="imgui:1311", + ImGuiPopupPositionPolicy="imgui_internal:1425", + ImGuiPtrOrIndex="imgui_internal:1403", + ImGuiScrollFlags_="imgui_internal:1656", + ImGuiSelectableFlagsPrivate_="imgui_internal:1047", + ImGuiSelectableFlags_="imgui:1329", + ImGuiSelectionBasicStorage="imgui:3021", + ImGuiSelectionExternalStorage="imgui:3044", + ImGuiSelectionRequest="imgui:2995", + ImGuiSelectionRequestType="imgui:2987", + ImGuiSeparatorFlags_="imgui_internal:1070", + ImGuiSettingsHandler="imgui_internal:1970", + ImGuiShrinkWidthItem="imgui_internal:1396", + ImGuiSizeCallbackData="imgui:2616", + ImGuiSliderFlagsPrivate_="imgui_internal:1040", + ImGuiSliderFlags_="imgui:1886", + ImGuiSortDirection="imgui:1502", + ImGuiStackLevelInfo="imgui_internal:2089", + ImGuiStorage="imgui:2733", + ImGuiStoragePair="imgui:2716", + ImGuiStyle="imgui:2231", + ImGuiStyleMod="imgui_internal:899", + ImGuiStyleVarInfo="imgui_internal:883", + ImGuiStyleVar_="imgui:1776", + ImGuiTabBar="imgui_internal:2741", + ImGuiTabBarFlagsPrivate_="imgui_internal:2704", + ImGuiTabBarFlags_="imgui:1361", + ImGuiTabItem="imgui_internal:2722", + ImGuiTabItemFlagsPrivate_="imgui_internal:2712", + ImGuiTabItemFlags_="imgui:1378", + ImGuiTable="imgui_internal:2884", + ImGuiTableBgTarget_="imgui:2085", + ImGuiTableCellData="imgui_internal:2852", + ImGuiTableColumn="imgui_internal:2792", + ImGuiTableColumnFlags_="imgui:2032", + ImGuiTableColumnSettings="imgui_internal:3032", + ImGuiTableColumnSortSpecs="imgui:2107", + ImGuiTableFlags_="imgui:1979", + ImGuiTableHeaderData="imgui_internal:2861", + ImGuiTableInstanceData="imgui_internal:2871", + ImGuiTableRowFlags_="imgui:2070", + ImGuiTableSettings="imgui_internal:3056", + ImGuiTableSortSpecs="imgui:2097", + ImGuiTableTempData="imgui_internal:3009", + ImGuiTextBuffer="imgui:2695", + ImGuiTextFilter="imgui:2668", + ImGuiTextFlags_="imgui_internal:1088", + ImGuiTextIndex="imgui_internal:789", + ImGuiTextRange="imgui:2678", + ImGuiTooltipFlags_="imgui_internal:1094", + ImGuiTreeNodeFlagsPrivate_="imgui_internal:1061", + ImGuiTreeNodeFlags_="imgui:1267", + ImGuiTreeNodeStackData="imgui_internal:1357", + ImGuiTypingSelectFlags_="imgui_internal:1742", + ImGuiTypingSelectRequest="imgui_internal:1750", + ImGuiTypingSelectState="imgui_internal:1761", + ImGuiViewport="imgui:3859", + ImGuiViewportFlags_="imgui:3844", + ImGuiViewportP="imgui_internal:1919", + ImGuiWindow="imgui_internal:2569", + ImGuiWindowFlags_="imgui:1142", + ImGuiWindowRefreshFlags_="imgui_internal:1254", + ImGuiWindowSettings="imgui_internal:1956", + ImGuiWindowStackData="imgui_internal:1387", + ImGuiWindowTempData="imgui_internal:2516", + ImRect="imgui_internal:558", + ImTextureData="imgui:3422", + ImTextureFormat="imgui:3390", + ImTextureRect="imgui:3409", + ImTextureRef="imgui:355", + ImTextureStatus="imgui:3397", + ImVec1="imgui_internal:532", + ImVec2="imgui:287", + ImVec2i="imgui_internal:540", + ImVec2ih="imgui_internal:548", + ImVec4="imgui:300", + stbrp_context_opaque="imgui_internal:3764"}, nonPOD={ ImBitArray=true, ImColor=true, @@ -3974,9 +4082,13 @@ local t={ ImDrawListSplitter=true, ImFont=true, ImFontAtlas=true, - ImFontAtlasCustomRect=true, + ImFontAtlasBuilder=true, + ImFontAtlasRect=true, + ImFontBaked=true, ImFontConfig=true, + ImFontGlyph=true, ImFontGlyphRangesBuilder=true, + ImFontLoader=true, ImGuiBoxSelectState=true, ImGuiComboPreviewData=true, ImGuiContext=true, @@ -4038,8 +4150,12 @@ local t={ ImRect=true, ImSpan=true, ImSpanAllocator=true, + ImStableVector=true, + ImTextureData=true, + ImTextureRef=true, ImVec1=true, ImVec2=true, + ImVec2i=true, ImVec2ih=true, ImVec4=true, ImVector=true}, @@ -4067,8 +4183,8 @@ local t={ name="ClipRect", type="ImVec4"}, [2]={ - name="TextureId", - type="ImTextureID"}, + name="TexRef", + type="ImTextureRef"}, [3]={ name="VtxOffset", type="unsigned int"}, @@ -4095,8 +4211,8 @@ local t={ name="ClipRect", type="ImVec4"}, [2]={ - name="TextureId", - type="ImTextureID"}, + name="TexRef", + type="ImTextureRef"}, [3]={ name="VtxOffset", type="unsigned int"}}, @@ -4128,7 +4244,11 @@ local t={ type="ImVec2"}, [9]={ name="OwnerViewport", - type="ImGuiViewport*"}}, + type="ImGuiViewport*"}, + [10]={ + name="Textures", + template_type="ImTextureData*", + type="ImVector_ImTextureDataPtr*"}}, ImDrawDataBuilder={ [1]={ name="Layers[2]", @@ -4182,9 +4302,9 @@ local t={ template_type="ImVec4", type="ImVector_ImVec4"}, [13]={ - name="_TextureIdStack", - template_type="ImTextureID", - type="ImVector_ImTextureID"}, + name="_TextureStack", + template_type="ImTextureRef", + type="ImVector_ImTextureRef"}, [14]={ name="_CallbacksDataBuf", template_type="ImU8", @@ -4203,41 +4323,51 @@ local t={ name="TexUvLines", type="const ImVec4*"}, [3]={ + name="FontAtlas", + type="ImFontAtlas*"}, + [4]={ name="Font", type="ImFont*"}, - [4]={ + [5]={ name="FontSize", type="float"}, - [5]={ + [6]={ name="FontScale", type="float"}, - [6]={ + [7]={ name="CurveTessellationTol", type="float"}, - [7]={ + [8]={ name="CircleSegmentMaxError", type="float"}, - [8]={ + [9]={ name="InitialFringeScale", type="float"}, - [9]={ + [10]={ name="InitialFlags", type="ImDrawListFlags"}, - [10]={ + [11]={ name="ClipRectFullscreen", type="ImVec4"}, - [11]={ + [12]={ name="TempBuffer", template_type="ImVec2", type="ImVector_ImVec2"}, - [12]={ + [13]={ + name="DrawLists", + template_type="ImDrawList*", + type="ImVector_ImDrawListPtr"}, + [14]={ + name="Context", + type="ImGuiContext*"}, + [15]={ name="ArcFastVtx[48]", size=48, type="ImVec2"}, - [13]={ + [16]={ name="ArcFastRadiusCutoff", type="float"}, - [14]={ + [17]={ name="CircleSegmentCounts[64]", size=64, type="ImU8"}}, @@ -4263,6 +4393,270 @@ local t={ name="col", type="ImU32"}}, ImFont={ + [1]={ + name="LastBaked", + type="ImFontBaked*"}, + [2]={ + name="ContainerAtlas", + type="ImFontAtlas*"}, + [3]={ + name="Flags", + type="ImFontFlags"}, + [4]={ + name="CurrentRasterizerDensity", + type="float"}, + [5]={ + name="FontId", + type="ImGuiID"}, + [6]={ + name="LegacySize", + type="float"}, + [7]={ + name="Sources", + template_type="ImFontConfig*", + type="ImVector_ImFontConfigPtr"}, + [8]={ + name="EllipsisChar", + type="ImWchar"}, + [9]={ + name="FallbackChar", + type="ImWchar"}, + [10]={ + name="Used8kPagesMap[(0xFFFF+1)/8192/8]", + size=1, + type="ImU8"}, + [11]={ + name="EllipsisAutoBake", + type="bool"}, + [12]={ + name="RemapPairs", + type="ImGuiStorage"}}, + ImFontAtlas={ + [1]={ + name="Flags", + type="ImFontAtlasFlags"}, + [2]={ + name="TexDesiredFormat", + type="ImTextureFormat"}, + [3]={ + name="TexGlyphPadding", + type="int"}, + [4]={ + name="TexMinWidth", + type="int"}, + [5]={ + name="TexMinHeight", + type="int"}, + [6]={ + name="TexMaxWidth", + type="int"}, + [7]={ + name="TexMaxHeight", + type="int"}, + [8]={ + name="UserData", + type="void*"}, + [9]={ + name="TexRef", + type="ImTextureRef"}, + [10]={ + name="TexData", + type="ImTextureData*"}, + [11]={ + name="TexList", + template_type="ImTextureData*", + type="ImVector_ImTextureDataPtr"}, + [12]={ + name="Locked", + type="bool"}, + [13]={ + name="RendererHasTextures", + type="bool"}, + [14]={ + name="TexIsBuilt", + type="bool"}, + [15]={ + name="TexPixelsUseColors", + type="bool"}, + [16]={ + name="TexUvScale", + type="ImVec2"}, + [17]={ + name="TexUvWhitePixel", + type="ImVec2"}, + [18]={ + name="Fonts", + template_type="ImFont*", + type="ImVector_ImFontPtr"}, + [19]={ + name="Sources", + template_type="ImFontConfig", + type="ImVector_ImFontConfig"}, + [20]={ + name="TexUvLines[(32)+1]", + size=33, + type="ImVec4"}, + [21]={ + name="TexNextUniqueID", + type="int"}, + [22]={ + name="FontNextUniqueID", + type="int"}, + [23]={ + name="DrawListSharedDatas", + template_type="ImDrawListSharedData*", + type="ImVector_ImDrawListSharedDataPtr"}, + [24]={ + name="Builder", + type="ImFontAtlasBuilder*"}, + [25]={ + name="FontLoader", + type="const ImFontLoader*"}, + [26]={ + name="FontLoaderName", + type="const char*"}, + [27]={ + name="FontLoaderData", + type="void*"}, + [28]={ + name="FontLoaderFlags", + type="unsigned int"}, + [29]={ + name="RefCount", + type="int"}, + [30]={ + name="OwnerContext", + type="ImGuiContext*"}}, + ImFontAtlasBuilder={ + [1]={ + name="PackContext", + type="stbrp_context_opaque"}, + [2]={ + name="PackNodes", + template_type="stbrp_node_im", + type="ImVector_stbrp_node_im"}, + [3]={ + name="Rects", + template_type="ImTextureRect", + type="ImVector_ImTextureRect"}, + [4]={ + name="RectsIndex", + template_type="ImFontAtlasRectEntry", + type="ImVector_ImFontAtlasRectEntry"}, + [5]={ + name="TempBuffer", + template_type="unsigned char", + type="ImVector_unsigned_char"}, + [6]={ + name="RectsIndexFreeListStart", + type="int"}, + [7]={ + name="RectsPackedCount", + type="int"}, + [8]={ + name="RectsPackedSurface", + type="int"}, + [9]={ + name="RectsDiscardedCount", + type="int"}, + [10]={ + name="RectsDiscardedSurface", + type="int"}, + [11]={ + name="FrameCount", + type="int"}, + [12]={ + name="MaxRectSize", + type="ImVec2i"}, + [13]={ + name="MaxRectBounds", + type="ImVec2i"}, + [14]={ + name="LockDisableResize", + type="bool"}, + [15]={ + name="PreloadedAllGlyphsRanges", + type="bool"}, + [16]={ + name="BakedPool", + template_type="ImFontBaked,32", + type="ImStableVector_ImFontBaked__32"}, + [17]={ + name="BakedMap", + type="ImGuiStorage"}, + [18]={ + name="BakedDiscardedCount", + type="int"}, + [19]={ + name="PackIdMouseCursors", + type="ImFontAtlasRectId"}, + [20]={ + name="PackIdLinesTexData", + type="ImFontAtlasRectId"}}, + ImFontAtlasPostProcessData={ + [1]={ + name="FontAtlas", + type="ImFontAtlas*"}, + [2]={ + name="Font", + type="ImFont*"}, + [3]={ + name="FontSrc", + type="ImFontConfig*"}, + [4]={ + name="FontBaked", + type="ImFontBaked*"}, + [5]={ + name="Glyph", + type="ImFontGlyph*"}, + [6]={ + name="Pixels", + type="void*"}, + [7]={ + name="Format", + type="ImTextureFormat"}, + [8]={ + name="Pitch", + type="int"}, + [9]={ + name="Width", + type="int"}, + [10]={ + name="Height", + type="int"}}, + ImFontAtlasRect={ + [1]={ + name="x", + type="unsigned short"}, + [2]={ + name="y", + type="unsigned short"}, + [3]={ + name="w", + type="unsigned short"}, + [4]={ + name="h", + type="unsigned short"}, + [5]={ + name="uv0", + type="ImVec2"}, + [6]={ + name="uv1", + type="ImVec2"}}, + ImFontAtlasRectEntry={ + [1]={ + bitfield="20", + name="TargetIndex", + type="int"}, + [2]={ + bitfield="10", + name="Generation", + type="int"}, + [3]={ + bitfield="1", + name="IsUsed", + type="unsigned int"}}, + ImFontBaked={ [1]={ name="IndexAdvanceX", template_type="float", @@ -4271,229 +4665,129 @@ local t={ name="FallbackAdvanceX", type="float"}, [3]={ - name="FontSize", + name="Size", type="float"}, [4]={ + name="RasterizerDensity", + type="float"}, + [5]={ name="IndexLookup", template_type="ImU16", type="ImVector_ImU16"}, - [5]={ + [6]={ name="Glyphs", template_type="ImFontGlyph", type="ImVector_ImFontGlyph"}, - [6]={ - name="FallbackGlyph", - type="ImFontGlyph*"}, [7]={ - name="ContainerAtlas", - type="ImFontAtlas*"}, + name="FallbackGlyphIndex", + type="int"}, [8]={ - name="Sources", - type="ImFontConfig*"}, - [9]={ - name="SourcesCount", - type="short"}, - [10]={ - name="EllipsisCharCount", - type="short"}, - [11]={ - name="EllipsisChar", - type="ImWchar"}, - [12]={ - name="FallbackChar", - type="ImWchar"}, - [13]={ - name="EllipsisWidth", - type="float"}, - [14]={ - name="EllipsisCharStep", - type="float"}, - [15]={ - name="Scale", - type="float"}, - [16]={ name="Ascent", type="float"}, - [17]={ + [9]={ name="Descent", type="float"}, - [18]={ - name="MetricsTotalSurface", - type="int"}, - [19]={ - name="DirtyLookupTables", - type="bool"}, - [20]={ - name="Used8kPagesMap[(0xFFFF+1)/8192/8]", - size=1, - type="ImU8"}}, - ImFontAtlas={ - [1]={ - name="Flags", - type="ImFontAtlasFlags"}, - [2]={ - name="TexID", - type="ImTextureID"}, - [3]={ - name="TexDesiredWidth", - type="int"}, - [4]={ - name="TexGlyphPadding", - type="int"}, - [5]={ - name="UserData", - type="void*"}, - [6]={ - name="Locked", - type="bool"}, - [7]={ - name="TexReady", - type="bool"}, - [8]={ - name="TexPixelsUseColors", - type="bool"}, - [9]={ - name="TexPixelsAlpha8", - type="unsigned char*"}, [10]={ - name="TexPixelsRGBA32", - type="unsigned int*"}, + bitfield="26", + name="MetricsTotalSurface", + type="unsigned int"}, [11]={ - name="TexWidth", - type="int"}, - [12]={ - name="TexHeight", - type="int"}, - [13]={ - name="TexUvScale", - type="ImVec2"}, - [14]={ - name="TexUvWhitePixel", - type="ImVec2"}, - [15]={ - name="Fonts", - template_type="ImFont*", - type="ImVector_ImFontPtr"}, - [16]={ - name="CustomRects", - template_type="ImFontAtlasCustomRect", - type="ImVector_ImFontAtlasCustomRect"}, - [17]={ - name="Sources", - template_type="ImFontConfig", - type="ImVector_ImFontConfig"}, - [18]={ - name="TexUvLines[(32)+1]", - size=33, - type="ImVec4"}, - [19]={ - name="FontBuilderIO", - type="const ImFontBuilderIO*"}, - [20]={ - name="FontBuilderFlags", - type="unsigned int"}, - [21]={ - name="PackIdMouseCursors", - type="int"}, - [22]={ - name="PackIdLines", - type="int"}}, - ImFontAtlasCustomRect={ - [1]={ - name="X", - type="unsigned short"}, - [2]={ - name="Y", - type="unsigned short"}, - [3]={ - name="Width", - type="unsigned short"}, - [4]={ - name="Height", - type="unsigned short"}, - [5]={ - bitfield="31", - name="GlyphID", - type="unsigned int"}, - [6]={ bitfield="1", - name="GlyphColored", + name="WantDestroy", type="unsigned int"}, - [7]={ - name="GlyphAdvanceX", - type="float"}, - [8]={ - name="GlyphOffset", - type="ImVec2"}, - [9]={ - name="Font", - type="ImFont*"}}, - ImFontBuilderIO={ - [1]={ - name="FontBuilder_Build", - type="bool(*)(ImFontAtlas* atlas)"}}, + [12]={ + bitfield="1", + name="LockLoadingFallback", + type="unsigned int"}, + [13]={ + name="LastUsedFrame", + type="int"}, + [14]={ + name="BakedId", + type="ImGuiID"}, + [15]={ + name="ContainerFont", + type="ImFont*"}, + [16]={ + name="FontLoaderDatas", + type="void*"}}, ImFontConfig={ [1]={ - name="FontData", - type="void*"}, - [2]={ - name="FontDataSize", - type="int"}, - [3]={ - name="FontDataOwnedByAtlas", - type="bool"}, - [4]={ - name="MergeMode", - type="bool"}, - [5]={ - name="PixelSnapH", - type="bool"}, - [6]={ - name="FontNo", - type="int"}, - [7]={ - name="OversampleH", - type="int"}, - [8]={ - name="OversampleV", - type="int"}, - [9]={ - name="SizePixels", - type="float"}, - [10]={ - name="GlyphOffset", - type="ImVec2"}, - [11]={ - name="GlyphRanges", - type="const ImWchar*"}, - [12]={ - name="GlyphMinAdvanceX", - type="float"}, - [13]={ - name="GlyphMaxAdvanceX", - type="float"}, - [14]={ - name="GlyphExtraAdvanceX", - type="float"}, - [15]={ - name="FontBuilderFlags", - type="unsigned int"}, - [16]={ - name="RasterizerMultiply", - type="float"}, - [17]={ - name="RasterizerDensity", - type="float"}, - [18]={ - name="EllipsisChar", - type="ImWchar"}, - [19]={ name="Name[40]", size=40, type="char"}, + [2]={ + name="FontData", + type="void*"}, + [3]={ + name="FontDataSize", + type="int"}, + [4]={ + name="FontDataOwnedByAtlas", + type="bool"}, + [5]={ + name="MergeMode", + type="bool"}, + [6]={ + name="PixelSnapH", + type="bool"}, + [7]={ + name="PixelSnapV", + type="bool"}, + [8]={ + name="FontNo", + type="ImS8"}, + [9]={ + name="OversampleH", + type="ImS8"}, + [10]={ + name="OversampleV", + type="ImS8"}, + [11]={ + name="SizePixels", + type="float"}, + [12]={ + name="GlyphRanges", + type="const ImWchar*"}, + [13]={ + name="GlyphExcludeRanges", + type="const ImWchar*"}, + [14]={ + name="GlyphOffset", + type="ImVec2"}, + [15]={ + name="GlyphMinAdvanceX", + type="float"}, + [16]={ + name="GlyphMaxAdvanceX", + type="float"}, + [17]={ + name="GlyphExtraAdvanceX", + type="float"}, + [18]={ + name="FontLoaderFlags", + type="unsigned int"}, + [19]={ + name="RasterizerMultiply", + type="float"}, [20]={ + name="RasterizerDensity", + type="float"}, + [21]={ + name="EllipsisChar", + type="ImWchar"}, + [22]={ + name="Flags", + type="ImFontFlags"}, + [23]={ name="DstFont", - type="ImFont*"}}, + type="ImFont*"}, + [24]={ + name="FontLoader", + type="const ImFontLoader*"}, + [25]={ + name="FontLoaderData", + type="void*"}}, ImFontGlyph={ [1]={ bitfield="1", @@ -4504,41 +4798,89 @@ local t={ name="Visible", type="unsigned int"}, [3]={ - bitfield="30", - name="Codepoint", + bitfield="4", + name="SourceIdx", type="unsigned int"}, [4]={ + bitfield="26", + name="Codepoint", + type="unsigned int"}, + [5]={ name="AdvanceX", type="float"}, - [5]={ + [6]={ name="X0", type="float"}, - [6]={ + [7]={ name="Y0", type="float"}, - [7]={ + [8]={ name="X1", type="float"}, - [8]={ + [9]={ name="Y1", type="float"}, - [9]={ + [10]={ name="U0", type="float"}, - [10]={ + [11]={ name="V0", type="float"}, - [11]={ + [12]={ name="U1", type="float"}, - [12]={ + [13]={ name="V1", - type="float"}}, + type="float"}, + [14]={ + name="PackId", + type="int"}}, ImFontGlyphRangesBuilder={ [1]={ name="UsedChars", template_type="ImU32", type="ImVector_ImU32"}}, + ImFontLoader={ + [1]={ + name="Name", + type="const char*"}, + [2]={ + name="LoaderInit", + type="bool(*)(ImFontAtlas* atlas)"}, + [3]={ + name="LoaderShutdown", + type="void(*)(ImFontAtlas* atlas)"}, + [4]={ + name="FontSrcInit", + type="bool(*)(ImFontAtlas* atlas,ImFontConfig* src)"}, + [5]={ + name="FontSrcDestroy", + type="void(*)(ImFontAtlas* atlas,ImFontConfig* src)"}, + [6]={ + name="FontSrcContainsGlyph", + type="bool(*)(ImFontAtlas* atlas,ImFontConfig* src,ImWchar codepoint)"}, + [7]={ + name="FontBakedInit", + type="bool(*)(ImFontAtlas* atlas,ImFontConfig* src,ImFontBaked* baked,void* loader_data_for_baked_src)"}, + [8]={ + name="FontBakedDestroy", + type="void(*)(ImFontAtlas* atlas,ImFontConfig* src,ImFontBaked* baked,void* loader_data_for_baked_src)"}, + [9]={ + name="FontBakedLoadGlyph", + type="bool(*)(ImFontAtlas* atlas,ImFontConfig* src,ImFontBaked* baked,void* loader_data_for_baked_src,ImWchar codepoint,ImFontGlyph* out_glyph)"}, + [10]={ + name="FontBakedSrcLoaderDataSize", + type="size_t"}}, + ImFontStackData={ + [1]={ + name="Font", + type="ImFont*"}, + [2]={ + name="FontSizeBeforeScaling", + type="float"}, + [3]={ + name="FontSizeAfterScaling", + type="float"}}, ImGuiBoxSelectState={ [1]={ name="ID", @@ -4617,932 +4959,952 @@ local t={ name="Initialized", type="bool"}, [2]={ - name="FontAtlasOwnedByContext", - type="bool"}, - [3]={ name="IO", type="ImGuiIO"}, - [4]={ + [3]={ name="PlatformIO", type="ImGuiPlatformIO"}, - [5]={ + [4]={ name="Style", type="ImGuiStyle"}, + [5]={ + name="FontAtlases", + template_type="ImFontAtlas*", + type="ImVector_ImFontAtlasPtr"}, [6]={ name="Font", type="ImFont*"}, [7]={ + name="FontBaked", + type="ImFontBaked*"}, + [8]={ name="FontSize", type="float"}, - [8]={ - name="FontBaseSize", - type="float"}, [9]={ - name="FontScale", + name="FontSizeBase", type="float"}, [10]={ - name="CurrentDpiScale", + name="FontBakedScale", type="float"}, [11]={ + name="FontRasterizerDensity", + type="float"}, + [12]={ + name="CurrentDpiScale", + type="float"}, + [13]={ name="DrawListSharedData", type="ImDrawListSharedData"}, - [12]={ + [14]={ name="Time", type="double"}, - [13]={ + [15]={ name="FrameCount", type="int"}, - [14]={ + [16]={ name="FrameCountEnded", type="int"}, - [15]={ + [17]={ name="FrameCountRendered", type="int"}, - [16]={ + [18]={ name="WithinEndChildID", type="ImGuiID"}, - [17]={ + [19]={ name="WithinFrameScope", type="bool"}, - [18]={ + [20]={ name="WithinFrameScopeWithImplicitWindow", type="bool"}, - [19]={ + [21]={ name="GcCompactAll", type="bool"}, - [20]={ + [22]={ name="TestEngineHookItems", type="bool"}, - [21]={ + [23]={ name="TestEngine", type="void*"}, - [22]={ + [24]={ name="ContextName[16]", size=16, type="char"}, - [23]={ + [25]={ name="InputEventsQueue", template_type="ImGuiInputEvent", type="ImVector_ImGuiInputEvent"}, - [24]={ + [26]={ name="InputEventsTrail", template_type="ImGuiInputEvent", type="ImVector_ImGuiInputEvent"}, - [25]={ + [27]={ name="InputEventsNextMouseSource", type="ImGuiMouseSource"}, - [26]={ + [28]={ name="InputEventsNextEventId", type="ImU32"}, - [27]={ + [29]={ name="Windows", template_type="ImGuiWindow*", type="ImVector_ImGuiWindowPtr"}, - [28]={ + [30]={ name="WindowsFocusOrder", template_type="ImGuiWindow*", type="ImVector_ImGuiWindowPtr"}, - [29]={ + [31]={ name="WindowsTempSortBuffer", template_type="ImGuiWindow*", type="ImVector_ImGuiWindowPtr"}, - [30]={ + [32]={ name="CurrentWindowStack", template_type="ImGuiWindowStackData", type="ImVector_ImGuiWindowStackData"}, - [31]={ + [33]={ name="WindowsById", type="ImGuiStorage"}, - [32]={ + [34]={ name="WindowsActiveCount", type="int"}, - [33]={ + [35]={ name="WindowsBorderHoverPadding", type="float"}, - [34]={ + [36]={ name="DebugBreakInWindow", type="ImGuiID"}, - [35]={ + [37]={ name="CurrentWindow", type="ImGuiWindow*"}, - [36]={ + [38]={ name="HoveredWindow", type="ImGuiWindow*"}, - [37]={ + [39]={ name="HoveredWindowUnderMovingWindow", type="ImGuiWindow*"}, - [38]={ + [40]={ name="HoveredWindowBeforeClear", type="ImGuiWindow*"}, - [39]={ + [41]={ name="MovingWindow", type="ImGuiWindow*"}, - [40]={ + [42]={ name="WheelingWindow", type="ImGuiWindow*"}, - [41]={ + [43]={ name="WheelingWindowRefMousePos", type="ImVec2"}, - [42]={ + [44]={ name="WheelingWindowStartFrame", type="int"}, - [43]={ + [45]={ name="WheelingWindowScrolledFrame", type="int"}, - [44]={ + [46]={ name="WheelingWindowReleaseTimer", type="float"}, - [45]={ + [47]={ name="WheelingWindowWheelRemainder", type="ImVec2"}, - [46]={ + [48]={ name="WheelingAxisAvg", type="ImVec2"}, - [47]={ + [49]={ name="DebugDrawIdConflicts", type="ImGuiID"}, - [48]={ + [50]={ name="DebugHookIdInfo", type="ImGuiID"}, - [49]={ + [51]={ name="HoveredId", type="ImGuiID"}, - [50]={ + [52]={ name="HoveredIdPreviousFrame", type="ImGuiID"}, - [51]={ + [53]={ name="HoveredIdPreviousFrameItemCount", type="int"}, - [52]={ + [54]={ name="HoveredIdTimer", type="float"}, - [53]={ + [55]={ name="HoveredIdNotActiveTimer", type="float"}, - [54]={ + [56]={ name="HoveredIdAllowOverlap", type="bool"}, - [55]={ + [57]={ name="HoveredIdIsDisabled", type="bool"}, - [56]={ + [58]={ name="ItemUnclipByLog", type="bool"}, - [57]={ + [59]={ name="ActiveId", type="ImGuiID"}, - [58]={ + [60]={ name="ActiveIdIsAlive", type="ImGuiID"}, - [59]={ + [61]={ name="ActiveIdTimer", type="float"}, - [60]={ + [62]={ name="ActiveIdIsJustActivated", type="bool"}, - [61]={ + [63]={ name="ActiveIdAllowOverlap", type="bool"}, - [62]={ + [64]={ name="ActiveIdNoClearOnFocusLoss", type="bool"}, - [63]={ + [65]={ name="ActiveIdHasBeenPressedBefore", type="bool"}, - [64]={ + [66]={ name="ActiveIdHasBeenEditedBefore", type="bool"}, - [65]={ + [67]={ name="ActiveIdHasBeenEditedThisFrame", type="bool"}, - [66]={ + [68]={ name="ActiveIdFromShortcut", type="bool"}, - [67]={ + [69]={ bitfield="8", name="ActiveIdMouseButton", type="int"}, - [68]={ + [70]={ name="ActiveIdClickOffset", type="ImVec2"}, - [69]={ + [71]={ name="ActiveIdWindow", type="ImGuiWindow*"}, - [70]={ + [72]={ name="ActiveIdSource", type="ImGuiInputSource"}, - [71]={ + [73]={ name="ActiveIdPreviousFrame", type="ImGuiID"}, - [72]={ + [74]={ name="DeactivatedItemData", type="ImGuiDeactivatedItemData"}, - [73]={ + [75]={ name="ActiveIdValueOnActivation", type="ImGuiDataTypeStorage"}, - [74]={ + [76]={ name="LastActiveId", type="ImGuiID"}, - [75]={ + [77]={ name="LastActiveIdTimer", type="float"}, - [76]={ + [78]={ name="LastKeyModsChangeTime", type="double"}, - [77]={ + [79]={ name="LastKeyModsChangeFromNoneTime", type="double"}, - [78]={ + [80]={ name="LastKeyboardKeyPressTime", type="double"}, - [79]={ + [81]={ name="KeysMayBeCharInput", type="ImBitArrayForNamedKeys"}, - [80]={ + [82]={ name="KeysOwnerData[ImGuiKey_NamedKey_COUNT]", size=155, type="ImGuiKeyOwnerData"}, - [81]={ + [83]={ name="KeysRoutingTable", type="ImGuiKeyRoutingTable"}, - [82]={ + [84]={ name="ActiveIdUsingNavDirMask", type="ImU32"}, - [83]={ + [85]={ name="ActiveIdUsingAllKeyboardKeys", type="bool"}, - [84]={ + [86]={ name="DebugBreakInShortcutRouting", type="ImGuiKeyChord"}, - [85]={ + [87]={ name="CurrentFocusScopeId", type="ImGuiID"}, - [86]={ + [88]={ name="CurrentItemFlags", type="ImGuiItemFlags"}, - [87]={ + [89]={ name="DebugLocateId", type="ImGuiID"}, - [88]={ + [90]={ name="NextItemData", type="ImGuiNextItemData"}, - [89]={ + [91]={ name="LastItemData", type="ImGuiLastItemData"}, - [90]={ + [92]={ name="NextWindowData", type="ImGuiNextWindowData"}, - [91]={ + [93]={ name="DebugShowGroupRects", type="bool"}, - [92]={ + [94]={ name="DebugFlashStyleColorIdx", type="ImGuiCol"}, - [93]={ + [95]={ name="ColorStack", template_type="ImGuiColorMod", type="ImVector_ImGuiColorMod"}, - [94]={ + [96]={ name="StyleVarStack", template_type="ImGuiStyleMod", type="ImVector_ImGuiStyleMod"}, - [95]={ + [97]={ name="FontStack", - template_type="ImFont*", - type="ImVector_ImFontPtr"}, - [96]={ + template_type="ImFontStackData", + type="ImVector_ImFontStackData"}, + [98]={ name="FocusScopeStack", template_type="ImGuiFocusScopeData", type="ImVector_ImGuiFocusScopeData"}, - [97]={ + [99]={ name="ItemFlagsStack", template_type="ImGuiItemFlags", type="ImVector_ImGuiItemFlags"}, - [98]={ + [100]={ name="GroupStack", template_type="ImGuiGroupData", type="ImVector_ImGuiGroupData"}, - [99]={ + [101]={ name="OpenPopupStack", template_type="ImGuiPopupData", type="ImVector_ImGuiPopupData"}, - [100]={ + [102]={ name="BeginPopupStack", template_type="ImGuiPopupData", type="ImVector_ImGuiPopupData"}, - [101]={ + [103]={ name="TreeNodeStack", template_type="ImGuiTreeNodeStackData", type="ImVector_ImGuiTreeNodeStackData"}, - [102]={ + [104]={ name="Viewports", template_type="ImGuiViewportP*", type="ImVector_ImGuiViewportPPtr"}, - [103]={ + [105]={ name="NavCursorVisible", type="bool"}, - [104]={ + [106]={ name="NavHighlightItemUnderNav", type="bool"}, - [105]={ + [107]={ name="NavMousePosDirty", type="bool"}, - [106]={ + [108]={ name="NavIdIsAlive", type="bool"}, - [107]={ + [109]={ name="NavId", type="ImGuiID"}, - [108]={ + [110]={ name="NavWindow", type="ImGuiWindow*"}, - [109]={ + [111]={ name="NavFocusScopeId", type="ImGuiID"}, - [110]={ + [112]={ name="NavLayer", type="ImGuiNavLayer"}, - [111]={ + [113]={ name="NavActivateId", type="ImGuiID"}, - [112]={ + [114]={ name="NavActivateDownId", type="ImGuiID"}, - [113]={ + [115]={ name="NavActivatePressedId", type="ImGuiID"}, - [114]={ + [116]={ name="NavActivateFlags", type="ImGuiActivateFlags"}, - [115]={ + [117]={ name="NavFocusRoute", template_type="ImGuiFocusScopeData", type="ImVector_ImGuiFocusScopeData"}, - [116]={ + [118]={ name="NavHighlightActivatedId", type="ImGuiID"}, - [117]={ + [119]={ name="NavHighlightActivatedTimer", type="float"}, - [118]={ + [120]={ name="NavNextActivateId", type="ImGuiID"}, - [119]={ + [121]={ name="NavNextActivateFlags", type="ImGuiActivateFlags"}, - [120]={ + [122]={ name="NavInputSource", type="ImGuiInputSource"}, - [121]={ + [123]={ name="NavLastValidSelectionUserData", type="ImGuiSelectionUserData"}, - [122]={ + [124]={ name="NavCursorHideFrames", type="ImS8"}, - [123]={ + [125]={ name="NavAnyRequest", type="bool"}, - [124]={ + [126]={ name="NavInitRequest", type="bool"}, - [125]={ + [127]={ name="NavInitRequestFromMove", type="bool"}, - [126]={ + [128]={ name="NavInitResult", type="ImGuiNavItemData"}, - [127]={ + [129]={ name="NavMoveSubmitted", type="bool"}, - [128]={ + [130]={ name="NavMoveScoringItems", type="bool"}, - [129]={ + [131]={ name="NavMoveForwardToNextFrame", type="bool"}, - [130]={ + [132]={ name="NavMoveFlags", type="ImGuiNavMoveFlags"}, - [131]={ + [133]={ name="NavMoveScrollFlags", type="ImGuiScrollFlags"}, - [132]={ + [134]={ name="NavMoveKeyMods", type="ImGuiKeyChord"}, - [133]={ + [135]={ name="NavMoveDir", type="ImGuiDir"}, - [134]={ + [136]={ name="NavMoveDirForDebug", type="ImGuiDir"}, - [135]={ + [137]={ name="NavMoveClipDir", type="ImGuiDir"}, - [136]={ + [138]={ name="NavScoringRect", type="ImRect"}, - [137]={ + [139]={ name="NavScoringNoClipRect", type="ImRect"}, - [138]={ + [140]={ name="NavScoringDebugCount", type="int"}, - [139]={ + [141]={ name="NavTabbingDir", type="int"}, - [140]={ + [142]={ name="NavTabbingCounter", type="int"}, - [141]={ + [143]={ name="NavMoveResultLocal", type="ImGuiNavItemData"}, - [142]={ + [144]={ name="NavMoveResultLocalVisible", type="ImGuiNavItemData"}, - [143]={ + [145]={ name="NavMoveResultOther", type="ImGuiNavItemData"}, - [144]={ + [146]={ name="NavTabbingResultFirst", type="ImGuiNavItemData"}, - [145]={ + [147]={ name="NavJustMovedFromFocusScopeId", type="ImGuiID"}, - [146]={ + [148]={ name="NavJustMovedToId", type="ImGuiID"}, - [147]={ + [149]={ name="NavJustMovedToFocusScopeId", type="ImGuiID"}, - [148]={ + [150]={ name="NavJustMovedToKeyMods", type="ImGuiKeyChord"}, - [149]={ + [151]={ name="NavJustMovedToIsTabbing", type="bool"}, - [150]={ + [152]={ name="NavJustMovedToHasSelectionData", type="bool"}, - [151]={ + [153]={ + name="ConfigNavWindowingWithGamepad", + type="bool"}, + [154]={ name="ConfigNavWindowingKeyNext", type="ImGuiKeyChord"}, - [152]={ + [155]={ name="ConfigNavWindowingKeyPrev", type="ImGuiKeyChord"}, - [153]={ + [156]={ name="NavWindowingTarget", type="ImGuiWindow*"}, - [154]={ + [157]={ name="NavWindowingTargetAnim", type="ImGuiWindow*"}, - [155]={ + [158]={ name="NavWindowingListWindow", type="ImGuiWindow*"}, - [156]={ + [159]={ name="NavWindowingTimer", type="float"}, - [157]={ + [160]={ name="NavWindowingHighlightAlpha", type="float"}, - [158]={ + [161]={ + name="NavWindowingInputSource", + type="ImGuiInputSource"}, + [162]={ name="NavWindowingToggleLayer", type="bool"}, - [159]={ + [163]={ name="NavWindowingToggleKey", type="ImGuiKey"}, - [160]={ + [164]={ name="NavWindowingAccumDeltaPos", type="ImVec2"}, - [161]={ + [165]={ name="NavWindowingAccumDeltaSize", type="ImVec2"}, - [162]={ + [166]={ name="DimBgRatio", type="float"}, - [163]={ + [167]={ name="DragDropActive", type="bool"}, - [164]={ + [168]={ name="DragDropWithinSource", type="bool"}, - [165]={ + [169]={ name="DragDropWithinTarget", type="bool"}, - [166]={ + [170]={ name="DragDropSourceFlags", type="ImGuiDragDropFlags"}, - [167]={ + [171]={ name="DragDropSourceFrameCount", type="int"}, - [168]={ + [172]={ name="DragDropMouseButton", type="int"}, - [169]={ + [173]={ name="DragDropPayload", type="ImGuiPayload"}, - [170]={ + [174]={ name="DragDropTargetRect", type="ImRect"}, - [171]={ + [175]={ name="DragDropTargetClipRect", type="ImRect"}, - [172]={ + [176]={ name="DragDropTargetId", type="ImGuiID"}, - [173]={ + [177]={ name="DragDropAcceptFlags", type="ImGuiDragDropFlags"}, - [174]={ + [178]={ name="DragDropAcceptIdCurrRectSurface", type="float"}, - [175]={ + [179]={ name="DragDropAcceptIdCurr", type="ImGuiID"}, - [176]={ + [180]={ name="DragDropAcceptIdPrev", type="ImGuiID"}, - [177]={ + [181]={ name="DragDropAcceptFrameCount", type="int"}, - [178]={ + [182]={ name="DragDropHoldJustPressedId", type="ImGuiID"}, - [179]={ + [183]={ name="DragDropPayloadBufHeap", template_type="unsigned char", type="ImVector_unsigned_char"}, - [180]={ + [184]={ name="DragDropPayloadBufLocal[16]", size=16, type="unsigned char"}, - [181]={ + [185]={ name="ClipperTempDataStacked", type="int"}, - [182]={ + [186]={ name="ClipperTempData", template_type="ImGuiListClipperData", type="ImVector_ImGuiListClipperData"}, - [183]={ + [187]={ name="CurrentTable", type="ImGuiTable*"}, - [184]={ + [188]={ name="DebugBreakInTable", type="ImGuiID"}, - [185]={ + [189]={ name="TablesTempDataStacked", type="int"}, - [186]={ + [190]={ name="TablesTempData", template_type="ImGuiTableTempData", type="ImVector_ImGuiTableTempData"}, - [187]={ + [191]={ name="Tables", template_type="ImGuiTable", type="ImPool_ImGuiTable"}, - [188]={ + [192]={ name="TablesLastTimeActive", template_type="float", type="ImVector_float"}, - [189]={ + [193]={ name="DrawChannelsTempMergeBuffer", template_type="ImDrawChannel", type="ImVector_ImDrawChannel"}, - [190]={ + [194]={ name="CurrentTabBar", type="ImGuiTabBar*"}, - [191]={ + [195]={ name="TabBars", template_type="ImGuiTabBar", type="ImPool_ImGuiTabBar"}, - [192]={ + [196]={ name="CurrentTabBarStack", template_type="ImGuiPtrOrIndex", type="ImVector_ImGuiPtrOrIndex"}, - [193]={ + [197]={ name="ShrinkWidthBuffer", template_type="ImGuiShrinkWidthItem", type="ImVector_ImGuiShrinkWidthItem"}, - [194]={ + [198]={ name="BoxSelectState", type="ImGuiBoxSelectState"}, - [195]={ + [199]={ name="CurrentMultiSelect", type="ImGuiMultiSelectTempData*"}, - [196]={ + [200]={ name="MultiSelectTempDataStacked", type="int"}, - [197]={ + [201]={ name="MultiSelectTempData", template_type="ImGuiMultiSelectTempData", type="ImVector_ImGuiMultiSelectTempData"}, - [198]={ + [202]={ name="MultiSelectStorage", template_type="ImGuiMultiSelectState", type="ImPool_ImGuiMultiSelectState"}, - [199]={ + [203]={ name="HoverItemDelayId", type="ImGuiID"}, - [200]={ + [204]={ name="HoverItemDelayIdPreviousFrame", type="ImGuiID"}, - [201]={ + [205]={ name="HoverItemDelayTimer", type="float"}, - [202]={ + [206]={ name="HoverItemDelayClearTimer", type="float"}, - [203]={ + [207]={ name="HoverItemUnlockedStationaryId", type="ImGuiID"}, - [204]={ + [208]={ name="HoverWindowUnlockedStationaryId", type="ImGuiID"}, - [205]={ + [209]={ name="MouseCursor", type="ImGuiMouseCursor"}, - [206]={ + [210]={ name="MouseStationaryTimer", type="float"}, - [207]={ + [211]={ name="MouseLastValidPos", type="ImVec2"}, - [208]={ + [212]={ name="InputTextState", type="ImGuiInputTextState"}, - [209]={ + [213]={ name="InputTextDeactivatedState", type="ImGuiInputTextDeactivatedState"}, - [210]={ - name="InputTextPasswordFont", - type="ImFont"}, - [211]={ + [214]={ + name="InputTextPasswordFontBackupBaked", + type="ImFontBaked"}, + [215]={ + name="InputTextPasswordFontBackupFlags", + type="ImFontFlags"}, + [216]={ name="TempInputId", type="ImGuiID"}, - [212]={ + [217]={ name="DataTypeZeroValue", type="ImGuiDataTypeStorage"}, - [213]={ + [218]={ name="BeginMenuDepth", type="int"}, - [214]={ + [219]={ name="BeginComboDepth", type="int"}, - [215]={ + [220]={ name="ColorEditOptions", type="ImGuiColorEditFlags"}, - [216]={ + [221]={ name="ColorEditCurrentID", type="ImGuiID"}, - [217]={ + [222]={ name="ColorEditSavedID", type="ImGuiID"}, - [218]={ + [223]={ name="ColorEditSavedHue", type="float"}, - [219]={ + [224]={ name="ColorEditSavedSat", type="float"}, - [220]={ + [225]={ name="ColorEditSavedColor", type="ImU32"}, - [221]={ + [226]={ name="ColorPickerRef", type="ImVec4"}, - [222]={ + [227]={ name="ComboPreviewData", type="ImGuiComboPreviewData"}, - [223]={ + [228]={ name="WindowResizeBorderExpectedRect", type="ImRect"}, - [224]={ + [229]={ name="WindowResizeRelativeMode", type="bool"}, - [225]={ + [230]={ name="ScrollbarSeekMode", type="short"}, - [226]={ + [231]={ name="ScrollbarClickDeltaToGrabCenter", type="float"}, - [227]={ + [232]={ name="SliderGrabClickOffset", type="float"}, - [228]={ + [233]={ name="SliderCurrentAccum", type="float"}, - [229]={ + [234]={ name="SliderCurrentAccumDirty", type="bool"}, - [230]={ + [235]={ name="DragCurrentAccumDirty", type="bool"}, - [231]={ + [236]={ name="DragCurrentAccum", type="float"}, - [232]={ + [237]={ name="DragSpeedDefaultRatio", type="float"}, - [233]={ + [238]={ name="DisabledAlphaBackup", type="float"}, - [234]={ + [239]={ name="DisabledStackSize", type="short"}, - [235]={ + [240]={ name="TooltipOverrideCount", type="short"}, - [236]={ + [241]={ name="TooltipPreviousWindow", type="ImGuiWindow*"}, - [237]={ + [242]={ name="ClipboardHandlerData", template_type="char", type="ImVector_char"}, - [238]={ + [243]={ name="MenusIdSubmittedThisFrame", template_type="ImGuiID", type="ImVector_ImGuiID"}, - [239]={ + [244]={ name="TypingSelectState", type="ImGuiTypingSelectState"}, - [240]={ + [245]={ name="PlatformImeData", type="ImGuiPlatformImeData"}, - [241]={ + [246]={ name="PlatformImeDataPrev", type="ImGuiPlatformImeData"}, - [242]={ + [247]={ + name="UserTextures", + template_type="ImTextureData*", + type="ImVector_ImTextureDataPtr"}, + [248]={ name="SettingsLoaded", type="bool"}, - [243]={ + [249]={ name="SettingsDirtyTimer", type="float"}, - [244]={ + [250]={ name="SettingsIniData", type="ImGuiTextBuffer"}, - [245]={ + [251]={ name="SettingsHandlers", template_type="ImGuiSettingsHandler", type="ImVector_ImGuiSettingsHandler"}, - [246]={ + [252]={ name="SettingsWindows", template_type="ImGuiWindowSettings", type="ImChunkStream_ImGuiWindowSettings"}, - [247]={ + [253]={ name="SettingsTables", template_type="ImGuiTableSettings", type="ImChunkStream_ImGuiTableSettings"}, - [248]={ + [254]={ name="Hooks", template_type="ImGuiContextHook", type="ImVector_ImGuiContextHook"}, - [249]={ + [255]={ name="HookIdNext", type="ImGuiID"}, - [250]={ + [256]={ name="LocalizationTable[ImGuiLocKey_COUNT]", size=10, type="const char*"}, - [251]={ + [257]={ name="LogEnabled", type="bool"}, - [252]={ + [258]={ name="LogFlags", type="ImGuiLogFlags"}, - [253]={ + [259]={ name="LogWindow", type="ImGuiWindow*"}, - [254]={ + [260]={ name="LogFile", type="ImFileHandle"}, - [255]={ + [261]={ name="LogBuffer", type="ImGuiTextBuffer"}, - [256]={ + [262]={ name="LogNextPrefix", type="const char*"}, - [257]={ + [263]={ name="LogNextSuffix", type="const char*"}, - [258]={ + [264]={ name="LogLinePosY", type="float"}, - [259]={ + [265]={ name="LogLineFirstItem", type="bool"}, - [260]={ + [266]={ name="LogDepthRef", type="int"}, - [261]={ + [267]={ name="LogDepthToExpand", type="int"}, - [262]={ + [268]={ name="LogDepthToExpandDefault", type="int"}, - [263]={ + [269]={ name="ErrorCallback", type="ImGuiErrorCallback"}, - [264]={ + [270]={ name="ErrorCallbackUserData", type="void*"}, - [265]={ + [271]={ name="ErrorTooltipLockedPos", type="ImVec2"}, - [266]={ + [272]={ name="ErrorFirst", type="bool"}, - [267]={ + [273]={ name="ErrorCountCurrentFrame", type="int"}, - [268]={ + [274]={ name="StackSizesInNewFrame", type="ImGuiErrorRecoveryState"}, - [269]={ + [275]={ name="StackSizesInBeginForCurrentWindow", type="ImGuiErrorRecoveryState*"}, - [270]={ + [276]={ name="DebugDrawIdConflictsCount", type="int"}, - [271]={ + [277]={ name="DebugLogFlags", type="ImGuiDebugLogFlags"}, - [272]={ + [278]={ name="DebugLogBuf", type="ImGuiTextBuffer"}, - [273]={ + [279]={ name="DebugLogIndex", type="ImGuiTextIndex"}, - [274]={ + [280]={ name="DebugLogSkippedErrors", type="int"}, - [275]={ + [281]={ name="DebugLogAutoDisableFlags", type="ImGuiDebugLogFlags"}, - [276]={ + [282]={ name="DebugLogAutoDisableFrames", type="ImU8"}, - [277]={ + [283]={ name="DebugLocateFrames", type="ImU8"}, - [278]={ + [284]={ name="DebugBreakInLocateId", type="bool"}, - [279]={ + [285]={ name="DebugBreakKeyChord", type="ImGuiKeyChord"}, - [280]={ + [286]={ name="DebugBeginReturnValueCullDepth", type="ImS8"}, - [281]={ + [287]={ name="DebugItemPickerActive", type="bool"}, - [282]={ + [288]={ name="DebugItemPickerMouseButton", type="ImU8"}, - [283]={ + [289]={ name="DebugItemPickerBreakId", type="ImGuiID"}, - [284]={ + [290]={ name="DebugFlashStyleColorTime", type="float"}, - [285]={ + [291]={ name="DebugFlashStyleColorBackup", type="ImVec4"}, - [286]={ + [292]={ name="DebugMetricsConfig", type="ImGuiMetricsConfig"}, - [287]={ + [293]={ name="DebugIDStackTool", type="ImGuiIDStackTool"}, - [288]={ + [294]={ name="DebugAllocInfo", type="ImGuiDebugAllocInfo"}, - [289]={ + [295]={ name="FramerateSecPerFrame[60]", size=60, type="float"}, - [290]={ + [296]={ name="FramerateSecPerFrameIdx", type="int"}, - [291]={ + [297]={ name="FramerateSecPerFrameCount", type="int"}, - [292]={ + [298]={ name="FramerateSecPerFrameAccum", type="float"}, - [293]={ + [299]={ name="WantCaptureMouseNextFrame", type="int"}, - [294]={ + [300]={ name="WantCaptureKeyboardNextFrame", type="int"}, - [295]={ + [301]={ name="WantTextInputNextFrame", type="int"}, - [296]={ + [302]={ name="TempBuffer", template_type="char", type="ImVector_char"}, - [297]={ + [303]={ name="TempKeychordName[64]", size=64, type="char"}}, @@ -5732,306 +6094,303 @@ local t={ name="DisplaySize", type="ImVec2"}, [4]={ - name="DeltaTime", - type="float"}, - [5]={ - name="IniSavingRate", - type="float"}, - [6]={ - name="IniFilename", - type="const char*"}, - [7]={ - name="LogFilename", - type="const char*"}, - [8]={ - name="UserData", - type="void*"}, - [9]={ - name="Fonts", - type="ImFontAtlas*"}, - [10]={ - name="FontGlobalScale", - type="float"}, - [11]={ - name="FontAllowUserScaling", - type="bool"}, - [12]={ - name="FontDefault", - type="ImFont*"}, - [13]={ name="DisplayFramebufferScale", type="ImVec2"}, - [14]={ + [5]={ + name="DeltaTime", + type="float"}, + [6]={ + name="IniSavingRate", + type="float"}, + [7]={ + name="IniFilename", + type="const char*"}, + [8]={ + name="LogFilename", + type="const char*"}, + [9]={ + name="UserData", + type="void*"}, + [10]={ + name="Fonts", + type="ImFontAtlas*"}, + [11]={ + name="FontDefault", + type="ImFont*"}, + [12]={ + name="FontAllowUserScaling", + type="bool"}, + [13]={ name="ConfigNavSwapGamepadButtons", type="bool"}, - [15]={ + [14]={ name="ConfigNavMoveSetMousePos", type="bool"}, - [16]={ + [15]={ name="ConfigNavCaptureKeyboard", type="bool"}, - [17]={ + [16]={ name="ConfigNavEscapeClearFocusItem", type="bool"}, - [18]={ + [17]={ name="ConfigNavEscapeClearFocusWindow", type="bool"}, - [19]={ + [18]={ name="ConfigNavCursorVisibleAuto", type="bool"}, - [20]={ + [19]={ name="ConfigNavCursorVisibleAlways", type="bool"}, - [21]={ + [20]={ name="MouseDrawCursor", type="bool"}, - [22]={ + [21]={ name="ConfigMacOSXBehaviors", type="bool"}, - [23]={ + [22]={ name="ConfigInputTrickleEventQueue", type="bool"}, - [24]={ + [23]={ name="ConfigInputTextCursorBlink", type="bool"}, - [25]={ + [24]={ name="ConfigInputTextEnterKeepActive", type="bool"}, - [26]={ + [25]={ name="ConfigDragClickToInputText", type="bool"}, - [27]={ + [26]={ name="ConfigWindowsResizeFromEdges", type="bool"}, - [28]={ + [27]={ name="ConfigWindowsMoveFromTitleBarOnly", type="bool"}, - [29]={ + [28]={ name="ConfigWindowsCopyContentsWithCtrlC", type="bool"}, - [30]={ + [29]={ name="ConfigScrollbarScrollByPage", type="bool"}, - [31]={ + [30]={ name="ConfigMemoryCompactTimer", type="float"}, - [32]={ + [31]={ name="MouseDoubleClickTime", type="float"}, - [33]={ + [32]={ name="MouseDoubleClickMaxDist", type="float"}, - [34]={ + [33]={ name="MouseDragThreshold", type="float"}, - [35]={ + [34]={ name="KeyRepeatDelay", type="float"}, - [36]={ + [35]={ name="KeyRepeatRate", type="float"}, - [37]={ + [36]={ name="ConfigErrorRecovery", type="bool"}, - [38]={ + [37]={ name="ConfigErrorRecoveryEnableAssert", type="bool"}, - [39]={ + [38]={ name="ConfigErrorRecoveryEnableDebugLog", type="bool"}, - [40]={ + [39]={ name="ConfigErrorRecoveryEnableTooltip", type="bool"}, - [41]={ + [40]={ name="ConfigDebugIsDebuggerPresent", type="bool"}, - [42]={ + [41]={ name="ConfigDebugHighlightIdConflicts", type="bool"}, - [43]={ + [42]={ name="ConfigDebugHighlightIdConflictsShowItemPicker", type="bool"}, - [44]={ + [43]={ name="ConfigDebugBeginReturnValueOnce", type="bool"}, - [45]={ + [44]={ name="ConfigDebugBeginReturnValueLoop", type="bool"}, - [46]={ + [45]={ name="ConfigDebugIgnoreFocusLoss", type="bool"}, - [47]={ + [46]={ name="ConfigDebugIniSettings", type="bool"}, - [48]={ + [47]={ name="BackendPlatformName", type="const char*"}, - [49]={ + [48]={ name="BackendRendererName", type="const char*"}, - [50]={ + [49]={ name="BackendPlatformUserData", type="void*"}, - [51]={ + [50]={ name="BackendRendererUserData", type="void*"}, - [52]={ + [51]={ name="BackendLanguageUserData", type="void*"}, - [53]={ + [52]={ name="WantCaptureMouse", type="bool"}, - [54]={ + [53]={ name="WantCaptureKeyboard", type="bool"}, - [55]={ + [54]={ name="WantTextInput", type="bool"}, - [56]={ + [55]={ name="WantSetMousePos", type="bool"}, - [57]={ + [56]={ name="WantSaveIniSettings", type="bool"}, - [58]={ + [57]={ name="NavActive", type="bool"}, - [59]={ + [58]={ name="NavVisible", type="bool"}, - [60]={ + [59]={ name="Framerate", type="float"}, - [61]={ + [60]={ name="MetricsRenderVertices", type="int"}, - [62]={ + [61]={ name="MetricsRenderIndices", type="int"}, - [63]={ + [62]={ name="MetricsRenderWindows", type="int"}, - [64]={ + [63]={ name="MetricsActiveWindows", type="int"}, - [65]={ + [64]={ name="MouseDelta", type="ImVec2"}, - [66]={ + [65]={ name="Ctx", type="ImGuiContext*"}, - [67]={ + [66]={ name="MousePos", type="ImVec2"}, - [68]={ + [67]={ name="MouseDown[5]", size=5, type="bool"}, - [69]={ + [68]={ name="MouseWheel", type="float"}, - [70]={ + [69]={ name="MouseWheelH", type="float"}, - [71]={ + [70]={ name="MouseSource", type="ImGuiMouseSource"}, - [72]={ + [71]={ name="KeyCtrl", type="bool"}, - [73]={ + [72]={ name="KeyShift", type="bool"}, - [74]={ + [73]={ name="KeyAlt", type="bool"}, - [75]={ + [74]={ name="KeySuper", type="bool"}, - [76]={ + [75]={ name="KeyMods", type="ImGuiKeyChord"}, - [77]={ + [76]={ name="KeysData[ImGuiKey_NamedKey_COUNT]", size=155, type="ImGuiKeyData"}, - [78]={ + [77]={ name="WantCaptureMouseUnlessPopupClose", type="bool"}, - [79]={ + [78]={ name="MousePosPrev", type="ImVec2"}, - [80]={ + [79]={ name="MouseClickedPos[5]", size=5, type="ImVec2"}, - [81]={ + [80]={ name="MouseClickedTime[5]", size=5, type="double"}, - [82]={ + [81]={ name="MouseClicked[5]", size=5, type="bool"}, - [83]={ + [82]={ name="MouseDoubleClicked[5]", size=5, type="bool"}, - [84]={ + [83]={ name="MouseClickedCount[5]", size=5, type="ImU16"}, - [85]={ + [84]={ name="MouseClickedLastCount[5]", size=5, type="ImU16"}, - [86]={ + [85]={ name="MouseReleased[5]", size=5, type="bool"}, - [87]={ + [86]={ name="MouseReleasedTime[5]", size=5, type="double"}, - [88]={ + [87]={ name="MouseDownOwned[5]", size=5, type="bool"}, - [89]={ + [88]={ name="MouseDownOwnedUnlessPopupClose[5]", size=5, type="bool"}, - [90]={ + [89]={ name="MouseWheelRequestAxisSwap", type="bool"}, - [91]={ + [90]={ name="MouseCtrlLeftAsRightClick", type="bool"}, - [92]={ + [91]={ name="MouseDownDuration[5]", size=5, type="float"}, - [93]={ + [92]={ name="MouseDownDurationPrev[5]", size=5, type="float"}, - [94]={ + [93]={ name="MouseDragMaxDistanceSqr[5]", size=5, type="float"}, - [95]={ + [94]={ name="PenPressure", type="float"}, - [96]={ + [95]={ name="AppFocusLost", type="bool"}, - [97]={ + [96]={ name="AppAcceptingEvents", type="bool"}, - [98]={ + [97]={ name="InputQueueSurrogate", type="ImWchar16"}, - [99]={ + [98]={ name="InputQueueCharacters", template_type="ImWchar", type="ImVector_ImWchar"}}, @@ -6306,7 +6665,7 @@ local t={ type="float"}, [6]={ name="StartPosY", - type="float"}, + type="double"}, [7]={ name="StartSeekOffsetY", type="double"}, @@ -6405,17 +6764,23 @@ local t={ name="ShowTextEncodingViewer", type="bool"}, [9]={ + name="ShowTextureUsedRect", + type="bool"}, + [10]={ name="ShowWindowsRectsType", type="int"}, - [10]={ + [11]={ name="ShowTablesRectsType", type="int"}, - [11]={ + [12]={ name="HighlightMonitorIdx", type="int"}, - [12]={ + [13]={ name="HighlightViewportID", - type="ImGuiID"}}, + type="ImGuiID"}, + [14]={ + name="ShowFontPreview", + type="bool"}}, ImGuiMultiSelectIO={ [1]={ name="Requests", @@ -6749,18 +7114,34 @@ local t={ name="Platform_LocaleDecimalPoint", type="ImWchar"}, [9]={ + name="Renderer_TextureMaxWidth", + type="int"}, + [10]={ + name="Renderer_TextureMaxHeight", + type="int"}, + [11]={ name="Renderer_RenderState", - type="void*"}}, + type="void*"}, + [12]={ + name="Textures", + template_type="ImTextureData*", + type="ImVector_ImTextureDataPtr"}}, ImGuiPlatformImeData={ [1]={ name="WantVisible", type="bool"}, [2]={ + name="WantTextInput", + type="bool"}, + [3]={ name="InputPos", type="ImVec2"}, - [3]={ + [4]={ name="InputLineHeight", - type="float"}}, + type="float"}, + [5]={ + name="ViewportId", + type="ImGuiID"}}, ImGuiPopupData={ [1]={ name="PopupId", @@ -6918,174 +7299,198 @@ local t={ type="union { int val_i; float val_f; void* val_p;}"}}, ImGuiStyle={ [1]={ - name="Alpha", + name="FontSizeBase", type="float"}, [2]={ - name="DisabledAlpha", + name="FontScaleMain", type="float"}, [3]={ - name="WindowPadding", - type="ImVec2"}, + name="FontScaleDpi", + type="float"}, [4]={ - name="WindowRounding", + name="Alpha", type="float"}, [5]={ - name="WindowBorderSize", + name="DisabledAlpha", type="float"}, [6]={ + name="WindowPadding", + type="ImVec2"}, + [7]={ + name="WindowRounding", + type="float"}, + [8]={ + name="WindowBorderSize", + type="float"}, + [9]={ name="WindowBorderHoverPadding", type="float"}, - [7]={ + [10]={ name="WindowMinSize", type="ImVec2"}, - [8]={ + [11]={ name="WindowTitleAlign", type="ImVec2"}, - [9]={ + [12]={ name="WindowMenuButtonPosition", type="ImGuiDir"}, - [10]={ + [13]={ name="ChildRounding", type="float"}, - [11]={ + [14]={ name="ChildBorderSize", type="float"}, - [12]={ + [15]={ name="PopupRounding", type="float"}, - [13]={ + [16]={ name="PopupBorderSize", type="float"}, - [14]={ + [17]={ name="FramePadding", type="ImVec2"}, - [15]={ + [18]={ name="FrameRounding", type="float"}, - [16]={ + [19]={ name="FrameBorderSize", type="float"}, - [17]={ + [20]={ name="ItemSpacing", type="ImVec2"}, - [18]={ + [21]={ name="ItemInnerSpacing", type="ImVec2"}, - [19]={ + [22]={ name="CellPadding", type="ImVec2"}, - [20]={ + [23]={ name="TouchExtraPadding", type="ImVec2"}, - [21]={ + [24]={ name="IndentSpacing", type="float"}, - [22]={ + [25]={ name="ColumnsMinSpacing", type="float"}, - [23]={ + [26]={ name="ScrollbarSize", type="float"}, - [24]={ + [27]={ name="ScrollbarRounding", type="float"}, - [25]={ + [28]={ name="GrabMinSize", type="float"}, - [26]={ + [29]={ name="GrabRounding", type="float"}, - [27]={ + [30]={ name="LogSliderDeadzone", type="float"}, - [28]={ + [31]={ name="ImageBorderSize", type="float"}, - [29]={ + [32]={ name="TabRounding", type="float"}, - [30]={ + [33]={ name="TabBorderSize", type="float"}, - [31]={ + [34]={ name="TabCloseButtonMinWidthSelected", type="float"}, - [32]={ + [35]={ name="TabCloseButtonMinWidthUnselected", type="float"}, - [33]={ + [36]={ name="TabBarBorderSize", type="float"}, - [34]={ + [37]={ name="TabBarOverlineSize", type="float"}, - [35]={ + [38]={ name="TableAngledHeadersAngle", type="float"}, - [36]={ + [39]={ name="TableAngledHeadersTextAlign", type="ImVec2"}, - [37]={ + [40]={ + name="TreeLinesFlags", + type="ImGuiTreeNodeFlags"}, + [41]={ + name="TreeLinesSize", + type="float"}, + [42]={ + name="TreeLinesRounding", + type="float"}, + [43]={ name="ColorButtonPosition", type="ImGuiDir"}, - [38]={ + [44]={ name="ButtonTextAlign", type="ImVec2"}, - [39]={ + [45]={ name="SelectableTextAlign", type="ImVec2"}, - [40]={ + [46]={ name="SeparatorTextBorderSize", type="float"}, - [41]={ + [47]={ name="SeparatorTextAlign", type="ImVec2"}, - [42]={ + [48]={ name="SeparatorTextPadding", type="ImVec2"}, - [43]={ + [49]={ name="DisplayWindowPadding", type="ImVec2"}, - [44]={ + [50]={ name="DisplaySafeAreaPadding", type="ImVec2"}, - [45]={ + [51]={ name="MouseCursorScale", type="float"}, - [46]={ + [52]={ name="AntiAliasedLines", type="bool"}, - [47]={ + [53]={ name="AntiAliasedLinesUseTex", type="bool"}, - [48]={ + [54]={ name="AntiAliasedFill", type="bool"}, - [49]={ + [55]={ name="CurveTessellationTol", type="float"}, - [50]={ + [56]={ name="CircleTessellationMaxError", type="float"}, - [51]={ + [57]={ name="Colors[ImGuiCol_COUNT]", - size=56, + size=58, type="ImVec4"}, - [52]={ + [58]={ name="HoverStationaryDelay", type="float"}, - [53]={ + [59]={ name="HoverDelayShort", type="float"}, - [54]={ + [60]={ name="HoverDelayNormal", type="float"}, - [55]={ + [61]={ name="HoverFlagsForTooltipMouse", type="ImGuiHoveredFlags"}, - [56]={ + [62]={ name="HoverFlagsForTooltipNav", - type="ImGuiHoveredFlags"}}, + type="ImGuiHoveredFlags"}, + [63]={ + name="_MainScale", + type="float"}, + [64]={ + name="_NextFrameFontSizeBase", + type="float"}}, ImGuiStyleMod={ [1]={ name="VarIdx", @@ -7922,7 +8327,16 @@ local t={ type="ImGuiItemFlags"}, [4]={ name="NavRect", - type="ImRect"}}, + type="ImRect"}, + [5]={ + name="DrawLinesX1", + type="float"}, + [6]={ + name="DrawLinesToNodesY2", + type="float"}, + [7]={ + name="DrawLinesTableColumn", + type="ImGuiTableColumnIdx"}}, ImGuiTypingSelectRequest={ [1]={ name="Flags", @@ -7976,15 +8390,18 @@ local t={ name="Size", type="ImVec2"}, [5]={ - name="WorkPos", + name="FramebufferScale", type="ImVec2"}, [6]={ - name="WorkSize", + name="WorkPos", type="ImVec2"}, [7]={ + name="WorkSize", + type="ImVec2"}, + [8]={ name="PlatformHandle", type="void*"}, - [8]={ + [9]={ name="PlatformHandleRaw", type="void*"}}, ImGuiViewportP={ @@ -8462,44 +8879,47 @@ local t={ name="TreeHasStackDataDepthMask", type="ImU32"}, [27]={ + name="TreeRecordsClippedNodesY2Mask", + type="ImU32"}, + [28]={ name="ChildWindows", template_type="ImGuiWindow*", type="ImVector_ImGuiWindowPtr"}, - [28]={ + [29]={ name="StateStorage", type="ImGuiStorage*"}, - [29]={ + [30]={ name="CurrentColumns", type="ImGuiOldColumns*"}, - [30]={ + [31]={ name="CurrentTableIdx", type="int"}, - [31]={ + [32]={ name="LayoutType", type="ImGuiLayoutType"}, - [32]={ + [33]={ name="ParentLayoutType", type="ImGuiLayoutType"}, - [33]={ + [34]={ name="ModalDimBgColor", type="ImU32"}, - [34]={ + [35]={ name="WindowItemStatusFlags", type="ImGuiItemStatusFlags"}, - [35]={ + [36]={ name="ChildItemStatusFlags", type="ImGuiItemStatusFlags"}, - [36]={ + [37]={ name="ItemWidth", type="float"}, - [37]={ + [38]={ name="TextWrapPos", type="float"}, - [38]={ + [39]={ name="ItemWidthStack", template_type="float", type="ImVector_float"}, - [39]={ + [40]={ name="TextWrapPosStack", template_type="float", type="ImVector_float"}}, @@ -8510,6 +8930,76 @@ local t={ [2]={ name="Max", type="ImVec2"}}, + ImTextureData={ + [1]={ + name="UniqueID", + type="int"}, + [2]={ + name="Status", + type="ImTextureStatus"}, + [3]={ + name="BackendUserData", + type="void*"}, + [4]={ + name="TexID", + type="ImTextureID"}, + [5]={ + name="Format", + type="ImTextureFormat"}, + [6]={ + name="Width", + type="int"}, + [7]={ + name="Height", + type="int"}, + [8]={ + name="BytesPerPixel", + type="int"}, + [9]={ + name="Pixels", + type="unsigned char*"}, + [10]={ + name="UsedRect", + type="ImTextureRect"}, + [11]={ + name="UpdateRect", + type="ImTextureRect"}, + [12]={ + name="Updates", + template_type="ImTextureRect", + type="ImVector_ImTextureRect"}, + [13]={ + name="UnusedFrames", + type="int"}, + [14]={ + name="RefCount", + type="unsigned short"}, + [15]={ + name="UseColors", + type="bool"}, + [16]={ + name="WantDestroyNextFrame", + type="bool"}}, + ImTextureRect={ + [1]={ + name="x", + type="unsigned short"}, + [2]={ + name="y", + type="unsigned short"}, + [3]={ + name="w", + type="unsigned short"}, + [4]={ + name="h", + type="unsigned short"}}, + ImTextureRef={ + [1]={ + name="_TexData", + type="ImTextureData*"}, + [2]={ + name="_TexID", + type="ImTextureID"}}, ImVec1={ [1]={ name="x", @@ -8521,6 +9011,13 @@ local t={ [2]={ name="y", type="float"}}, + ImVec2i={ + [1]={ + name="x", + type="int"}, + [2]={ + name="y", + type="int"}}, ImVec2ih={ [1]={ name="x", @@ -8540,7 +9037,12 @@ local t={ type="float"}, [4]={ name="w", - type="float"}}}, + type="float"}}, + stbrp_context_opaque={ + [1]={ + name="data[80]", + size=80, + type="char"}}}, templated_structs={ ImBitArray={ [1]={ @@ -8587,6 +9089,16 @@ local t={ [5]={ name="Sizes[CHUNKS]", type="int"}}, + ImStableVector={ + [1]={ + name="Size", + type="int"}, + [2]={ + name="Capacity", + type="int"}, + [3]={ + name="Blocks", + type="ImVector"}}, ImVector={ [1]={ name="Size", @@ -8611,16 +9123,23 @@ local t={ ImGuiTableCellData=true, ImGuiTableColumn=true, ImGuiTableColumnIdx=true}, + ImStableVector={ + ["ImFontBaked,32"]=true}, ImVector={ ImDrawChannel=true, ImDrawCmd=true, ImDrawIdx=true, ["ImDrawList*"]=true, + ["ImDrawListSharedData*"]=true, ImDrawVert=true, ["ImFont*"]=true, - ImFontAtlasCustomRect=true, + ["ImFontAtlas*"]=true, + ImFontAtlasRectEntry=true, + ["ImFontBaked*"]=true, ImFontConfig=true, + ["ImFontConfig*"]=true, ImFontGlyph=true, + ImFontStackData=true, ImGuiColorMod=true, ImGuiContextHook=true, ImGuiFocusScopeData=true, @@ -8655,7 +9174,9 @@ local t={ ["ImGuiViewportP*"]=true, ["ImGuiWindow*"]=true, ImGuiWindowStackData=true, - ImTextureID=true, + ["ImTextureData*"]=true, + ImTextureRect=true, + ImTextureRef=true, ImU16=true, ImU32=true, ImU8=true, @@ -8665,6 +9186,7 @@ local t={ char=true, float=true, int=true, + stbrp_node_im=true, ["unsigned char"]=true}}, typenames={ ImBitArray="int BITCOUNT, int OFFSET = 0", @@ -8672,5 +9194,6 @@ local t={ ImPool="T", ImSpan="T", ImSpanAllocator="int CHUNKS", + ImStableVector="typename T, int BLOCK_SIZE", ImVector="T"}} return t \ No newline at end of file diff --git a/generator/output/typedefs_dict.json b/generator/output/typedefs_dict.json index de0d16b..3ea0da5 100644 --- a/generator/output/typedefs_dict.json +++ b/generator/output/typedefs_dict.json @@ -19,12 +19,19 @@ "ImFileHandle": "FILE*", "ImFont": "struct ImFont", "ImFontAtlas": "struct ImFontAtlas", - "ImFontAtlasCustomRect": "struct ImFontAtlasCustomRect", + "ImFontAtlasBuilder": "struct ImFontAtlasBuilder", "ImFontAtlasFlags": "int", - "ImFontBuilderIO": "struct ImFontBuilderIO", + "ImFontAtlasPostProcessData": "struct ImFontAtlasPostProcessData", + "ImFontAtlasRect": "struct ImFontAtlasRect", + "ImFontAtlasRectEntry": "struct ImFontAtlasRectEntry", + "ImFontAtlasRectId": "int", + "ImFontBaked": "struct ImFontBaked", "ImFontConfig": "struct ImFontConfig", + "ImFontFlags": "int", "ImFontGlyph": "struct ImFontGlyph", "ImFontGlyphRangesBuilder": "struct ImFontGlyphRangesBuilder", + "ImFontLoader": "struct ImFontLoader", + "ImFontStackData": "struct ImFontStackData", "ImGuiActivateFlags": "int", "ImGuiBackendFlags": "int", "ImGuiBoxSelectState": "struct ImGuiBoxSelectState", @@ -53,6 +60,7 @@ "ImGuiFocusRequestFlags": "int", "ImGuiFocusScopeData": "struct ImGuiFocusScopeData", "ImGuiFocusedFlags": "int", + "ImGuiFreeTypeLoaderFlags": "unsigned int", "ImGuiGroupData": "struct ImGuiGroupData", "ImGuiHoveredFlags": "int", "ImGuiID": "unsigned int", @@ -181,17 +189,24 @@ "ImS64": "signed long long", "ImS8": "signed char", "ImStbTexteditState": "ImStb::STB_TexteditState", + "ImTextureData": "struct ImTextureData", "ImTextureID": "ImU64", + "ImTextureRect": "struct ImTextureRect", + "ImTextureRef": "struct ImTextureRef", "ImU16": "unsigned short", "ImU32": "unsigned int", "ImU64": "unsigned long long", "ImU8": "unsigned char", "ImVec1": "struct ImVec1", "ImVec2": "struct ImVec2", + "ImVec2i": "struct ImVec2i", "ImVec2ih": "struct ImVec2ih", "ImVec4": "struct ImVec4", "ImWchar": "ImWchar16", "ImWchar16": "unsigned short", "ImWchar32": "unsigned int", - "STB_TexteditState": "struct STB_TexteditState" + "STB_TexteditState": "struct STB_TexteditState", + "stbrp_context_opaque": "struct stbrp_context_opaque", + "stbrp_node": "struct stbrp_node", + "stbrp_node_im": "stbrp_node" } \ No newline at end of file diff --git a/generator/output/typedefs_dict.lua b/generator/output/typedefs_dict.lua index 60469eb..72538f5 100644 --- a/generator/output/typedefs_dict.lua +++ b/generator/output/typedefs_dict.lua @@ -19,12 +19,19 @@ local t={ ImFileHandle="FILE*", ImFont="struct ImFont", ImFontAtlas="struct ImFontAtlas", - ImFontAtlasCustomRect="struct ImFontAtlasCustomRect", + ImFontAtlasBuilder="struct ImFontAtlasBuilder", ImFontAtlasFlags="int", - ImFontBuilderIO="struct ImFontBuilderIO", + ImFontAtlasPostProcessData="struct ImFontAtlasPostProcessData", + ImFontAtlasRect="struct ImFontAtlasRect", + ImFontAtlasRectEntry="struct ImFontAtlasRectEntry", + ImFontAtlasRectId="int", + ImFontBaked="struct ImFontBaked", ImFontConfig="struct ImFontConfig", + ImFontFlags="int", ImFontGlyph="struct ImFontGlyph", ImFontGlyphRangesBuilder="struct ImFontGlyphRangesBuilder", + ImFontLoader="struct ImFontLoader", + ImFontStackData="struct ImFontStackData", ImGuiActivateFlags="int", ImGuiBackendFlags="int", ImGuiBoxSelectState="struct ImGuiBoxSelectState", @@ -53,6 +60,7 @@ local t={ ImGuiFocusRequestFlags="int", ImGuiFocusScopeData="struct ImGuiFocusScopeData", ImGuiFocusedFlags="int", + ImGuiFreeTypeLoaderFlags="unsigned int", ImGuiGroupData="struct ImGuiGroupData", ImGuiHoveredFlags="int", ImGuiID="unsigned int", @@ -181,17 +189,24 @@ local t={ ImS64="signed long long", ImS8="signed char", ImStbTexteditState="ImStb::STB_TexteditState", + ImTextureData="struct ImTextureData", ImTextureID="ImU64", + ImTextureRect="struct ImTextureRect", + ImTextureRef="struct ImTextureRef", ImU16="unsigned short", ImU32="unsigned int", ImU64="unsigned long long", ImU8="unsigned char", ImVec1="struct ImVec1", ImVec2="struct ImVec2", + ImVec2i="struct ImVec2i", ImVec2ih="struct ImVec2ih", ImVec4="struct ImVec4", ImWchar="ImWchar16", ImWchar16="unsigned short", ImWchar32="unsigned int", - STB_TexteditState="struct STB_TexteditState"} + STB_TexteditState="struct STB_TexteditState", + stbrp_context_opaque="struct stbrp_context_opaque", + stbrp_node="struct stbrp_node", + stbrp_node_im="stbrp_node"} return t \ No newline at end of file diff --git a/imgui b/imgui index f5befd2..5ee9c2a 160000 --- a/imgui +++ b/imgui @@ -1 +1 @@ -Subproject commit f5befd2d29e66809cd1110a152e375a7f1981f06 +Subproject commit 5ee9c2ad1ffcc105910b8f059f7d6c86b0ef30b7 diff --git a/test/main.c b/test/main.c index 7bee61b..c936833 100644 --- a/test/main.c +++ b/test/main.c @@ -22,9 +22,10 @@ int main(void) igCreateContext(NULL); ImGuiIO *io = igGetIO(); - unsigned char *text_pixels = NULL; - int text_w, text_h; - ImFontAtlas_GetTexDataAsRGBA32(io->Fonts, &text_pixels, &text_w, &text_h, NULL); + // unsigned char *text_pixels = NULL; + // int text_w, text_h; + // ImFontAtlas_GetTexDataAsRGBA32(io->Fonts, &text_pixels, &text_w, &text_h, NULL); + io->BackendFlags |= ImGuiBackendFlags_RendererHasTextures; for (int n = 0; n < 20; n++) { printf("NewFrame() %d\n", n);