Files
cimgui/README.md
2018-09-05 13:45:16 +02:00

3.4 KiB

cimgui Build Status

Please post issues in https://github.com/Extrawurst/cimgui

sample

This is a thin c-api wrapper programmatically generated for the excellent C++ intermediate gui imgui. All functions are programmatically wrapped except contructors, destructors and ImVector.(Unless someone find a use case for them) Generated files are: cimgui.cpp, cimgui.h for C compilation. Also for helping in bindings creation, definitions.lua with function definitions information and structs_and_enums.lua. This library is intended as a intermediate layer to be able to use imgui from other languages that can interface with C (like D - see D-binding)

Notes:

compilation

  • clone
  • make using makefile on linux/osx/mingw (Or use CMake to generate project)

auto binding generation

usage

  • use whatever method is in ImGui c++ namespace in the original 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 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. (or second argument if it is a struct function)
  • 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)

example bindings based on cimgui