Compare commits

..

30 Commits
1.72b ... 1.75

Author SHA1 Message Date
Victor Bombi
c5eea0b2db update README.md 2020-02-10 16:30:19 +01:00
Victor Bombi
4e00f55cc8 pull imgui 1.75 and generate 2020-02-10 16:28:40 +01:00
sonoro1234
6740445cbc add config_generator.lua for setting additional includes needed by any implementation. 2020-01-24 16:40:16 +01:00
sonoro1234
677678af07 cpp2ffi: add COMPILER argument to location iterator 2020-01-23 12:15:14 +01:00
Victor Bombi
fa9538889b Merge pull request #114 from Dominaezzz/patch-1
Fix Typo
2020-01-05 12:43:14 +01:00
Dominic Fischer
3bd9469a30 Fix Typo 2020-01-01 11:39:02 +00:00
sonoro1234
d9e1d9a80d drop cimgui_internal.h generation 2019-12-02 10:50:47 +01:00
sonoro1234
4d7a7ac09f cimgui_internal.h generation 2019-11-28 11:59:25 +01:00
sonoro1234
8096fb69fe pull imgui correction for unnamed argument 2019-11-27 15:02:40 +01:00
Victor Bombi
97cfb930e0 Merge pull request #110 from cimgui/internal
more preparation for imgui_internal inclusion, main change replace en…
2019-11-27 12:35:57 +01:00
sonoro1234
549e3cc8f8 more preparation for imgui_internal inclusion, main change replace enum with typedef enum 2019-11-27 12:31:16 +01:00
sonoro1234
3a7d0d46f8 pull ImGui 1.74 and generation 2019-11-26 10:02:00 +01:00
sonoro1234
e3cbc0119e generator.lua: preparation of imgui_internal inclusion 2019-11-26 09:56:37 +01:00
sonoro1234
7c405d3a38 cpp2ffi: add order table 2019-11-26 09:55:30 +01:00
sonoro1234
a310379820 generator.lua: use namespace in function generation, parseImGuiHeader as function 2019-11-21 13:14:41 +01:00
sonoro1234
e53a7beaeb cimgui_template: include imgui_internal.h before cimgui.h 2019-11-21 13:12:39 +01:00
sonoro1234
e7c5c6b9a1 cpp2ffi:better function return detection 2019-11-21 13:11:19 +01:00
Victor Bombi
c09dc063b0 Merge pull request #107 from rokups/workflows
github actions build script
Thanks @rokups and @lmariscal for the work done!!
2019-11-06 10:33:26 +01:00
Rokas Kupstys
e3136bb882 CI tall luajit and add bindings generation step. 2019-11-06 11:00:05 +02:00
Rokas Kupstys
59583ea35a Implement weekly builds using github actions. Based on a script from @nimgl - thanks! 2019-11-05 09:53:49 +02:00
Victor Bombi
c05aa00083 Merge pull request #104 from s-ol/no-stdcpp
Compile without exception support to link without stdc++
2019-10-21 15:41:10 +02:00
s-ol
75f2167111 compile without exception support to link without stdc++ 2019-10-17 23:31:45 +02:00
sonoro1234
bc5f64b2c2 add colon left out in ImVector_ImWchar_destroy manual declaration 2019-09-29 12:39:50 +02:00
sonoro1234
7cafceccae Add ImVector_ImWchar_destroy manual function 2019-09-27 12:31:42 +02:00
sonoro1234
1c65ee2bdc pull imgui 1.73 2019-09-25 12:44:17 +02:00
sonoro1234
0f5aa16fe8 drop ImVector functions 2019-09-25 12:39:51 +02:00
Victor Bombi
cde83f9fe8 Merge pull request #102 from lmariscal/ci
Update CMake to a modern module system and create simple test
2019-08-01 18:41:43 +02:00
sonoro1234
eefd229b68 readme: use cimgui travis account 2019-08-01 18:37:28 +02:00
Leonardo Mariscal
df61f2c552 Add Windows to travis CI 2019-08-01 07:59:37 -05:00
Leonardo Mariscal
14e8be9af1 Update CMake to a more modern module management system and create simple test based on imgui null example 2019-07-31 19:37:51 -05:00
29 changed files with 2140 additions and 25895 deletions

76
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,76 @@
name: Build
on:
push: {}
pull_request: {}
schedule:
- cron: '0 9 * * 1'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
shell: bash
env:
GITHUB_OS: ${{ matrix.os }}
run: |
if [ "$GITHUB_OS" == "macOS-latest" ];
then
brew install luajit
elif [ "$GITHUB_OS" == "ubuntu-latest" ];
then
sudo apt-get install -y luajit
elif [ "$GITHUB_OS" == "windows-latest" ];
then
vcpkg install luajit
fi
- name: Download Submodules
run: |
git submodule update --init --recursive
if: github.event_name != 'schedule'
- name: Download Latest ImGui
shell: bash
run: |
rm -rf imgui
git clone https://github.com/ocornut/imgui.git
if: github.event_name == 'schedule'
- name: Generate Bindings
shell: bash
run: |
export PATH=$PATH:/C/vcpkg/packages/luajit_x86-windows/tools/:/C/vcpkg/packages/luajit_x86-windows/bin/
cd ./generator
bash ./generator.sh
- name: CMake
run: |
mkdir cmake-build
cd cmake-build
cmake -DCIMGUI_TEST=1 ..
- name: Build
working-directory: cmake-build
run: |
cmake --build .
- name: Test
shell: bash
env:
GITHUB_OS: ${{ matrix.os }}
working-directory: cmake-build
run: |
if [ "$GITHUB_OS" == "windows-latest" ];
then
./Debug/cimgui_test.exe
else
./cimgui_test
fi

5
.gitignore vendored
View File

@@ -32,7 +32,10 @@ cimgui/cimgui.sdf
cimgui/cimgui.v12.suo
cimgui/Release/
.idea
CMakeLists.txt
cimgui/.vs/
cimgui/cimgui.vcxproj.user
cimgui/x64/
# Test / Build
bld/
build/

View File

@@ -1,11 +1,32 @@
language: cpp
dist: trusty
os:
- linux
- osx
- windows
compiler:
- gcc
- clang
env:
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
script:
make
- mkdir bld
- cd bld
- cmake -D CIMGUI_TEST=1 ..
- |
if [ "$TRAVIS_OS_NAME" == "windows" ]; then
export PATH=$MSBUILD_PATH:$PATH
MSBuild.exe cimgui.sln
else
make
fi
- |
if [ "$TRAVIS_OS_NAME" == "windows" ]; then
./Debug/cimgui_test.exe
else
./cimgui_test
fi

View File

@@ -1,20 +1,15 @@
Project(cimgui)
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.1)
project(cimgui)
#general settings
include_directories(imgui)
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)
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)
file(GLOB IMGUI_SOURCES
cimgui.cpp
imgui/imgui.cpp
imgui/imgui_draw.cpp
imgui/imgui_demo.cpp
imgui/imgui_widgets.cpp
)
set(IMGUI_STATIC "no" CACHE STRING "Build as a static library")
@@ -25,12 +20,27 @@ else (IMGUI_STATIC)
add_library(cimgui SHARED ${IMGUI_SOURCES})
endif (IMGUI_STATIC)
target_link_libraries(cimgui ${IMGUI_LIBRARIES})
target_compile_definitions(cimgui PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS=1)
if (WIN32)
target_compile_definitions(cimgui PUBLIC IMGUI_IMPL_API="extern \"C\" __declspec\(dllexport\)")
else (WIN32)
target_compile_definitions(cimgui PUBLIC IMGUI_IMPL_API="extern \"C\" ")
endif (WIN32)
target_include_directories(cimgui PUBLIC ${CMAKE_SOURCE_DIR})
target_include_directories(cimgui PUBLIC ${CMAKE_SOURCE_DIR}/imgui)
set_target_properties(cimgui PROPERTIES PREFIX "")
#install
install(TARGETS cimgui
RUNTIME DESTINATION .
LIBRARY DESTINATION .
ARCHIVE DESTINATION .
)
RUNTIME DESTINATION .
LIBRARY DESTINATION .
ARCHIVE DESTINATION .
)
#test
set(CIMGUI_TEST "no" CACHE STRING "Enable compilation of a test unit based on imgui null")
if (CIMGUI_TEST)
add_subdirectory(test)
endif ()

View File

@@ -8,7 +8,7 @@ OBJS += ./imgui/imgui_draw.o
OBJS += ./imgui/imgui_demo.o
OBJS += ./imgui/imgui_widgets.o
CXXFLAGS=-O2
CXXFLAGS=-O2 -fno-exceptions -fno-rtti
UNAME_S := $(shell uname -s)

View File

