Compare commits

...

90 Commits
1.73 ... 1.77

Author SHA1 Message Date
Victor Bombi
bc3bc4583d pull imgui master 1.77 and generate 2020-06-29 18:55:13 +02:00
Victor Bombi
13ad240b74 readme: argsT when arg is function pointer 2020-06-08 18:03:20 +02:00
Victor Bombi
74ca33d026 generation with non const ref to ptr 2020-06-06 11:42:25 +02:00
Victor Bombi
ab53af765f non const ref to pointer 2020-06-06 11:41:33 +02:00
Victor Bombi
4e160d8017 generation with location info 2020-06-05 20:46:02 +02:00
Victor Bombi
8b4ebff2e2 update readme with location info 2020-06-05 20:45:08 +02:00
Victor Bombi
a27b5236db keep implementations locations 2020-06-05 20:45:08 +02:00
Victor Bombi
19e41cf8e9 keep function locations
keep locations
2020-06-05 20:45:08 +02:00
Victor Bombi
61784f32f9 readme: size field in struct description 2020-05-31 10:37:10 +02:00
Victor Bombi
250169feb7 generation after FnPtr change 2020-05-30 15:33:12 +02:00
Victor Bombi
16846a206b FnPtr changes to FnretvalPtr to allow 2 overloadings with different FnPtr, corrected checking equal ov_cimguiname 2020-05-30 15:30:57 +02:00
Victor Bombi
f30441fd5d CMakeLists.txt modification for MSVC thanks to @Sewer56 2020-05-25 16:54:55 +02:00
Victor Bombi
787939bebc getCname uses namespace 2020-05-16 16:50:12 +02:00
Victor Bombi
be187bcdc4 avoid last , in enums parsing 2020-04-28 14:05:05 +02:00
Victor Bombi
98e6ff7051 Merge pull request #130 from barrybingo/master
Make names visible when using gcc/clang
2020-04-20 14:58:34 +02:00
Victor Bombi
39efe04d04 calc value in enums where it is sum of known values 2020-04-20 14:50:37 +02:00
barrybingo
925f656646 Make names visible when using gcc/clang 2020-04-20 13:09:30 +01:00
Victor Bombi
95d494d91d parse unnamed unions 2020-04-17 21:15:00 +02:00
Victor Bombi
3e6ef21864 generation 2020-04-17 20:28:20 +02:00
Victor Bombi
39983d8970 another union exception: TODO parse unions 2020-04-17 20:27:56 +02:00
Victor Bombi
4a63c7e2ae clean_spaces with mult operator 2020-04-17 20:27:01 +02:00
Victor Bombi
acf490ffd6 README.md update with C examples links 2020-04-17 11:11:38 +02:00
Victor Bombi
df7c5d1b5d post in cpp and h files if it is generated with internal api 2020-04-14 17:37:22 +02:00
Victor Bombi
7224084284 drop nocompiler generation 2020-04-14 11:05:52 +02:00
Victor Bombi
a99713a8ba dont try to get typedef in typedef struct 2020-04-14 10:31:19 +02:00
Victor Bombi
ce302529e4 avoid error in opengl3 impl generation with extra_defines 2020-04-14 10:18:40 +02:00
Victor Bombi
400b7d76dd typedef_st_re addition 2020-04-14 10:02:39 +02:00
Victor Bombi
c0c050ce1e add include for implementations generation 2020-04-13 10:16:11 +02:00
Victor Bombi
52fbd3f694 update README.md 2020-04-13 09:47:37 +02:00
Victor Bombi
f84d9c4301 pull imgui 1.76 and generate with internal also 2020-04-13 09:45:35 +02:00
Victor Bombi
4197d9f7e5 add ImRect to non POD defs 2020-04-07 12:32:38 +02:00
Victor Bombi
ef683bf14a fix typo in readme 2020-03-28 18:51:10 +01:00
Victor Bombi
b1a9eb3c21 Merge pull request #127 from cimgui/simplify
Simplify
2020-03-28 18:18:05 +01:00
Victor Bombi
27f4d3c3c4 more README update 2020-03-28 18:09:51 +01:00
Victor Bombi
672f1bab04 drop generator_old 2020-03-28 13:39:36 +01:00
Victor Bombi
16ab55b72a update readme 2020-03-28 13:32:44 +01:00
Victor Bombi
18297589a5 all overloads will have a postfix for avoiding collision with generic version 2020-03-28 12:23:12 +01:00
Victor Bombi
760662ecea drop nonUDT1 second (not dropping but take place of no nonUDT) 2020-03-27 13:49:16 +01:00
Victor Bombi
0e16e0aedc drop nonUDT1 first 2020-03-27 13:44:11 +01:00
Victor Bombi
6033d331f9 drop nonUDT2 and empty table cimgui_overloads 2020-03-27 13:07:27 +01:00
Victor Bombi
7a6c714351 Merge pull request #126 from cimgui/internal_funcs
Internal funcs
2020-03-27 12:27:56 +01:00
Victor Bombi
5451260291 two files left out in last commit 2020-03-27 12:21:07 +01:00
Victor Bombi
e2347c174d make internal generation false for merging in master 2020-03-27 12:18:47 +01:00
Victor Bombi
e7a883d9f3 use loadstring for parsing size of struct members, clean spaces around + 2020-03-26 11:56:17 +01:00
Victor Bombi
906fd09e67 dont save first underscore in templated types 2020-03-26 08:44:51 +01:00
Victor Bombi
d1ac207b45 take care of spaces in templated type 2020-03-26 08:13:38 +01:00
Victor Bombi
956ddf4033 move ImPool templates typedefs after ImGuiStorage definition 2020-03-25 13:58:14 +01:00
Victor Bombi
056c340d25 thanks to typedef instead of define we work directly with ImWchar 2020-03-25 12:47:40 +01:00
Victor Bombi
ab3699df27 take care of IMGUI_USE_WCHAR32 2020-03-25 12:21:04 +01:00
Victor Bombi
8ee704c485 keep names from external API as they were 2020-03-24 19:05:57 +01:00
Victor Bombi
901c705518 dont generate internal alone
generate all functions: internal and external
2020-03-24 18:35:21 +01:00
Victor Bombi
77ee4fad38 cpp2ffi: change vardef_re allowing parenthesis for ImU8 Used4kPagesMap[((sizeof(ImWchar16) == 2 ? 0xFFFF : 0x10FFFF)+1)/4096/8]; 2020-03-23 16:28:28 +01:00
Victor Bombi
830b4580d0 Merge pull request #122 from aschuhardt/cmake-include-dir
Altering the exported 'include' directory path
2020-03-22 09:30:12 +01:00
Addison Schuhardt
f8eb990407 Altering the exported 'include' directory path so that it is not mistakenly set to a user's project root path. This will allow users who are linking to cimgui from a nested directory to be provided with the correct 'include' paths automatically. 2020-03-21 14:33:06 -07:00
Victor Bombi
5f15425a02 README.md update for IMGUI_HAS_DOCK 2020-03-17 12:28:26 +01:00
Victor Bombi
8be6ddd980 add structs_and_enums_i for imgui_internal, replace IMGUI_DOCKING for IMGUI_HAS_DOCK 2020-03-14 11:35:44 +01:00
Victor Bombi
7dc6dbe77e use IMGUI_HAS_DOCK instead of having to define IMGUI_DOCKING 2020-03-02 21:39:24 +01:00
Victor Bombi
0cbc6bf55f simplify parse_enum_values function 2020-02-29 14:18:11 +01:00
Victor Bombi
02677f9691 more robust parsing of enum values 2020-02-29 14:06:48 +01:00
Victor Bombi
e2c14f1b41 activate cimgui_internal.h generation 2020-02-28 23:14:03 +01:00
Victor Bombi
55dc243358 readme: document bitfield in structs_and_enums 2020-02-28 10:53:37 +01:00
Victor Bombi
16bcad7933 take care of bit fields in struct_and_enums generation. 2020-02-28 10:50:10 +01:00
Victor Bombi
db0243a6f0 generated with IMGUI_DOCKING addition. 2020-02-28 10:49:35 +01:00
Victor Bombi
9bed5f29a9 Merge pull request #120 from mellinoe/docking_template_additions
Add CimguiStorage and ImGuiPlatformIO redirect functions to the master branch.
2020-02-21 17:28:43 +01:00
Eric Mellino
39336d9843 Add a note in README.md about the IMGUI_DOCKING preprocessor define. 2020-02-21 08:02:16 -08:00
Eric Mellino
f350e7b7a7 Add CimguiStorage and ImGuiPlatformIO redirect functions. 2020-02-21 00:57:21 -08:00
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
28 changed files with 34013 additions and 5891 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

View File

@@ -22,13 +22,13 @@ endif (IMGUI_STATIC)
target_compile_definitions(cimgui PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS=1)
if (WIN32)
target_compile_definitions(cimgui PUBLIC IMGUI_IMPL_API="extern \"C\" __declspec\(dllexport\)")
target_compile_definitions(cimgui PUBLIC IMGUI_IMPL_API=extern\t\"C\"\t__declspec\(dllexport\))
else (WIN32)
target_compile_definitions(cimgui PUBLIC IMGUI_IMPL_API="extern \"C\" ")
target_compile_definitions(cimgui PUBLIC IMGUI_IMPL_API=extern\t\"C\"\t)
endif (WIN32)
target_include_directories(cimgui PUBLIC ${CMAKE_SOURCE_DIR})
target_include_directories(cimgui PUBLIC ${CMAKE_SOURCE_DIR}/imgui)
target_include_directories(cimgui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(cimgui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/imgui)
set_target_properties(cimgui PROPERTIES PREFIX "")
#install

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

@@ -11,10 +11,11 @@ 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.73 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)
* currently this wrapper is based on version [1.76 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 implementations 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.
* Current overloaded function names can be found in (https://github.com/cimgui/cimgui/blob/master/generator/output/overloads.txt)
# compilation
@@ -23,21 +24,23 @@ Notes:
* git submodule update
* compile
* using makefile on linux/macOS/mingw (Or use CMake to generate project)
* or as in https://github.com/sonoro1234/LuaJIT-ImGui/tree/master_auto_implementations/build
* or as in https://github.com/sonoro1234/LuaJIT-ImGui/tree/master/build
# using generator
* this is only needed (before compilation) if you want an imgui version different from the one provided, otherwise generation is already done.
* 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)
* you need to use also a C++ compiler for doing preprocessing: gcc (In windows MinGW-W64-builds for example), clang or cl (MSVC). (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, or cl and to choose desired implementations and whether imgui_internal is generated or not.
* edit config_generator.lua for adding includes needed by your chosen implementations (vulkan needs that).
* 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
* C interface is exposed by cimgui.h when you define CIMGUI_DEFINE_ENUMS_AND_STRUCTS
* with your prefered language you can use the lua or json files generated as in:
* https://github.com/sonoro1234/LuaJIT-ImGui/blob/master_auto_implementations/lua/build.bat (with lua code generation in https://github.com/sonoro1234/LuaJIT-ImGui/blob/master_auto_implementations/lua/class_gen.lua)
* https://github.com/sonoro1234/LuaJIT-ImGui/blob/master/lua/build.bat (with lua code generation in https://github.com/sonoro1234/LuaJIT-ImGui/blob/master/lua/class_gen.lua)
* https://github.com/mellinoe/ImGui.NET/tree/autogen/src/CodeGenerator
### definitions description
* It is a collection in which key is the cimgui name that would result without overloadings and the value is an array of overloadings (may be only one overloading)
@@ -46,18 +49,19 @@ 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)
* argsT : an array of collections (each one with type: argument type and name: the argument name)
* 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, when the argument is a function pointer also ret: return type and signature: the function signature)
* 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)
* nonUDT : if present can be 1 or 2 (explained meaning in usage) if return type was a user defined type
* 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 the original function was returning a user defined type so that signature has been changed to accept a pointer to the UDT as first argument.
* location : name of the header file this function comes from. (imgui, internal, imgui_impl_xxx)
### structs_and_enums description
* Is is a collection with two items:
* under key enums we get the enums collection in which each key is the enum tagname and the value is an array of the ordered values represented as a collection with keys
@@ -68,13 +72,14 @@ Notes:
* type : the type of the struct member
* template_type : if type has a template argument (as ImVector) here will be
* name : the name of the struct member
* size : the number of array elements (when it is an array)
* bitfield : the bitfield width (in case it is a bitfield)
# usage
* use whatever method is in ImGui c++ namespace in the original [imgui.h](https://github.com/ocornut/imgui/blob/master/imgui.h) by prepending `ig`
* methods have the same parameter list and return values (where possible)
* functions that belong to a struct have an extra first argument with a pointer to the struct.
* where a function returns UDT (user defined type) by value some compilers complain so another function with the name `function_name_nonUDT` is generated accepting a pointer to the UDT type as the first argument.
* also is generated `function_name_nonUDT2` which instead of returning the UDT type returns a simple version (without functions) called `UDTType_Simple` (`ImVec2_Simple` for `ImVec2`)
* where a function returns UDT (user defined type) by value some compilers complain so the function is generated accepting a pointer to the UDT type as the first argument (or second if belongs to a struct).
# example bindings based on cimgui
@@ -84,4 +89,10 @@ Notes:
* [imgui-rs](https://github.com/Gekkio/imgui-rs)
* [imgui-pas](https://github.com/dpethes/imgui-pas)
* [odin-imgui](https://github.com/ThisDrunkDane/odin-imgui)
* [LuaJIT-imgui](https://github.com/sonoro1234/LuaJIT-ImGui)
* [LuaJIT-ImGui](https://github.com/sonoro1234/LuaJIT-ImGui)
# C examples based on cimgui
* [sdl2-cimgui-demo](https://github.com/haxpor/sdl2-cimgui-demo)
* [cimgui_c_sdl2_example](https://github.com/canoi12/cimgui_c_sdl2_example/)
* [cimgui-c-example](https://github.com/peko/cimgui-c-example) with GLFW

1984
cimgui.cpp

File diff suppressed because it is too large Load Diff

1724
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"
@@ -30,20 +31,18 @@ CIMGUI_API float igGET_FLT_MAX()
{
return FLT_MAX;
}
CIMGUI_API void igColorConvertRGBtoHSV(float r,float g,float b,float *out_h,float *out_s,float *out_v)
{
ImGui::ColorConvertRGBtoHSV(r,g,b,*out_h,*out_s,*out_v);
}
CIMGUI_API void igColorConvertHSVtoRGB(float h,float s,float v,float *out_r,float *out_g,float *out_b)
{
ImGui::ColorConvertHSVtoRGB(h,s,v,*out_r,*out_g,*out_b);
}
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>();
@@ -53,3 +52,63 @@ CIMGUI_API void ImVector_ImWchar_UnInit(ImVector_ImWchar* p)
p->~ImVector<ImWchar>();
}
#ifdef IMGUI_HAS_DOCK
// NOTE: Some function pointers in the ImGuiPlatformIO structure are not C-compatible because of their
// use of a complex return type. To work around this, we store a custom CimguiStorage object inside
// ImGuiIO::BackendLanguageUserData, which contains C-compatible function pointer variants for these
// functions. When a user function pointer is provided, we hook up the underlying ImGuiPlatformIO
// function pointer to a thunk which accesses the user function pointer through CimguiStorage.
struct CimguiStorage
{
void(*Platform_GetWindowPos)(ImGuiViewport* vp, ImVec2* out_pos);
void(*Platform_GetWindowSize)(ImGuiViewport* vp, ImVec2* out_pos);
};
// Gets a reference to the CimguiStorage object stored in the current ImGui context's BackendLanguageUserData.
CimguiStorage& GetCimguiStorage()
{
ImGuiIO& io = ImGui::GetIO();
if (io.BackendLanguageUserData == NULL)
{
io.BackendLanguageUserData = new CimguiStorage();
}
return *(CimguiStorage*)io.BackendLanguageUserData;
}
// Thunk satisfying the signature of ImGuiPlatformIO::Platform_GetWindowPos.
ImVec2 Platform_GetWindowPos_hook(ImGuiViewport* vp)
{
ImVec2 pos;
GetCimguiStorage().Platform_GetWindowPos(vp, &pos);
return pos;
};
// Fully C-compatible function pointer setter for ImGuiPlatformIO::Platform_GetWindowPos.
CIMGUI_API void ImGuiPlatformIO_Set_Platform_GetWindowPos(ImGuiPlatformIO* platform_io, void(*user_callback)(ImGuiViewport* vp, ImVec2* out_pos))
{
CimguiStorage& storage = GetCimguiStorage();
storage.Platform_GetWindowPos = user_callback;
platform_io->Platform_GetWindowPos = &Platform_GetWindowPos_hook;
}
// Thunk satisfying the signature of ImGuiPlatformIO::Platform_GetWindowSize.
ImVec2 Platform_GetWindowSize_hook(ImGuiViewport* vp)
{
ImVec2 size;
GetCimguiStorage().Platform_GetWindowSize(vp, &size);
return size;
};
// Fully C-compatible function pointer setter for ImGuiPlatformIO::Platform_GetWindowSize.
CIMGUI_API void ImGuiPlatformIO_Set_Platform_GetWindowSize(ImGuiPlatformIO* platform_io, void(*user_callback)(ImGuiViewport* vp, ImVec2* out_size))
{
CimguiStorage& storage = GetCimguiStorage();
storage.Platform_GetWindowSize = user_callback;
platform_io->Platform_GetWindowSize = &Platform_GetWindowSize_hook;
}
#endif

View File

@@ -12,7 +12,11 @@
#define snprintf sprintf_s
#endif
#else
#define API
#ifdef __GNUC__
#define API __attribute__((__visibility__("default")))
#else
#define API
#endif
#endif
#if defined __cplusplus
@@ -33,11 +37,6 @@ typedef unsigned __int64 ImU64;
//typedef unsigned long long ImU64;
#endif
//UDT stuff
typedef struct ImVec2_Simple { float x; float y; } ImVec2_Simple;
typedef struct ImVec4_Simple { float x; float y; float z; float w;} ImVec4_Simple;
typedef struct ImColor_Simple { ImVec4_Simple Value;} ImColor_Simple;
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
#include "imgui_structs.h"
@@ -45,28 +44,6 @@ typedef struct ImColor_Simple { ImVec4_Simple Value;} ImColor_Simple;
struct GLFWwindow;
struct SDL_Window;
typedef union SDL_Event SDL_Event;
inline ImVec2_Simple ImVec2ToSimple(ImVec2 vec)
{
ImVec2_Simple result;
result.x = vec.x;
result.y = vec.y;
return result;
}
inline ImVec4_Simple ImVec4ToSimple(ImVec4 vec)
{
ImVec4_Simple result;
result.x = vec.x;
result.y = vec.y;
result.z = vec.z;
result.w = vec.w;
return result;
}
inline ImColor_Simple ImColorToSimple(ImColor col)
{
ImColor_Simple result;
result.Value = ImVec4ToSimple(col.Value);
return result;
}
#endif // CIMGUI_DEFINE_ENUMS_AND_STRUCTS
#include "auto_funcs.h"
@@ -78,13 +55,14 @@ CIMGUI_API void igLogText(CONST char *fmt, ...);
CIMGUI_API void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...);
//for getting FLT_MAX in bindings
CIMGUI_API float igGET_FLT_MAX();
//not const args from & to *
CIMGUI_API void igColorConvertRGBtoHSV(float r,float g,float b,float *out_h,float *out_s,float *out_v);
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

@@ -93,6 +93,26 @@ local function str_split(str, pat)
end
return t
end
local function strsplit(str, pat)
local t = {}
local t2 = {}
local fpat = "(.-)" .. pat
local last_end = 1
local s, e, cap, cap2 = str:find(fpat, 1)
while s do
table.insert(t,cap)
table.insert(t2,cap2)
last_end = e+1
s, e, cap, cap2 = str:find(fpat, last_end)
end
if last_end <= #str then
cap = str:sub(last_end)
table.insert(t, cap)
elseif str:sub(-1)==pat then
table.insert(t, "")
end
return t,t2
end
local function split_comment(line)
local comment = line:match("(%s*//.*)") or ""
line = line:gsub("%s*//.*","")
@@ -104,31 +124,93 @@ 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)
cad = cad:gsub("%s+"," ") --not more than one space
cad = cad:gsub("%s*([%(%),=])%s*","%1") --not spaces with ( , )
cad = cad:gsub("%s*([%(%),=:%+])%s*","%1") --not spaces with ( , ) or ( = ) or ( : ) or +
--clean %d * %d (could be done above but type*name should be treated different in other places)
cad = cad:gsub("(%d)%s*(%*)%s*(%d)","%1%2%3")
return cad
end
function strsplit(str, pat)
local t = {}
local fpat = "(.-)" .. pat
local last_end = 1
local s, e, cap = str:find(fpat, 1)
while s do
table.insert(t,cap)
last_end = e+1
s, e, cap = str:find(fpat, last_end)
end
if last_end <= #str then
cap = str:sub(last_end)
table.insert(t, cap)
elseif str:sub(-1)==pat then
table.insert(t, "")
end
return t
------------------------------------
local function parse_enum_value(enline, allenums)
local value = enline.value
local function clean(val)
if type(val)=="string" then
return clean_spaces(val)
else
return val
end
end
if type(value)=="number" then
return value
elseif type(value)=="string" then
--numbers
local numval = tonumber(value)
if numval then return numval end
--already in allenums
if allenums[clean(value)] then return allenums[clean(value)] end
--must be several and operators
--precedence order (hope not ())
assert(not value:match("[%(%)]"))
local several,seps = strsplit(value,"([<>&|~%+]+)")
--M.prtable(value,several,seps)
assert(#seps+1==#several)
local i = 1
local ik = 1
local sepk = {"~","<<",">>","&","^","|","+"}
while(#seps>0) do
local sep = sepk[ik]
local v = seps[i]
if sep==v then
local val1 = clean(several[i])
local val2 = clean(several[i+1])
if allenums[val1] then val1 = allenums[val1] end
if allenums[val2] then val2 = allenums[val2] end
if v=="~" then
assert(several[i]==" " or several[i]=="")
several[i] = bit.bnot(val2)
elseif v=="<<" then
several[i] = bit.lshift(val1,val2)
elseif v==">>" then
several[i] = bit.rshift(val1,val2)
elseif v=="&" then
several[i] = bit.band(val1,val2)
elseif v=="^" then
error"^ operator still not done"
elseif v=="|" then
several[i] = bit.bor(val1,val2)
elseif v=="+" then
several[i] = val1 + val2
else
error("unknown operator "..v)
end
table.remove(several,i+1)
table.remove(seps,i)
else
i = i + 1
end
if i>#seps then
ik = ik + 1 --next operator
if ik > #sepk then break end
i = 1
end
end
if #seps>0 or type(several[1])~="number" then
M.prtable("enline",enline)
M.prtable(several,seps)
M.prtable(allenums)
end
assert(#seps==0)
assert(type(several[1])=="number")
return several[1]
end
end
--------------------------------------------------------------------------
local function save_data(filename,...)
@@ -180,21 +262,26 @@ local function getRE()
namespace_re = "^([^;{}]-namespace[^;{}]-%b{})",
class_re = "^([^;{}]-class[^;{}]-%b{}%s*;)",
typedef_re = "^\n*(typedef[^;]+;)",
typedef_st_re = "^\n*(typedef%s+struct%s*%b{}.+;)",
functypedef_re = "^\n*%s*(typedef[%w%s%*_]+%(%s*%*%s*[%w_]+%s*%)%s*%b()%s*;)",
functypedef_re = "^\n*%s*(typedef[%w%s%*_]+%([^*]*%*%s*[%w_]+%s*%)%s*%b()%s*;)",
vardef_re = "^\n*([^;{}%(%)]+;)",
--vardef_re = "^\n*([^;{}%(%)]+;)",
--change for things as
--[[ImU8 Used4kPagesMap[((sizeof(ImWchar16) == 2 ? 0xFFFF : 0x10FFFF)+1)/4096/8];]]
vardef_re = "^\n*([^;{}]+;)",
functionD_re = "^([^;{}]-%b()[\n%s%w]*%b{})",
--functionD_re = "^([^;{}]-%b()[^{}%(%)]*%b{})",
functype_re = "^%s*[%w%s%*]+%(%*[%w_]+%)%([^%(%)]*%)%s*;"
}
local resN = {"functypedef_re","functype_re","function_re","functionD_re","struct_re","enum_re","union_re","namespace_re","class_re","typedef_re","vardef_re"}
local resN = {"functypedef_re","functype_re","function_re","functionD_re","typedef_st_re","struct_re","enum_re","union_re","namespace_re","class_re","typedef_re","vardef_re"}
return res,resN
end
M.getRE = getRE
--takes preprocesed file in table cdefsor and returns items
local function parseItems(txt,dumpit)
local function parseItems(txt,dumpit,loca)
--assert(loca)
--dumpit = true
local res,resN = getRE()
@@ -211,7 +298,7 @@ local function parseItems(txt,dumpit)
item = txt:sub(i,e)
--if re~=functionD_re then --skip defined functions
item = item:gsub("extern __attribute__%(%(dllexport%)%) ","")
table.insert(itemarr,{re_name=re_name,item=item})
table.insert(itemarr,{re_name=re_name,item=item,locat=loca})
--end
items[re_name] = items[re_name] or {}
table.insert(items[re_name],item)
@@ -219,7 +306,7 @@ local function parseItems(txt,dumpit)
ini = e + 1
if dumpit then
print(item)
print(ire,"------------------------------------------------------")
print(ire,re_name,"------------------------------------------------------")
end
break
end
@@ -231,6 +318,7 @@ local function parseItems(txt,dumpit)
if not onlyspaces then
print(ini,#txt);
print(txt);
print"item:"
print(item)
error"parseItems error"
end
@@ -300,11 +388,15 @@ local function name_overloadsAlgo(v)
end
end
end
--avoid empty postfix which will be reserved to generic
for i,v in ipairs(bb) do if v=="" then bb[i]="Nil" end end
return aa,bb
end
local function typetoStr(typ)
--print("typetoStr",typ)
--typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","%1") -- funcs
typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","FnPtr")
--typ = typ:gsub("[^%(%)]+%(%*?(.+)%).+","FnPtr")
typ = typ:gsub("([^%(%)]+)%(%*?(.+)%).+","Fn%1Ptr")
typ = typ:gsub("[%w_]+%[(%d*)%]","arr%1")
typ = typ:gsub("%*","Ptr")
typ = typ:gsub("void","")
@@ -321,7 +413,8 @@ local function typetoStr(typ)
typ = typ:gsub("[<>]","")
return typ
end
local function parseFunction(self,stname,lineorig,namespace)
local function parseFunction(self,stname,lineorig,namespace,locat)
line = clean_spaces(lineorig)
--move *
line = line:gsub("%s*%*","%*")
@@ -342,15 +435,15 @@ 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")
if not args then
print"not gettint args in"
print(line,lineorig)
print(funcname,"args",args)
print"not gettint args in"
print(line,lineorig)
print(funcname,"args",args)
end
local argscsinpars = args:gsub("(=[^,%(%)]*)(%b())","%1")
@@ -373,31 +466,34 @@ local function parseFunction(self,stname,lineorig,namespace)
if self.typenames[stname] ~= template then --rule out template typename
te = template:gsub("%s","_")
te = te:gsub("%*","Ptr")
te = "_"..te
self.templates[ttype] = self.templates[ttype] or {}
self.templates[ttype][template] = te
te = "_"..te
end
end
--end
argscsinpars = argscsinpars:gsub("<([%w_%*]+)>",te) --ImVector
argscsinpars = argscsinpars:gsub("<([%w_%*%s]+)>",te) --ImVector
local argsArr = {}
local functype_re = "^%s*[%w%s%*]+%(%*[%w_]+%)%([^%(%)]*%)"
local functype_reex = "^(%s*[%w%s%*]+)%(%*([%w_]+)%)(%([^%(%)]*%))"
local functype_arg_rest = "^(%s*[%w%s%*]+%(%*[%w_]+%)%([^%(%)]*%)),*(.*)"
local rest = argscsinpars:sub(2,-2) --strip ()
while true do
--local tt = strsplit(rest,",")
--for ii,arg in ipairs(tt) do
--for arg in argscsinpars:gmatch("[%(,]*([^,%(%)]+)[%),]") do
local reftoptr
if rest == "void" then break end
local type,name,retf,sigf
local arg,restt = rest:match(functype_arg_rest)
if arg then
if arg then -- if is function pointer
local t1,namef,t2 = arg:match(functype_reex)
type=t1.."(*)"..t2;name=namef
type = t1.."(*)"..t2;name=namef
retf = t1
sigf = t2
rest = restt
@@ -405,8 +501,13 @@ local function parseFunction(self,stname,lineorig,namespace)
arg,restt = rest:match(",*([^,%(%)]+),*(.*)")
if not arg then break end
rest = restt
if arg:match("&") and arg:match("const") then
arg = arg:gsub("&","")
if arg:match("&") then
if arg:match("const") then
arg = arg:gsub("&","")
else
arg = arg:gsub("&","*")
reftoptr = true
end
end
if arg:match("%.%.%.") then
type="...";name="..."
@@ -416,7 +517,6 @@ local function parseFunction(self,stname,lineorig,namespace)
if not type or not name then
print("failure arg detection",funcname,type,name,argscsinpars,arg)
else
if name:match"%*" then print("**",funcname) end
--float name[2] to float[2] name
@@ -427,17 +527,17 @@ local function parseFunction(self,stname,lineorig,namespace)
end
end
end
table.insert(argsArr,{type=type,name=name,ret=retf,signature=sigf})
table.insert(argsArr,{type=type,name=name,ret=retf,signature=sigf,reftoptr=reftoptr})
if arg:match("&") and not arg:match("const") then
--only post error if not manual
local cname = self.getCname(stname,funcname) --cimguiname
local cname = self.getCname(stname,funcname, namespace) --cimguiname
if not self.manuals[cname] then
print("reference to no const arg in",funcname,argscsinpars)
print("reference to no const arg in",funcname,argscsinpars,arg)
end
end
end
argscsinpars = argscsinpars:gsub("&","")
local signature = argscsinpars:gsub("([%w%s%*_]+)%s[%w_]+%s*([,%)])","%1%2")
signature = signature:gsub("%s*([,%)])","%1") --space before , and )
signature = signature:gsub(",%s*",",")--space after ,
@@ -448,6 +548,43 @@ local function parseFunction(self,stname,lineorig,namespace)
local call_args = argscsinpars:gsub("([%w_]+%s[%w_]+)%[%d*%]","%1") --float[2]
call_args = call_args:gsub("%(%*([%w_]+)%)%([^%(%)]*%)"," %1") --func type
call_args = call_args:gsub("[^%(].-([%w_]+)%s*([,%)])","%1%2")
--recreate argscsinpars from argsArr
local asp, caar
if #argsArr > 0 then
asp = "("
caar = "("
for i,v in ipairs(argsArr) do
if v.ret then --function pointer
asp = asp .. v.ret .. "(*" .. v.name .. ")" .. v.signature .. ","
caar = caar .. v.name .. ","
else
local siz = v.type:match("(%[%d*%])") or ""
local type = v.type:gsub("(%[%d*%])","")
asp = asp .. type .. (v.name~="..." and " "..v.name or "") .. siz .. ","
local callname = v.reftoptr and "*"..v.name or v.name
caar = caar .. callname .. ","
end
end
asp = asp:sub(1,-2)..")"
caar = caar:sub(1,-2)..")"
else
asp = "()"
caar = "()"
end
--[[
if asp~=argscsinpars then
print("bad recontruction",funcname)
print(argscsinpars)
print(asp)
end
if caar~=call_args then
print("bad call_args",funcname)
print(call_args)
print(caar)
end
--]]
------------------------------
if not ret and stname then --must be constructors
if not (stname == funcname or "~"..stname==funcname) then --break end
@@ -457,7 +594,7 @@ local function parseFunction(self,stname,lineorig,namespace)
end
end
local cimguiname = self.getCname(stname,funcname)
local cimguiname = self.getCname(stname,funcname, namespace)
table.insert(self.funcdefs,{stname=stname,funcname=funcname,args=args,argsc=argscsinpars,signature=signature,cimguiname=cimguiname,call_args=call_args,ret =ret})
local defsT = self.defsT
defsT[cimguiname] = defsT[cimguiname] or {}
@@ -475,9 +612,9 @@ local function parseFunction(self,stname,lineorig,namespace)
defT.stname = stname
defT.funcname = funcname
defT.argsoriginal = args
defT.args=argscsinpars
defT.args= asp --argscsinpars
defT.signature = signature
defT.call_args = call_args
defT.call_args = caar --call_args
defT.isvararg = signature:match("%.%.%.%)$")
defT.location = locat
--defT.comment = "" --comment
@@ -519,14 +656,16 @@ local function AdjustArguments(FP)
end
local function ADDnonUDT(FP)
local defsT = FP.defsT
local newcdefs = {}
--for cimguiname,defs in pairs(defsT) do
--for i,defT in ipairs(defs) do
--local t = {cimguiname=cimguiname,signature=defT.signature,ret=defT.ret}
--local newcdefs = {}
for numcdef,t in ipairs(FP.funcdefs) do
if t.cimguiname then
local cimf = defsT[t.cimguiname]
local defT = cimf[t.signature]
--find index
local index
for ind,ddd in ipairs(cimf) do
if ddd == defT then index=ind; break end
end
--if UDT return generate nonUDT version
local isUDT = false
for _,udt_ret in ipairs(FP.UDTs) do
@@ -548,40 +687,25 @@ local function ADDnonUDT(FP)
local comma = (#defT.argsT > 0) and "," or ""
defT2.args = "("..defT.ret.." *pOut"..comma..defT.args:sub(2)
defT2.ret = "void"
defT2.ov_cimguiname = (defT2.ov_cimguiname or defT2.cimguiname).."_nonUDT"
defT2.ov_cimguiname = (defT2.ov_cimguiname or defT2.cimguiname) --.."_nonUDT"
defT2.nonUDT = 1
defT2.retref = nil
defsT[t.cimguiname][#defsT[t.cimguiname] + 1] = defT2
defsT[t.cimguiname][t.signature.."nonUDT"] = defT2
table.insert(newcdefs,{stname=t.stname,funcname=t.funcname,args=args,argsc=argscsinpars,signature=t.signature.."nonUDT",cimguiname=t.cimguiname,call_args=call_args,ret =t.ret})
--converting to Simple type----------------------------------------------------
local defT3 = {}
--first strings
for k,v in pairs(defT) do
defT3[k] = v
end
--then argsT table
defT3.argsT = {}
for k,v in ipairs(defT.argsT) do
table.insert(defT3.argsT,{type=v.type,name=v.name})
end
local comma = (#defT.argsT > 0) and "," or ""
--defT3.args = "("..defT.ret.." *pOut"..comma..defT.args:sub(2)
defT3.ret = defT.ret.."_Simple"
defT3.retorig = defT.ret
defT3.ov_cimguiname = (defT3.ov_cimguiname or defT3.cimguiname).."_nonUDT2"
defT3.nonUDT = 2
defT3.retref = nil
defsT[t.cimguiname][#defsT[t.cimguiname] + 1] = defT3
defsT[t.cimguiname][t.signature.."nonUDT2"] = defT3
table.insert(newcdefs,{stname=t.stname,funcname=t.funcname,args=args,argsc=argscsinpars,signature=t.signature.."nonUDT2",cimguiname=t.cimguiname,call_args=call_args,ret =t.ret})
--replace
cimf[index] = defT2
cimf[t.signature] = defT2
FP.funcdefs[numcdef] = {stname=t.stname,funcname=t.funcname,args=args,argsc=argscsinpars,signature=t.signature,cimguiname=t.cimguiname,call_args=call_args,ret =t.ret}
-- defsT[t.cimguiname][#defsT[t.cimguiname] + 1] = defT2
-- defsT[t.cimguiname][t.signature.."nonUDT"] = defT2
-- table.insert(newcdefs,{stname=t.stname,funcname=t.funcname,args=args,argsc=argscsinpars,signature=t.signature.."nonUDT",cimguiname=t.cimguiname,call_args=call_args,ret =t.ret})
end
else print("not cimguiname in");M.prtable(t)
end
--end
end
for i,v in ipairs(newcdefs) do
table.insert(FP.funcdefs,v)
end
-- for i,v in ipairs(newcdefs) do
-- table.insert(FP.funcdefs,v)
-- end
end
local function ADDdestructors(FP)
@@ -630,6 +754,7 @@ end
--only basic ending
local c_types = {
["bool"]=true,
["char"]=true,
["int"]=true,
["float"]=true,
@@ -641,6 +766,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
@@ -688,16 +814,16 @@ function M.Parser()
par.manuals = {}
par.UDTs = {}
function par:insert(line)
table.insert(cdefs,line)
function par:insert(line,loca)
table.insert(cdefs,{line,loca})
end
function par.getCname(stname,funcname)
function par.getCname(stname,funcname, namespace)
if #stname == 0 then return funcname end --top level
local pre = stname.."_"
return pre..funcname
end
function par.getCname_overload(stname,funcname,signature)
local cname = par.getCname(stname,funcname)
function par.getCname_overload(stname,funcname,signature, namespace)
local cname = par.getCname(stname,funcname, namespace)
local ov_cname = par.cname_overloads[cname] and par.cname_overloads[cname][signature] --or cname
return ov_cname
end
@@ -714,7 +840,8 @@ function M.Parser()
end
function par:parseItems()
--typedefs dictionary
for i,line in ipairs(cdefs) do
for i,cdef in ipairs(cdefs) do
local line = cdef[1]
if line:match("typedef") then
line = clean_spaces(line)
local value,key = line:match("typedef%s+(.+)%s+([%w_]+);")
@@ -727,15 +854,33 @@ function M.Parser()
linet = linet:gsub("typedef ","")
linet = linet:gsub("%(%*("..key..")%)","(*)")
self.typedefs_dict[key] = linet
else
print("not found function typedef")
elseif not line:match"typedef%s*struct" then --discard typedef struct
print("typedef not found")
print(key,value,line)
end
end
end
end
local txt = table.concat(cdefs,"\n")
itemsarr,items = parseItems(txt)
itemsarr = {}
if self.separate_locations then
local located_cdefs = self:separate_locations(cdefs)
for i,lcdef in ipairs(located_cdefs) do
local txt = table.concat(lcdef[2],"\n")
local itemsarrT,itemsT = parseItems(txt,false,lcdef[1])
for i,it in ipairs(itemsarrT) do
table.insert(itemsarr,it)
end
end
else
local cdefs2 = {}
for i,cdef in ipairs(cdefs) do
table.insert(cdefs2,cdef[1])
end
local txt = table.concat(cdefs2,"\n")
itemsarr,items = parseItems(txt,false)
end
self.itemsarr , self.items = itemsarr,items
end
function par:printItems()
@@ -747,14 +892,14 @@ function M.Parser()
function par:parseFunctions()
for i,it in ipairs(itemsarr) do
if it.re_name == "function_re" or it.re_name == "functionD_re" then
self:parseFunction("",it.item)
self:parseFunction("",it.item,nil,it.locat)
elseif 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)
local nspparr,itemsnsp = parseItems(nsp,false,it.locat)
for insp,itnsp in ipairs(nspparr) do
if itnsp.re_name == "function_re" or itnsp.re_name == "functionD_re" then
self:parseFunction("",itnsp.item,namespace)
self:parseFunction("",itnsp.item,namespace,itnsp.locat)
end
end
elseif it.re_name == "struct_re" then
@@ -766,20 +911,20 @@ function M.Parser()
self.typenames = self.typenames or {}
self.typenames[stname] = typename
end
local nspparr,itemsnsp = parseItems(nsp)
local nspparr,itemsnsp = parseItems(nsp,false,it.locat)
for insp,itnsp in ipairs(nspparr) do
if itnsp.re_name == "function_re" or itnsp.re_name == "functionD_re" then
self:parseFunction(stname,itnsp.item)
self:parseFunction(stname,itnsp.item,nil,itnsp.locat)
elseif itnsp.re_name == "struct_re" then
--get embeded_structs
local embededst = itnsp.item:match("struct%s+(%S+)")
self.embeded_structs[embededst] = stname.."::"..embededst
local nsp2 = strip_end(itnsp.item:match("%b{}"):sub(2,-2))
local itemsemarr,itemsem = parseItems(nsp2)
local itemsemarr,itemsem = parseItems(nsp2,false,itnsp.locat)
assert(not itemsem.struct_re,"two level embed struct")
for iemb,itemb in ipairs(itemsemarr) do
if itemb.re_name == "function_re" or itemb.re_name == "functionD_re" then
self:parseFunction(embededst,itemb.item)
self:parseFunction(embededst,itemb.item,nil,itemb.locat)
end
end
end
@@ -789,18 +934,34 @@ function M.Parser()
--require"anima"
--prtable(self.defsT)
end
function par:clean_struct(stru)
function par:clean_struct(stru, locat)
--assert(locat)
local outtab = {}
local iner = strip_end(stru:match("%b{}"):sub(2,-2))
local stname = stru:match("struct%s*(%S+)%s*%b{}")
local inistruct = clean_spaces(stru:match("(.-)%b{}"))
--local stname = stru:match("struct%s*(%S+)%s*%b{}")
local stname, derived
if inistruct:match":" then
stname,derived = inistruct:match"struct%s*([^%s:]+):(.+)"
derived = derived:match"(%S+)$"
else
stname = inistruct:match"struct%s(%S+)"
end
if derived then print(stname,"derived from",derived) end
if not stname then
print(stru)
error"could not get stname"
end
--initial
table.insert(outtab,stru:match("(.-)%b{}"))
--table.insert(outtab,stru:match("(.-)%b{}"))
table.insert(outtab,"\nstruct "..stname.."\n")
table.insert(outtab,"{")
local itlist,itemsin = parseItems(iner)
if derived then
table.insert(outtab,"\n "..derived.." _"..derived..";")
end
local itlist,itemsin = parseItems(iner, false,locat)
if #itlist == 0 then return "" end --here we avoid empty structs
for j,it in ipairs(itlist) do
if it.re_name == "vardef_re" or it.re_name == "functype_re" or it.re_name == "union_re" then
@@ -808,6 +969,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 +979,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,12 +1011,31 @@ 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, nil, it.locat )
for insp,itnsp in ipairs(nspparr) do
if itnsp.re_name == "struct_re" or itnsp.re_name == "typedef_st_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)
local cleanst,structname = self:clean_struct(it.item, it.locat)
--if not structname then print("NO NAME",cleanst,it.item) end
--if not void stname or templated
if structname and not self.typenames[structname] then
table.insert(outtab,cleanst)
@@ -863,7 +1046,7 @@ function M.Parser()
end
--inner_structs
for i,it in ipairs(self.inerstructs) do
local cleanst,structname = self:clean_struct(it.item)
local cleanst,structname = self:clean_struct(it.item, it.locat)
if structname then
table.insert(outtab,cleanst)
table.insert(typedefs_table,"typedef struct "..structname.." "..structname..";\n")
@@ -894,9 +1077,9 @@ function M.Parser()
local typen,rest = line:match("%s*([^,]+)%s(%S+[,;])")
--local template_type = typen:match("/%*<(.+)>%*/")
--if template_type then typen = typen:match("(.+)/%*") end
if not typen then -- Lets try Type*name
typen,rest = line:match("([^,]+%*)(%S+[,;])")
end
if not typen then -- Lets try Type*name
typen,rest = line:match("([^,]+%*)(%S+[,;])")
end
local template_type
for k,v in pairs(self.templates) do
template_type = typen:match(k.."_(.+)")
@@ -907,21 +1090,59 @@ function M.Parser()
template_type = template_type:gsub("Ptr","%*")
end
for name in rest:gmatch("([^%s,;]+)%s?[,;]") do
table.insert(outtab,{type=typen,template_type=template_type,name=name})
--unnamed unions
local union_re = "^([^;{}]-union[^;{}]-%b{}[%s%w_%(%)]*;)"
if line:match(union_re) and name == "}" then
typen = typen..name
name = ""
end
local namebitfield,bitfield = name:match("([^:]+):(%d+)") --take care of bitfields
table.insert(outtab,{type=typen,template_type=template_type,name=namebitfield or name,bitfield=bitfield})
end
end
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
local enumsordered = {}
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] = {}
table.insert(enumsordered,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
@@ -931,16 +1152,27 @@ function M.Parser()
else --increment by one
local name = line:match("%s*([^,]+)")
local enum_table = outtab.enums[enumname]
local value = enum_table[#enum_table] and (enum_table[#enum_table].value + 1) or 0
local prevvalue = enum_table[#enum_table] and enum_table[#enum_table].value
local value --= enum_table[#enum_table] and (enum_table[#enum_table].value + 1) or 0
if not prevvalue then
value = 0
elseif tonumber(prevvalue) then
value = prevvalue +1
else --should be string
value = prevvalue .. "+1"
end
if name then --avoid last , if present
table.insert(outtab.enums[enumname],{name=name,value=value})
end
end
end
elseif it.re_name == "struct_re" then
local cleanst,structname,strtab = self:clean_struct(it.item)
local cleanst,structname,strtab = self:clean_struct(it.item, it.locat)
--if not void stname or templated
--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
@@ -950,7 +1182,7 @@ function M.Parser()
--inner_structs
for i,it in ipairs(self.inerstructs) do
local cleanst,structname,strtab = self:clean_struct(it.item)
local cleanst,structname,strtab = self:clean_struct(it.item, it.locat)
if structname then --not empty struc
outtab.structs[structname] = {}
for j=3,#strtab-1 do
@@ -970,24 +1202,11 @@ function M.Parser()
--calcule size of name[16+1] [xxx_COUNT]
local allenums = {}
--first calc_value in enums
for enumname,enum in pairs(outtab.enums) do
for i,enumname in ipairs(enumsordered) do
--for enumname,enum in pairs(outtab.enums) do
local enum = outtab.enums[enumname]
for i,t in ipairs(enum) do
local val = tonumber(t.value)
if val then
t.calc_value = val
elseif t.value:match"<<" then
local v1,v2 = t.value:match("(%d+)%s*<<%s*(%d+)")
t.calc_value = bit.lshift(v1,v2)
elseif t.value:match"|" then --or several enums
local ens = t.value
ens = strsplit(ens,"|")
for i,v in ipairs(ens) do ens[i] = allenums[clean_spaces(v)] end
t.calc_value = bit.bor(unpack(ens))
elseif allenums[t.value] then
t.calc_value = allenums[t.value]
else
print("Error unknown value in enums",t.value)
end
t.calc_value = parse_enum_value(t,allenums)
assert(t.calc_value)
allenums[t.name] = t.calc_value
end
@@ -1001,13 +1220,13 @@ function M.Parser()
t.size = tonumber(val)
elseif allenums[val] then
t.size = allenums[val]
elseif val:match"%+" then
local s1,s2 = val:match("(%d+)%s*%+%s*(%d+)")
t.size = s1+s2
else
print("Error size is",val)
local f,err = loadstring("estevalor="..val)
if not f then print("error on loadstring",err,"with val:",val) end
f()
t.size = estevalor
end
assert(t.size)
assert(t.size,val)
end
end
end
@@ -1041,13 +1260,13 @@ function M.Parser()
local typesc,post = name_overloadsAlgo(v)
for i,t in ipairs(v) do
--take overloaded name from manual table or algorythm
t.ov_cimguiname = self.getCname_overload(t.stname,t.funcname,t.signature) or k..typetoStr(post[i])
t.ov_cimguiname = self.getCname_overload(t.stname,t.funcname,t.signature,t.namespace) or k..typetoStr(post[i])
table.insert(strt,string.format("%d\t%s\t%s %s",i,t.ret,t.ov_cimguiname,t.signature))
--prtable(typesc[i])
--M.prtable(typesc[i],post)
end
--check not two names are equal (produced by bad cimguiname_overload)
for i=1,#v-1 do
for j=i+1,#v-1 do
for j=i+1,#v do
if v[i].ov_cimguiname == v[j].ov_cimguiname then
local t,tj = v[i],v[j]
print("Error caused by Bad overloading "..t.ov_cimguiname.." of function ",t.funcname,t.signature,"conflicts with ",tj.funcname,tj.signature)
@@ -1239,7 +1458,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 +1468,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 +1494,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
@@ -1319,4 +1540,29 @@ local function location(file,locpathT,defines)
return location_it
end
M.location = location
--[=[
-- tests
local line = [[struct ImDrawListSharedData
{
ImVec2 TexUvWhitePixel;
ImFont* Font;
float FontSize;
float CurveTessellationTol;
float CircleSegmentMaxError;
ImVec4 ClipRectFullscreen;
ImDrawListFlags InitialFlags;
ImVec2 ArcFastVtx[12 * 1];
ImU8 CircleSegmentCounts[64];
ImDrawListSharedData();
void SetCircleSegmentMaxError(float max_error);
};]]
local parser = M.Parser()
parser:insert(line)
parser:do_parse()
--M.prtable(parser)
M.prtable(parser:gen_structs_and_enums_table())
--]=]
--print(clean_spaces[[ImVec2 ArcFastVtx[12 * 1];]])
return M

View File

@@ -10,13 +10,14 @@
:: 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:\mingws\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
:: arg[1] compiler name gcc, clang, cl or nocompiler
:: arg[2..n] name of implementations to generate
luajit ./generator.lua gcc glfw opengl3 opengl2 sdl
:: arg[1] compiler name gcc, clang or cl
:: arg[2] imgui_internal functions generation: true or false
:: arg[3..n] name of implementations to generate
luajit ./generator.lua gcc true glfw opengl3 opengl2 sdl
::leave console open
cmd /k

View File

@@ -6,6 +6,7 @@ assert(_VERSION=='Lua 5.1',"Must use LuaJIT")
assert(bit,"Must use LuaJIT")
local script_args = {...}
local COMPILER = script_args[1]
local INTERNAL_GENERATION = script_args[2]=="true"
local CPRE,CTEST
if COMPILER == "gcc" or COMPILER == "clang" then
CPRE = COMPILER..[[ -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]]
@@ -15,31 +16,33 @@ elseif COMPILER == "cl" then
CTEST = COMPILER
else
print("Working without compiler ")
error("cant work with "..COMPILER.." compiler")
end
--test compiler present
local HAVE_COMPILER = false
if CTEST then
local pipe,err = io.popen(CTEST,"r")
if pipe then
local str = pipe:read"*a"
print(str)
pipe:close()
if str=="" then
HAVE_COMPILER = false
else
HAVE_COMPILER = true
end
else
local pipe,err = io.popen(CTEST,"r")
if pipe then
local str = pipe:read"*a"
print(str)
pipe:close()
if str=="" then
HAVE_COMPILER = false
print(err)
else
HAVE_COMPILER = true
end
assert(HAVE_COMPILER,"gcc, clang or cl needed to run script")
end --CTEST
else
HAVE_COMPILER = false
print(err)
end
assert(HAVE_COMPILER,"gcc, clang or cl needed to run script")
print("HAVE_COMPILER",HAVE_COMPILER)
print("INTERNAL_GENERATION",INTERNAL_GENERATION)
--get implementations
local implementations = {}
for i=2,#script_args do table.insert(implementations,script_args[i]) end
for i=3,#script_args do table.insert(implementations,script_args[i]) end
--------------------------------------------------------------------------
--this table has the functions to be skipped in generation
@@ -47,8 +50,8 @@ for i=2,#script_args do table.insert(implementations,script_args[i]) end
local cimgui_manuals = {
igLogText = true,
ImGuiTextBuffer_appendf = true,
igColorConvertRGBtoHSV = true,
igColorConvertHSVtoRGB = true
--igColorConvertRGBtoHSV = true,
--igColorConvertHSVtoRGB = true
}
--------------------------------------------------------------------------
--this table is a dictionary to force a naming of function overloading (instead of algorythmic generated)
@@ -56,39 +59,12 @@ local cimgui_manuals = {
--desired name
---------------------------------------------------------------------------
local cimgui_overloads = {
igPushID = {
--igPushID = {
--["(const char*)"] = "igPushIDStr",
["(const char*,const char*)"] = "igPushIDRange",
--["(const char*,const char*)"] = "igPushIDRange",
--["(const void*)"] = "igPushIDPtr",
--["(int)"] = "igPushIDInt"
},
igGetID = {
["(const char*,const char*)"] = "igGetIDRange",
},
ImDrawList_AddText = {
["(const ImVec2,ImU32,const char*,const char*)"] = "ImDrawList_AddText",
},
igGetColorU32 = {
["(ImGuiCol,float)"] = "igGetColorU32",
},
igCollapsingHeader = {
["(const char*,ImGuiTreeNodeFlags)"] = "igCollapsingHeader",
},
igCombo = {
["(const char*,int*,const char* const[],int,int)"] = "igCombo",
},
igPlotLines = {
["(const char*,const float*,int,int,const char*,float,float,ImVec2,int)"] = "igPlotLines",
},
igBeginChild = {
["(const char*,const ImVec2,bool,ImGuiWindowFlags)"] = "igBeginChild",
},
igSelectable = {
["(const char*,bool,ImGuiSelectableFlags,const ImVec2)"] = "igSelectable"
},
igPushStyleColor = {
["(ImGuiCol,const ImVec4)"] = "igPushStyleColor"
}
--},
}
--------------------------header definitions
@@ -99,96 +75,14 @@ local cimgui_header =
local gdefines = {} --for FLT_MAX and others
--------------------------------------------------------------------------
--helper functions
---------------------------minimal preprocessor without compiler for ImGui.h
local function filelines(file,locats)
local split_comment = require"cpp2ffi".split_comment
local iflevels = {}
--generated known prepros
local prepro = {
["#if"]={
[ "defined(__clang__) || defined(__GNUC__)" ]=false,
[ "defined(__clang__)" ]=false,
[ "defined(_MSC_VER) && !defined(__clang__)" ]=false,
[ "!defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H)" ]=false,
[ "!defined(IMGUI_IMPL_OPENGL_LOADER_GL3W) \\" ]=false,
},
["#elif"]={
[ "defined(__GNUC__) && __GNUC__ >= 8" ]=false,
[ "(defined(__clang__) || defined(__GNUC__)) && (__cplusplus < 201100)" ]=false,
},
["#ifdef"]={
[ "IM_VEC4_CLASS_EXTRA" ]=false,
[ "IMGUI_USER_CONFIG" ]=false,
[ "IMGUI_INCLUDE_IMGUI_USER_H" ]=false,
[ "IMGUI_USE_BGRA_PACKED_COLOR" ]=false,
[ "IM_VEC2_CLASS_EXTRA" ]=false,
},
["#ifndef"]={
[ "IMGUI_API" ]=false,
[ "IMGUI_IMPL_API" ]=false,
[ "IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT" ]=true,
[ "IM_ASSERT" ]=false,
[ "ImTextureID" ]=true,
[ "ImDrawIdx" ]=true,
[ "IMGUI_DISABLE_OBSOLETE_FUNCTIONS" ]=false,
},
}
local function prepro_boolif(pre,cond)
local conds = prepro[pre]
assert(conds,pre.." has no conds-----------------------------")
local res = conds[cond]
--assert(type(res)~="nil",cond.." not found")
if type(res)=="nil" then
print(pre,cond,"not found in precompiler database, returning false.")
res = false
end
return res
end
local function location_it()
repeat
local line = file:read"*l"
if not line then return nil end
line,_ = split_comment(line)
--if line:sub(1,1) == "#" then
if line:match("^%s*#") then
local pre,cond = line:match("^%s*(#%S*)%s+(.*)%s*$")
if line:match("#if") then
iflevels[#iflevels +1 ] = prepro_boolif(pre,cond)
elseif line:match("#endif") then
iflevels[#iflevels] = nil
elseif line:match("#elif") then
if not iflevels[#iflevels] then
iflevels[#iflevels] = prepro_boolif(pre,cond)
else --was true
iflevels[#iflevels] = false
end
elseif line:match("#else") then
iflevels[#iflevels] = not iflevels[#iflevels]
else
if not (pre:match("#define") or pre:match"#include" or pre:match"#pragma") then
print("not expected preprocessor directive ",pre)
end
end
-- skip
elseif #iflevels == 0 or iflevels[#iflevels] then
-- drop IMGUI_APIX
line = line:gsub("IMGUI_IMPL_API","")
-- drop IMGUI_API
line = line:gsub("IMGUI_API","")
return line,locats[1]
end
until false
end
return location_it
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 +91,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 +122,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 +172,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 +188,10 @@ 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")
else --nonUDT==2
table.insert(outtab," "..def.retorig.." ret = ImGui::"..def.funcname..def.call_args..";\n")
table.insert(outtab," "..def.ret.." ret2 = "..def.retorig.."ToSimple(ret);\n")
table.insert(outtab," return ret2;\n")
table.insert(outtab," *pOut = "..namespace..def.funcname..def.call_args..";\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
@@ -319,10 +219,6 @@ local function struct_f_implementation(outtab,def)
elseif def.nonUDT then
if def.nonUDT == 1 then
table.insert(outtab," *pOut = self->"..def.funcname..def.call_args..";\n")
else --nonUDT==2
table.insert(outtab," "..def.retorig.." ret = self->"..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 struct
table.insert(outtab," return "..ptret.."self->"..def.funcname..def.call_args..";\n")
@@ -422,30 +318,35 @@ 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")
local function generate_templates(code,codeimpool,templates)
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(codeimpool,"typedef struct ImVector_"..newte.." {int Size;int Capacity;"..te.."* Data;} ImVector_"..newte..";\n")
table.insert(codeimpool,"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 = {}
@@ -470,12 +371,19 @@ local function cimgui_generation(parser)
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 outtabpool = {}
generate_templates(outtab, outtabpool, parser.templates)
--move outtabpool after ImGuiStorage definition
local outpost1, outpost2 = outpost:match("^(.+struct ImGuiStorage%s*\n%b{};\n)(.+)$")
outpost = outpost1..table.concat(outtabpool)..outpost2
local cstructsstr = outpre..table.concat(outtab,"")..outpost --..(extra or "")
hstrfile = hstrfile:gsub([[#include "imgui_structs%.h"]],cstructsstr)
local cfuncsstr = func_header_generate(parser)
@@ -507,52 +415,79 @@ while true do
end
pipe:close()
cimgui_header = cimgui_header:gsub("XXX",imgui_version)
if INTERNAL_GENERATION then
cimgui_header = cimgui_header..[[//with imgui_internal.h api
]]
end
print("IMGUI_VERSION",imgui_version)
--get some defines----------------------------
if HAVE_COMPILER then
gdefines = get_defines{"IMGUI_VERSION","FLT_MAX"}
end
gdefines = get_defines{"IMGUI_VERSION","FLT_MAX"}
--funtion for parsing imgui headers
local function parseImGuiHeader(header,names)
--prepare parser
local parser = cpp2ffi.Parser()
parser.separate_locations = function(self,cdefs)
local imguicdefs = {}
local othercdefs = {}
for i,cdef in ipairs(cdefs) do
if cdef[2]=="imgui" then
table.insert(imguicdefs,cdef[1])
else
table.insert(othercdefs,cdef[1])
end
end
return {{"imgui",imguicdefs},{"internal",othercdefs}}
end
parser.getCname = function(stname,funcname,namespace)
local pre = (stname == "") and (namespace and (namespace=="ImGui" and "ig" or namespace.."_") or "ig") or stname.."_"
return pre..funcname
end
parser.cname_overloads = cimgui_overloads
parser.manuals = cimgui_manuals
parser.UDTs = {"ImVec2","ImVec4","ImColor","ImRect"}
local pipe,err = io.popen(CPRE..header,"r")
if not pipe then
error("could not execute COMPILER "..err)
end
local iterator = cpp2ffi.location
--[[
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, loca)
--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")
local parser1
if INTERNAL_GENERATION then
save_data("headers.h",[[#include "../imgui/imgui.h"
#include "../imgui/imgui_internal.h"]])
parser1 = parseImGuiHeader([[headers.h]],{[[imgui]],[[imgui_internal]],[[imstb_textedit]]})
os.remove("headers.h")
else
pipe,err = io.open([[../imgui/imgui.h]],"r")
parser1 = parseImGuiHeader([[../imgui/imgui.h]],{[[imgui]]})
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()
parser1:do_parse()
--table.sort(parser1.funcdefs, function(a,b) return a.cimguiname < b.cimguiname end)
--parser1:dump_alltypes()
--parser1:printItems()
save_data("./output/overloads.txt",parser1.overloadstxt)
cimgui_generation(parser1)
@@ -563,57 +498,74 @@ set_defines(parser1.defsT)
save_data("./output/definitions.lua",serializeTableF(parser1.defsT))
----------save struct and enums lua table in structs_and_enums.lua for using in bindings
local structs_and_enums_table = parser1:gen_structs_and_enums_table()
--correct Pair union member if exists (until 1.71)
if structs_and_enums_table["structs"]["Pair"] then
structs_and_enums_table["structs"]["Pair"][2]["name"] = ""
structs_and_enums_table["structs"]["Pair"][2]["type"] = structs_and_enums_table["structs"]["Pair"][2]["type"] .. "}"
end
-- 1.72 and after
if structs_and_enums_table["structs"]["ImGuiStoragePair"] then
structs_and_enums_table["structs"]["ImGuiStoragePair"][2]["name"] = ""
structs_and_enums_table["structs"]["ImGuiStoragePair"][2]["type"] = structs_and_enums_table["structs"]["ImGuiStoragePair"][2]["type"] .. "}"
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
if #implementations > 0 then
print("------------------implementations generation with "..COMPILER.."------------------------")
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
if HAVE_COMPILER then
pipe,err = io.popen(CPRE..source,"r")
else
pipe,err = io.open(source,"r")
end
local define_cmd = COMPILER=="cl" and [[ /E /D]] or [[ -E -D]]
local extra_defines = ""
if impl == "opengl3" then extra_defines = define_cmd .. "IMGUI_IMPL_OPENGL_LOADER_GL3W " end
local include_cmd = COMPILER=="cl" and [[ /I ]] or [[ -I ]]
local extra_includes = include_cmd.." ../imgui "
if config[impl] then
for j,inc in ipairs(config[impl]) do
extra_includes = extra_includes .. include_cmd .. inc .. " "
end
end
local pipe,err = io.popen(CPRE..extra_defines..extra_includes..source,"r")
if not pipe then
error("could not get file: "..err)
end
local iterator = (HAVE_COMPILER and cpp2ffi.location) or filelines
local iterator = cpp2ffi.location
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)
parser2:insert(line,locat)
end
pipe:close()
end
parser2.separate_locations = function(self, cdefs)
local sepcdefs = {}
for i,impl in ipairs(implementations) do
sepcdefs[i] = {[[imgui_impl_]].. impl,{}}
for j,cdef in ipairs(cdefs) do
if cdef[2]==sepcdefs[i][1] then
table.insert(sepcdefs[i][2],cdef[1])
end
end
end
return sepcdefs
end
parser2:do_parse()
-- save ./cimgui_impl.h

View File

@@ -12,6 +12,7 @@
# impl_definitions.lua for implementation function definitions
#process files
# arg[1] compiler name gcc, clang, cl or nocompiler
# arg[2..n] name of implementations to generate
luajit ./generator.lua gcc glfw opengl3 opengl2 sdl
# arg[1] compiler name gcc, clang, or cl
# arg[2] imgui_internal functions generation: true or false
# arg[3..n] name of implementations to generate
luajit ./generator.lua gcc true glfw opengl3 opengl2 sdl

View File

@@ -1,23 +0,0 @@
:: this script must be executed in this directory
:: all the output goes to generator/output folder
:: .cpp and .h files:
:: cimgui.h and cimgui.cpp with gcc preprocess
:: cimgui_nopreprocess.h and cimgui_nopreprocess.cpp generated without preprocess
:: cimgui_impl.h with implementation function cdefs
:: lua and json files:
:: definitions.lua for function definitions
:: structs_and_enums.lua with struct and enum information-definitions
:: 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:\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
:: arg[1] compiler name gcc, clang, cl or nocompiler
:: arg[2..n] name of implementations to generate
luajit ./generator_old.lua gcc glfw opengl3 opengl2 sdl
::leave console open
cmd /k

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

@@ -1,9 +1,6 @@
typedef struct SDL_Window SDL_Window;
typedef struct GLFWwindow GLFWwindow;
struct GLFWwindow;
struct SDL_Window;
struct GLFWwindow;struct SDL_Window;
typedef union SDL_Event SDL_Event;CIMGUI_API bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window,bool install_callbacks);
CIMGUI_API bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window,bool install_callbacks);
CIMGUI_API void ImGui_ImplGlfw_Shutdown();
@@ -31,6 +28,7 @@ CIMGUI_API void ImGui_ImplOpenGL2_DestroyDeviceObjects();
CIMGUI_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window,void* sdl_gl_context);
CIMGUI_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window);
CIMGUI_API bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window);
CIMGUI_API bool ImGui_ImplSDL2_InitForMetal(SDL_Window* window);
CIMGUI_API void ImGui_ImplSDL2_Shutdown();
CIMGUI_API void ImGui_ImplSDL2_NewFrame(SDL_Window* window);
CIMGUI_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -17,6 +17,7 @@
"cimguiname": "ImGui_ImplGlfw_CharCallback",
"defaults": [],
"funcname": "ImGui_ImplGlfw_CharCallback",
"location": "imgui_impl_glfw",
"ov_cimguiname": "ImGui_ImplGlfw_CharCallback",
"ret": "void",
"signature": "(GLFWwindow*,unsigned int)",
@@ -41,6 +42,7 @@
"cimguiname": "ImGui_ImplGlfw_InitForOpenGL",
"defaults": [],
"funcname": "ImGui_ImplGlfw_InitForOpenGL",
"location": "imgui_impl_glfw",
"ov_cimguiname": "ImGui_ImplGlfw_InitForOpenGL",
"ret": "bool",
"signature": "(GLFWwindow*,bool)",
@@ -65,6 +67,7 @@
"cimguiname": "ImGui_ImplGlfw_InitForVulkan",
"defaults": [],
"funcname": "ImGui_ImplGlfw_InitForVulkan",
"location": "imgui_impl_glfw",
"ov_cimguiname": "ImGui_ImplGlfw_InitForVulkan",
"ret": "bool",
"signature": "(GLFWwindow*,bool)",
@@ -101,6 +104,7 @@
"cimguiname": "ImGui_ImplGlfw_KeyCallback",
"defaults": [],
"funcname": "ImGui_ImplGlfw_KeyCallback",
"location": "imgui_impl_glfw",
"ov_cimguiname": "ImGui_ImplGlfw_KeyCallback",
"ret": "void",
"signature": "(GLFWwindow*,int,int,int,int)",
@@ -133,6 +137,7 @@
"cimguiname": "ImGui_ImplGlfw_MouseButtonCallback",
"defaults": [],
"funcname": "ImGui_ImplGlfw_MouseButtonCallback",
"location": "imgui_impl_glfw",
"ov_cimguiname": "ImGui_ImplGlfw_MouseButtonCallback",
"ret": "void",
"signature": "(GLFWwindow*,int,int,int)",
@@ -148,6 +153,7 @@
"cimguiname": "ImGui_ImplGlfw_NewFrame",
"defaults": [],
"funcname": "ImGui_ImplGlfw_NewFrame",
"location": "imgui_impl_glfw",
"ov_cimguiname": "ImGui_ImplGlfw_NewFrame",
"ret": "void",
"signature": "()",
@@ -176,6 +182,7 @@
"cimguiname": "ImGui_ImplGlfw_ScrollCallback",
"defaults": [],
"funcname": "ImGui_ImplGlfw_ScrollCallback",
"location": "imgui_impl_glfw",
"ov_cimguiname": "ImGui_ImplGlfw_ScrollCallback",
"ret": "void",
"signature": "(GLFWwindow*,double,double)",
@@ -191,6 +198,7 @@
"cimguiname": "ImGui_ImplGlfw_Shutdown",
"defaults": [],
"funcname": "ImGui_ImplGlfw_Shutdown",
"location": "imgui_impl_glfw",
"ov_cimguiname": "ImGui_ImplGlfw_Shutdown",
"ret": "void",
"signature": "()",
@@ -206,6 +214,7 @@
"cimguiname": "ImGui_ImplOpenGL2_CreateDeviceObjects",
"defaults": [],
"funcname": "ImGui_ImplOpenGL2_CreateDeviceObjects",
"location": "imgui_impl_opengl2",
"ov_cimguiname": "ImGui_ImplOpenGL2_CreateDeviceObjects",
"ret": "bool",
"signature": "()",
@@ -221,6 +230,7 @@
"cimguiname": "ImGui_ImplOpenGL2_CreateFontsTexture",
"defaults": [],
"funcname": "ImGui_ImplOpenGL2_CreateFontsTexture",
"location": "imgui_impl_opengl2",
"ov_cimguiname": "ImGui_ImplOpenGL2_CreateFontsTexture",
"ret": "bool",
"signature": "()",
@@ -236,6 +246,7 @@
"cimguiname": "ImGui_ImplOpenGL2_DestroyDeviceObjects",
"defaults": [],
"funcname": "ImGui_ImplOpenGL2_DestroyDeviceObjects",
"location": "imgui_impl_opengl2",
"ov_cimguiname": "ImGui_ImplOpenGL2_DestroyDeviceObjects",
"ret": "void",
"signature": "()",
@@ -251,6 +262,7 @@
"cimguiname": "ImGui_ImplOpenGL2_DestroyFontsTexture",
"defaults": [],
"funcname": "ImGui_ImplOpenGL2_DestroyFontsTexture",
"location": "imgui_impl_opengl2",
"ov_cimguiname": "ImGui_ImplOpenGL2_DestroyFontsTexture",
"ret": "void",
"signature": "()",
@@ -266,6 +278,7 @@
"cimguiname": "ImGui_ImplOpenGL2_Init",
"defaults": [],
"funcname": "ImGui_ImplOpenGL2_Init",
"location": "imgui_impl_opengl2",
"ov_cimguiname": "ImGui_ImplOpenGL2_Init",
"ret": "bool",
"signature": "()",
@@ -281,6 +294,7 @@
"cimguiname": "ImGui_ImplOpenGL2_NewFrame",
"defaults": [],
"funcname": "ImGui_ImplOpenGL2_NewFrame",
"location": "imgui_impl_opengl2",
"ov_cimguiname": "ImGui_ImplOpenGL2_NewFrame",
"ret": "void",
"signature": "()",
@@ -301,6 +315,7 @@
"cimguiname": "ImGui_ImplOpenGL2_RenderDrawData",
"defaults": [],
"funcname": "ImGui_ImplOpenGL2_RenderDrawData",
"location": "imgui_impl_opengl2",
"ov_cimguiname": "ImGui_ImplOpenGL2_RenderDrawData",
"ret": "void",
"signature": "(ImDrawData*)",
@@ -316,6 +331,7 @@
"cimguiname": "ImGui_ImplOpenGL2_Shutdown",
"defaults": [],
"funcname": "ImGui_ImplOpenGL2_Shutdown",
"location": "imgui_impl_opengl2",
"ov_cimguiname": "ImGui_ImplOpenGL2_Shutdown",
"ret": "void",
"signature": "()",
@@ -331,6 +347,7 @@
"cimguiname": "ImGui_ImplOpenGL3_CreateDeviceObjects",
"defaults": [],
"funcname": "ImGui_ImplOpenGL3_CreateDeviceObjects",
"location": "imgui_impl_opengl3",
"ov_cimguiname": "ImGui_ImplOpenGL3_CreateDeviceObjects",
"ret": "bool",
"signature": "()",
@@ -346,6 +363,7 @@
"cimguiname": "ImGui_ImplOpenGL3_CreateFontsTexture",
"defaults": [],
"funcname": "ImGui_ImplOpenGL3_CreateFontsTexture",
"location": "imgui_impl_opengl3",
"ov_cimguiname": "ImGui_ImplOpenGL3_CreateFontsTexture",
"ret": "bool",
"signature": "()",
@@ -361,6 +379,7 @@
"cimguiname": "ImGui_ImplOpenGL3_DestroyDeviceObjects",
"defaults": [],
"funcname": "ImGui_ImplOpenGL3_DestroyDeviceObjects",
"location": "imgui_impl_opengl3",
"ov_cimguiname": "ImGui_ImplOpenGL3_DestroyDeviceObjects",
"ret": "void",
"signature": "()",
@@ -376,6 +395,7 @@
"cimguiname": "ImGui_ImplOpenGL3_DestroyFontsTexture",
"defaults": [],
"funcname": "ImGui_ImplOpenGL3_DestroyFontsTexture",
"location": "imgui_impl_opengl3",
"ov_cimguiname": "ImGui_ImplOpenGL3_DestroyFontsTexture",
"ret": "void",
"signature": "()",
@@ -391,13 +411,14 @@
"type": "const char*"
}
],
"argsoriginal": "(const char* glsl_version=NULL)",
"argsoriginal": "(const char* glsl_version=((void*)0))",
"call_args": "(glsl_version)",
"cimguiname": "ImGui_ImplOpenGL3_Init",
"defaults": {
"glsl_version": "NULL"
"glsl_version": "((void*)0)"
},
"funcname": "ImGui_ImplOpenGL3_Init",
"location": "imgui_impl_opengl3",
"ov_cimguiname": "ImGui_ImplOpenGL3_Init",
"ret": "bool",
"signature": "(const char*)",
@@ -413,6 +434,7 @@
"cimguiname": "ImGui_ImplOpenGL3_NewFrame",
"defaults": [],
"funcname": "ImGui_ImplOpenGL3_NewFrame",
"location": "imgui_impl_opengl3",
"ov_cimguiname": "ImGui_ImplOpenGL3_NewFrame",
"ret": "void",
"signature": "()",
@@ -433,6 +455,7 @@
"cimguiname": "ImGui_ImplOpenGL3_RenderDrawData",
"defaults": [],
"funcname": "ImGui_ImplOpenGL3_RenderDrawData",
"location": "imgui_impl_opengl3",
"ov_cimguiname": "ImGui_ImplOpenGL3_RenderDrawData",
"ret": "void",
"signature": "(ImDrawData*)",
@@ -448,6 +471,7 @@
"cimguiname": "ImGui_ImplOpenGL3_Shutdown",
"defaults": [],
"funcname": "ImGui_ImplOpenGL3_Shutdown",
"location": "imgui_impl_opengl3",
"ov_cimguiname": "ImGui_ImplOpenGL3_Shutdown",
"ret": "void",
"signature": "()",
@@ -468,12 +492,34 @@
"cimguiname": "ImGui_ImplSDL2_InitForD3D",
"defaults": [],
"funcname": "ImGui_ImplSDL2_InitForD3D",
"location": "imgui_impl_sdl",
"ov_cimguiname": "ImGui_ImplSDL2_InitForD3D",
"ret": "bool",
"signature": "(SDL_Window*)",
"stname": ""
}
],
"ImGui_ImplSDL2_InitForMetal": [
{
"args": "(SDL_Window* window)",
"argsT": [
{
"name": "window",
"type": "SDL_Window*"
}
],
"argsoriginal": "(SDL_Window* window)",
"call_args": "(window)",
"cimguiname": "ImGui_ImplSDL2_InitForMetal",
"defaults": [],
"funcname": "ImGui_ImplSDL2_InitForMetal",
"location": "imgui_impl_sdl",
"ov_cimguiname": "ImGui_ImplSDL2_InitForMetal",
"ret": "bool",
"signature": "(SDL_Window*)",
"stname": ""
}
],
"ImGui_ImplSDL2_InitForOpenGL": [
{
"args": "(SDL_Window* window,void* sdl_gl_context)",
@@ -492,6 +538,7 @@
"cimguiname": "ImGui_ImplSDL2_InitForOpenGL",
"defaults": [],
"funcname": "ImGui_ImplSDL2_InitForOpenGL",
"location": "imgui_impl_sdl",
"ov_cimguiname": "ImGui_ImplSDL2_InitForOpenGL",
"ret": "bool",
"signature": "(SDL_Window*,void*)",
@@ -512,6 +559,7 @@
"cimguiname": "ImGui_ImplSDL2_InitForVulkan",
"defaults": [],
"funcname": "ImGui_ImplSDL2_InitForVulkan",
"location": "imgui_impl_sdl",
"ov_cimguiname": "ImGui_ImplSDL2_InitForVulkan",
"ret": "bool",
"signature": "(SDL_Window*)",
@@ -532,6 +580,7 @@
"cimguiname": "ImGui_ImplSDL2_NewFrame",
"defaults": [],
"funcname": "ImGui_ImplSDL2_NewFrame",
"location": "imgui_impl_sdl",
"ov_cimguiname": "ImGui_ImplSDL2_NewFrame",
"ret": "void",
"signature": "(SDL_Window*)",
@@ -552,6 +601,7 @@
"cimguiname": "ImGui_ImplSDL2_ProcessEvent",
"defaults": [],
"funcname": "ImGui_ImplSDL2_ProcessEvent",
"location": "imgui_impl_sdl",
"ov_cimguiname": "ImGui_ImplSDL2_ProcessEvent",
"ret": "bool",
"signature": "(const SDL_Event*)",
@@ -567,6 +617,7 @@
"cimguiname": "ImGui_ImplSDL2_Shutdown",
"defaults": [],
"funcname": "ImGui_ImplSDL2_Shutdown",
"location": "imgui_impl_sdl",
"ov_cimguiname": "ImGui_ImplSDL2_Shutdown",
"ret": "void",
"signature": "()",

View File

@@ -14,6 +14,7 @@ defs["ImGui_ImplGlfw_CharCallback"][1]["call_args"] = "(window,c)"
defs["ImGui_ImplGlfw_CharCallback"][1]["cimguiname"] = "ImGui_ImplGlfw_CharCallback"
defs["ImGui_ImplGlfw_CharCallback"][1]["defaults"] = {}
defs["ImGui_ImplGlfw_CharCallback"][1]["funcname"] = "ImGui_ImplGlfw_CharCallback"
defs["ImGui_ImplGlfw_CharCallback"][1]["location"] = "imgui_impl_glfw"
defs["ImGui_ImplGlfw_CharCallback"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_CharCallback"
defs["ImGui_ImplGlfw_CharCallback"][1]["ret"] = "void"
defs["ImGui_ImplGlfw_CharCallback"][1]["signature"] = "(GLFWwindow*,unsigned int)"
@@ -34,6 +35,7 @@ defs["ImGui_ImplGlfw_InitForOpenGL"][1]["call_args"] = "(window,install_callback
defs["ImGui_ImplGlfw_InitForOpenGL"][1]["cimguiname"] = "ImGui_ImplGlfw_InitForOpenGL"
defs["ImGui_ImplGlfw_InitForOpenGL"][1]["defaults"] = {}
defs["ImGui_ImplGlfw_InitForOpenGL"][1]["funcname"] = "ImGui_ImplGlfw_InitForOpenGL"
defs["ImGui_ImplGlfw_InitForOpenGL"][1]["location"] = "imgui_impl_glfw"
defs["ImGui_ImplGlfw_InitForOpenGL"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_InitForOpenGL"
defs["ImGui_ImplGlfw_InitForOpenGL"][1]["ret"] = "bool"
defs["ImGui_ImplGlfw_InitForOpenGL"][1]["signature"] = "(GLFWwindow*,bool)"
@@ -54,6 +56,7 @@ defs["ImGui_ImplGlfw_InitForVulkan"][1]["call_args"] = "(window,install_callback
defs["ImGui_ImplGlfw_InitForVulkan"][1]["cimguiname"] = "ImGui_ImplGlfw_InitForVulkan"
defs["ImGui_ImplGlfw_InitForVulkan"][1]["defaults"] = {}
defs["ImGui_ImplGlfw_InitForVulkan"][1]["funcname"] = "ImGui_ImplGlfw_InitForVulkan"
defs["ImGui_ImplGlfw_InitForVulkan"][1]["location"] = "imgui_impl_glfw"
defs["ImGui_ImplGlfw_InitForVulkan"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_InitForVulkan"
defs["ImGui_ImplGlfw_InitForVulkan"][1]["ret"] = "bool"
defs["ImGui_ImplGlfw_InitForVulkan"][1]["signature"] = "(GLFWwindow*,bool)"
@@ -83,6 +86,7 @@ defs["ImGui_ImplGlfw_KeyCallback"][1]["call_args"] = "(window,key,scancode,actio
defs["ImGui_ImplGlfw_KeyCallback"][1]["cimguiname"] = "ImGui_ImplGlfw_KeyCallback"
defs["ImGui_ImplGlfw_KeyCallback"][1]["defaults"] = {}
defs["ImGui_ImplGlfw_KeyCallback"][1]["funcname"] = "ImGui_ImplGlfw_KeyCallback"
defs["ImGui_ImplGlfw_KeyCallback"][1]["location"] = "imgui_impl_glfw"
defs["ImGui_ImplGlfw_KeyCallback"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_KeyCallback"
defs["ImGui_ImplGlfw_KeyCallback"][1]["ret"] = "void"
defs["ImGui_ImplGlfw_KeyCallback"][1]["signature"] = "(GLFWwindow*,int,int,int,int)"
@@ -109,6 +113,7 @@ defs["ImGui_ImplGlfw_MouseButtonCallback"][1]["call_args"] = "(window,button,act
defs["ImGui_ImplGlfw_MouseButtonCallback"][1]["cimguiname"] = "ImGui_ImplGlfw_MouseButtonCallback"
defs["ImGui_ImplGlfw_MouseButtonCallback"][1]["defaults"] = {}
defs["ImGui_ImplGlfw_MouseButtonCallback"][1]["funcname"] = "ImGui_ImplGlfw_MouseButtonCallback"
defs["ImGui_ImplGlfw_MouseButtonCallback"][1]["location"] = "imgui_impl_glfw"
defs["ImGui_ImplGlfw_MouseButtonCallback"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_MouseButtonCallback"
defs["ImGui_ImplGlfw_MouseButtonCallback"][1]["ret"] = "void"
defs["ImGui_ImplGlfw_MouseButtonCallback"][1]["signature"] = "(GLFWwindow*,int,int,int)"
@@ -123,6 +128,7 @@ defs["ImGui_ImplGlfw_NewFrame"][1]["call_args"] = "()"
defs["ImGui_ImplGlfw_NewFrame"][1]["cimguiname"] = "ImGui_ImplGlfw_NewFrame"
defs["ImGui_ImplGlfw_NewFrame"][1]["defaults"] = {}
defs["ImGui_ImplGlfw_NewFrame"][1]["funcname"] = "ImGui_ImplGlfw_NewFrame"
defs["ImGui_ImplGlfw_NewFrame"][1]["location"] = "imgui_impl_glfw"
defs["ImGui_ImplGlfw_NewFrame"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_NewFrame"
defs["ImGui_ImplGlfw_NewFrame"][1]["ret"] = "void"
defs["ImGui_ImplGlfw_NewFrame"][1]["signature"] = "()"
@@ -146,6 +152,7 @@ defs["ImGui_ImplGlfw_ScrollCallback"][1]["call_args"] = "(window,xoffset,yoffset
defs["ImGui_ImplGlfw_ScrollCallback"][1]["cimguiname"] = "ImGui_ImplGlfw_ScrollCallback"
defs["ImGui_ImplGlfw_ScrollCallback"][1]["defaults"] = {}
defs["ImGui_ImplGlfw_ScrollCallback"][1]["funcname"] = "ImGui_ImplGlfw_ScrollCallback"
defs["ImGui_ImplGlfw_ScrollCallback"][1]["location"] = "imgui_impl_glfw"
defs["ImGui_ImplGlfw_ScrollCallback"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_ScrollCallback"
defs["ImGui_ImplGlfw_ScrollCallback"][1]["ret"] = "void"
defs["ImGui_ImplGlfw_ScrollCallback"][1]["signature"] = "(GLFWwindow*,double,double)"
@@ -160,6 +167,7 @@ defs["ImGui_ImplGlfw_Shutdown"][1]["call_args"] = "()"
defs["ImGui_ImplGlfw_Shutdown"][1]["cimguiname"] = "ImGui_ImplGlfw_Shutdown"
defs["ImGui_ImplGlfw_Shutdown"][1]["defaults"] = {}
defs["ImGui_ImplGlfw_Shutdown"][1]["funcname"] = "ImGui_ImplGlfw_Shutdown"
defs["ImGui_ImplGlfw_Shutdown"][1]["location"] = "imgui_impl_glfw"
defs["ImGui_ImplGlfw_Shutdown"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_Shutdown"
defs["ImGui_ImplGlfw_Shutdown"][1]["ret"] = "void"
defs["ImGui_ImplGlfw_Shutdown"][1]["signature"] = "()"
@@ -174,6 +182,7 @@ defs["ImGui_ImplOpenGL2_CreateDeviceObjects"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL2_CreateDeviceObjects"][1]["cimguiname"] = "ImGui_ImplOpenGL2_CreateDeviceObjects"
defs["ImGui_ImplOpenGL2_CreateDeviceObjects"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL2_CreateDeviceObjects"][1]["funcname"] = "ImGui_ImplOpenGL2_CreateDeviceObjects"
defs["ImGui_ImplOpenGL2_CreateDeviceObjects"][1]["location"] = "imgui_impl_opengl2"
defs["ImGui_ImplOpenGL2_CreateDeviceObjects"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL2_CreateDeviceObjects"
defs["ImGui_ImplOpenGL2_CreateDeviceObjects"][1]["ret"] = "bool"
defs["ImGui_ImplOpenGL2_CreateDeviceObjects"][1]["signature"] = "()"
@@ -188,6 +197,7 @@ defs["ImGui_ImplOpenGL2_CreateFontsTexture"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL2_CreateFontsTexture"][1]["cimguiname"] = "ImGui_ImplOpenGL2_CreateFontsTexture"
defs["ImGui_ImplOpenGL2_CreateFontsTexture"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL2_CreateFontsTexture"][1]["funcname"] = "ImGui_ImplOpenGL2_CreateFontsTexture"
defs["ImGui_ImplOpenGL2_CreateFontsTexture"][1]["location"] = "imgui_impl_opengl2"
defs["ImGui_ImplOpenGL2_CreateFontsTexture"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL2_CreateFontsTexture"
defs["ImGui_ImplOpenGL2_CreateFontsTexture"][1]["ret"] = "bool"
defs["ImGui_ImplOpenGL2_CreateFontsTexture"][1]["signature"] = "()"
@@ -202,6 +212,7 @@ defs["ImGui_ImplOpenGL2_DestroyDeviceObjects"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL2_DestroyDeviceObjects"][1]["cimguiname"] = "ImGui_ImplOpenGL2_DestroyDeviceObjects"
defs["ImGui_ImplOpenGL2_DestroyDeviceObjects"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL2_DestroyDeviceObjects"][1]["funcname"] = "ImGui_ImplOpenGL2_DestroyDeviceObjects"
defs["ImGui_ImplOpenGL2_DestroyDeviceObjects"][1]["location"] = "imgui_impl_opengl2"
defs["ImGui_ImplOpenGL2_DestroyDeviceObjects"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL2_DestroyDeviceObjects"
defs["ImGui_ImplOpenGL2_DestroyDeviceObjects"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL2_DestroyDeviceObjects"][1]["signature"] = "()"
@@ -216,6 +227,7 @@ defs["ImGui_ImplOpenGL2_DestroyFontsTexture"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL2_DestroyFontsTexture"][1]["cimguiname"] = "ImGui_ImplOpenGL2_DestroyFontsTexture"
defs["ImGui_ImplOpenGL2_DestroyFontsTexture"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL2_DestroyFontsTexture"][1]["funcname"] = "ImGui_ImplOpenGL2_DestroyFontsTexture"
defs["ImGui_ImplOpenGL2_DestroyFontsTexture"][1]["location"] = "imgui_impl_opengl2"
defs["ImGui_ImplOpenGL2_DestroyFontsTexture"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL2_DestroyFontsTexture"
defs["ImGui_ImplOpenGL2_DestroyFontsTexture"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL2_DestroyFontsTexture"][1]["signature"] = "()"
@@ -230,6 +242,7 @@ defs["ImGui_ImplOpenGL2_Init"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL2_Init"][1]["cimguiname"] = "ImGui_ImplOpenGL2_Init"
defs["ImGui_ImplOpenGL2_Init"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL2_Init"][1]["funcname"] = "ImGui_ImplOpenGL2_Init"
defs["ImGui_ImplOpenGL2_Init"][1]["location"] = "imgui_impl_opengl2"
defs["ImGui_ImplOpenGL2_Init"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL2_Init"
defs["ImGui_ImplOpenGL2_Init"][1]["ret"] = "bool"
defs["ImGui_ImplOpenGL2_Init"][1]["signature"] = "()"
@@ -244,6 +257,7 @@ defs["ImGui_ImplOpenGL2_NewFrame"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL2_NewFrame"][1]["cimguiname"] = "ImGui_ImplOpenGL2_NewFrame"
defs["ImGui_ImplOpenGL2_NewFrame"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL2_NewFrame"][1]["funcname"] = "ImGui_ImplOpenGL2_NewFrame"
defs["ImGui_ImplOpenGL2_NewFrame"][1]["location"] = "imgui_impl_opengl2"
defs["ImGui_ImplOpenGL2_NewFrame"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL2_NewFrame"
defs["ImGui_ImplOpenGL2_NewFrame"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL2_NewFrame"][1]["signature"] = "()"
@@ -261,6 +275,7 @@ defs["ImGui_ImplOpenGL2_RenderDrawData"][1]["call_args"] = "(draw_data)"
defs["ImGui_ImplOpenGL2_RenderDrawData"][1]["cimguiname"] = "ImGui_ImplOpenGL2_RenderDrawData"
defs["ImGui_ImplOpenGL2_RenderDrawData"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL2_RenderDrawData"][1]["funcname"] = "ImGui_ImplOpenGL2_RenderDrawData"
defs["ImGui_ImplOpenGL2_RenderDrawData"][1]["location"] = "imgui_impl_opengl2"
defs["ImGui_ImplOpenGL2_RenderDrawData"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL2_RenderDrawData"
defs["ImGui_ImplOpenGL2_RenderDrawData"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL2_RenderDrawData"][1]["signature"] = "(ImDrawData*)"
@@ -275,6 +290,7 @@ defs["ImGui_ImplOpenGL2_Shutdown"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL2_Shutdown"][1]["cimguiname"] = "ImGui_ImplOpenGL2_Shutdown"
defs["ImGui_ImplOpenGL2_Shutdown"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL2_Shutdown"][1]["funcname"] = "ImGui_ImplOpenGL2_Shutdown"
defs["ImGui_ImplOpenGL2_Shutdown"][1]["location"] = "imgui_impl_opengl2"
defs["ImGui_ImplOpenGL2_Shutdown"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL2_Shutdown"
defs["ImGui_ImplOpenGL2_Shutdown"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL2_Shutdown"][1]["signature"] = "()"
@@ -289,6 +305,7 @@ defs["ImGui_ImplOpenGL3_CreateDeviceObjects"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL3_CreateDeviceObjects"][1]["cimguiname"] = "ImGui_ImplOpenGL3_CreateDeviceObjects"
defs["ImGui_ImplOpenGL3_CreateDeviceObjects"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL3_CreateDeviceObjects"][1]["funcname"] = "ImGui_ImplOpenGL3_CreateDeviceObjects"
defs["ImGui_ImplOpenGL3_CreateDeviceObjects"][1]["location"] = "imgui_impl_opengl3"
defs["ImGui_ImplOpenGL3_CreateDeviceObjects"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL3_CreateDeviceObjects"
defs["ImGui_ImplOpenGL3_CreateDeviceObjects"][1]["ret"] = "bool"
defs["ImGui_ImplOpenGL3_CreateDeviceObjects"][1]["signature"] = "()"
@@ -303,6 +320,7 @@ defs["ImGui_ImplOpenGL3_CreateFontsTexture"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL3_CreateFontsTexture"][1]["cimguiname"] = "ImGui_ImplOpenGL3_CreateFontsTexture"
defs["ImGui_ImplOpenGL3_CreateFontsTexture"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL3_CreateFontsTexture"][1]["funcname"] = "ImGui_ImplOpenGL3_CreateFontsTexture"
defs["ImGui_ImplOpenGL3_CreateFontsTexture"][1]["location"] = "imgui_impl_opengl3"
defs["ImGui_ImplOpenGL3_CreateFontsTexture"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL3_CreateFontsTexture"
defs["ImGui_ImplOpenGL3_CreateFontsTexture"][1]["ret"] = "bool"
defs["ImGui_ImplOpenGL3_CreateFontsTexture"][1]["signature"] = "()"
@@ -317,6 +335,7 @@ defs["ImGui_ImplOpenGL3_DestroyDeviceObjects"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL3_DestroyDeviceObjects"][1]["cimguiname"] = "ImGui_ImplOpenGL3_DestroyDeviceObjects"
defs["ImGui_ImplOpenGL3_DestroyDeviceObjects"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL3_DestroyDeviceObjects"][1]["funcname"] = "ImGui_ImplOpenGL3_DestroyDeviceObjects"
defs["ImGui_ImplOpenGL3_DestroyDeviceObjects"][1]["location"] = "imgui_impl_opengl3"
defs["ImGui_ImplOpenGL3_DestroyDeviceObjects"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL3_DestroyDeviceObjects"
defs["ImGui_ImplOpenGL3_DestroyDeviceObjects"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL3_DestroyDeviceObjects"][1]["signature"] = "()"
@@ -331,6 +350,7 @@ defs["ImGui_ImplOpenGL3_DestroyFontsTexture"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL3_DestroyFontsTexture"][1]["cimguiname"] = "ImGui_ImplOpenGL3_DestroyFontsTexture"
defs["ImGui_ImplOpenGL3_DestroyFontsTexture"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL3_DestroyFontsTexture"][1]["funcname"] = "ImGui_ImplOpenGL3_DestroyFontsTexture"
defs["ImGui_ImplOpenGL3_DestroyFontsTexture"][1]["location"] = "imgui_impl_opengl3"
defs["ImGui_ImplOpenGL3_DestroyFontsTexture"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL3_DestroyFontsTexture"
defs["ImGui_ImplOpenGL3_DestroyFontsTexture"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL3_DestroyFontsTexture"][1]["signature"] = "()"
@@ -343,12 +363,13 @@ defs["ImGui_ImplOpenGL3_Init"][1]["argsT"] = {}
defs["ImGui_ImplOpenGL3_Init"][1]["argsT"][1] = {}
defs["ImGui_ImplOpenGL3_Init"][1]["argsT"][1]["name"] = "glsl_version"
defs["ImGui_ImplOpenGL3_Init"][1]["argsT"][1]["type"] = "const char*"
defs["ImGui_ImplOpenGL3_Init"][1]["argsoriginal"] = "(const char* glsl_version=NULL)"
defs["ImGui_ImplOpenGL3_Init"][1]["argsoriginal"] = "(const char* glsl_version=((void*)0))"
defs["ImGui_ImplOpenGL3_Init"][1]["call_args"] = "(glsl_version)"
defs["ImGui_ImplOpenGL3_Init"][1]["cimguiname"] = "ImGui_ImplOpenGL3_Init"
defs["ImGui_ImplOpenGL3_Init"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL3_Init"][1]["defaults"]["glsl_version"] = "NULL"
defs["ImGui_ImplOpenGL3_Init"][1]["defaults"]["glsl_version"] = "((void*)0)"
defs["ImGui_ImplOpenGL3_Init"][1]["funcname"] = "ImGui_ImplOpenGL3_Init"
defs["ImGui_ImplOpenGL3_Init"][1]["location"] = "imgui_impl_opengl3"
defs["ImGui_ImplOpenGL3_Init"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL3_Init"
defs["ImGui_ImplOpenGL3_Init"][1]["ret"] = "bool"
defs["ImGui_ImplOpenGL3_Init"][1]["signature"] = "(const char*)"
@@ -363,6 +384,7 @@ defs["ImGui_ImplOpenGL3_NewFrame"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL3_NewFrame"][1]["cimguiname"] = "ImGui_ImplOpenGL3_NewFrame"
defs["ImGui_ImplOpenGL3_NewFrame"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL3_NewFrame"][1]["funcname"] = "ImGui_ImplOpenGL3_NewFrame"
defs["ImGui_ImplOpenGL3_NewFrame"][1]["location"] = "imgui_impl_opengl3"
defs["ImGui_ImplOpenGL3_NewFrame"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL3_NewFrame"
defs["ImGui_ImplOpenGL3_NewFrame"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL3_NewFrame"][1]["signature"] = "()"
@@ -380,6 +402,7 @@ defs["ImGui_ImplOpenGL3_RenderDrawData"][1]["call_args"] = "(draw_data)"
defs["ImGui_ImplOpenGL3_RenderDrawData"][1]["cimguiname"] = "ImGui_ImplOpenGL3_RenderDrawData"
defs["ImGui_ImplOpenGL3_RenderDrawData"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL3_RenderDrawData"][1]["funcname"] = "ImGui_ImplOpenGL3_RenderDrawData"
defs["ImGui_ImplOpenGL3_RenderDrawData"][1]["location"] = "imgui_impl_opengl3"
defs["ImGui_ImplOpenGL3_RenderDrawData"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL3_RenderDrawData"
defs["ImGui_ImplOpenGL3_RenderDrawData"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL3_RenderDrawData"][1]["signature"] = "(ImDrawData*)"
@@ -394,6 +417,7 @@ defs["ImGui_ImplOpenGL3_Shutdown"][1]["call_args"] = "()"
defs["ImGui_ImplOpenGL3_Shutdown"][1]["cimguiname"] = "ImGui_ImplOpenGL3_Shutdown"
defs["ImGui_ImplOpenGL3_Shutdown"][1]["defaults"] = {}
defs["ImGui_ImplOpenGL3_Shutdown"][1]["funcname"] = "ImGui_ImplOpenGL3_Shutdown"
defs["ImGui_ImplOpenGL3_Shutdown"][1]["location"] = "imgui_impl_opengl3"
defs["ImGui_ImplOpenGL3_Shutdown"][1]["ov_cimguiname"] = "ImGui_ImplOpenGL3_Shutdown"
defs["ImGui_ImplOpenGL3_Shutdown"][1]["ret"] = "void"
defs["ImGui_ImplOpenGL3_Shutdown"][1]["signature"] = "()"
@@ -411,11 +435,30 @@ defs["ImGui_ImplSDL2_InitForD3D"][1]["call_args"] = "(window)"
defs["ImGui_ImplSDL2_InitForD3D"][1]["cimguiname"] = "ImGui_ImplSDL2_InitForD3D"
defs["ImGui_ImplSDL2_InitForD3D"][1]["defaults"] = {}
defs["ImGui_ImplSDL2_InitForD3D"][1]["funcname"] = "ImGui_ImplSDL2_InitForD3D"
defs["ImGui_ImplSDL2_InitForD3D"][1]["location"] = "imgui_impl_sdl"
defs["ImGui_ImplSDL2_InitForD3D"][1]["ov_cimguiname"] = "ImGui_ImplSDL2_InitForD3D"
defs["ImGui_ImplSDL2_InitForD3D"][1]["ret"] = "bool"
defs["ImGui_ImplSDL2_InitForD3D"][1]["signature"] = "(SDL_Window*)"
defs["ImGui_ImplSDL2_InitForD3D"][1]["stname"] = ""
defs["ImGui_ImplSDL2_InitForD3D"]["(SDL_Window*)"] = defs["ImGui_ImplSDL2_InitForD3D"][1]
defs["ImGui_ImplSDL2_InitForMetal"] = {}
defs["ImGui_ImplSDL2_InitForMetal"][1] = {}
defs["ImGui_ImplSDL2_InitForMetal"][1]["args"] = "(SDL_Window* window)"
defs["ImGui_ImplSDL2_InitForMetal"][1]["argsT"] = {}
defs["ImGui_ImplSDL2_InitForMetal"][1]["argsT"][1] = {}
defs["ImGui_ImplSDL2_InitForMetal"][1]["argsT"][1]["name"] = "window"
defs["ImGui_ImplSDL2_InitForMetal"][1]["argsT"][1]["type"] = "SDL_Window*"
defs["ImGui_ImplSDL2_InitForMetal"][1]["argsoriginal"] = "(SDL_Window* window)"
defs["ImGui_ImplSDL2_InitForMetal"][1]["call_args"] = "(window)"
defs["ImGui_ImplSDL2_InitForMetal"][1]["cimguiname"] = "ImGui_ImplSDL2_InitForMetal"
defs["ImGui_ImplSDL2_InitForMetal"][1]["defaults"] = {}
defs["ImGui_ImplSDL2_InitForMetal"][1]["funcname"] = "ImGui_ImplSDL2_InitForMetal"
defs["ImGui_ImplSDL2_InitForMetal"][1]["location"] = "imgui_impl_sdl"
defs["ImGui_ImplSDL2_InitForMetal"][1]["ov_cimguiname"] = "ImGui_ImplSDL2_InitForMetal"
defs["ImGui_ImplSDL2_InitForMetal"][1]["ret"] = "bool"
defs["ImGui_ImplSDL2_InitForMetal"][1]["signature"] = "(SDL_Window*)"
defs["ImGui_ImplSDL2_InitForMetal"][1]["stname"] = ""
defs["ImGui_ImplSDL2_InitForMetal"]["(SDL_Window*)"] = defs["ImGui_ImplSDL2_InitForMetal"][1]
defs["ImGui_ImplSDL2_InitForOpenGL"] = {}
defs["ImGui_ImplSDL2_InitForOpenGL"][1] = {}
defs["ImGui_ImplSDL2_InitForOpenGL"][1]["args"] = "(SDL_Window* window,void* sdl_gl_context)"
@@ -431,6 +474,7 @@ defs["ImGui_ImplSDL2_InitForOpenGL"][1]["call_args"] = "(window,sdl_gl_context)"
defs["ImGui_ImplSDL2_InitForOpenGL"][1]["cimguiname"] = "ImGui_ImplSDL2_InitForOpenGL"
defs["ImGui_ImplSDL2_InitForOpenGL"][1]["defaults"] = {}
defs["ImGui_ImplSDL2_InitForOpenGL"][1]["funcname"] = "ImGui_ImplSDL2_InitForOpenGL"
defs["ImGui_ImplSDL2_InitForOpenGL"][1]["location"] = "imgui_impl_sdl"
defs["ImGui_ImplSDL2_InitForOpenGL"][1]["ov_cimguiname"] = "ImGui_ImplSDL2_InitForOpenGL"
defs["ImGui_ImplSDL2_InitForOpenGL"][1]["ret"] = "bool"
defs["ImGui_ImplSDL2_InitForOpenGL"][1]["signature"] = "(SDL_Window*,void*)"
@@ -448,6 +492,7 @@ defs["ImGui_ImplSDL2_InitForVulkan"][1]["call_args"] = "(window)"
defs["ImGui_ImplSDL2_InitForVulkan"][1]["cimguiname"] = "ImGui_ImplSDL2_InitForVulkan"
defs["ImGui_ImplSDL2_InitForVulkan"][1]["defaults"] = {}
defs["ImGui_ImplSDL2_InitForVulkan"][1]["funcname"] = "ImGui_ImplSDL2_InitForVulkan"
defs["ImGui_ImplSDL2_InitForVulkan"][1]["location"] = "imgui_impl_sdl"
defs["ImGui_ImplSDL2_InitForVulkan"][1]["ov_cimguiname"] = "ImGui_ImplSDL2_InitForVulkan"
defs["ImGui_ImplSDL2_InitForVulkan"][1]["ret"] = "bool"
defs["ImGui_ImplSDL2_InitForVulkan"][1]["signature"] = "(SDL_Window*)"
@@ -465,6 +510,7 @@ defs["ImGui_ImplSDL2_NewFrame"][1]["call_args"] = "(window)"
defs["ImGui_ImplSDL2_NewFrame"][1]["cimguiname"] = "ImGui_ImplSDL2_NewFrame"
defs["ImGui_ImplSDL2_NewFrame"][1]["defaults"] = {}
defs["ImGui_ImplSDL2_NewFrame"][1]["funcname"] = "ImGui_ImplSDL2_NewFrame"
defs["ImGui_ImplSDL2_NewFrame"][1]["location"] = "imgui_impl_sdl"
defs["ImGui_ImplSDL2_NewFrame"][1]["ov_cimguiname"] = "ImGui_ImplSDL2_NewFrame"
defs["ImGui_ImplSDL2_NewFrame"][1]["ret"] = "void"
defs["ImGui_ImplSDL2_NewFrame"][1]["signature"] = "(SDL_Window*)"
@@ -482,6 +528,7 @@ defs["ImGui_ImplSDL2_ProcessEvent"][1]["call_args"] = "(event)"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["cimguiname"] = "ImGui_ImplSDL2_ProcessEvent"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["defaults"] = {}
defs["ImGui_ImplSDL2_ProcessEvent"][1]["funcname"] = "ImGui_ImplSDL2_ProcessEvent"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["location"] = "imgui_impl_sdl"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["ov_cimguiname"] = "ImGui_ImplSDL2_ProcessEvent"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["ret"] = "bool"
defs["ImGui_ImplSDL2_ProcessEvent"][1]["signature"] = "(const SDL_Event*)"
@@ -496,6 +543,7 @@ defs["ImGui_ImplSDL2_Shutdown"][1]["call_args"] = "()"
defs["ImGui_ImplSDL2_Shutdown"][1]["cimguiname"] = "ImGui_ImplSDL2_Shutdown"
defs["ImGui_ImplSDL2_Shutdown"][1]["defaults"] = {}
defs["ImGui_ImplSDL2_Shutdown"][1]["funcname"] = "ImGui_ImplSDL2_Shutdown"
defs["ImGui_ImplSDL2_Shutdown"][1]["location"] = "imgui_impl_sdl"
defs["ImGui_ImplSDL2_Shutdown"][1]["ov_cimguiname"] = "ImGui_ImplSDL2_Shutdown"
defs["ImGui_ImplSDL2_Shutdown"][1]["ret"] = "void"
defs["ImGui_ImplSDL2_Shutdown"][1]["signature"] = "()"

View File

@@ -1,9 +1,12 @@
----------------overloadings---------------------------
ImVector_resize 2
1 void ImVector_resize (int)
1 void ImVector_resizeNil (int)
2 void ImVector_resizeT (int,const T)
igSetScrollFromPosY 2
1 void igSetScrollFromPosYFloat (float,float)
2 void igSetScrollFromPosYWindowPtr (ImGuiWindow*,float,float)
ImVec4_ImVec4 2
1 nil ImVec4_ImVec4 ()
1 nil ImVec4_ImVec4Nil ()
2 nil ImVec4_ImVec4Float (float,float,float,float)
igValue 4
1 void igValueBool (const char*,bool)
@@ -11,125 +14,201 @@ igValue 4
3 void igValueUint (const char*,unsigned int)
4 void igValueFloat (const char*,float,const char*)
igIsRectVisible 2
1 bool igIsRectVisible (const ImVec2)
1 bool igIsRectVisibleNil (const ImVec2)
2 bool igIsRectVisibleVec2 (const ImVec2,const ImVec2)
igRadioButton 2
1 bool igRadioButtonBool (const char*,bool)
2 bool igRadioButtonIntPtr (const char*,int*,int)
ImGuiTextRange_ImGuiTextRange 2
1 nil ImGuiTextRange_ImGuiTextRange ()
1 nil ImGuiTextRange_ImGuiTextRangeNil ()
2 nil ImGuiTextRange_ImGuiTextRangeStr (const char*,const char*)
ImVec2_ImVec2 2
1 nil ImVec2_ImVec2Nil ()
2 nil ImVec2_ImVec2Float (float,float)
ImVector_back 2
1 T* ImVector_back ()
1 T* ImVector_backNil ()
2 const T* ImVector_back_const ()const
igPlotHistogram 2
1 void igPlotHistogramFloatPtr (const char*,const float*,int,int,const char*,float,float,ImVec2,int)
2 void igPlotHistogramFnPtr (const char*,float(*)(void*,int),void*,int,int,const char*,float,float,ImVec2)
2 void igPlotHistogramFnFloatPtr (const char*,float(*)(void*,int),void*,int,int,const char*,float,float,ImVec2)
igGetID 3
1 ImGuiID igGetIDStr (const char*)
2 ImGuiID igGetIDRange (const char*,const char*)
2 ImGuiID igGetIDStrStr (const char*,const char*)
3 ImGuiID igGetIDPtr (const void*)
igSetWindowPos 2
ImVec1_ImVec1 2
1 nil ImVec1_ImVec1Nil ()
2 nil ImVec1_ImVec1Float (float)
igImPow 2
1 float igImPowFloat (float,float)
2 double igImPowdouble (double,double)
igSetWindowPos 3
1 void igSetWindowPosVec2 (const ImVec2,ImGuiCond)
2 void igSetWindowPosStr (const char*,const ImVec2,ImGuiCond)
3 void igSetWindowPosWindowPtr (ImGuiWindow*,const ImVec2,ImGuiCond)
igBeginChild 2
1 bool igBeginChild (const char*,const ImVec2,bool,ImGuiWindowFlags)
1 bool igBeginChildStr (const char*,const ImVec2,bool,ImGuiWindowFlags)
2 bool igBeginChildID (ImGuiID,const ImVec2,bool,ImGuiWindowFlags)
igPushID 4
1 void igPushIDStr (const char*)
2 void igPushIDRange (const char*,const char*)
2 void igPushIDStrStr (const char*,const char*)
3 void igPushIDPtr (const void*)
4 void igPushIDInt (int)
ImRect_Contains 2
1 bool ImRect_ContainsVec2 (const ImVec2)const
2 bool ImRect_ContainsRect (const ImRect)const
ImRect_Add 2
1 void ImRect_AddVec2 (const ImVec2)
2 void ImRect_AddRect (const ImRect)
ImGuiStoragePair_ImGuiStoragePair 3
1 nil ImGuiStoragePair_ImGuiStoragePairInt (ImGuiID,int)
2 nil ImGuiStoragePair_ImGuiStoragePairFloat (ImGuiID,float)
3 nil ImGuiStoragePair_ImGuiStoragePairPtr (ImGuiID,void*)
igSetScrollFromPosX 2
1 void igSetScrollFromPosXFloat (float,float)
2 void igSetScrollFromPosXWindowPtr (ImGuiWindow*,float,float)
igGetForegroundDrawList 2
1 ImDrawList* igGetForegroundDrawListNil ()
2 ImDrawList* igGetForegroundDrawListWindowPtr (ImGuiWindow*)
ImVector_front 2
1 T* ImVector_frontNil ()
2 const T* ImVector_front_const ()const
ImGuiWindow_GetID 3
1 ImGuiID ImGuiWindow_GetIDStr (const char*,const char*)
2 ImGuiID ImGuiWindow_GetIDPtr (const void*)
3 ImGuiID ImGuiWindow_GetIDInt (int)
igImLengthSqr 2
1 float igImLengthSqrVec2 (const ImVec2)
2 float igImLengthSqrVec4 (const ImVec4)
igImFloor 2
1 float igImFloorFloat (float)
2 ImVec2 igImFloorVec2 (const ImVec2)
igTreeNode 3
1 bool igTreeNodeStr (const char*)
2 bool igTreeNodeStrStr (const char*,const char*,...)
3 bool igTreeNodePtr (const void*,const char*,...)
igCombo 3
1 bool igCombo (const char*,int*,const char* const[],int,int)
1 bool igComboStr_arr (const char*,int*,const char* const[],int,int)
2 bool igComboStr (const char*,int*,const char*,int)
3 bool igComboFnPtr (const char*,int*,bool(*)(void*,int,const char**),void*,int,int)
3 bool igComboFnBoolPtr (const char*,int*,bool(*)(void*,int,const char**),void*,int,int)
igSetScrollY 2
1 void igSetScrollYFloat (float)
2 void igSetScrollYWindowPtr (ImGuiWindow*,float)
ImVector_erase 2
1 T* ImVector_erase (const T*)
1 T* ImVector_eraseNil (const T*)
2 T* ImVector_eraseTPtr (const T*,const T*)
ImDrawList_AddText 2
1 void ImDrawList_AddText (const ImVec2,ImU32,const char*,const char*)
1 void ImDrawList_AddTextVec2 (const ImVec2,ImU32,const char*,const char*)
2 void ImDrawList_AddTextFontPtr (const ImFont*,float,const ImVec2,ImU32,const char*,const char*,float,const ImVec4*)
igPushStyleVar 2
1 void igPushStyleVarFloat (ImGuiStyleVar,float)
2 void igPushStyleVarVec2 (ImGuiStyleVar,const ImVec2)
igSetWindowFocus 2
1 void igSetWindowFocus ()
1 void igSetWindowFocusNil ()
2 void igSetWindowFocusStr (const char*)
igImLerp 3
1 ImVec2 igImLerpVec2Float (const ImVec2,const ImVec2,float)
2 ImVec2 igImLerpVec2Vec2 (const ImVec2,const ImVec2,const ImVec2)
3 ImVec4 igImLerpVec4 (const ImVec4,const ImVec4,float)
ImVector_end 2
1 T* ImVector_end ()
1 T* ImVector_endNil ()
2 const T* ImVector_end_const ()const
igItemSize 2
1 void igItemSizeVec2 (const ImVec2,float)
2 void igItemSizeRect (const ImRect,float)
igMarkIniSettingsDirty 2
1 void igMarkIniSettingsDirtyNil ()
2 void igMarkIniSettingsDirtyWindowPtr (ImGuiWindow*)
igSetWindowSize 3
1 void igSetWindowSizeVec2 (const ImVec2,ImGuiCond)
2 void igSetWindowSizeStr (const char*,const ImVec2,ImGuiCond)
3 void igSetWindowSizeWindowPtr (ImGuiWindow*,const ImVec2,ImGuiCond)
igSetScrollX 2
1 void igSetScrollXFloat (float)
2 void igSetScrollXWindowPtr (ImGuiWindow*,float)
igIsPopupOpen 2
1 bool igIsPopupOpenStr (const char*,ImGuiPopupFlags)
2 bool igIsPopupOpenID (ImGuiID,ImGuiPopupFlags)
ImVector_ImVector 2
1 nil ImVector_ImVector ()
1 nil ImVector_ImVectorNil ()
2 nil ImVector_ImVectorVector (const ImVector)
igSetWindowCollapsed 2
igSetWindowCollapsed 3
1 void igSetWindowCollapsedBool (bool,ImGuiCond)
2 void igSetWindowCollapsedStr (const char*,bool,ImGuiCond)
3 void igSetWindowCollapsedWindowPtr (ImGuiWindow*,bool,ImGuiCond)
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)
1 void igPlotLinesFloatPtr (const char*,const float*,int,int,const char*,float,float,ImVec2,int)
2 void igPlotLinesFnFloatPtr (const char*,float(*)(void*,int),void*,int,int,const char*,float,float,ImVec2)
igPushStyleColor 2
1 void igPushStyleColorU32 (ImGuiCol,ImU32)
2 void igPushStyleColorVec4 (ImGuiCol,const ImVec4)
ImGuiWindow_GetIDNoKeepAlive 3
1 ImGuiID ImGuiWindow_GetIDNoKeepAliveStr (const char*,const char*)
2 ImGuiID ImGuiWindow_GetIDNoKeepAlivePtr (const void*)
3 ImGuiID ImGuiWindow_GetIDNoKeepAliveInt (int)
igTreeNodeExV 2
1 bool igTreeNodeExVStr (const char*,ImGuiTreeNodeFlags,const char*,va_list)
2 bool igTreeNodeExVPtr (const void*,ImGuiTreeNodeFlags,const char*,va_list)
ImVec2ih_ImVec2ih 3
1 nil ImVec2ih_ImVec2ihNil ()
2 nil ImVec2ih_ImVec2ihshort (short,short)
3 explicit ImVec2ih_ImVec2ihVec2 (const ImVec2)
ImGuiStyleMod_ImGuiStyleMod 3
1 nil ImGuiStyleMod_ImGuiStyleModInt (ImGuiStyleVar,int)
2 nil ImGuiStyleMod_ImGuiStyleModFloat (ImGuiStyleVar,float)
3 nil ImGuiStyleMod_ImGuiStyleModVec2 (ImGuiStyleVar,ImVec2)
ImPool_Remove 2
1 void ImPool_RemoveTPtr (ImGuiID,const T*)
2 void ImPool_RemovePoolIdx (ImGuiID,ImPoolIdx)
ImRect_Expand 2
1 void ImRect_ExpandFloat (const float)
2 void ImRect_ExpandVec2 (const ImVec2)
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)
2 bool igListBoxFnBoolPtr (const char*,int*,bool(*)(void*,int,const char**),void*,int,int)
ImGuiPtrOrIndex_ImGuiPtrOrIndex 2
1 nil ImGuiPtrOrIndex_ImGuiPtrOrIndexPtr (void*)
2 nil ImGuiPtrOrIndex_ImGuiPtrOrIndexInt (int)
ImRect_ImRect 4
1 nil ImRect_ImRectNil ()
2 nil ImRect_ImRectVec2 (const ImVec2,const ImVec2)
3 nil ImRect_ImRectVec4 (const ImVec4)
4 nil ImRect_ImRectFloat (float,float,float,float)
igTreePush 2
1 void igTreePushStr (const char*)
2 void igTreePushPtr (const void*)
igGetColorU32 3
1 ImU32 igGetColorU32 (ImGuiCol,float)
2 ImU32 igGetColorU32Vec4 (const ImVec4)
3 ImU32 igGetColorU32U32 (ImU32)
ImColor_ImColor 5
1 nil ImColor_ImColor ()
2 nil ImColor_ImColorInt (int,int,int,int)
3 nil ImColor_ImColorU32 (ImU32)
4 nil ImColor_ImColorFloat (float,float,float,float)
5 nil ImColor_ImColorVec4 (const ImVec4)
ImVector_front 2
1 T* ImVector_front ()
2 const T* ImVector_front_const ()const
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)
igTreeNodeEx 3
1 bool igTreeNodeExStr (const char*,ImGuiTreeNodeFlags)
2 bool igTreeNodeExStrStr (const char*,ImGuiTreeNodeFlags,const char*,...)
3 bool igTreeNodeExPtr (const void*,ImGuiTreeNodeFlags,const char*,...)
igSelectable 2
1 bool igSelectable (const char*,bool,ImGuiSelectableFlags,const ImVec2)
2 bool igSelectableBoolPtr (const char*,bool*,ImGuiSelectableFlags,const ImVec2)
igGetColorU32 3
1 ImU32 igGetColorU32Col (ImGuiCol,float)
2 ImU32 igGetColorU32Vec4 (const ImVec4)
3 ImU32 igGetColorU32U32 (ImU32)
ImVector_find 2
1 T* ImVector_find (const T)
1 T* ImVector_findNil (const T)
2 const T* ImVector_find_const (const T)const
ImColor_ImColor 5
1 nil ImColor_ImColorNil ()
2 nil ImColor_ImColorInt (int,int,int,int)
3 nil ImColor_ImColorU32 (ImU32)
4 nil ImColor_ImColorFloat (float,float,float,float)
5 nil ImColor_ImColorVec4 (const ImVec4)
ImVector_begin 2
1 T* ImVector_beginNil ()
2 const T* ImVector_begin_const ()const
igCollapsingHeader 2
1 bool igCollapsingHeaderTreeNodeFlags (const char*,ImGuiTreeNodeFlags)
2 bool igCollapsingHeaderBoolPtr (const char*,bool*,ImGuiTreeNodeFlags)
igListBoxHeader 2
1 bool igListBoxHeaderVec2 (const char*,const ImVec2)
2 bool igListBoxHeaderInt (const char*,int,int)
igSelectable 2
1 bool igSelectableBool (const char*,bool,ImGuiSelectableFlags,const ImVec2)
2 bool igSelectableBoolPtr (const char*,bool*,ImGuiSelectableFlags,const ImVec2)
igMenuItem 2
1 bool igMenuItemBool (const char*,const char*,bool,bool)
2 bool igMenuItemBoolPtr (const char*,const char*,bool*,bool)
igSetWindowSize 2
1 void igSetWindowSizeVec2 (const ImVec2,ImGuiCond)
2 void igSetWindowSizeStr (const char*,const ImVec2,ImGuiCond)
igTreeNodeV 2
1 bool igTreeNodeVStr (const char*,const char*,va_list)
2 bool igTreeNodeVPtr (const void*,const char*,va_list)
93 overloaded
149 overloaded

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,19 @@
{
"ImBitVector": "struct ImBitVector",
"ImColor": "struct ImColor",
"ImDrawCallback": "void(*)(const ImDrawList* parent_list,const ImDrawCmd* cmd);",
"ImDrawChannel": "struct ImDrawChannel",
"ImDrawCmd": "struct ImDrawCmd",
"ImDrawCornerFlags": "int",
"ImDrawData": "struct ImDrawData",
"ImDrawDataBuilder": "struct ImDrawDataBuilder",
"ImDrawIdx": "unsigned short",
"ImDrawList": "struct ImDrawList",
"ImDrawListFlags": "int",
"ImDrawListSharedData": "struct ImDrawListSharedData",
"ImDrawListSplitter": "struct ImDrawListSplitter",
"ImDrawVert": "struct ImDrawVert",
"ImFileHandle": "FILE*",
"ImFont": "struct ImFont",
"ImFontAtlas": "struct ImFontAtlas",
"ImFontAtlasCustomRect": "struct ImFontAtlasCustomRect",
@@ -19,42 +22,84 @@
"ImFontGlyph": "struct ImFontGlyph",
"ImFontGlyphRangesBuilder": "struct ImFontGlyphRangesBuilder",
"ImGuiBackendFlags": "int",
"ImGuiButtonFlags": "int",
"ImGuiCol": "int",
"ImGuiColorEditFlags": "int",
"ImGuiColorMod": "struct ImGuiColorMod",
"ImGuiColumnData": "struct ImGuiColumnData",
"ImGuiColumns": "struct ImGuiColumns",
"ImGuiColumnsFlags": "int",
"ImGuiComboFlags": "int",
"ImGuiCond": "int",
"ImGuiConfigFlags": "int",
"ImGuiContext": "struct ImGuiContext",
"ImGuiDataType": "int",
"ImGuiDataTypeInfo": "struct ImGuiDataTypeInfo",
"ImGuiDataTypeTempStorage": "struct ImGuiDataTypeTempStorage",
"ImGuiDir": "int",
"ImGuiDragDropFlags": "int",
"ImGuiDragFlags": "int",
"ImGuiFocusedFlags": "int",
"ImGuiGroupData": "struct ImGuiGroupData",
"ImGuiHoveredFlags": "int",
"ImGuiID": "unsigned int",
"ImGuiIO": "struct ImGuiIO",
"ImGuiInputTextCallback": "int(*)(ImGuiInputTextCallbackData *data);",
"ImGuiInputTextCallbackData": "struct ImGuiInputTextCallbackData",
"ImGuiInputTextFlags": "int",
"ImGuiInputTextState": "struct ImGuiInputTextState",
"ImGuiItemFlags": "int",
"ImGuiItemHoveredDataBackup": "struct ImGuiItemHoveredDataBackup",
"ImGuiItemStatusFlags": "int",
"ImGuiKey": "int",
"ImGuiKeyModFlags": "int",
"ImGuiLayoutType": "int",
"ImGuiListClipper": "struct ImGuiListClipper",
"ImGuiMenuColumns": "struct ImGuiMenuColumns",
"ImGuiMouseButton": "int",
"ImGuiMouseCursor": "int",
"ImGuiNavDirSourceFlags": "int",
"ImGuiNavHighlightFlags": "int",
"ImGuiNavInput": "int",
"ImGuiNavMoveFlags": "int",
"ImGuiNavMoveResult": "struct ImGuiNavMoveResult",
"ImGuiNextItemData": "struct ImGuiNextItemData",
"ImGuiNextItemDataFlags": "int",
"ImGuiNextWindowData": "struct ImGuiNextWindowData",
"ImGuiNextWindowDataFlags": "int",
"ImGuiOnceUponAFrame": "struct ImGuiOnceUponAFrame",
"ImGuiPayload": "struct ImGuiPayload",
"ImGuiPopupData": "struct ImGuiPopupData",
"ImGuiPopupFlags": "int",
"ImGuiPtrOrIndex": "struct ImGuiPtrOrIndex",
"ImGuiSelectableFlags": "int",
"ImGuiSeparatorFlags": "int",
"ImGuiSettingsHandler": "struct ImGuiSettingsHandler",
"ImGuiShrinkWidthItem": "struct ImGuiShrinkWidthItem",
"ImGuiSizeCallback": "void(*)(ImGuiSizeCallbackData* data);",
"ImGuiSizeCallbackData": "struct ImGuiSizeCallbackData",
"ImGuiSliderFlags": "int",
"ImGuiStorage": "struct ImGuiStorage",
"ImGuiStoragePair": "struct ImGuiStoragePair",
"ImGuiStyle": "struct ImGuiStyle",
"ImGuiStyleMod": "struct ImGuiStyleMod",
"ImGuiStyleVar": "int",
"ImGuiTabBar": "struct ImGuiTabBar",
"ImGuiTabBarFlags": "int",
"ImGuiTabItem": "struct ImGuiTabItem",
"ImGuiTabItemFlags": "int",
"ImGuiTextBuffer": "struct ImGuiTextBuffer",
"ImGuiTextFilter": "struct ImGuiTextFilter",
"ImGuiTextFlags": "int",
"ImGuiTextRange": "struct ImGuiTextRange",
"ImGuiTooltipFlags": "int",
"ImGuiTreeNodeFlags": "int",
"ImGuiWindow": "struct ImGuiWindow",
"ImGuiWindowFlags": "int",
"ImGuiWindowSettings": "struct ImGuiWindowSettings",
"ImGuiWindowTempData": "struct ImGuiWindowTempData",
"ImPoolIdx": "int",
"ImRect": "struct ImRect",
"ImS16": "signed short",
"ImS32": "signed int",
"ImS64": "int64_t",
@@ -64,9 +109,13 @@
"ImU32": "unsigned int",
"ImU64": "uint64_t",
"ImU8": "unsigned char",
"ImVec1": "struct ImVec1",
"ImVec2": "struct ImVec2",
"ImVec2ih": "struct ImVec2ih",
"ImVec4": "struct ImVec4",
"ImWchar": "unsigned short",
"ImWchar": "ImWchar16",
"ImWchar16": "unsigned short",
"ImWchar32": "unsigned int",
"const_iterator": "const value_type*",
"iterator": "value_type*",
"value_type": "T"

View File

@@ -1,16 +1,19 @@
local defs = {}
defs["ImBitVector"] = "struct ImBitVector"
defs["ImColor"] = "struct ImColor"
defs["ImDrawCallback"] = "void(*)(const ImDrawList* parent_list,const ImDrawCmd* cmd);"
defs["ImDrawChannel"] = "struct ImDrawChannel"
defs["ImDrawCmd"] = "struct ImDrawCmd"
defs["ImDrawCornerFlags"] = "int"
defs["ImDrawData"] = "struct ImDrawData"
defs["ImDrawDataBuilder"] = "struct ImDrawDataBuilder"
defs["ImDrawIdx"] = "unsigned short"
defs["ImDrawList"] = "struct ImDrawList"
defs["ImDrawListFlags"] = "int"
defs["ImDrawListSharedData"] = "struct ImDrawListSharedData"
defs["ImDrawListSplitter"] = "struct ImDrawListSplitter"
defs["ImDrawVert"] = "struct ImDrawVert"
defs["ImFileHandle"] = "FILE*"
defs["ImFont"] = "struct ImFont"
defs["ImFontAtlas"] = "struct ImFontAtlas"
defs["ImFontAtlasCustomRect"] = "struct ImFontAtlasCustomRect"
@@ -19,42 +22,84 @@ defs["ImFontConfig"] = "struct ImFontConfig"
defs["ImFontGlyph"] = "struct ImFontGlyph"
defs["ImFontGlyphRangesBuilder"] = "struct ImFontGlyphRangesBuilder"
defs["ImGuiBackendFlags"] = "int"
defs["ImGuiButtonFlags"] = "int"
defs["ImGuiCol"] = "int"
defs["ImGuiColorEditFlags"] = "int"
defs["ImGuiColorMod"] = "struct ImGuiColorMod"
defs["ImGuiColumnData"] = "struct ImGuiColumnData"
defs["ImGuiColumns"] = "struct ImGuiColumns"
defs["ImGuiColumnsFlags"] = "int"
defs["ImGuiComboFlags"] = "int"
defs["ImGuiCond"] = "int"
defs["ImGuiConfigFlags"] = "int"
defs["ImGuiContext"] = "struct ImGuiContext"
defs["ImGuiDataType"] = "int"
defs["ImGuiDataTypeInfo"] = "struct ImGuiDataTypeInfo"
defs["ImGuiDataTypeTempStorage"] = "struct ImGuiDataTypeTempStorage"
defs["ImGuiDir"] = "int"
defs["ImGuiDragDropFlags"] = "int"
defs["ImGuiDragFlags"] = "int"
defs["ImGuiFocusedFlags"] = "int"
defs["ImGuiGroupData"] = "struct ImGuiGroupData"
defs["ImGuiHoveredFlags"] = "int"
defs["ImGuiID"] = "unsigned int"
defs["ImGuiIO"] = "struct ImGuiIO"
defs["ImGuiInputTextCallback"] = "int(*)(ImGuiInputTextCallbackData *data);"
defs["ImGuiInputTextCallbackData"] = "struct ImGuiInputTextCallbackData"
defs["ImGuiInputTextFlags"] = "int"
defs["ImGuiInputTextState"] = "struct ImGuiInputTextState"
defs["ImGuiItemFlags"] = "int"
defs["ImGuiItemHoveredDataBackup"] = "struct ImGuiItemHoveredDataBackup"
defs["ImGuiItemStatusFlags"] = "int"
defs["ImGuiKey"] = "int"
defs["ImGuiKeyModFlags"] = "int"
defs["ImGuiLayoutType"] = "int"
defs["ImGuiListClipper"] = "struct ImGuiListClipper"
defs["ImGuiMenuColumns"] = "struct ImGuiMenuColumns"
defs["ImGuiMouseButton"] = "int"
defs["ImGuiMouseCursor"] = "int"
defs["ImGuiNavDirSourceFlags"] = "int"
defs["ImGuiNavHighlightFlags"] = "int"
defs["ImGuiNavInput"] = "int"
defs["ImGuiNavMoveFlags"] = "int"
defs["ImGuiNavMoveResult"] = "struct ImGuiNavMoveResult"
defs["ImGuiNextItemData"] = "struct ImGuiNextItemData"
defs["ImGuiNextItemDataFlags"] = "int"
defs["ImGuiNextWindowData"] = "struct ImGuiNextWindowData"
defs["ImGuiNextWindowDataFlags"] = "int"
defs["ImGuiOnceUponAFrame"] = "struct ImGuiOnceUponAFrame"
defs["ImGuiPayload"] = "struct ImGuiPayload"
defs["ImGuiPopupData"] = "struct ImGuiPopupData"
defs["ImGuiPopupFlags"] = "int"
defs["ImGuiPtrOrIndex"] = "struct ImGuiPtrOrIndex"
defs["ImGuiSelectableFlags"] = "int"
defs["ImGuiSeparatorFlags"] = "int"
defs["ImGuiSettingsHandler"] = "struct ImGuiSettingsHandler"
defs["ImGuiShrinkWidthItem"] = "struct ImGuiShrinkWidthItem"
defs["ImGuiSizeCallback"] = "void(*)(ImGuiSizeCallbackData* data);"
defs["ImGuiSizeCallbackData"] = "struct ImGuiSizeCallbackData"
defs["ImGuiSliderFlags"] = "int"
defs["ImGuiStorage"] = "struct ImGuiStorage"
defs["ImGuiStoragePair"] = "struct ImGuiStoragePair"
defs["ImGuiStyle"] = "struct ImGuiStyle"
defs["ImGuiStyleMod"] = "struct ImGuiStyleMod"
defs["ImGuiStyleVar"] = "int"
defs["ImGuiTabBar"] = "struct ImGuiTabBar"
defs["ImGuiTabBarFlags"] = "int"
defs["ImGuiTabItem"] = "struct ImGuiTabItem"
defs["ImGuiTabItemFlags"] = "int"
defs["ImGuiTextBuffer"] = "struct ImGuiTextBuffer"
defs["ImGuiTextFilter"] = "struct ImGuiTextFilter"
defs["ImGuiTextFlags"] = "int"
defs["ImGuiTextRange"] = "struct ImGuiTextRange"
defs["ImGuiTooltipFlags"] = "int"
defs["ImGuiTreeNodeFlags"] = "int"
defs["ImGuiWindow"] = "struct ImGuiWindow"
defs["ImGuiWindowFlags"] = "int"
defs["ImGuiWindowSettings"] = "struct ImGuiWindowSettings"
defs["ImGuiWindowTempData"] = "struct ImGuiWindowTempData"
defs["ImPoolIdx"] = "int"
defs["ImRect"] = "struct ImRect"
defs["ImS16"] = "signed short"
defs["ImS32"] = "signed int"
defs["ImS64"] = "int64_t"
@@ -64,9 +109,13 @@ defs["ImU16"] = "unsigned short"
defs["ImU32"] = "unsigned int"
defs["ImU64"] = "uint64_t"
defs["ImU8"] = "unsigned char"
defs["ImVec1"] = "struct ImVec1"
defs["ImVec2"] = "struct ImVec2"
defs["ImVec2ih"] = "struct ImVec2ih"
defs["ImVec4"] = "struct ImVec4"
defs["ImWchar"] = "unsigned short"
defs["ImWchar"] = "ImWchar16"
defs["ImWchar16"] = "unsigned short"
defs["ImWchar32"] = "unsigned int"
defs["const_iterator"] = "const value_type*"
defs["iterator"] = "value_type*"
defs["value_type"] = "T"

2
imgui

Submodule imgui updated: f0f5301612...9418dcb693