@@ -1,4 +1,4 @@
# cimgui [![Build Status](https://travis-ci.org/sonoro1234/cimgui.svg?branch=master)](https://travis-ci.org/sonoro1234/cimgui)
# cimgui [![Build Status](https://travis-ci.org/cimgui/cimgui.svg?branch=master)](https://travis-ci.org/cimgui/cimgui)
This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui [Dear ImGui](https://github.com/ocornut/imgui).
@@ -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.72b of Dear ImGui]
* currently this wrapper is based on version [1.75 of Dear ImGui]
* only functions, structs and enums from imgui.h are wrapped.
* if you are interested in imgui implementations you should look LuaJIT-ImGui project.
* overloaded function names try to be the most compatible with traditional cimgui names. So all naming is algorithmic except for those names that were in conflict with widely used cimgui names and were thus coded in a table (https://github.com/cimgui/cimgui/blob/master/generator/generator.lua#L58). Current overloaded function names can be found in (https://github.com/cimgui/cimgui/blob/master/generator/output/overloads.txt)
@@ -31,7 +31,9 @@ Notes:
* you will need LuaJIT (https://github.com/LuaJIT/LuaJIT.git better 2.1 branch) or precompiled for linux/macOS/windows in https://luapower.com/luajit/download
* you can use also a C++ compiler for doing preprocessing: gcc (In windows MinGW-W64-builds for example), clang or cl (MSVC) or not use a compiler (experimental nocompiler option) at all. (this repo was done with gcc)
* update `imgui` folder to the version you desire.
* edit `generator/generator.bat` on windows, or `generator/generator.sh` on linux, to choose between gcc, clang, cl or nocompiler. Run it with gcc, clang or cl and LuaJIT on your PATH.
* edit `generator/generator.bat` on windows, or `generator/generator.sh` on linux, to choose between gcc, clang, cl or nocompiler and to choose desired implementations.
* edit config_generator.lua for adding includes needed by your chosen implementations.
* Run generator.bat or generator.sh with gcc, clang or cl and LuaJIT on your PATH.
* as a result some files are generated: `cimgui.cpp` and `cimgui.h` for compiling and some lua/json files with information about the binding: `definitions.json` with function info, `structs_and_enums.json` with struct and enum info, `impl_definitions.json` with functions from the implementations info.
# generate binding
@@ -46,17 +48,17 @@ Notes:
* ov_cimguiname : the overloaded cimgui name (if absent it would be taken from cimguiname)
* cimguiname : the name without overloading (this should be used if there is not ov_cimguiname)
* ret : the return type
* retref : is setted if original return type is a reference. (will be a pointer in cimgui)
* retref : is set if original return type is a reference. (will be a pointer in cimgui)
* argsT : an array of collections (each one with type: argument type and name: the argument name)
* args : a string of argsT concatenated and separated by commas
* call_args : a string with the argument names separated by commas for calling imgui function
* defaults : a collection in which key is argument name and value is the default value.
* manual : will be true if this function is hand-written (not generated)
* isvararg : is setted if some argument is a vararg
* constructor : is setted if the function is a constructor for a class
* destructor : is setted if the function is a destructor for a class
* templated : is setted if the function belongs to a templated class (ImVector)
* templatedgen: is setted if the function belongs to a struct generated from template (ImVector_ImWchar)
* isvararg : is set if some argument is a vararg
* constructor : is set if the function is a constructor for a class
* destructor : is set if the function is a destructor for a class
* templated : is set if the function belongs to a templated class (ImVector)
* templatedgen: is set if the function belongs to a struct generated from template (ImVector_ImWchar)
* nonUDT : if present can be 1 or 2 (explained meaning in usage) if return type was a user defined type
### structs_and_enums description
* Is is a collection with two items:

2190
cimgui.cpp

File diff suppressed because it is too large Load Diff

738
cimgui.h

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,9 @@
#include "./imgui/imgui.h"
#include "./imgui/imgui_internal.h"
#include "cimgui.h"
#include "./imgui/imgui_internal.h"
#include "auto_funcs.cpp"
@@ -44,6 +45,11 @@ CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create()
return IM_NEW(ImVector<ImWchar>) ();
}
CIMGUI_API void ImVector_ImWchar_destroy(ImVector_ImWchar* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImVector_ImWchar_Init(ImVector_ImWchar* p)
{
IM_PLACEMENT_NEW(p) ImVector<ImWchar>();

View File

@@ -83,6 +83,7 @@ CIMGUI_API void igColorConvertRGBtoHSV(float r,float g,float b,float *out_h,floa
CIMGUI_API void igColorConvertHSVtoRGB(float h,float s,float v,float *out_r,float *out_g,float *out_b);
CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create();
CIMGUI_API void ImVector_ImWchar_destroy(ImVector_ImWchar* self);
CIMGUI_API void ImVector_ImWchar_Init(ImVector_ImWchar* p);
CIMGUI_API void ImVector_ImWchar_UnInit(ImVector_ImWchar* p);
#endif //CIMGUI_INCLUDED

View File

@@ -0,0 +1,3 @@
return {
vulkan = {[[C:\VulkanSDK\1.1.130.0\Include]]}
}

View File

@@ -104,7 +104,7 @@ local function strip(cad)
return cad:gsub("^%s*(.-)%s*$","%1") --remove initial and final spaces
end
local function strip_end(cad)
return cad:gsub("^(.-)%s*$","%1") --remove initial and final spaces
return cad:gsub("^(.-)%s*$","%1") --remove final spaces
end
local function clean_spaces(cad)
cad = strip(cad)
@@ -342,7 +342,7 @@ local function parseFunction(self,stname,lineorig,namespace)
--skip template
if line:match("template") then return end
local ret = line:match("([^%(%)]+[%*%s])%s?~?[_%w]+%b()")
local ret = line:match("([^%(%):,]+[%*%s])%s?~?[_%w]+%b()")
--local funcname, args = line:match("(~?[_%w]+)%s*(%b())")
local funcname, args, extraconst = line:match("(~?[_%w]+)%s*(%b())(.*)")
extraconst = extraconst:match("const")
@@ -630,6 +630,7 @@ end
--only basic ending
local c_types = {
["bool"]=true,
["char"]=true,
["int"]=true,
["float"]=true,
@@ -641,6 +642,7 @@ local c_types = {
["size_t"]=true,
["ptrdiff_t"]=true,
}
M.c_types = c_types
local function check_arg_detection(fdefs,typedefs)
print"-----------------check arg detection---------------------------"
for k,defT in pairs(fdefs) do
@@ -709,7 +711,7 @@ function M.Parser()
self:parseFunctions()
self:compute_overloads()
self:gen_structs_and_enums()
self:compute_templated()
--self:compute_templated()
ADDdestructors(self)
end
function par:parseItems()
@@ -808,6 +810,7 @@ function M.Parser()
--local ttype,template = it.item:match("([^%s,%(%)]+)%s*<(.+)>")
local ttype,template = it.item:match"([^%s,%(%)]+)%s*<(.+)>"
if template then
--if template=="T" then print("T found in---------");print(stru) end
local te = template:gsub("%s","_")
te = te:gsub("%*","Ptr")
self.templates[ttype] = self.templates[ttype] or {}
@@ -817,6 +820,8 @@ function M.Parser()
end
--clean mutable
it2 = it2:gsub("mutable","")
--clean namespaces
it2 = it2:gsub("%w+::","")
--skip static variables
if not (it.re_name == "vardef_re" and it2:match"static") then
table.insert(outtab,it2)
@@ -847,10 +852,26 @@ function M.Parser()
end
end
end
--get structs in namespace
for i,it in ipairs(itemsarr) do
if it.re_name == "namespace_re" then
local nsp = it.item:match("%b{}"):sub(2,-2)
local namespace = it.item:match("namespace%s+(%S+)")
local nspparr,itemsnsp = parseItems(nsp)
for insp,itnsp in ipairs(nspparr) do
if itnsp.re_name == "struct_re" then --or itnsp.re_name == "functionD_re" then
--print("in mamespace",itnsp.item,namespace)
table.insert(outtab,itnsp.item)
end
end
end
end
--then structs and enums
for i,it in ipairs(itemsarr) do
if it.re_name == "enum_re" then
table.insert(outtab,it.item)
local enumname, enumbody = it.item:match"^%s*enum%s+([^%s;{}]+)[%s\n\r]*(%b{})"
--print("enum is:",enumname, enumbody)
table.insert(outtab,"\ntypedef enum ".. enumbody..enumname..";")
elseif it.re_name == "struct_re" then
local cleanst,structname = self:clean_struct(it.item)
--if not void stname or templated
@@ -913,15 +934,44 @@ function M.Parser()
end
function par:gen_structs_and_enums_table()
local outtab = {enums={},structs={}}
local outtabpre = {}
local typedefs_table = {}
self.typedefs_table = {}
self.vardefs = {}
self.inerstructs = {}
self.order = {}
--first typedefs
for i,it in ipairs(itemsarr) do
if it.re_name == "typedef_re" then --or it.re_name == "functypedef_re" or it.re_name == "vardef_re" then
local typedefdef,typedefname = it.item:match"typedef(.+)%s([^%s;]+);$"
typedefname = strip(typedefname)
self.typedefs_table[typedefname] = strip(typedefdef)
self.order[typedefname] = i
-- add typedef after struct name
-- if it.re_name == "vardef_re" and it.item:match"struct" then
-- local stname = it.item:match("struct%s*(%S+)%s*;")
-- table.insert(typedefs_table,"typedef struct "..stname.." "..stname..";\n")
-- self.typedefs_dict[stname]="struct "..stname
-- end
end
end
--vardefs
for i,it in ipairs(itemsarr) do
if it.re_name == "vardef_re" then
local stname = it.item:match"struct%s(%S+)$"
if stname then
stname = strip(stname)
self.vardefs[stname] = true
self.order[stname] = i
end
end
end
--then structs and enums
for i,it in ipairs(itemsarr) do
if it.re_name == "enum_re" then
local enumname = it.item:match"^%s*enum%s+([^%s;{}]+)"
outtab.enums[enumname] = {}
self.order[enumname] = i
local inner = strip_end(it.item:match("%b{}"):sub(2,-2))
local enumarr = str_split(inner,",")
for j,line in ipairs(enumarr) do
@@ -941,6 +991,7 @@ function M.Parser()
--M.prtable(cleanst,structname,strtab)
if structname and not self.typenames[structname] then
outtab.structs[structname] = {}
self.order[structname]=i
for j=3,#strtab-1 do
self:parse_struct_line(strtab[j],outtab.structs[structname])
end
@@ -1239,7 +1290,7 @@ M.serializeTableF = function(t)
return M.serializeTable("defs",t).."\nreturn defs"
end
--iterates lines from a gcc/clang -E in a specific location
local function location(file,locpathT,defines)
local function location(file,locpathT,defines,COMPILER)
local define_re = "^#define%s+([^%s]+)%s+([^%s]+)$"
local number_re = "^-?[0-9]+u*$"
local hex_re = "0x[0-9a-fA-F]+u*$"
@@ -1249,6 +1300,7 @@ local function location(file,locpathT,defines)
else --gcc, clang
location_re = '^# (%d+) "([^"]*)"'
end
local path_reT = {}
for i,locpath in ipairs(locpathT) do
table.insert(path_reT,'^.*[\\/]('..locpath..')%.h$')
@@ -1274,6 +1326,7 @@ local function location(file,locpathT,defines)
if #line==0 then --nothing on emptyline
elseif not line:match("%S") then --nothing if only spaces
elseif line:sub(1,1) == "#" then
--elseif line:match"^%s*#" then
-- Is this a location pragma?
local loc_num_t,location_match = line:match(location_re)
if location_match then

View File

@@ -10,7 +10,7 @@
:: impl_definitions.lua for implementation function definitions
:: set your PATH if necessary for LuaJIT or Lua5.1 or luajit with: (for example)
set PATH=%PATH%;C:\luaGL;C:\mingw32\bin;
set PATH=%PATH%;C:\anima;C:\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\mingw32\bin;
:: set PATH=%PATH%;C:\luaGL;C:\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\mingw32\bin;
:: set PATH=%PATH%;C:\luaGL\sources\luajit-master\luajit-master\bin\mingw32;C:\mingw32\bin;
::process files

View File

@@ -189,6 +189,13 @@ end
--------------------------------functions for C generation
--load parser module
local cpp2ffi = require"cpp2ffi"
local read_data = cpp2ffi.read_data
local save_data = cpp2ffi.save_data
local copyfile = cpp2ffi.copyfile
local serializeTableF = cpp2ffi.serializeTableF
local function func_header_impl_generate(FP)
local outtab = {}
@@ -197,11 +204,19 @@ local function func_header_impl_generate(FP)
if t.cimguiname then
local cimf = FP.defsT[t.cimguiname]
local def = cimf[t.signature]
if def.ret then --not constructor
local addcoment = def.comment or ""
local addcoment = def.comment or ""
if def.constructor then
-- it happens with vulkan impl but constructor ImGui_ImplVulkanH_Window is not needed
--assert(def.stname ~= "","constructor without struct")
--table.insert(outtab,"CIMGUI_API "..def.stname.."* "..def.ov_cimguiname ..(empty and "(void)" or --def.args)..";"..addcoment.."\n")
elseif def.destructor then
--table.insert(outtab,"CIMGUI_API void "..def.ov_cimguiname..def.args..";"..addcoment.."\n")
else
if def.stname == "" then --ImGui namespace or top level
table.insert(outtab,"CIMGUI_API".." "..def.ret.." "..def.ov_cimguiname..def.args..";"..addcoment.."\n")
else
cpp2ffi.prtable(def)
error("class function in implementations")
end
end
@@ -220,6 +235,7 @@ local function func_header_generate(FP)
for k,v in pairs(FP.embeded_structs) do
table.insert(outtab,"typedef "..v.." "..k..";\n")
end
for ttype,v in pairs(FP.templates) do
for ttypein,_ in pairs(v) do
local te = ttypein:gsub("%s","_")
@@ -269,14 +285,15 @@ local function ImGui_f_implementation(outtab,def)
local ptret = def.retref and "&" or ""
table.insert(outtab,"CIMGUI_API".." "..def.ret.." "..def.ov_cimguiname..def.args.."\n")
table.insert(outtab,"{\n")
local namespace = def.namespace and def.namespace.."::" or ""
if def.isvararg then
local call_args = def.call_args:gsub("%.%.%.","args")
table.insert(outtab," va_list args;\n")
table.insert(outtab," va_start(args, fmt);\n")
if def.ret~="void" then
table.insert(outtab," "..def.ret.." ret = ImGui::"..def.funcname.."V"..call_args..";\n")
table.insert(outtab," "..def.ret.." ret = "..namespace..def.funcname.."V"..call_args..";\n")
else
table.insert(outtab," ImGui::"..def.funcname.."V"..call_args..";\n")
table.insert(outtab," "..namespace..def.funcname.."V"..call_args..";\n")
end
table.insert(outtab," va_end(args);\n")
if def.ret~="void" then
@@ -284,14 +301,14 @@ local function ImGui_f_implementation(outtab,def)
end
elseif def.nonUDT then
if def.nonUDT == 1 then
table.insert(outtab," *pOut = ImGui::"..def.funcname..def.call_args..";\n")
table.insert(outtab," *pOut = "..namespace..def.funcname..def.call_args..";\n")
else --nonUDT==2
table.insert(outtab," "..def.retorig.." ret = ImGui::"..def.funcname..def.call_args..";\n")
table.insert(outtab," "..def.retorig.." ret = "..namespace..def.funcname..def.call_args..";\n")
table.insert(outtab," "..def.ret.." ret2 = "..def.retorig.."ToSimple(ret);\n")
table.insert(outtab," return ret2;\n")
end
else --standard ImGui
table.insert(outtab," return "..ptret.."ImGui::"..def.funcname..def.call_args..";\n")
table.insert(outtab," return "..ptret..namespace..def.funcname..def.call_args..";\n")
end
table.insert(outtab,"}\n")
end
@@ -422,30 +439,36 @@ local function DefsByStruct(FP)
end
--load parser module
local cpp2ffi = require"cpp2ffi"
local read_data = cpp2ffi.read_data
local save_data = cpp2ffi.save_data
local copyfile = cpp2ffi.copyfile
local serializeTableF = cpp2ffi.serializeTableF
----------custom ImVector templates
local function generate_templates(code,templates)
table.insert(code,[[typedef struct ImVector{int Size;int Capacity;void* Data;} ImVector;]].."\n")
table.insert(code,"\n"..[[typedef struct ImVector{int Size;int Capacity;void* Data;} ImVector;]].."\n")
for ttype,v in pairs(templates) do
--local te = k:gsub("%s","_")
--te = te:gsub("%*","Ptr")
if ttype == "ImVector" then
for te,newte in pairs(v) do
table.insert(code,"typedef struct ImVector_"..newte.." {int Size;int Capacity;"..te.."* Data;} ImVector_"..newte..";\n")
end
for te,newte in pairs(v) do
table.insert(code,"typedef struct ImVector_"..newte.." {int Size;int Capacity;"..te.."* Data;} ImVector_"..newte..";\n")
end
elseif ttype == "ImPool" then
--declare ImGuiStorage
for te,newte in pairs(v) do
table.insert(code,"typedef struct ImVector_"..newte.." {int Size;int Capacity;"..te.."* Data;} ImVector_"..newte..";\n")
table.insert(code,"typedef struct ImPool_"..newte.." {ImVector_"..te.." Buf;ImGuiStorage Map;ImPoolIdx FreeIdx;} ImPool_"..newte..";\n")
end
elseif ttype == "ImChunkStream" then
for te,newte in pairs(v) do
table.insert(code,"typedef struct ImVector_"..newte.." {int Size;int Capacity;"..te.."* Data;} ImVector_"..newte..";\n")
table.insert(code,"typedef struct ImChunkStream_"..newte.." {ImVector_"..te.." Buf;} ImChunkStream_"..newte..";\n")
end
end
end
end
--generate cimgui.cpp cimgui.h
local function cimgui_generation(parser)
cpp2ffi.prtable(parser.templates)
cpp2ffi.prtable(parser.typenames)
--[[
-- clean ImVector:contains() for not applicable types
local clean_f = {}
for k,v in pairs(parser.defsT) do
@@ -464,17 +487,19 @@ local function cimgui_generation(parser)
end
end
end
--]]
--------------------------------------------------
local hstrfile = read_data"./cimgui_template.h"
local outpre,outpost = parser:gen_structs_and_enums()
--parser.templates get completely defined here
--cpp2ffi.prtable(parser.templates)
parser.templates.ImVector.T = nil
cpp2ffi.prtable(parser.templates)
cpp2ffi.prtable(parser.typenames)
local outtab = {}
generate_templates(outtab,parser.templates)
local cstructsstr = outpre..table.concat(outtab,"")..outpost
local cstructsstr = outpre..table.concat(outtab,"")..outpost..(extra or "")
hstrfile = hstrfile:gsub([[#include "imgui_structs%.h"]],cstructsstr)
local cfuncsstr = func_header_generate(parser)
@@ -512,46 +537,149 @@ if HAVE_COMPILER then
gdefines = get_defines{"IMGUI_VERSION","FLT_MAX"}
end
--funtion for parsing imgui headers
local function parseImGuiHeader(header,names)
--prepare parser
local parser = cpp2ffi.Parser()
parser.getCname = function(stname,funcname)
local pre = (stname == "") and "ig" or stname.."_"
return pre..funcname
end
parser.cname_overloads = cimgui_overloads
parser.manuals = cimgui_manuals
parser.UDTs = {"ImVec2","ImVec4","ImColor"}
local pipe,err
if HAVE_COMPILER then
pipe,err = io.popen(CPRE..header,"r")
else
pipe,err = io.open(header,"r")
end
if not pipe then
error("could not execute gcc "..err)
end
local iterator = (HAVE_COMPILER and cpp2ffi.location) or filelines
local tableo = {}
--[[
local line
repeat
line =pipe:read"*l"
table.insert(tableo,line)
until not line
cpp2ffi.save_data("cdefs1.lua",table.concat(tableo,"\n"))
--]]
for line,loca,loca2 in iterator(pipe,names,{},COMPILER) do
parser:insert(line)
--table.insert(tableo,line)
--print(loca,loca2)
end
--cpp2ffi.save_data("cdefs1.lua",table.concat(tableo))
pipe:close()
return parser
end
--generation
print("------------------generation with "..COMPILER.."------------------------")
local typedefs_dict2
--prepare parser
local parser1 = cpp2ffi.Parser()
parser1.getCname = function(stname,funcname)
local pre = (stname == "") and "ig" or stname.."_"
return pre..funcname
end
parser1.cname_overloads = cimgui_overloads
parser1.manuals = cimgui_manuals
parser1.UDTs = {"ImVec2","ImVec4","ImColor"}
local pipe,err
if HAVE_COMPILER then
pipe,err = io.popen(CPRE..[[../imgui/imgui.h]],"r")
else
pipe,err = io.open([[../imgui/imgui.h]],"r")
end
if not pipe then
error("could not execute gcc "..err)
end
--local file,err = io.open("output_compiler.txt","w")
--if not file then error(err) end
local iterator = (HAVE_COMPILER and cpp2ffi.location) or filelines
for line in iterator(pipe,{"imgui"},{}) do
parser1:insert(line)
--file:write(line)
end
--file:close()
pipe:close()
--local parser1 = parseImGuiHeader([[headers.h]],{[[imgui]],[[imgui_internal]],[[imstb_textedit]]})
local parser1 = parseImGuiHeader([[../imgui/imgui.h]],{[[imgui]]})
parser1:do_parse()
--table.sort(parser1.funcdefs, function(a,b) return a.cimguiname < b.cimguiname end)
--parser1:dump_alltypes()
--parser1:printItems()
---------- generate cimgui_internal.h
--[=[
local parser1i = parseImGuiHeader([[../imgui/imgui_internal.h]],{[[imgui_internal]],[[imstb_textedit]]})
parser1i:do_parse()
local outpre,outpost = parser1i:gen_structs_and_enums()
--avoid T
parser1i.templates.ImVector.T = nil
for k,v in pairs(parser1i.templates.ImVector) do
if parser1.templates.ImVector[k] then parser1i.templates.ImVector[k]=nil end
end
local outtab = {}
generate_templates(outtab,parser1i.templates)
--drop first
table.remove(outtab,1)
local cstructsstr = outpre..table.concat(outtab,"")..outpost..(extra or "")
local cfuncsstr = func_header_generate(parser1i)
save_data("./output/cimgui_internal.h",cimgui_header,"#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS\n",cstructsstr,"\n#endif\n")--,cfuncsstr)
copyfile("./output/cimgui_internal.h", "../cimgui_internal.h")
--]=]
----------- add only ImGuiContext from imgui_internal.h to parser1
--[=[
local parser1i = parseImGuiHeader([[../imgui/imgui_internal.h]],{[[imgui_internal]],[[imstb_textedit]]})
parser1i:do_parse()
local p1isten = parser1i:gen_structs_and_enums_table()
--parser1i:printItems()
print"typedefs_table---------------------------"
cpp2ffi.prtable(parser1i.typedefs_table)
print"typedefs_table end---------------------------"
local needed = {ImGuiContext = {type = "ImGuiContext", kind = "structs", order = parser1i.order["ImGuiContext"]}}
local seen = {}
local function RecurseNeeded(Ini,IniKind,level)
--if level > 5 then return end
if seen[Ini] then return end
seen[Ini] = true
print("RecurseNeeded",Ini,IniKind,level)
for i,v in ipairs(p1isten[IniKind][Ini]) do
--if not v.type then print("nil type in",Ini,IniKind) end
--dont want pointers
local type = v.type:match"([^%*]+)"
--ImVector out
if type:match"ImVector_" then type=type:match"ImVector_(.+)" end
local kind = p1isten.enums[type] and "enums" or p1isten.structs[type] and "structs" or nil
if kind=="structs" then
if not needed[type] then RecurseNeeded(type,kind,level+1) end
needed[type] = {type = type, kind = kind, order = parser1i.order[type]}
elseif kind=="enums" then
needed[type] = {type = type, kind = kind, order = parser1i.order[type]}
elseif parser1i.typedefs_table[type] then
needed[type] = {type = type, kind = "typedef", order = parser1i.order[type]}
elseif parser1i.vardefs[type] then
needed[type] = {type = type, kind = "vardef", order = parser1i.order[type]}
elseif not cpp2ffi.c_types[type] then
print("RecurseNeded failed",type)
--error"failed recurse"
end
end
end
RecurseNeeded("ImGuiContext","structs",0)
local ordered_needed = {}
for k,v in pairs(needed) do
table.insert(ordered_needed,v)
end
table.sort(ordered_needed, function(a,b) return a.order < b.order end)
print"needed are-----------------------"
for i,vv in ipairs(ordered_needed) do
print(vv.order,vv.type,vv.kind)
local v = parser1i.itemsarr[vv.order]
--if v.item:match"^[%s\n\r]*struct%s*ImGuiContext" then
if vv.kind=="structs" then
--add enum keyword where necessary
--print"setting enum keyword------------------------"
local newitem = ""
for line in v.item:gmatch("([^\n]+)") do
local typen = line:match"^%s*(%S+)"
if p1isten.enums[typen] then
print("add enum",typen)
newitem = newitem.."\nenum"..line
else
newitem = newitem.."\n"..line
end
end
v.item = newitem
end
table.insert(parser1.itemsarr,v)
end
--]=]
----------------------
save_data("./output/overloads.txt",parser1.overloadstxt)
cimgui_generation(parser1)
@@ -577,12 +705,14 @@ end
save_data("./output/structs_and_enums.lua",serializeTableF(structs_and_enums_table))
save_data("./output/typedefs_dict.lua",serializeTableF(parser1.typedefs_dict))
--check every function has ov_cimguiname
-- for k,v in pairs(parser1.defsT) do
-- for _,def in ipairs(v) do
-- assert(def.ov_cimguiname)
-- end
-- end
--=================================Now implementations
local parser2
@@ -590,14 +720,22 @@ local parser2
if #implementations > 0 then
parser2 = cpp2ffi.Parser()
local config = require"config_generator"
for i,impl in ipairs(implementations) do
local source = [[../imgui/examples/imgui_impl_]].. impl .. ".h "
local locati = [[imgui_impl_]].. impl
local pipe,err
local extra_includes = ""
local include_cmd = COMPILER=="cl" and [[ /I ]] or [[ -I ]]
if config[impl] then
for j,inc in ipairs(config[impl]) do
extra_includes = extra_includes .. include_cmd .. inc .. " "
end
end
if HAVE_COMPILER then
pipe,err = io.popen(CPRE..source,"r")
pipe,err = io.popen(CPRE..extra_includes..source,"r")
else
pipe,err = io.open(source,"r")
end
@@ -607,7 +745,7 @@ if #implementations > 0 then
local iterator = (HAVE_COMPILER and cpp2ffi.location) or filelines
for line,locat in iterator(pipe,{locati},{}) do
for line,locat in iterator(pipe,{locati},{},COMPILER) do
--local line, comment = split_comment(line)
parser2:insert(line)
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -79,24 +79,24 @@ igSetWindowCollapsed 2
igPlotLines 2
1 void igPlotLines (const char*,const float*,int,int,const char*,float,float,ImVec2,int)
2 void igPlotLinesFnPtr (const char*,float(*)(void*,int),void*,int,int,const char*,float,float,ImVec2)
igListBoxHeader 2
1 bool igListBoxHeaderVec2 (const char*,const ImVec2)
2 bool igListBoxHeaderInt (const char*,int,int)
igPushStyleColor 2
1 void igPushStyleColorU32 (ImGuiCol,ImU32)
2 void igPushStyleColor (ImGuiCol,const ImVec4)
igTreeNodeExV 2
1 bool igTreeNodeExVStr (const char*,ImGuiTreeNodeFlags,const char*,va_list)
2 bool igTreeNodeExVPtr (const void*,ImGuiTreeNodeFlags,const char*,va_list)
igListBox 2
1 bool igListBoxStr_arr (const char*,int*,const char* const[],int,int)
2 bool igListBoxFnPtr (const char*,int*,bool(*)(void*,int,const char**),void*,int,int)
ImVec2_ImVec2 2
1 nil ImVec2_ImVec2 ()
2 nil ImVec2_ImVec2Float (float,float)
igCollapsingHeader 2
1 bool igCollapsingHeader (const char*,ImGuiTreeNodeFlags)
2 bool igCollapsingHeaderBoolPtr (const char*,bool*,ImGuiTreeNodeFlags)
igTreePush 2
1 void igTreePushStr (const char*)
2 void igTreePushPtr (const void*)
igSelectable 2
1 bool igSelectable (const char*,bool,ImGuiSelectableFlags,const ImVec2)
2 bool igSelectableBoolPtr (const char*,bool*,ImGuiSelectableFlags,const ImVec2)
igGetColorU32 3
1 ImU32 igGetColorU32 (ImGuiCol,float)
2 ImU32 igGetColorU32Vec4 (const ImVec4)
@@ -107,18 +107,18 @@ ImColor_ImColor 5
3 nil ImColor_ImColorU32 (ImU32)
4 nil ImColor_ImColorFloat (float,float,float,float)
5 nil ImColor_ImColorVec4 (const ImVec4)
ImVec2_ImVec2 2
1 nil ImVec2_ImVec2 ()
2 nil ImVec2_ImVec2Float (float,float)
ImVector_front 2
1 T* ImVector_front ()
2 const T* ImVector_front_const ()const
igSelectable 2
1 bool igSelectable (const char*,bool,ImGuiSelectableFlags,const ImVec2)
2 bool igSelectableBoolPtr (const char*,bool*,ImGuiSelectableFlags,const ImVec2)
ImVector_begin 2
1 T* ImVector_begin ()
2 const T* ImVector_begin_const ()const
igPushStyleColor 2
1 void igPushStyleColorU32 (ImGuiCol,ImU32)
2 void igPushStyleColor (ImGuiCol,const ImVec4)
ImVector_front 2
1 T* ImVector_front ()
2 const T* ImVector_front_const ()const
ImVector_find 2
1 T* ImVector_find (const T)
2 const T* ImVector_find_const (const T)const
igTreeNodeEx 3
1 bool igTreeNodeExStr (const char*,ImGuiTreeNodeFlags)
2 bool igTreeNodeExStrStr (const char*,ImGuiTreeNodeFlags,const char*,...)
@@ -126,7 +126,10 @@ igTreeNodeEx 3
igMenuItem 2
1 bool igMenuItemBool (const char*,const char*,bool,bool)
2 bool igMenuItemBoolPtr (const char*,const char*,bool*,bool)
igListBoxHeader 2
1 bool igListBoxHeaderVec2 (const char*,const ImVec2)
2 bool igListBoxHeaderInt (const char*,int,int)
igTreeNodeV 2
1 bool igTreeNodeVStr (const char*,const char*,va_list)
2 bool igTreeNodeVPtr (const void*,const char*,va_list)
91 overloaded
93 overloaded

View File

@@ -1077,6 +1077,28 @@
"value": 22
}
],
"ImGuiMouseButton_": [
{
"calc_value": 0,
"name": "ImGuiMouseButton_Left",
"value": "0"
},
{
"calc_value": 1,
"name": "ImGuiMouseButton_Right",
"value": "1"
},
{
"calc_value": 2,
"name": "ImGuiMouseButton_Middle",
"value": "2"
},
{
"calc_value": 5,
"name": "ImGuiMouseButton_COUNT",
"value": "5"
}
],
"ImGuiMouseCursor_": [
{
"calc_value": -1,
@@ -1125,8 +1147,13 @@
},
{
"calc_value": 8,
"name": "ImGuiMouseCursor_COUNT",
"name": "ImGuiMouseCursor_NotAllowed",
"value": 8
},
{
"calc_value": 9,
"name": "ImGuiMouseCursor_COUNT",
"value": 9
}
],
"ImGuiNavInput_": [
@@ -1217,33 +1244,28 @@
},
{
"calc_value": 17,
"name": "ImGuiNavInput_KeyTab_",
"name": "ImGuiNavInput_KeyLeft_",
"value": 17
},
{
"calc_value": 18,
"name": "ImGuiNavInput_KeyLeft_",
"name": "ImGuiNavInput_KeyRight_",
"value": 18
},
{
"calc_value": 19,
"name": "ImGuiNavInput_KeyRight_",
"name": "ImGuiNavInput_KeyUp_",
"value": 19
},
{
"calc_value": 20,
"name": "ImGuiNavInput_KeyUp_",
"name": "ImGuiNavInput_KeyDown_",
"value": 20
},
{
"calc_value": 21,
"name": "ImGuiNavInput_KeyDown_",
"value": 21
},
{
"calc_value": 22,
"name": "ImGuiNavInput_COUNT",
"value": 22
"value": 21
},
{
"calc_value": 16,
@@ -1276,6 +1298,11 @@
"calc_value": 8,
"name": "ImGuiSelectableFlags_Disabled",
"value": "1 << 3"
},
{
"calc_value": 16,
"name": "ImGuiSelectableFlags_AllowItemOverlap",
"value": "1 << 4"
}
],
"ImGuiStyleVar_": [
@@ -1545,6 +1572,16 @@
"name": "ImGuiTreeNodeFlags_FramePadding",
"value": "1 << 10"
},
{
"calc_value": 2048,
"name": "ImGuiTreeNodeFlags_SpanAvailWidth",
"value": "1 << 11"
},
{
"calc_value": 4096,
"name": "ImGuiTreeNodeFlags_SpanFullWidth",
"value": "1 << 12"
},
{
"calc_value": 8192,
"name": "ImGuiTreeNodeFlags_NavLeftJumpsBackHere",
@@ -1933,6 +1970,14 @@
"name": "FallbackChar",
"type": "ImWchar"
},
{
"name": "EllipsisChar",
"type": "ImWchar"
},
{
"name": "DirtyLookupTables",
"type": "bool"
},
{
"name": "Scale",
"type": "float"
@@ -1948,10 +1993,6 @@
{
"name": "MetricsTotalSurface",
"type": "int"
},
{
"name": "DirtyLookupTables",
"type": "bool"
}
],
"ImFontAtlas": [
@@ -2119,6 +2160,10 @@
"name": "RasterizerMultiply",
"type": "float"
},
{
"name": "EllipsisChar",
"type": "ImWchar"
},
{
"name": "Name[40]",
"size": 40,
@@ -2276,6 +2321,10 @@
"name": "ConfigWindowsMoveFromTitleBarOnly",
"type": "bool"
},
{
"name": "ConfigWindowsMemoryCompactTimer",
"type": "float"
},
{
"name": "BackendPlatformName",
"type": "const char*"
@@ -2360,7 +2409,7 @@
},
{
"name": "NavInputs[ImGuiNavInput_COUNT]",
"size": 22,
"size": 21,
"type": "float"
},
{
@@ -2490,12 +2539,12 @@
},
{
"name": "NavInputsDownDuration[ImGuiNavInput_COUNT]",
"size": 22,
"size": 21,
"type": "float"
},
{
"name": "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]",
"size": 22,
"size": 21,
"type": "float"
},
{
@@ -2556,12 +2605,12 @@
],
"ImGuiListClipper": [
{
"name": "StartPosY",
"type": "float"
"name": "DisplayStart",
"type": "int"
},
{
"name": "ItemsHeight",
"type": "float"
"name": "DisplayEnd",
"type": "int"
},
{
"name": "ItemsCount",
@@ -2572,12 +2621,12 @@
"type": "int"
},
{
"name": "DisplayStart",
"type": "int"
"name": "ItemsHeight",
"type": "float"
},
{
"name": "DisplayEnd",
"type": "int"
"name": "StartPosY",
"type": "float"
}
],
"ImGuiOnceUponAFrame": [
@@ -2793,6 +2842,10 @@
"name": "CurveTessellationTol",
"type": "float"
},
{
"name": "CircleSegmentMaxError",
"type": "float"
},
{
"name": "Colors[ImGuiCol_COUNT]",
"size": 48,

View File

@@ -852,6 +852,23 @@ defs["enums"]["ImGuiKey_"][23] = {}
defs["enums"]["ImGuiKey_"][23]["calc_value"] = 22
defs["enums"]["ImGuiKey_"][23]["name"] = "ImGuiKey_COUNT"
defs["enums"]["ImGuiKey_"][23]["value"] = 22
defs["enums"]["ImGuiMouseButton_"] = {}
defs["enums"]["ImGuiMouseButton_"][1] = {}
defs["enums"]["ImGuiMouseButton_"][1]["calc_value"] = 0
defs["enums"]["ImGuiMouseButton_"][1]["name"] = "ImGuiMouseButton_Left"
defs["enums"]["ImGuiMouseButton_"][1]["value"] = "0"
defs["enums"]["ImGuiMouseButton_"][2] = {}
defs["enums"]["ImGuiMouseButton_"][2]["calc_value"] = 1
defs["enums"]["ImGuiMouseButton_"][2]["name"] = "ImGuiMouseButton_Right"
defs["enums"]["ImGuiMouseButton_"][2]["value"] = "1"
defs["enums"]["ImGuiMouseButton_"][3] = {}
defs["enums"]["ImGuiMouseButton_"][3]["calc_value"] = 2
defs["enums"]["ImGuiMouseButton_"][3]["name"] = "ImGuiMouseButton_Middle"
defs["enums"]["ImGuiMouseButton_"][3]["value"] = "2"
defs["enums"]["ImGuiMouseButton_"][4] = {}
defs["enums"]["ImGuiMouseButton_"][4]["calc_value"] = 5
defs["enums"]["ImGuiMouseButton_"][4]["name"] = "ImGuiMouseButton_COUNT"
defs["enums"]["ImGuiMouseButton_"][4]["value"] = "5"
defs["enums"]["ImGuiMouseCursor_"] = {}
defs["enums"]["ImGuiMouseCursor_"][1] = {}
defs["enums"]["ImGuiMouseCursor_"][1]["calc_value"] = -1
@@ -891,8 +908,12 @@ defs["enums"]["ImGuiMouseCursor_"][9]["name"] = "ImGuiMouseCursor_Hand"
defs["enums"]["ImGuiMouseCursor_"][9]["value"] = 7
defs["enums"]["ImGuiMouseCursor_"][10] = {}
defs["enums"]["ImGuiMouseCursor_"][10]["calc_value"] = 8
defs["enums"]["ImGuiMouseCursor_"][10]["name"] = "ImGuiMouseCursor_COUNT"
defs["enums"]["ImGuiMouseCursor_"][10]["name"] = "ImGuiMouseCursor_NotAllowed"
defs["enums"]["ImGuiMouseCursor_"][10]["value"] = 8
defs["enums"]["ImGuiMouseCursor_"][11] = {}
defs["enums"]["ImGuiMouseCursor_"][11]["calc_value"] = 9
defs["enums"]["ImGuiMouseCursor_"][11]["name"] = "ImGuiMouseCursor_COUNT"
defs["enums"]["ImGuiMouseCursor_"][11]["value"] = 9
defs["enums"]["ImGuiNavInput_"] = {}
defs["enums"]["ImGuiNavInput_"][1] = {}
defs["enums"]["ImGuiNavInput_"][1]["calc_value"] = 0
@@ -964,32 +985,28 @@ defs["enums"]["ImGuiNavInput_"][17]["name"] = "ImGuiNavInput_KeyMenu_"
defs["enums"]["ImGuiNavInput_"][17]["value"] = 16
defs["enums"]["ImGuiNavInput_"][18] = {}
defs["enums"]["ImGuiNavInput_"][18]["calc_value"] = 17
defs["enums"]["ImGuiNavInput_"][18]["name"] = "ImGuiNavInput_KeyTab_"
defs["enums"]["ImGuiNavInput_"][18]["name"] = "ImGuiNavInput_KeyLeft_"
defs["enums"]["ImGuiNavInput_"][18]["value"] = 17
defs["enums"]["ImGuiNavInput_"][19] = {}
defs["enums"]["ImGuiNavInput_"][19]["calc_value"] = 18
defs["enums"]["ImGuiNavInput_"][19]["name"] = "ImGuiNavInput_KeyLeft_"
defs["enums"]["ImGuiNavInput_"][19]["name"] = "ImGuiNavInput_KeyRight_"
defs["enums"]["ImGuiNavInput_"][19]["value"] = 18
defs["enums"]["ImGuiNavInput_"][20] = {}
defs["enums"]["ImGuiNavInput_"][20]["calc_value"] = 19
defs["enums"]["ImGuiNavInput_"][20]["name"] = "ImGuiNavInput_KeyRight_"
defs["enums"]["ImGuiNavInput_"][20]["name"] = "ImGuiNavInput_KeyUp_"
defs["enums"]["ImGuiNavInput_"][20]["value"] = 19
defs["enums"]["ImGuiNavInput_"][21] = {}
defs["enums"]["ImGuiNavInput_"][21]["calc_value"] = 20
defs["enums"]["ImGuiNavInput_"][21]["name"] = "ImGuiNavInput_KeyUp_"
defs["enums"]["ImGuiNavInput_"][21]["name"] = "ImGuiNavInput_KeyDown_"
defs["enums"]["ImGuiNavInput_"][21]["value"] = 20
defs["enums"]["ImGuiNavInput_"][22] = {}
defs["enums"]["ImGuiNavInput_"][22]["calc_value"] = 21
defs["enums"]["ImGuiNavInput_"][22]["name"] = "ImGuiNavInput_KeyDown_"
defs["enums"]["ImGuiNavInput_"][22]["name"] = "ImGuiNavInput_COUNT"
defs["enums"]["ImGuiNavInput_"][22]["value"] = 21
defs["enums"]["ImGuiNavInput_"][23] = {}
defs["enums"]["ImGuiNavInput_"][23]["calc_value"] = 22
defs["enums"]["ImGuiNavInput_"][23]["name"] = "ImGuiNavInput_COUNT"
defs["enums"]["ImGuiNavInput_"][23]["value"] = 22
defs["enums"]["ImGuiNavInput_"][24] = {}
defs["enums"]["ImGuiNavInput_"][24]["calc_value"] = 16
defs["enums"]["ImGuiNavInput_"][24]["name"] = "ImGuiNavInput_InternalStart_"
defs["enums"]["ImGuiNavInput_"][24]["value"] = "ImGuiNavInput_KeyMenu_"
defs["enums"]["ImGuiNavInput_"][23]["calc_value"] = 16
defs["enums"]["ImGuiNavInput_"][23]["name"] = "ImGuiNavInput_InternalStart_"
defs["enums"]["ImGuiNavInput_"][23]["value"] = "ImGuiNavInput_KeyMenu_"
defs["enums"]["ImGuiSelectableFlags_"] = {}
defs["enums"]["ImGuiSelectableFlags_"][1] = {}
defs["enums"]["ImGuiSelectableFlags_"][1]["calc_value"] = 0
@@ -1011,6 +1028,10 @@ defs["enums"]["ImGuiSelectableFlags_"][5] = {}
defs["enums"]["ImGuiSelectableFlags_"][5]["calc_value"] = 8
defs["enums"]["ImGuiSelectableFlags_"][5]["name"] = "ImGuiSelectableFlags_Disabled"
defs["enums"]["ImGuiSelectableFlags_"][5]["value"] = "1 << 3"
defs["enums"]["ImGuiSelectableFlags_"][6] = {}
defs["enums"]["ImGuiSelectableFlags_"][6]["calc_value"] = 16
defs["enums"]["ImGuiSelectableFlags_"][6]["name"] = "ImGuiSelectableFlags_AllowItemOverlap"
defs["enums"]["ImGuiSelectableFlags_"][6]["value"] = "1 << 4"
defs["enums"]["ImGuiStyleVar_"] = {}
defs["enums"]["ImGuiStyleVar_"][1] = {}
defs["enums"]["ImGuiStyleVar_"][1]["calc_value"] = 0
@@ -1224,13 +1245,21 @@ defs["enums"]["ImGuiTreeNodeFlags_"][12]["calc_value"] = 1024
defs["enums"]["ImGuiTreeNodeFlags_"][12]["name"] = "ImGuiTreeNodeFlags_FramePadding"
defs["enums"]["ImGuiTreeNodeFlags_"][12]["value"] = "1 << 10"
defs["enums"]["ImGuiTreeNodeFlags_"][13] = {}
defs["enums"]["ImGuiTreeNodeFlags_"][13]["calc_value"] = 8192
defs["enums"]["ImGuiTreeNodeFlags_"][13]["name"] = "ImGuiTreeNodeFlags_NavLeftJumpsBackHere"
defs["enums"]["ImGuiTreeNodeFlags_"][13]["value"] = "1 << 13"
defs["enums"]["ImGuiTreeNodeFlags_"][13]["calc_value"] = 2048
defs["enums"]["ImGuiTreeNodeFlags_"][13]["name"] = "ImGuiTreeNodeFlags_SpanAvailWidth"
defs["enums"]["ImGuiTreeNodeFlags_"][13]["value"] = "1 << 11"
defs["enums"]["ImGuiTreeNodeFlags_"][14] = {}
defs["enums"]["ImGuiTreeNodeFlags_"][14]["calc_value"] = 26
defs["enums"]["ImGuiTreeNodeFlags_"][14]["name"] = "ImGuiTreeNodeFlags_CollapsingHeader"
defs["enums"]["ImGuiTreeNodeFlags_"][14]["value"] = "ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog"
defs["enums"]["ImGuiTreeNodeFlags_"][14]["calc_value"] = 4096
defs["enums"]["ImGuiTreeNodeFlags_"][14]["name"] = "ImGuiTreeNodeFlags_SpanFullWidth"
defs["enums"]["ImGuiTreeNodeFlags_"][14]["value"] = "1 << 12"
defs["enums"]["ImGuiTreeNodeFlags_"][15] = {}
defs["enums"]["ImGuiTreeNodeFlags_"][15]["calc_value"] = 8192
defs["enums"]["ImGuiTreeNodeFlags_"][15]["name"] = "ImGuiTreeNodeFlags_NavLeftJumpsBackHere"
defs["enums"]["ImGuiTreeNodeFlags_"][15]["value"] = "1 << 13"
defs["enums"]["ImGuiTreeNodeFlags_"][16] = {}
defs["enums"]["ImGuiTreeNodeFlags_"][16]["calc_value"] = 26
defs["enums"]["ImGuiTreeNodeFlags_"][16]["name"] = "ImGuiTreeNodeFlags_CollapsingHeader"
defs["enums"]["ImGuiTreeNodeFlags_"][16]["value"] = "ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog"
defs["enums"]["ImGuiWindowFlags_"] = {}
defs["enums"]["ImGuiWindowFlags_"][1] = {}
defs["enums"]["ImGuiWindowFlags_"][1]["calc_value"] = 0
@@ -1521,20 +1550,23 @@ defs["structs"]["ImFont"][11] = {}
defs["structs"]["ImFont"][11]["name"] = "FallbackChar"
defs["structs"]["ImFont"][11]["type"] = "ImWchar"
defs["structs"]["ImFont"][12] = {}
defs["structs"]["ImFont"][12]["name"] = "Scale"
defs["structs"]["ImFont"][12]["type"] = "float"
defs["structs"]["ImFont"][12]["name"] = "EllipsisChar"
defs["structs"]["ImFont"][12]["type"] = "ImWchar"
defs["structs"]["ImFont"][13] = {}
defs["structs"]["ImFont"][13]["name"] = "Ascent"
defs["structs"]["ImFont"][13]["type"] = "float"
defs["structs"]["ImFont"][13]["name"] = "DirtyLookupTables"
defs["structs"]["ImFont"][13]["type"] = "bool"
defs["structs"]["ImFont"][14] = {}
defs["structs"]["ImFont"][14]["name"] = "Descent"
defs["structs"]["ImFont"][14]["name"] = "Scale"
defs["structs"]["ImFont"][14]["type"] = "float"
defs["structs"]["ImFont"][15] = {}
defs["structs"]["ImFont"][15]["name"] = "MetricsTotalSurface"
defs["structs"]["ImFont"][15]["type"] = "int"
defs["structs"]["ImFont"][15]["name"] = "Ascent"
defs["structs"]["ImFont"][15]["type"] = "float"
defs["structs"]["ImFont"][16] = {}
defs["structs"]["ImFont"][16]["name"] = "DirtyLookupTables"
defs["structs"]["ImFont"][16]["type"] = "bool"
defs["structs"]["ImFont"][16]["name"] = "Descent"
defs["structs"]["ImFont"][16]["type"] = "float"
defs["structs"]["ImFont"][17] = {}
defs["structs"]["ImFont"][17]["name"] = "MetricsTotalSurface"
defs["structs"]["ImFont"][17]["type"] = "int"
defs["structs"]["ImFontAtlas"] = {}
defs["structs"]["ImFontAtlas"][1] = {}
defs["structs"]["ImFontAtlas"][1]["name"] = "Locked"
@@ -1660,12 +1692,15 @@ defs["structs"]["ImFontConfig"][16] = {}
defs["structs"]["ImFontConfig"][16]["name"] = "RasterizerMultiply"
defs["structs"]["ImFontConfig"][16]["type"] = "float"
defs["structs"]["ImFontConfig"][17] = {}
defs["structs"]["ImFontConfig"][17]["name"] = "Name[40]"
defs["structs"]["ImFontConfig"][17]["size"] = 40
defs["structs"]["ImFontConfig"][17]["type"] = "char"
defs["structs"]["ImFontConfig"][17]["name"] = "EllipsisChar"
defs["structs"]["ImFontConfig"][17]["type"] = "ImWchar"
defs["structs"]["ImFontConfig"][18] = {}
defs["structs"]["ImFontConfig"][18]["name"] = "DstFont"
defs["structs"]["ImFontConfig"][18]["type"] = "ImFont*"
defs["structs"]["ImFontConfig"][18]["name"] = "Name[40]"
defs["structs"]["ImFontConfig"][18]["size"] = 40
defs["structs"]["ImFontConfig"][18]["type"] = "char"
defs["structs"]["ImFontConfig"][19] = {}
defs["structs"]["ImFontConfig"][19]["name"] = "DstFont"
defs["structs"]["ImFontConfig"][19]["type"] = "ImFont*"
defs["structs"]["ImFontGlyph"] = {}
defs["structs"]["ImFontGlyph"][1] = {}
defs["structs"]["ImFontGlyph"][1]["name"] = "Codepoint"
@@ -1777,180 +1812,183 @@ defs["structs"]["ImGuiIO"][24] = {}
defs["structs"]["ImGuiIO"][24]["name"] = "ConfigWindowsMoveFromTitleBarOnly"
defs["structs"]["ImGuiIO"][24]["type"] = "bool"
defs["structs"]["ImGuiIO"][25] = {}
defs["structs"]["ImGuiIO"][25]["name"] = "BackendPlatformName"
defs["structs"]["ImGuiIO"][25]["type"] = "const char*"
defs["structs"]["ImGuiIO"][25]["name"] = "ConfigWindowsMemoryCompactTimer"
defs["structs"]["ImGuiIO"][25]["type"] = "float"
defs["structs"]["ImGuiIO"][26] = {}
defs["structs"]["ImGuiIO"][26]["name"] = "BackendRendererName"
defs["structs"]["ImGuiIO"][26]["name"] = "BackendPlatformName"
defs["structs"]["ImGuiIO"][26]["type"] = "const char*"
defs["structs"]["ImGuiIO"][27] = {}
defs["structs"]["ImGuiIO"][27]["name"] = "BackendPlatformUserData"
defs["structs"]["ImGuiIO"][27]["type"] = "void*"
defs["structs"]["ImGuiIO"][27]["name"] = "BackendRendererName"
defs["structs"]["ImGuiIO"][27]["type"] = "const char*"
defs["structs"]["ImGuiIO"][28] = {}
defs["structs"]["ImGuiIO"][28]["name"] = "BackendRendererUserData"
defs["structs"]["ImGuiIO"][28]["name"] = "BackendPlatformUserData"
defs["structs"]["ImGuiIO"][28]["type"] = "void*"
defs["structs"]["ImGuiIO"][29] = {}
defs["structs"]["ImGuiIO"][29]["name"] = "BackendLanguageUserData"
defs["structs"]["ImGuiIO"][29]["name"] = "BackendRendererUserData"
defs["structs"]["ImGuiIO"][29]["type"] = "void*"
defs["structs"]["ImGuiIO"][30] = {}
defs["structs"]["ImGuiIO"][30]["name"] = "GetClipboardTextFn"
defs["structs"]["ImGuiIO"][30]["type"] = "const char*(*)(void* user_data)"
defs["structs"]["ImGuiIO"][30]["name"] = "BackendLanguageUserData"
defs["structs"]["ImGuiIO"][30]["type"] = "void*"
defs["structs"]["ImGuiIO"][31] = {}
defs["structs"]["ImGuiIO"][31]["name"] = "SetClipboardTextFn"
defs["structs"]["ImGuiIO"][31]["type"] = "void(*)(void* user_data,const char* text)"
defs["structs"]["ImGuiIO"][31]["name"] = "GetClipboardTextFn"
defs["structs"]["ImGuiIO"][31]["type"] = "const char*(*)(void* user_data)"
defs["structs"]["ImGuiIO"][32] = {}
defs["structs"]["ImGuiIO"][32]["name"] = "ClipboardUserData"
defs["structs"]["ImGuiIO"][32]["type"] = "void*"
defs["structs"]["ImGuiIO"][32]["name"] = "SetClipboardTextFn"
defs["structs"]["ImGuiIO"][32]["type"] = "void(*)(void* user_data,const char* text)"
defs["structs"]["ImGuiIO"][33] = {}
defs["structs"]["ImGuiIO"][33]["name"] = "ImeSetInputScreenPosFn"
defs["structs"]["ImGuiIO"][33]["type"] = "void(*)(int x,int y)"
defs["structs"]["ImGuiIO"][33]["name"] = "ClipboardUserData"
defs["structs"]["ImGuiIO"][33]["type"] = "void*"
defs["structs"]["ImGuiIO"][34] = {}
defs["structs"]["ImGuiIO"][34]["name"] = "ImeWindowHandle"
defs["structs"]["ImGuiIO"][34]["type"] = "void*"
defs["structs"]["ImGuiIO"][34]["name"] = "ImeSetInputScreenPosFn"
defs["structs"]["ImGuiIO"][34]["type"] = "void(*)(int x,int y)"
defs["structs"]["ImGuiIO"][35] = {}
defs["structs"]["ImGuiIO"][35]["name"] = "RenderDrawListsFnUnused"
defs["structs"]["ImGuiIO"][35]["name"] = "ImeWindowHandle"
defs["structs"]["ImGuiIO"][35]["type"] = "void*"
defs["structs"]["ImGuiIO"][36] = {}
defs["structs"]["ImGuiIO"][36]["name"] = "MousePos"
defs["structs"]["ImGuiIO"][36]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][36]["name"] = "RenderDrawListsFnUnused"
defs["structs"]["ImGuiIO"][36]["type"] = "void*"
defs["structs"]["ImGuiIO"][37] = {}
defs["structs"]["ImGuiIO"][37]["name"] = "MouseDown[5]"
defs["structs"]["ImGuiIO"][37]["size"] = 5
defs["structs"]["ImGuiIO"][37]["type"] = "bool"
defs["structs"]["ImGuiIO"][37]["name"] = "MousePos"
defs["structs"]["ImGuiIO"][37]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][38] = {}
defs["structs"]["ImGuiIO"][38]["name"] = "MouseWheel"
defs["structs"]["ImGuiIO"][38]["type"] = "float"
defs["structs"]["ImGuiIO"][38]["name"] = "MouseDown[5]"
defs["structs"]["ImGuiIO"][38]["size"] = 5
defs["structs"]["ImGuiIO"][38]["type"] = "bool"
defs["structs"]["ImGuiIO"][39] = {}
defs["structs"]["ImGuiIO"][39]["name"] = "MouseWheelH"
defs["structs"]["ImGuiIO"][39]["name"] = "MouseWheel"
defs["structs"]["ImGuiIO"][39]["type"] = "float"
defs["structs"]["ImGuiIO"][40] = {}
defs["structs"]["ImGuiIO"][40]["name"] = "KeyCtrl"
defs["structs"]["ImGuiIO"][40]["type"] = "bool"
defs["structs"]["ImGuiIO"][40]["name"] = "MouseWheelH"
defs["structs"]["ImGuiIO"][40]["type"] = "float"
defs["structs"]["ImGuiIO"][41] = {}
defs["structs"]["ImGuiIO"][41]["name"] = "KeyShift"
defs["structs"]["ImGuiIO"][41]["name"] = "KeyCtrl"
defs["structs"]["ImGuiIO"][41]["type"] = "bool"
defs["structs"]["ImGuiIO"][42] = {}
defs["structs"]["ImGuiIO"][42]["name"] = "KeyAlt"
defs["structs"]["ImGuiIO"][42]["name"] = "KeyShift"
defs["structs"]["ImGuiIO"][42]["type"] = "bool"
defs["structs"]["ImGuiIO"][43] = {}
defs["structs"]["ImGuiIO"][43]["name"] = "KeySuper"
defs["structs"]["ImGuiIO"][43]["name"] = "KeyAlt"
defs["structs"]["ImGuiIO"][43]["type"] = "bool"
defs["structs"]["ImGuiIO"][44] = {}
defs["structs"]["ImGuiIO"][44]["name"] = "KeysDown[512]"
defs["structs"]["ImGuiIO"][44]["size"] = 512
defs["structs"]["ImGuiIO"][44]["name"] = "KeySuper"
defs["structs"]["ImGuiIO"][44]["type"] = "bool"
defs["structs"]["ImGuiIO"][45] = {}
defs["structs"]["ImGuiIO"][45]["name"] = "NavInputs[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][45]["size"] = 22
defs["structs"]["ImGuiIO"][45]["type"] = "float"
defs["structs"]["ImGuiIO"][45]["name"] = "KeysDown[512]"
defs["structs"]["ImGuiIO"][45]["size"] = 512
defs["structs"]["ImGuiIO"][45]["type"] = "bool"
defs["structs"]["ImGuiIO"][46] = {}
defs["structs"]["ImGuiIO"][46]["name"] = "WantCaptureMouse"
defs["structs"]["ImGuiIO"][46]["type"] = "bool"
defs["structs"]["ImGuiIO"][46]["name"] = "NavInputs[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][46]["size"] = 21
defs["structs"]["ImGuiIO"][46]["type"] = "float"
defs["structs"]["ImGuiIO"][47] = {}
defs["structs"]["ImGuiIO"][47]["name"] = "WantCaptureKeyboard"
defs["structs"]["ImGuiIO"][47]["name"] = "WantCaptureMouse"
defs["structs"]["ImGuiIO"][47]["type"] = "bool"
defs["structs"]["ImGuiIO"][48] = {}
defs["structs"]["ImGuiIO"][48]["name"] = "WantTextInput"
defs["structs"]["ImGuiIO"][48]["name"] = "WantCaptureKeyboard"
defs["structs"]["ImGuiIO"][48]["type"] = "bool"
defs["structs"]["ImGuiIO"][49] = {}
defs["structs"]["ImGuiIO"][49]["name"] = "WantSetMousePos"
defs["structs"]["ImGuiIO"][49]["name"] = "WantTextInput"
defs["structs"]["ImGuiIO"][49]["type"] = "bool"
defs["structs"]["ImGuiIO"][50] = {}
defs["structs"]["ImGuiIO"][50]["name"] = "WantSaveIniSettings"
defs["structs"]["ImGuiIO"][50]["name"] = "WantSetMousePos"
defs["structs"]["ImGuiIO"][50]["type"] = "bool"
defs["structs"]["ImGuiIO"][51] = {}
defs["structs"]["ImGuiIO"][51]["name"] = "NavActive"
defs["structs"]["ImGuiIO"][51]["name"] = "WantSaveIniSettings"
defs["structs"]["ImGuiIO"][51]["type"] = "bool"
defs["structs"]["ImGuiIO"][52] = {}
defs["structs"]["ImGuiIO"][52]["name"] = "NavVisible"
defs["structs"]["ImGuiIO"][52]["name"] = "NavActive"
defs["structs"]["ImGuiIO"][52]["type"] = "bool"
defs["structs"]["ImGuiIO"][53] = {}
defs["structs"]["ImGuiIO"][53]["name"] = "Framerate"
defs["structs"]["ImGuiIO"][53]["type"] = "float"
defs["structs"]["ImGuiIO"][53]["name"] = "NavVisible"
defs["structs"]["ImGuiIO"][53]["type"] = "bool"
defs["structs"]["ImGuiIO"][54] = {}
defs["structs"]["ImGuiIO"][54]["name"] = "MetricsRenderVertices"
defs["structs"]["ImGuiIO"][54]["type"] = "int"
defs["structs"]["ImGuiIO"][54]["name"] = "Framerate"
defs["structs"]["ImGuiIO"][54]["type"] = "float"
defs["structs"]["ImGuiIO"][55] = {}
defs["structs"]["ImGuiIO"][55]["name"] = "MetricsRenderIndices"
defs["structs"]["ImGuiIO"][55]["name"] = "MetricsRenderVertices"
defs["structs"]["ImGuiIO"][55]["type"] = "int"
defs["structs"]["ImGuiIO"][56] = {}
defs["structs"]["ImGuiIO"][56]["name"] = "MetricsRenderWindows"
defs["structs"]["ImGuiIO"][56]["name"] = "MetricsRenderIndices"
defs["structs"]["ImGuiIO"][56]["type"] = "int"
defs["structs"]["ImGuiIO"][57] = {}
defs["structs"]["ImGuiIO"][57]["name"] = "MetricsActiveWindows"
defs["structs"]["ImGuiIO"][57]["name"] = "MetricsRenderWindows"
defs["structs"]["ImGuiIO"][57]["type"] = "int"
defs["structs"]["ImGuiIO"][58] = {}
defs["structs"]["ImGuiIO"][58]["name"] = "MetricsActiveAllocations"
defs["structs"]["ImGuiIO"][58]["name"] = "MetricsActiveWindows"
defs["structs"]["ImGuiIO"][58]["type"] = "int"
defs["structs"]["ImGuiIO"][59] = {}
defs["structs"]["ImGuiIO"][59]["name"] = "MouseDelta"
defs["structs"]["ImGuiIO"][59]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][59]["name"] = "MetricsActiveAllocations"
defs["structs"]["ImGuiIO"][59]["type"] = "int"
defs["structs"]["ImGuiIO"][60] = {}
defs["structs"]["ImGuiIO"][60]["name"] = "MousePosPrev"
defs["structs"]["ImGuiIO"][60]["name"] = "MouseDelta"
defs["structs"]["ImGuiIO"][60]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][61] = {}
defs["structs"]["ImGuiIO"][61]["name"] = "MouseClickedPos[5]"
defs["structs"]["ImGuiIO"][61]["size"] = 5
defs["structs"]["ImGuiIO"][61]["name"] = "MousePosPrev"
defs["structs"]["ImGuiIO"][61]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][62] = {}
defs["structs"]["ImGuiIO"][62]["name"] = "MouseClickedTime[5]"
defs["structs"]["ImGuiIO"][62]["name"] = "MouseClickedPos[5]"
defs["structs"]["ImGuiIO"][62]["size"] = 5
defs["structs"]["ImGuiIO"][62]["type"] = "double"
defs["structs"]["ImGuiIO"][62]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][63] = {}
defs["structs"]["ImGuiIO"][63]["name"] = "MouseClicked[5]"
defs["structs"]["ImGuiIO"][63]["name"] = "MouseClickedTime[5]"
defs["structs"]["ImGuiIO"][63]["size"] = 5
defs["structs"]["ImGuiIO"][63]["type"] = "bool"
defs["structs"]["ImGuiIO"][63]["type"] = "double"
defs["structs"]["ImGuiIO"][64] = {}
defs["structs"]["ImGuiIO"][64]["name"] = "MouseDoubleClicked[5]"
defs["structs"]["ImGuiIO"][64]["name"] = "MouseClicked[5]"
defs["structs"]["ImGuiIO"][64]["size"] = 5
defs["structs"]["ImGuiIO"][64]["type"] = "bool"
defs["structs"]["ImGuiIO"][65] = {}
defs["structs"]["ImGuiIO"][65]["name"] = "MouseReleased[5]"
defs["structs"]["ImGuiIO"][65]["name"] = "MouseDoubleClicked[5]"
defs["structs"]["ImGuiIO"][65]["size"] = 5
defs["structs"]["ImGuiIO"][65]["type"] = "bool"
defs["structs"]["ImGuiIO"][66] = {}
defs["structs"]["ImGuiIO"][66]["name"] = "MouseDownOwned[5]"
defs["structs"]["ImGuiIO"][66]["name"] = "MouseReleased[5]"
defs["structs"]["ImGuiIO"][66]["size"] = 5
defs["structs"]["ImGuiIO"][66]["type"] = "bool"
defs["structs"]["ImGuiIO"][67] = {}
defs["structs"]["ImGuiIO"][67]["name"] = "MouseDownWasDoubleClick[5]"
defs["structs"]["ImGuiIO"][67]["name"] = "MouseDownOwned[5]"
defs["structs"]["ImGuiIO"][67]["size"] = 5
defs["structs"]["ImGuiIO"][67]["type"] = "bool"
defs["structs"]["ImGuiIO"][68] = {}
defs["structs"]["ImGuiIO"][68]["name"] = "MouseDownDuration[5]"
defs["structs"]["ImGuiIO"][68]["name"] = "MouseDownWasDoubleClick[5]"
defs["structs"]["ImGuiIO"][68]["size"] = 5
defs["structs"]["ImGuiIO"][68]["type"] = "float"
defs["structs"]["ImGuiIO"][68]["type"] = "bool"
defs["structs"]["ImGuiIO"][69] = {}
defs["structs"]["ImGuiIO"][69]["name"] = "MouseDownDurationPrev[5]"
defs["structs"]["ImGuiIO"][69]["name"] = "MouseDownDuration[5]"
defs["structs"]["ImGuiIO"][69]["size"] = 5
defs["structs"]["ImGuiIO"][69]["type"] = "float"
defs["structs"]["ImGuiIO"][70] = {}
defs["structs"]["ImGuiIO"][70]["name"] = "MouseDragMaxDistanceAbs[5]"
defs["structs"]["ImGuiIO"][70]["name"] = "MouseDownDurationPrev[5]"
defs["structs"]["ImGuiIO"][70]["size"] = 5
defs["structs"]["ImGuiIO"][70]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][70]["type"] = "float"
defs["structs"]["ImGuiIO"][71] = {}
defs["structs"]["ImGuiIO"][71]["name"] = "MouseDragMaxDistanceSqr[5]"
defs["structs"]["ImGuiIO"][71]["name"] = "MouseDragMaxDistanceAbs[5]"
defs["structs"]["ImGuiIO"][71]["size"] = 5
defs["structs"]["ImGuiIO"][71]["type"] = "float"
defs["structs"]["ImGuiIO"][71]["type"] = "ImVec2"
defs["structs"]["ImGuiIO"][72] = {}
defs["structs"]["ImGuiIO"][72]["name"] = "KeysDownDuration[512]"
defs["structs"]["ImGuiIO"][72]["size"] = 512
defs["structs"]["ImGuiIO"][72]["name"] = "MouseDragMaxDistanceSqr[5]"
defs["structs"]["ImGuiIO"][72]["size"] = 5
defs["structs"]["ImGuiIO"][72]["type"] = "float"
defs["structs"]["ImGuiIO"][73] = {}
defs["structs"]["ImGuiIO"][73]["name"] = "KeysDownDurationPrev[512]"
defs["structs"]["ImGuiIO"][73]["name"] = "KeysDownDuration[512]"
defs["structs"]["ImGuiIO"][73]["size"] = 512
defs["structs"]["ImGuiIO"][73]["type"] = "float"
defs["structs"]["ImGuiIO"][74] = {}
defs["structs"]["ImGuiIO"][74]["name"] = "NavInputsDownDuration[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][74]["size"] = 22
defs["structs"]["ImGuiIO"][74]["name"] = "KeysDownDurationPrev[512]"
defs["structs"]["ImGuiIO"][74]["size"] = 512
defs["structs"]["ImGuiIO"][74]["type"] = "float"
defs["structs"]["ImGuiIO"][75] = {}
defs["structs"]["ImGuiIO"][75]["name"] = "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][75]["size"] = 22
defs["structs"]["ImGuiIO"][75]["name"] = "NavInputsDownDuration[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][75]["size"] = 21
defs["structs"]["ImGuiIO"][75]["type"] = "float"
defs["structs"]["ImGuiIO"][76] = {}
defs["structs"]["ImGuiIO"][76]["name"] = "InputQueueCharacters"
defs["structs"]["ImGuiIO"][76]["template_type"] = "ImWchar"
defs["structs"]["ImGuiIO"][76]["type"] = "ImVector_ImWchar"
defs["structs"]["ImGuiIO"][76]["name"] = "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]"
defs["structs"]["ImGuiIO"][76]["size"] = 21
defs["structs"]["ImGuiIO"][76]["type"] = "float"
defs["structs"]["ImGuiIO"][77] = {}
defs["structs"]["ImGuiIO"][77]["name"] = "InputQueueCharacters"
defs["structs"]["ImGuiIO"][77]["template_type"] = "ImWchar"
defs["structs"]["ImGuiIO"][77]["type"] = "ImVector_ImWchar"
defs["structs"]["ImGuiInputTextCallbackData"] = {}
defs["structs"]["ImGuiInputTextCallbackData"][1] = {}
defs["structs"]["ImGuiInputTextCallbackData"][1]["name"] = "EventFlag"
@@ -1990,11 +2028,11 @@ defs["structs"]["ImGuiInputTextCallbackData"][12]["name"] = "SelectionEnd"
defs["structs"]["ImGuiInputTextCallbackData"][12]["type"] = "int"
defs["structs"]["ImGuiListClipper"] = {}
defs["structs"]["ImGuiListClipper"][1] = {}
defs["structs"]["ImGuiListClipper"][1]["name"] = "StartPosY"
defs["structs"]["ImGuiListClipper"][1]["type"] = "float"
defs["structs"]["ImGuiListClipper"][1]["name"] = "DisplayStart"
defs["structs"]["ImGuiListClipper"][1]["type"] = "int"
defs["structs"]["ImGuiListClipper"][2] = {}
defs["structs"]["ImGuiListClipper"][2]["name"] = "ItemsHeight"
defs["structs"]["ImGuiListClipper"][2]["type"] = "float"
defs["structs"]["ImGuiListClipper"][2]["name"] = "DisplayEnd"
defs["structs"]["ImGuiListClipper"][2]["type"] = "int"
defs["structs"]["ImGuiListClipper"][3] = {}
defs["structs"]["ImGuiListClipper"][3]["name"] = "ItemsCount"
defs["structs"]["ImGuiListClipper"][3]["type"] = "int"
@@ -2002,11 +2040,11 @@ defs["structs"]["ImGuiListClipper"][4] = {}
defs["structs"]["ImGuiListClipper"][4]["name"] = "StepNo"
defs["structs"]["ImGuiListClipper"][4]["type"] = "int"
defs["structs"]["ImGuiListClipper"][5] = {}
defs["structs"]["ImGuiListClipper"][5]["name"] = "DisplayStart"
defs["structs"]["ImGuiListClipper"][5]["type"] = "int"
defs["structs"]["ImGuiListClipper"][5]["name"] = "ItemsHeight"
defs["structs"]["ImGuiListClipper"][5]["type"] = "float"
defs["structs"]["ImGuiListClipper"][6] = {}
defs["structs"]["ImGuiListClipper"][6]["name"] = "DisplayEnd"
defs["structs"]["ImGuiListClipper"][6]["type"] = "int"
defs["structs"]["ImGuiListClipper"][6]["name"] = "StartPosY"
defs["structs"]["ImGuiListClipper"][6]["type"] = "float"
defs["structs"]["ImGuiOnceUponAFrame"] = {}
defs["structs"]["ImGuiOnceUponAFrame"][1] = {}
defs["structs"]["ImGuiOnceUponAFrame"][1]["name"] = "RefFrame"
@@ -2166,9 +2204,12 @@ defs["structs"]["ImGuiStyle"][34] = {}
defs["structs"]["ImGuiStyle"][34]["name"] = "CurveTessellationTol"
defs["structs"]["ImGuiStyle"][34]["type"] = "float"
defs["structs"]["ImGuiStyle"][35] = {}
defs["structs"]["ImGuiStyle"][35]["name"] = "Colors[ImGuiCol_COUNT]"
defs["structs"]["ImGuiStyle"][35]["size"] = 48
defs["structs"]["ImGuiStyle"][35]["type"] = "ImVec4"
defs["structs"]["ImGuiStyle"][35]["name"] = "CircleSegmentMaxError"
defs["structs"]["ImGuiStyle"][35]["type"] = "float"
defs["structs"]["ImGuiStyle"][36] = {}
defs["structs"]["ImGuiStyle"][36]["name"] = "Colors[ImGuiCol_COUNT]"
defs["structs"]["ImGuiStyle"][36]["size"] = 48
defs["structs"]["ImGuiStyle"][36]["type"] = "ImVec4"
defs["structs"]["ImGuiTextBuffer"] = {}
defs["structs"]["ImGuiTextBuffer"][1] = {}
defs["structs"]["ImGuiTextBuffer"][1]["name"] = "Buf"

View File

@@ -37,6 +37,7 @@
"ImGuiInputTextFlags": "int",
"ImGuiKey": "int",
"ImGuiListClipper": "struct ImGuiListClipper",
"ImGuiMouseButton": "int",
"ImGuiMouseCursor": "int",
"ImGuiNavInput": "int",
"ImGuiOnceUponAFrame": "struct ImGuiOnceUponAFrame",

View File

@@ -37,6 +37,7 @@ defs["ImGuiInputTextCallbackData"] = "struct ImGuiInputTextCallbackData"
defs["ImGuiInputTextFlags"] = "int"
defs["ImGuiKey"] = "int"
defs["ImGuiListClipper"] = "struct ImGuiListClipper"
defs["ImGuiMouseButton"] = "int"
defs["ImGuiMouseCursor"] = "int"
defs["ImGuiNavInput"] = "int"
defs["ImGuiOnceUponAFrame"] = "struct ImGuiOnceUponAFrame"

2
imgui

Submodule imgui updated: 6a0d0dab5a...58b3e02b95

11
test/CMakeLists.txt Normal file
View File

@@ -0,0 +1,11 @@
file(GLOB CIMGUI_TEST_SOURCES
main.c
)
add_executable(cimgui_test ${CIMGUI_TEST_SOURCES})
set_target_properties(cimgui_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TARGET cimgui_test PROPERTY C_STANDARD 99)
target_compile_definitions(cimgui_test PRIVATE CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1)
target_link_libraries(cimgui_test PRIVATE cimgui)

41
test/main.c Normal file
View File

@@ -0,0 +1,41 @@
#include <stdio.h>
#include <assert.h>
#include "../cimgui.h"
int main(void)
{
assert(igDebugCheckVersionAndDataLayout(igGetVersion(), sizeof(ImGuiIO), sizeof(ImGuiStyle),
sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert),
sizeof(ImDrawIdx)));
printf("CreateContext() - v%s\n", igGetVersion());
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);
for (int n = 0; n < 20; n++) {
printf("NewFrame() %d\n", n);
ImVec2 display_size;
display_size.x = 1920;
display_size.y = 1080;
io->DisplaySize = display_size;
io->DeltaTime = 1.0f / 60.0f;
igNewFrame();
static float f = 0.0f;
igText("Hello World!");
igSliderFloat("float", &f, 0.0f, 1.0f, "%.3f", 1.0f);
igText("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io->Framerate, io->Framerate);
igShowDemoWindow(NULL);
igRender();
}
printf("DestroyContext()\n");
igDestroyContext(NULL);
return 0;
}

View File

@@ -1,6 +0,0 @@
:: set PATH=%PATH%;C:\mingw32\bin;
set PATH=%PATH%;C:\i686-7.2.0-release-posix-dwarf-rt_v5-rev1\mingw32\bin;
::gcc -std=c99 -DCIMGUI_DEFINE_ENUMS_AND_STRUCTS cimgui.h
::gcc -DCIMGUI_DEFINE_ENUMS_AND_STRUCTS cimgui.h
gcc -std=c99 -Wall -Wpedantic -DCIMGUI_DEFINE_ENUMS_AND_STRUCTS cimguitest.c
cmd /k

View File

@@ -1,6 +0,0 @@
#include "../cimgui.h"
int main(void)
{
return 0;
}

View File

@@ -1,13 +0,0 @@
::set PATH=%PATH%;C:\luaGL;C:\mingw32\bin;
::gcc -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ../imgui/imgui.h > 11.txt
::set PATH=%PATH%;C:\luaGL;
::set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\Hostx64\x64;
::ejecutar en cmd esto
::"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
::cl /P /DIMGUI_DISABLE_OBSOLETE_FUNCTIONS /DIMGUI_API="" /DIMGUI_IMPL_API="" ../imgui/imgui.h
:: > clout.txt
cl /P /DCIMGUI_DEFINE_ENUMS_AND_STRUCTS cimguitest.c
cmd /k