Merge pull request #457 from dbr/imgui-v1.81

This commit is contained in:
Thom Chiovoloni 2021-03-06 15:49:11 -08:00 committed by GitHub
commit d0e2be1678
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 2167 additions and 1663 deletions

View File

@ -12,6 +12,9 @@
- BREAKING: `PopupModal`'s `new` was reworked so that it didn't take `Ui` until `build` was called. This is a breaking change if you were invoking it directly. Simply move your `ui` call to `build` or `begin`.
- Upgrade to [Dear ImGui v1.81](https://github.com/ocornut/imgui/releases/tag/v1.81)
- `imgui::ListBox::calculate_size(items_count: ..., height_in_items: ...)` has been removed as the function backing it has been marked as obsolete. The recommended approach is to calculate the size yourself and use `.size(...)` (or use the default auto-calculated size)
## [0.7.0] - 2021-02-04
- Upgrade to [Dear ImGui v1.80](https://github.com/ocornut/imgui/releases/tag/v1.80). (Note that the new table functionality is not yet supported, however)

89
docs/upgrading-imgui.md Normal file
View File

@ -0,0 +1,89 @@
# Updating to new imgui versions
This document covers how to upgrade imgui-rs to a new version of the upstream C++ library.
The process is much the same to build imgui-rs for a tagged release (as shown) as it is for any arbitrary revision (such as one on a different branch)
## Step by step
1. Ensure the submodules are populated (`git submodule init` and `git submodule update --recursive`)
2. Check out the desired version of the `imgui-sys/third-party/imgui/` submodule
$ pwd
.../imgui-sys/third-party/imgui
$ git checkout v1.81
Previous HEAD position was 58075c44 Version 1.80
HEAD is now at 4df57136 Version 1.81
3. Ensure `luajit` is installed, as this is required by cimgui's generator.
$ luajit --help
4. Check out the `cimgui` project somewhere, as we use use the generator within this
$ git clone --recursive https://github.com/cimgui/cimgui.git /tmp/cimgui
5. Ensure the `imgui` submodule within `cimgui` is pointing to the same revision as in `imgui-rs`
$ cd /tmp/cimgui/imgui
$ git checkout v1.81
HEAD is now at 4df57136 Version 1.81
6. Back in `imgui-rs/imgui-sys/third-party/` - run the `update-cimgui-output.sh` helper script to execute cimgui's generator
$ pwd
.../imgui-sys/third-party
$ ./update-cimgui-output.sh /tmp/cimgui/
[...]
copyfile ./output/cimgui.h ../cimgui.h
copyfile ./output/cimgui.cpp ../cimgui.cpp
all done!!
This updates various files in the imgui-sys folder like `cimgui.cpp`, `definitions.json` and so on
With this step, we now have new C bindings to the desired verison of Dear ImGui.
7. Back in the root of the imgui-rs repo, run `cargo xtask bindgen`
$ cargo xtask bindgen
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `target/debug/xtask bindgen`
Executing bindgen [output = .../imgui-rs/imgui-sys/src/bindings.rs]
Success [output = .../imgui-rs/imgui-sys/src/bindings.rs]
Executing bindgen [output = .../imgui-rs/imgui-sys/src/wasm_bindings.rs]
Success [output = .../imgui-rs/imgui-sys/src/wasm_bindings.rs]
This requires bindgen to be installed (`cargo install bindgen` should do it)
This step generates `imgui-sys/src/bindings.rs` which is used by `imgui/src/*`
8. Run `cargo build` and fix any errors from upstream.
9. Run the tests with `cargo test`.
10. Try running one of the examples
cargo run --example test_window_impl
## Common sources of problems
### Function changes
Check the upstream imgui release notes for the new versions, as they detail any breaking changes.
If functions have been renamed, the required changes to the bindings are usually simple.
If functions have been removed, the changes are usually also simple but the implications may require some thought. Note by default `cimgui` generator will exclude any obsolete API.
If new function overloads are added - for example `imgui::Thing()` existed but `imgui::Thing(float)` was added - `bindings.rs` will previously have contained only `igThing`, but will now contain `igThingNil()` and `igThingFloat(...)`
### Memory layout changes
It is common for upstream to add/remove/reorder fields, so the bindings will compile but the memory layout will not match - which will (hopefully) result in the bindings causing a segfault. These are not tagged as breaking changes in the release notes.
The `*_memory_layout` tests when running `cargo test` should catch these (if they are created for every relevant struct!)
The fix for this is usually to compare the struct in (read-only) `imgui-sys/src/bindings.rs` compared to the relevant struct in `imgui/src/...` - the ordering and data-types must match, but the names do not (structs in `imgui/src/...` should use conventional Rust naming/casing)

View File

@ -515,7 +515,7 @@ fn show_test_window(ui: &Ui, state: &mut State, opened: &mut bool) {
im_str!("Tilefish"),
];
ListBox::new(im_str!("selectables list")).calculate_size(8, 4).build(ui, || {
ListBox::new(im_str!("selectables list")).build(ui, || {
for (index, name) in names.iter().enumerate() {
let selected = matches!(state.selected_fish2, Some(i) if i == index );
if Selectable::new(name).selected(selected).build(ui) {

10
imgui-sys/README.markdown Normal file
View File

@ -0,0 +1,10 @@
# imgui-sys: Low level bindings
This crate contains the raw FFI bindings to the Dear ImGui C++
library, by using the [cimgui](https://github.com/cimgui/cimgui) (a C
API wrapper project for Dear ImGui), then creating Rust bindings using
[bindgen](https://github.com/rust-lang/rust-bindgen).
These low level, mostly `unsafe` bindings are then used by `imgui-rs`
which wraps them in a nice to use, mostly safe API. Therefore most
users should not need to interact with this crate directly.

View File

@ -90,6 +90,11 @@ pub struct ImGuiContext {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ImFontBuilderIO {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ImDrawListSharedData {
_unused: [u8; 0],
}
@ -125,6 +130,7 @@ pub type ImGuiTableFlags = cty::c_int;
pub type ImGuiTableColumnFlags = cty::c_int;
pub type ImGuiTableRowFlags = cty::c_int;
pub type ImGuiTreeNodeFlags = cty::c_int;
pub type ImGuiViewportFlags = cty::c_int;
pub type ImGuiWindowFlags = cty::c_int;
pub type ImTextureID = *mut cty::c_void;
pub type ImGuiID = cty::c_uint;
@ -1293,10 +1299,10 @@ impl Default for ImDrawList {
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct ImDrawData {
pub Valid: bool,
pub CmdLists: *mut *mut ImDrawList,
pub CmdListsCount: cty::c_int,
pub TotalIdxCount: cty::c_int,
pub TotalVtxCount: cty::c_int,
pub CmdLists: *mut *mut ImDrawList,
pub DisplayPos: ImVec2,
pub DisplaySize: ImVec2,
pub FramebufferScale: ImVec2,
@ -1323,7 +1329,7 @@ pub struct ImFontConfig {
pub GlyphMinAdvanceX: f32,
pub GlyphMaxAdvanceX: f32,
pub MergeMode: bool,
pub RasterizerFlags: cty::c_uint,
pub FontBuilderFlags: cty::c_uint,
pub RasterizerMultiply: f32,
pub EllipsisChar: ImWchar,
pub Name: [cty::c_char; 40usize],
@ -1336,7 +1342,7 @@ impl Default for ImFontConfig {
}
impl ::core::fmt::Debug for ImFontConfig {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write ! (f , "ImFontConfig {{ FontData: {:?}, FontDataSize: {:?}, FontDataOwnedByAtlas: {:?}, FontNo: {:?}, SizePixels: {:?}, OversampleH: {:?}, OversampleV: {:?}, PixelSnapH: {:?}, GlyphExtraSpacing: {:?}, GlyphOffset: {:?}, GlyphRanges: {:?}, GlyphMinAdvanceX: {:?}, GlyphMaxAdvanceX: {:?}, MergeMode: {:?}, RasterizerFlags: {:?}, RasterizerMultiply: {:?}, EllipsisChar: {:?}, Name: [...], DstFont: {:?} }}" , self . FontData , self . FontDataSize , self . FontDataOwnedByAtlas , self . FontNo , self . SizePixels , self . OversampleH , self . OversampleV , self . PixelSnapH , self . GlyphExtraSpacing , self . GlyphOffset , self . GlyphRanges , self . GlyphMinAdvanceX , self . GlyphMaxAdvanceX , self . MergeMode , self . RasterizerFlags , self . RasterizerMultiply , self . EllipsisChar , self . DstFont)
write ! (f , "ImFontConfig {{ FontData: {:?}, FontDataSize: {:?}, FontDataOwnedByAtlas: {:?}, FontNo: {:?}, SizePixels: {:?}, OversampleH: {:?}, OversampleV: {:?}, PixelSnapH: {:?}, GlyphExtraSpacing: {:?}, GlyphOffset: {:?}, GlyphRanges: {:?}, GlyphMinAdvanceX: {:?}, GlyphMaxAdvanceX: {:?}, MergeMode: {:?}, FontBuilderFlags: {:?}, RasterizerMultiply: {:?}, EllipsisChar: {:?}, Name: [...], DstFont: {:?} }}" , self . FontData , self . FontDataSize , self . FontDataOwnedByAtlas , self . FontNo , self . SizePixels , self . OversampleH , self . OversampleV , self . PixelSnapH , self . GlyphExtraSpacing , self . GlyphOffset , self . GlyphRanges , self . GlyphMinAdvanceX , self . GlyphMaxAdvanceX , self . MergeMode , self . FontBuilderFlags , self . RasterizerMultiply , self . EllipsisChar , self . DstFont)
}
}
#[repr(C)]
@ -1355,42 +1361,58 @@ pub struct ImFontGlyph {
}
impl ImFontGlyph {
#[inline]
pub fn Codepoint(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 31u8) as u32) }
pub fn Colored(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_Codepoint(&mut self, val: cty::c_uint) {
pub fn set_Colored(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 31u8, val as u64)
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn Visible(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) }
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
}
#[inline]
pub fn set_Visible(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(31usize, 1u8, val as u64)
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn Codepoint(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) }
}
#[inline]
pub fn set_Codepoint(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(2usize, 30u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
Codepoint: cty::c_uint,
Colored: cty::c_uint,
Visible: cty::c_uint,
Codepoint: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 4usize], u32> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 31u8, {
let Codepoint: u32 = unsafe { ::core::mem::transmute(Codepoint) };
Codepoint as u64
__bindgen_bitfield_unit.set(0usize, 1u8, {
let Colored: u32 = unsafe { ::core::mem::transmute(Colored) };
Colored as u64
});
__bindgen_bitfield_unit.set(31usize, 1u8, {
__bindgen_bitfield_unit.set(1usize, 1u8, {
let Visible: u32 = unsafe { ::core::mem::transmute(Visible) };
Visible as u64
});
__bindgen_bitfield_unit.set(2usize, 30u8, {
let Codepoint: u32 = unsafe { ::core::mem::transmute(Codepoint) };
Codepoint as u64
});
__bindgen_bitfield_unit
}
}
@ -1444,6 +1466,8 @@ pub struct ImFontAtlas {
pub CustomRects: ImVector_ImFontAtlasCustomRect,
pub ConfigData: ImVector_ImFontConfig,
pub TexUvLines: [ImVec4; 64usize],
pub FontBuilderIO: *const ImFontBuilderIO,
pub FontBuilderFlags: cty::c_uint,
pub PackIdMouseCursors: cty::c_int,
pub PackIdLines: cty::c_int,
}
@ -1454,7 +1478,7 @@ impl Default for ImFontAtlas {
}
impl ::core::fmt::Debug for ImFontAtlas {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write ! (f , "ImFontAtlas {{ Locked: {:?}, Flags: {:?}, TexID: {:?}, TexDesiredWidth: {:?}, TexGlyphPadding: {:?}, TexPixelsAlpha8: {:?}, TexPixelsRGBA32: {:?}, TexWidth: {:?}, TexHeight: {:?}, TexUvScale: {:?}, TexUvWhitePixel: {:?}, Fonts: {:?}, CustomRects: {:?}, ConfigData: {:?}, TexUvLines: [...], PackIdMouseCursors: {:?}, PackIdLines: {:?} }}" , self . Locked , self . Flags , self . TexID , self . TexDesiredWidth , self . TexGlyphPadding , self . TexPixelsAlpha8 , self . TexPixelsRGBA32 , self . TexWidth , self . TexHeight , self . TexUvScale , self . TexUvWhitePixel , self . Fonts , self . CustomRects , self . ConfigData , self . PackIdMouseCursors , self . PackIdLines)
write ! (f , "ImFontAtlas {{ Locked: {:?}, Flags: {:?}, TexID: {:?}, TexDesiredWidth: {:?}, TexGlyphPadding: {:?}, TexPixelsAlpha8: {:?}, TexPixelsRGBA32: {:?}, TexWidth: {:?}, TexHeight: {:?}, TexUvScale: {:?}, TexUvWhitePixel: {:?}, Fonts: {:?}, CustomRects: {:?}, ConfigData: {:?}, TexUvLines: [...], FontBuilderIO: {:?}, FontBuilderFlags: {:?}, PackIdMouseCursors: {:?}, PackIdLines: {:?} }}" , self . Locked , self . Flags , self . TexID , self . TexDesiredWidth , self . TexGlyphPadding , self . TexPixelsAlpha8 , self . TexPixelsRGBA32 , self . TexWidth , self . TexHeight , self . TexUvScale , self . TexUvWhitePixel , self . Fonts , self . CustomRects , self . ConfigData , self . FontBuilderIO , self . FontBuilderFlags , self . PackIdMouseCursors , self . PackIdLines)
}
}
#[repr(C)]
@ -1483,6 +1507,20 @@ impl Default for ImFont {
unsafe { ::core::mem::zeroed() }
}
}
pub const ImGuiViewportFlags_None: ImGuiViewportFlags_ = 0;
pub const ImGuiViewportFlags_IsPlatformWindow: ImGuiViewportFlags_ = 1;
pub const ImGuiViewportFlags_IsPlatformMonitor: ImGuiViewportFlags_ = 2;
pub const ImGuiViewportFlags_OwnedByApp: ImGuiViewportFlags_ = 4;
pub type ImGuiViewportFlags_ = cty::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct ImGuiViewport {
pub Flags: ImGuiViewportFlags,
pub Pos: ImVec2,
pub Size: ImVec2,
pub WorkPos: ImVec2,
pub WorkSize: ImVec2,
}
extern "C" {
pub fn ImVec2_ImVec2Nil() -> *mut ImVec2;
}
@ -2542,6 +2580,12 @@ extern "C" {
size: ImVec2,
) -> bool;
}
extern "C" {
pub fn igBeginListBox(label: *const cty::c_char, size: ImVec2) -> bool;
}
extern "C" {
pub fn igEndListBox();
}
extern "C" {
pub fn igListBoxStr_arr(
label: *const cty::c_char,
@ -2567,19 +2611,6 @@ extern "C" {
height_in_items: cty::c_int,
) -> bool;
}
extern "C" {
pub fn igListBoxHeaderVec2(label: *const cty::c_char, size: ImVec2) -> bool;
}
extern "C" {
pub fn igListBoxHeaderInt(
label: *const cty::c_char,
items_count: cty::c_int,
height_in_items: cty::c_int,
) -> bool;
}
extern "C" {
pub fn igListBoxFooter();
}
extern "C" {
pub fn igPlotLinesFloatPtr(
label: *const cty::c_char,
@ -2950,6 +2981,9 @@ extern "C" {
extern "C" {
pub fn igSetItemAllowOverlap();
}
extern "C" {
pub fn igGetMainViewport() -> *mut ImGuiViewport;
}
extern "C" {
pub fn igIsRectVisibleNil(size: ImVec2) -> bool;
}
@ -4228,6 +4262,18 @@ extern "C" {
c_last: cty::c_uint,
) -> bool;
}
extern "C" {
pub fn ImGuiViewport_ImGuiViewport() -> *mut ImGuiViewport;
}
extern "C" {
pub fn ImGuiViewport_destroy(self_: *mut ImGuiViewport);
}
extern "C" {
pub fn ImGuiViewport_GetCenter(pOut: *mut ImVec2, self_: *mut ImGuiViewport);
}
extern "C" {
pub fn ImGuiViewport_GetWorkCenter(pOut: *mut ImVec2, self_: *mut ImGuiViewport);
}
extern "C" {
pub fn igLogText(fmt: *const cty::c_char, ...);
}

View File

@ -90,6 +90,11 @@ pub struct ImGuiContext {
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ImFontBuilderIO {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ImDrawListSharedData {
_unused: [u8; 0],
}
@ -125,6 +130,7 @@ pub type ImGuiTableFlags = cty::c_int;
pub type ImGuiTableColumnFlags = cty::c_int;
pub type ImGuiTableRowFlags = cty::c_int;
pub type ImGuiTreeNodeFlags = cty::c_int;
pub type ImGuiViewportFlags = cty::c_int;
pub type ImGuiWindowFlags = cty::c_int;
pub type ImTextureID = *mut cty::c_void;
pub type ImGuiID = cty::c_uint;
@ -1293,10 +1299,10 @@ impl Default for ImDrawList {
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct ImDrawData {
pub Valid: bool,
pub CmdLists: *mut *mut ImDrawList,
pub CmdListsCount: cty::c_int,
pub TotalIdxCount: cty::c_int,
pub TotalVtxCount: cty::c_int,
pub CmdLists: *mut *mut ImDrawList,
pub DisplayPos: ImVec2,
pub DisplaySize: ImVec2,
pub FramebufferScale: ImVec2,
@ -1323,7 +1329,7 @@ pub struct ImFontConfig {
pub GlyphMinAdvanceX: f32,
pub GlyphMaxAdvanceX: f32,
pub MergeMode: bool,
pub RasterizerFlags: cty::c_uint,
pub FontBuilderFlags: cty::c_uint,
pub RasterizerMultiply: f32,
pub EllipsisChar: ImWchar,
pub Name: [cty::c_char; 40usize],
@ -1336,7 +1342,7 @@ impl Default for ImFontConfig {
}
impl ::core::fmt::Debug for ImFontConfig {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write ! (f , "ImFontConfig {{ FontData: {:?}, FontDataSize: {:?}, FontDataOwnedByAtlas: {:?}, FontNo: {:?}, SizePixels: {:?}, OversampleH: {:?}, OversampleV: {:?}, PixelSnapH: {:?}, GlyphExtraSpacing: {:?}, GlyphOffset: {:?}, GlyphRanges: {:?}, GlyphMinAdvanceX: {:?}, GlyphMaxAdvanceX: {:?}, MergeMode: {:?}, RasterizerFlags: {:?}, RasterizerMultiply: {:?}, EllipsisChar: {:?}, Name: [...], DstFont: {:?} }}" , self . FontData , self . FontDataSize , self . FontDataOwnedByAtlas , self . FontNo , self . SizePixels , self . OversampleH , self . OversampleV , self . PixelSnapH , self . GlyphExtraSpacing , self . GlyphOffset , self . GlyphRanges , self . GlyphMinAdvanceX , self . GlyphMaxAdvanceX , self . MergeMode , self . RasterizerFlags , self . RasterizerMultiply , self . EllipsisChar , self . DstFont)
write ! (f , "ImFontConfig {{ FontData: {:?}, FontDataSize: {:?}, FontDataOwnedByAtlas: {:?}, FontNo: {:?}, SizePixels: {:?}, OversampleH: {:?}, OversampleV: {:?}, PixelSnapH: {:?}, GlyphExtraSpacing: {:?}, GlyphOffset: {:?}, GlyphRanges: {:?}, GlyphMinAdvanceX: {:?}, GlyphMaxAdvanceX: {:?}, MergeMode: {:?}, FontBuilderFlags: {:?}, RasterizerMultiply: {:?}, EllipsisChar: {:?}, Name: [...], DstFont: {:?} }}" , self . FontData , self . FontDataSize , self . FontDataOwnedByAtlas , self . FontNo , self . SizePixels , self . OversampleH , self . OversampleV , self . PixelSnapH , self . GlyphExtraSpacing , self . GlyphOffset , self . GlyphRanges , self . GlyphMinAdvanceX , self . GlyphMaxAdvanceX , self . MergeMode , self . FontBuilderFlags , self . RasterizerMultiply , self . EllipsisChar , self . DstFont)
}
}
#[repr(C)]
@ -1355,42 +1361,58 @@ pub struct ImFontGlyph {
}
impl ImFontGlyph {
#[inline]
pub fn Codepoint(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 31u8) as u32) }
pub fn Colored(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_Codepoint(&mut self, val: cty::c_uint) {
pub fn set_Colored(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 31u8, val as u64)
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn Visible(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) }
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
}
#[inline]
pub fn set_Visible(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(31usize, 1u8, val as u64)
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn Codepoint(&self) -> cty::c_uint {
unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) }
}
#[inline]
pub fn set_Codepoint(&mut self, val: cty::c_uint) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(2usize, 30u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
Codepoint: cty::c_uint,
Colored: cty::c_uint,
Visible: cty::c_uint,
Codepoint: cty::c_uint,
) -> __BindgenBitfieldUnit<[u8; 4usize], u32> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 31u8, {
let Codepoint: u32 = unsafe { ::core::mem::transmute(Codepoint) };
Codepoint as u64
__bindgen_bitfield_unit.set(0usize, 1u8, {
let Colored: u32 = unsafe { ::core::mem::transmute(Colored) };
Colored as u64
});
__bindgen_bitfield_unit.set(31usize, 1u8, {
__bindgen_bitfield_unit.set(1usize, 1u8, {
let Visible: u32 = unsafe { ::core::mem::transmute(Visible) };
Visible as u64
});
__bindgen_bitfield_unit.set(2usize, 30u8, {
let Codepoint: u32 = unsafe { ::core::mem::transmute(Codepoint) };
Codepoint as u64
});
__bindgen_bitfield_unit
}
}
@ -1444,6 +1466,8 @@ pub struct ImFontAtlas {
pub CustomRects: ImVector_ImFontAtlasCustomRect,
pub ConfigData: ImVector_ImFontConfig,
pub TexUvLines: [ImVec4; 64usize],
pub FontBuilderIO: *const ImFontBuilderIO,
pub FontBuilderFlags: cty::c_uint,
pub PackIdMouseCursors: cty::c_int,
pub PackIdLines: cty::c_int,
}
@ -1454,7 +1478,7 @@ impl Default for ImFontAtlas {
}
impl ::core::fmt::Debug for ImFontAtlas {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
write ! (f , "ImFontAtlas {{ Locked: {:?}, Flags: {:?}, TexID: {:?}, TexDesiredWidth: {:?}, TexGlyphPadding: {:?}, TexPixelsAlpha8: {:?}, TexPixelsRGBA32: {:?}, TexWidth: {:?}, TexHeight: {:?}, TexUvScale: {:?}, TexUvWhitePixel: {:?}, Fonts: {:?}, CustomRects: {:?}, ConfigData: {:?}, TexUvLines: [...], PackIdMouseCursors: {:?}, PackIdLines: {:?} }}" , self . Locked , self . Flags , self . TexID , self . TexDesiredWidth , self . TexGlyphPadding , self . TexPixelsAlpha8 , self . TexPixelsRGBA32 , self . TexWidth , self . TexHeight , self . TexUvScale , self . TexUvWhitePixel , self . Fonts , self . CustomRects , self . ConfigData , self . PackIdMouseCursors , self . PackIdLines)
write ! (f , "ImFontAtlas {{ Locked: {:?}, Flags: {:?}, TexID: {:?}, TexDesiredWidth: {:?}, TexGlyphPadding: {:?}, TexPixelsAlpha8: {:?}, TexPixelsRGBA32: {:?}, TexWidth: {:?}, TexHeight: {:?}, TexUvScale: {:?}, TexUvWhitePixel: {:?}, Fonts: {:?}, CustomRects: {:?}, ConfigData: {:?}, TexUvLines: [...], FontBuilderIO: {:?}, FontBuilderFlags: {:?}, PackIdMouseCursors: {:?}, PackIdLines: {:?} }}" , self . Locked , self . Flags , self . TexID , self . TexDesiredWidth , self . TexGlyphPadding , self . TexPixelsAlpha8 , self . TexPixelsRGBA32 , self . TexWidth , self . TexHeight , self . TexUvScale , self . TexUvWhitePixel , self . Fonts , self . CustomRects , self . ConfigData , self . FontBuilderIO , self . FontBuilderFlags , self . PackIdMouseCursors , self . PackIdLines)
}
}
#[repr(C)]
@ -1483,6 +1507,20 @@ impl Default for ImFont {
unsafe { ::core::mem::zeroed() }
}
}
pub const ImGuiViewportFlags_None: ImGuiViewportFlags_ = 0;
pub const ImGuiViewportFlags_IsPlatformWindow: ImGuiViewportFlags_ = 1;
pub const ImGuiViewportFlags_IsPlatformMonitor: ImGuiViewportFlags_ = 2;
pub const ImGuiViewportFlags_OwnedByApp: ImGuiViewportFlags_ = 4;
pub type ImGuiViewportFlags_ = cty::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
pub struct ImGuiViewport {
pub Flags: ImGuiViewportFlags,
pub Pos: ImVec2,
pub Size: ImVec2,
pub WorkPos: ImVec2,
pub WorkSize: ImVec2,
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn ImVec2_ImVec2Nil() -> *mut ImVec2;
@ -2757,6 +2795,14 @@ extern "C" {
) -> bool;
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igBeginListBox(label: *const cty::c_char, size: ImVec2) -> bool;
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igEndListBox();
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igListBoxStr_arr(
label: *const cty::c_char,
@ -2784,22 +2830,6 @@ extern "C" {
) -> bool;
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igListBoxHeaderVec2(label: *const cty::c_char, size: ImVec2) -> bool;
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igListBoxHeaderInt(
label: *const cty::c_char,
items_count: cty::c_int,
height_in_items: cty::c_int,
) -> bool;
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igListBoxFooter();
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igPlotLinesFloatPtr(
label: *const cty::c_char,
@ -3262,6 +3292,10 @@ extern "C" {
pub fn igSetItemAllowOverlap();
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igGetMainViewport() -> *mut ImGuiViewport;
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igIsRectVisibleNil(size: ImVec2) -> bool;
}
@ -4808,6 +4842,22 @@ extern "C" {
) -> bool;
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn ImGuiViewport_ImGuiViewport() -> *mut ImGuiViewport;
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn ImGuiViewport_destroy(self_: *mut ImGuiViewport);
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn ImGuiViewport_GetCenter(pOut: *mut ImVec2, self_: *mut ImGuiViewport);
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn ImGuiViewport_GetWorkCenter(pOut: *mut ImVec2, self_: *mut ImGuiViewport);
}
#[link(wasm_import_module = "imgui-sys-v0")]
extern "C" {
pub fn igLogText(fmt: *const cty::c_char, ...);
}

View File

@ -1,5 +1,5 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.80" from Dear ImGui https://github.com/ocornut/imgui
//based on imgui.h file version "1.81" from Dear ImGui https://github.com/ocornut/imgui
#include "./imgui/imgui.h"
#ifdef CIMGUI_FREETYPE
@ -940,6 +940,14 @@ CIMGUI_API bool igSelectableBoolPtr(const char* label,bool* p_selected,ImGuiSele
{
return ImGui::Selectable(label,p_selected,flags,size);
}
CIMGUI_API bool igBeginListBox(const char* label,const ImVec2 size)
{
return ImGui::BeginListBox(label,size);
}
CIMGUI_API void igEndListBox()
{
return ImGui::EndListBox();
}
CIMGUI_API bool igListBoxStr_arr(const char* label,int* current_item,const char* const items[],int items_count,int height_in_items)
{
return ImGui::ListBox(label,current_item,items,items_count,height_in_items);
@ -948,18 +956,6 @@ CIMGUI_API bool igListBoxFnBoolPtr(const char* label,int* current_item,bool(*ite
{
return ImGui::ListBox(label,current_item,items_getter,data,items_count,height_in_items);
}
CIMGUI_API bool igListBoxHeaderVec2(const char* label,const ImVec2 size)
{
return ImGui::ListBoxHeader(label,size);
}
CIMGUI_API bool igListBoxHeaderInt(const char* label,int items_count,int height_in_items)
{
return ImGui::ListBoxHeader(label,items_count,height_in_items);
}
CIMGUI_API void igListBoxFooter()
{
return ImGui::ListBoxFooter();
}
CIMGUI_API void igPlotLinesFloatPtr(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride)
{
return ImGui::PlotLines(label,values,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size,stride);
@ -1335,6 +1331,10 @@ CIMGUI_API void igSetItemAllowOverlap()
{
return ImGui::SetItemAllowOverlap();
}
CIMGUI_API ImGuiViewport* igGetMainViewport()
{
return ImGui::GetMainViewport();
}
CIMGUI_API bool igIsRectVisibleNil(const ImVec2 size)
{
return ImGui::IsRectVisible(size);
@ -2411,6 +2411,22 @@ CIMGUI_API bool ImFont_IsGlyphRangeUnused(ImFont* self,unsigned int c_begin,unsi
{
return self->IsGlyphRangeUnused(c_begin,c_last);
}
CIMGUI_API ImGuiViewport* ImGuiViewport_ImGuiViewport(void)
{
return IM_NEW(ImGuiViewport)();
}
CIMGUI_API void ImGuiViewport_destroy(ImGuiViewport* self)
{
IM_DELETE(self);
}
CIMGUI_API void ImGuiViewport_GetCenter(ImVec2 *pOut,ImGuiViewport* self)
{
*pOut = self->GetCenter();
}
CIMGUI_API void ImGuiViewport_GetWorkCenter(ImVec2 *pOut,ImGuiViewport* self)
{
*pOut = self->GetWorkCenter();
}

View File

@ -1,5 +1,5 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.80" from Dear ImGui https://github.com/ocornut/imgui
//based on imgui.h file version "1.81" from Dear ImGui https://github.com/ocornut/imgui
#ifndef CIMGUI_INCLUDED
#define CIMGUI_INCLUDED
#include <stdio.h>
@ -47,6 +47,7 @@ typedef struct ImGuiStoragePair ImGuiStoragePair;
typedef struct ImGuiTextRange ImGuiTextRange;
typedef struct ImVec4 ImVec4;
typedef struct ImVec2 ImVec2;
typedef struct ImGuiViewport ImGuiViewport;
typedef struct ImGuiTextFilter ImGuiTextFilter;
typedef struct ImGuiTextBuffer ImGuiTextBuffer;
typedef struct ImGuiTableColumnSortSpecs ImGuiTableColumnSortSpecs;
@ -64,6 +65,7 @@ typedef struct ImColor ImColor;
typedef struct ImFontGlyphRangesBuilder ImFontGlyphRangesBuilder;
typedef struct ImFontGlyph ImFontGlyph;
typedef struct ImFontConfig ImFontConfig;
typedef struct ImFontBuilderIO ImFontBuilderIO;
typedef struct ImFontAtlas ImFontAtlas;
typedef struct ImFont ImFont;
typedef struct ImDrawVert ImDrawVert;
@ -83,6 +85,7 @@ struct ImDrawListSplitter;
struct ImDrawVert;
struct ImFont;
struct ImFontAtlas;
struct ImFontBuilderIO;
struct ImFontConfig;
struct ImFontGlyph;
struct ImFontGlyphRangesBuilder;
@ -100,6 +103,7 @@ struct ImGuiTableSortSpecs;
struct ImGuiTableColumnSortSpecs;
struct ImGuiTextBuffer;
struct ImGuiTextFilter;
struct ImGuiViewport;
typedef int ImGuiCol;
typedef int ImGuiCond;
typedef int ImGuiDataType;
@ -133,6 +137,7 @@ typedef int ImGuiTableFlags;
typedef int ImGuiTableColumnFlags;
typedef int ImGuiTableRowFlags;
typedef int ImGuiTreeNodeFlags;
typedef int ImGuiViewportFlags;
typedef int ImGuiWindowFlags;
typedef void* ImTextureID;
typedef unsigned int ImGuiID;
@ -960,10 +965,10 @@ struct ImDrawList
struct ImDrawData
{
bool Valid;
ImDrawList** CmdLists;
int CmdListsCount;
int TotalIdxCount;
int TotalVtxCount;
ImDrawList** CmdLists;
ImVec2 DisplayPos;
ImVec2 DisplaySize;
ImVec2 FramebufferScale;
@ -984,7 +989,7 @@ struct ImFontConfig
float GlyphMinAdvanceX;
float GlyphMaxAdvanceX;
bool MergeMode;
unsigned int RasterizerFlags;
unsigned int FontBuilderFlags;
float RasterizerMultiply;
ImWchar EllipsisChar;
char Name[40];
@ -992,8 +997,9 @@ struct ImFontConfig
};
struct ImFontGlyph
{
unsigned int Codepoint : 31;
unsigned int Colored : 1;
unsigned int Visible : 1;
unsigned int Codepoint : 30;
float AdvanceX;
float X0, Y0, X1, Y1;
float U0, V0, U1, V1;
@ -1034,6 +1040,8 @@ struct ImFontAtlas
ImVector_ImFontAtlasCustomRect CustomRects;
ImVector_ImFontConfig ConfigData;
ImVec4 TexUvLines[(63) + 1];
const ImFontBuilderIO* FontBuilderIO;
unsigned int FontBuilderFlags;
int PackIdMouseCursors;
int PackIdLines;
};
@ -1056,6 +1064,20 @@ struct ImFont
int MetricsTotalSurface;
ImU8 Used4kPagesMap[(0xFFFF +1)/4096/8];
};
typedef enum {
ImGuiViewportFlags_None = 0,
ImGuiViewportFlags_IsPlatformWindow = 1 << 0,
ImGuiViewportFlags_IsPlatformMonitor = 1 << 1,
ImGuiViewportFlags_OwnedByApp = 1 << 2
}ImGuiViewportFlags_;
struct ImGuiViewport
{
ImGuiViewportFlags Flags;
ImVec2 Pos;
ImVec2 Size;
ImVec2 WorkPos;
ImVec2 WorkSize;
};
#else
struct GLFWwindow;
struct SDL_Window;
@ -1307,11 +1329,10 @@ CIMGUI_API bool igCollapsingHeaderBoolPtr(const char* label,bool* p_visible,ImGu
CIMGUI_API void igSetNextItemOpen(bool is_open,ImGuiCond cond);
CIMGUI_API bool igSelectableBool(const char* label,bool selected,ImGuiSelectableFlags flags,const ImVec2 size);
CIMGUI_API bool igSelectableBoolPtr(const char* label,bool* p_selected,ImGuiSelectableFlags flags,const ImVec2 size);
CIMGUI_API bool igBeginListBox(const char* label,const ImVec2 size);
CIMGUI_API void igEndListBox(void);
CIMGUI_API bool igListBoxStr_arr(const char* label,int* current_item,const char* const items[],int items_count,int height_in_items);
CIMGUI_API bool igListBoxFnBoolPtr(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int height_in_items);
CIMGUI_API bool igListBoxHeaderVec2(const char* label,const ImVec2 size);
CIMGUI_API bool igListBoxHeaderInt(const char* label,int items_count,int height_in_items);
CIMGUI_API void igListBoxFooter(void);
CIMGUI_API void igPlotLinesFloatPtr(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride);
CIMGUI_API void igPlotLinesFnFloatPtr(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size);
CIMGUI_API void igPlotHistogramFloatPtr(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride);
@ -1405,6 +1426,7 @@ CIMGUI_API void igGetItemRectMin(ImVec2 *pOut);
CIMGUI_API void igGetItemRectMax(ImVec2 *pOut);
CIMGUI_API void igGetItemRectSize(ImVec2 *pOut);
CIMGUI_API void igSetItemAllowOverlap(void);
CIMGUI_API ImGuiViewport* igGetMainViewport(void);
CIMGUI_API bool igIsRectVisibleNil(const ImVec2 size);
CIMGUI_API bool igIsRectVisibleVec2(const ImVec2 rect_min,const ImVec2 rect_max);
CIMGUI_API double igGetTime(void);
@ -1674,6 +1696,10 @@ CIMGUI_API void ImFont_AddRemapChar(ImFont* self,ImWchar dst,ImWchar src,bool ov
CIMGUI_API void ImFont_SetGlyphVisible(ImFont* self,ImWchar c,bool visible);
CIMGUI_API void ImFont_SetFallbackChar(ImFont* self,ImWchar c);
CIMGUI_API bool ImFont_IsGlyphRangeUnused(ImFont* self,unsigned int c_begin,unsigned int c_last);
CIMGUI_API ImGuiViewport* ImGuiViewport_ImGuiViewport(void);
CIMGUI_API void ImGuiViewport_destroy(ImGuiViewport* self);
CIMGUI_API void ImGuiViewport_GetCenter(ImVec2 *pOut,ImGuiViewport* self);
CIMGUI_API void ImGuiViewport_GetWorkCenter(ImVec2 *pOut,ImGuiViewport* self);
/////////////////////////hand written functions

View File

@ -6,6 +6,7 @@ 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 bool ImGui_ImplGlfw_InitForOther(GLFWwindow* window,bool install_callbacks);
CIMGUI_API void ImGui_ImplGlfw_Shutdown();
CIMGUI_API void ImGui_ImplGlfw_NewFrame();
CIMGUI_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window,int button,int action,int mods);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1 +1 @@
Subproject commit 58075c4414b985b352d10718b02a8c43f25efd7c
Subproject commit 4df57136e9832327c11e48b5bfe00b0326bd5b63

View File

@ -17,7 +17,7 @@
"cimguiname": "ImGui_ImplGlfw_CharCallback",
"defaults": {},
"funcname": "ImGui_ImplGlfw_CharCallback",
"location": "imgui_impl_glfw:35",
"location": "imgui_impl_glfw:36",
"ov_cimguiname": "ImGui_ImplGlfw_CharCallback",
"ret": "void",
"signature": "(GLFWwindow*,unsigned int)",
@ -49,6 +49,31 @@
"stname": ""
}
],
"ImGui_ImplGlfw_InitForOther": [
{
"args": "(GLFWwindow* window,bool install_callbacks)",
"argsT": [
{
"name": "window",
"type": "GLFWwindow*"
},
{
"name": "install_callbacks",
"type": "bool"
}
],
"argsoriginal": "(GLFWwindow* window,bool install_callbacks)",
"call_args": "(window,install_callbacks)",
"cimguiname": "ImGui_ImplGlfw_InitForOther",
"defaults": {},
"funcname": "ImGui_ImplGlfw_InitForOther",
"location": "imgui_impl_glfw:26",
"ov_cimguiname": "ImGui_ImplGlfw_InitForOther",
"ret": "bool",
"signature": "(GLFWwindow*,bool)",
"stname": ""
}
],
"ImGui_ImplGlfw_InitForVulkan": [
{
"args": "(GLFWwindow* window,bool install_callbacks)",
@ -104,7 +129,7 @@
"cimguiname": "ImGui_ImplGlfw_KeyCallback",
"defaults": {},
"funcname": "ImGui_ImplGlfw_KeyCallback",
"location": "imgui_impl_glfw:34",
"location": "imgui_impl_glfw:35",
"ov_cimguiname": "ImGui_ImplGlfw_KeyCallback",
"ret": "void",
"signature": "(GLFWwindow*,int,int,int,int)",
@ -137,7 +162,7 @@
"cimguiname": "ImGui_ImplGlfw_MouseButtonCallback",
"defaults": {},
"funcname": "ImGui_ImplGlfw_MouseButtonCallback",
"location": "imgui_impl_glfw:32",
"location": "imgui_impl_glfw:33",
"ov_cimguiname": "ImGui_ImplGlfw_MouseButtonCallback",
"ret": "void",
"signature": "(GLFWwindow*,int,int,int)",
@ -153,7 +178,7 @@
"cimguiname": "ImGui_ImplGlfw_NewFrame",
"defaults": {},
"funcname": "ImGui_ImplGlfw_NewFrame",
"location": "imgui_impl_glfw:27",
"location": "imgui_impl_glfw:28",
"ov_cimguiname": "ImGui_ImplGlfw_NewFrame",
"ret": "void",
"signature": "()",
@ -182,7 +207,7 @@
"cimguiname": "ImGui_ImplGlfw_ScrollCallback",
"defaults": {},
"funcname": "ImGui_ImplGlfw_ScrollCallback",
"location": "imgui_impl_glfw:33",
"location": "imgui_impl_glfw:34",
"ov_cimguiname": "ImGui_ImplGlfw_ScrollCallback",
"ret": "void",
"signature": "(GLFWwindow*,double,double)",
@ -198,7 +223,7 @@
"cimguiname": "ImGui_ImplGlfw_Shutdown",
"defaults": {},
"funcname": "ImGui_ImplGlfw_Shutdown",
"location": "imgui_impl_glfw:26",
"location": "imgui_impl_glfw:27",
"ov_cimguiname": "ImGui_ImplGlfw_Shutdown",
"ret": "void",
"signature": "()",

View File

@ -14,7 +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:35"
defs["ImGui_ImplGlfw_CharCallback"][1]["location"] = "imgui_impl_glfw:36"
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)"
@ -41,6 +41,27 @@ defs["ImGui_ImplGlfw_InitForOpenGL"][1]["ret"] = "bool"
defs["ImGui_ImplGlfw_InitForOpenGL"][1]["signature"] = "(GLFWwindow*,bool)"
defs["ImGui_ImplGlfw_InitForOpenGL"][1]["stname"] = ""
defs["ImGui_ImplGlfw_InitForOpenGL"]["(GLFWwindow*,bool)"] = defs["ImGui_ImplGlfw_InitForOpenGL"][1]
defs["ImGui_ImplGlfw_InitForOther"] = {}
defs["ImGui_ImplGlfw_InitForOther"][1] = {}
defs["ImGui_ImplGlfw_InitForOther"][1]["args"] = "(GLFWwindow* window,bool install_callbacks)"
defs["ImGui_ImplGlfw_InitForOther"][1]["argsT"] = {}
defs["ImGui_ImplGlfw_InitForOther"][1]["argsT"][1] = {}
defs["ImGui_ImplGlfw_InitForOther"][1]["argsT"][1]["name"] = "window"
defs["ImGui_ImplGlfw_InitForOther"][1]["argsT"][1]["type"] = "GLFWwindow*"
defs["ImGui_ImplGlfw_InitForOther"][1]["argsT"][2] = {}
defs["ImGui_ImplGlfw_InitForOther"][1]["argsT"][2]["name"] = "install_callbacks"
defs["ImGui_ImplGlfw_InitForOther"][1]["argsT"][2]["type"] = "bool"
defs["ImGui_ImplGlfw_InitForOther"][1]["argsoriginal"] = "(GLFWwindow* window,bool install_callbacks)"
defs["ImGui_ImplGlfw_InitForOther"][1]["call_args"] = "(window,install_callbacks)"
defs["ImGui_ImplGlfw_InitForOther"][1]["cimguiname"] = "ImGui_ImplGlfw_InitForOther"
defs["ImGui_ImplGlfw_InitForOther"][1]["defaults"] = {}
defs["ImGui_ImplGlfw_InitForOther"][1]["funcname"] = "ImGui_ImplGlfw_InitForOther"
defs["ImGui_ImplGlfw_InitForOther"][1]["location"] = "imgui_impl_glfw:26"
defs["ImGui_ImplGlfw_InitForOther"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_InitForOther"
defs["ImGui_ImplGlfw_InitForOther"][1]["ret"] = "bool"
defs["ImGui_ImplGlfw_InitForOther"][1]["signature"] = "(GLFWwindow*,bool)"
defs["ImGui_ImplGlfw_InitForOther"][1]["stname"] = ""
defs["ImGui_ImplGlfw_InitForOther"]["(GLFWwindow*,bool)"] = defs["ImGui_ImplGlfw_InitForOther"][1]
defs["ImGui_ImplGlfw_InitForVulkan"] = {}
defs["ImGui_ImplGlfw_InitForVulkan"][1] = {}
defs["ImGui_ImplGlfw_InitForVulkan"][1]["args"] = "(GLFWwindow* window,bool install_callbacks)"
@ -86,7 +107,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:34"
defs["ImGui_ImplGlfw_KeyCallback"][1]["location"] = "imgui_impl_glfw:35"
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)"
@ -113,7 +134,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:32"
defs["ImGui_ImplGlfw_MouseButtonCallback"][1]["location"] = "imgui_impl_glfw:33"
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)"
@ -128,7 +149,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:27"
defs["ImGui_ImplGlfw_NewFrame"][1]["location"] = "imgui_impl_glfw:28"
defs["ImGui_ImplGlfw_NewFrame"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_NewFrame"
defs["ImGui_ImplGlfw_NewFrame"][1]["ret"] = "void"
defs["ImGui_ImplGlfw_NewFrame"][1]["signature"] = "()"
@ -152,7 +173,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:33"
defs["ImGui_ImplGlfw_ScrollCallback"][1]["location"] = "imgui_impl_glfw:34"
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)"
@ -167,7 +188,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:26"
defs["ImGui_ImplGlfw_Shutdown"][1]["location"] = "imgui_impl_glfw:27"
defs["ImGui_ImplGlfw_Shutdown"][1]["ov_cimguiname"] = "ImGui_ImplGlfw_Shutdown"
defs["ImGui_ImplGlfw_Shutdown"][1]["ret"] = "void"
defs["ImGui_ImplGlfw_Shutdown"][1]["signature"] = "()"

View File

@ -72,9 +72,6 @@ igIsRectVisible 2
igListBox 2
1 bool igListBoxStr_arr (const char*,int*,const char* const[],int,int)
2 bool igListBoxFnBoolPtr (const char*,int*,bool(*)(void*,int,const char**),void*,int,int)
igListBoxHeader 2
1 bool igListBoxHeaderVec2 (const char*,const ImVec2)
2 bool igListBoxHeaderInt (const char*,int,int)
igMenuItem 2
1 bool igMenuItemBool (const char*,const char*,bool,bool)
2 bool igMenuItemBoolPtr (const char*,const char*,bool*,bool)
@ -135,4 +132,4 @@ igValue 4
2 void igValueInt (const char*,int)
3 void igValueUint (const char*,unsigned int)
4 void igValueFloat (const char*,float,const char*)
95 overloaded
93 overloaded

View File

@ -2176,6 +2176,28 @@
"value": "ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog"
}
],
"ImGuiViewportFlags_": [
{
"calc_value": 0,
"name": "ImGuiViewportFlags_None",
"value": "0"
},
{
"calc_value": 1,
"name": "ImGuiViewportFlags_IsPlatformWindow",
"value": "1 << 0"
},
{
"calc_value": 2,
"name": "ImGuiViewportFlags_IsPlatformMonitor",
"value": "1 << 1"
},
{
"calc_value": 4,
"name": "ImGuiViewportFlags_OwnedByApp",
"value": "1 << 2"
}
],
"ImGuiWindowFlags_": [
{
"calc_value": 0,
@ -2331,70 +2353,72 @@
},
"enumtypes": [],
"locations": {
"ImColor": "imgui:2179",
"ImDrawChannel": "imgui:2273",
"ImDrawCmd": "imgui:2228",
"ImDrawCmdHeader": "imgui:2265",
"ImDrawCornerFlags_": "imgui:2297",
"ImDrawData": "imgui:2452",
"ImDrawList": "imgui:2330",
"ImDrawListFlags_": "imgui:2313",
"ImDrawListSplitter": "imgui:2282",
"ImDrawVert": "imgui:2250",
"ImFont": "imgui:2663",
"ImFontAtlas": "imgui:2568",
"ImFontAtlasCustomRect": "imgui:2530",
"ImFontAtlasFlags_": "imgui:2543",
"ImFontConfig": "imgui:2475",
"ImFontGlyph": "imgui:2504",
"ImFontGlyphRangesBuilder": "imgui:2515",
"ImGuiBackendFlags_": "imgui:1355",
"ImGuiButtonFlags_": "imgui:1461",
"ImGuiCol_": "imgui:1365",
"ImGuiColorEditFlags_": "imgui:1474",
"ImGuiComboFlags_": "imgui:994",
"ImGuiCond_": "imgui:1566",
"ImGuiConfigFlags_": "imgui:1339",
"ImGuiDataType_": "imgui:1231",
"ImGuiDir_": "imgui:1247",
"ImGuiDragDropFlags_": "imgui:1209",
"ImGuiFocusedFlags_": "imgui:1181",
"ImGuiHoveredFlags_": "imgui:1193",
"ImGuiIO": "imgui:1726",
"ImGuiInputTextCallbackData": "imgui:1868",
"ImGuiInputTextFlags_": "imgui:909",
"ImGuiKeyModFlags_": "imgui:1294",
"ImGuiKey_": "imgui:1266",
"ImGuiListClipper": "imgui:2130",
"ImGuiMouseButton_": "imgui:1538",
"ImGuiMouseCursor_": "imgui:1548",
"ImGuiNavInput_": "imgui:1307",
"ImGuiOnceUponAFrame": "imgui:2008",
"ImGuiPayload": "imgui:1908",
"ImGuiPopupFlags_": "imgui:967",
"ImGuiSelectableFlags_": "imgui:983",
"ImGuiSizeCallbackData": "imgui:1899",
"ImGuiSliderFlags_": "imgui:1521",
"ImGuiSortDirection_": "imgui:1258",
"ImGuiStorage": "imgui:2070",
"ImGuiStoragePair": "imgui:2073",
"ImGuiStyle": "imgui:1672",
"ImGuiStyleVar_": "imgui:1430",
"ImGuiTabBarFlags_": "imgui:1008",
"ImGuiTabItemFlags_": "imgui:1024",
"ImGuiTableBgTarget_": "imgui:1172",
"ImGuiTableColumnFlags_": "imgui:1117",
"ImGuiTableColumnSortSpecs": "imgui:1930",
"ImGuiTableFlags_": "imgui:1060",
"ImGuiTableRowFlags_": "imgui:1157",
"ImGuiTableSortSpecs": "imgui:1944",
"ImGuiTextBuffer": "imgui:2043",
"ImGuiTextFilter": "imgui:2016",
"ImGuiTextRange": "imgui:2026",
"ImGuiTreeNodeFlags_": "imgui:938",
"ImGuiWindowFlags_": "imgui:869",
"ImVec2": "imgui:223",
"ImVec4": "imgui:236"
"ImColor": "imgui:2197",
"ImDrawChannel": "imgui:2291",
"ImDrawCmd": "imgui:2246",
"ImDrawCmdHeader": "imgui:2283",
"ImDrawCornerFlags_": "imgui:2315",
"ImDrawData": "imgui:2471",
"ImDrawList": "imgui:2349",
"ImDrawListFlags_": "imgui:2331",
"ImDrawListSplitter": "imgui:2300",
"ImDrawVert": "imgui:2268",
"ImFont": "imgui:2686",
"ImFontAtlas": "imgui:2587",
"ImFontAtlasCustomRect": "imgui:2549",
"ImFontAtlasFlags_": "imgui:2562",
"ImFontConfig": "imgui:2493",
"ImFontGlyph": "imgui:2522",
"ImFontGlyphRangesBuilder": "imgui:2534",
"ImGuiBackendFlags_": "imgui:1369",
"ImGuiButtonFlags_": "imgui:1475",
"ImGuiCol_": "imgui:1379",
"ImGuiColorEditFlags_": "imgui:1488",
"ImGuiComboFlags_": "imgui:1008",
"ImGuiCond_": "imgui:1580",
"ImGuiConfigFlags_": "imgui:1353",
"ImGuiDataType_": "imgui:1245",
"ImGuiDir_": "imgui:1261",
"ImGuiDragDropFlags_": "imgui:1223",
"ImGuiFocusedFlags_": "imgui:1195",
"ImGuiHoveredFlags_": "imgui:1207",
"ImGuiIO": "imgui:1740",
"ImGuiInputTextCallbackData": "imgui:1882",
"ImGuiInputTextFlags_": "imgui:923",
"ImGuiKeyModFlags_": "imgui:1308",
"ImGuiKey_": "imgui:1280",
"ImGuiListClipper": "imgui:2148",
"ImGuiMouseButton_": "imgui:1552",
"ImGuiMouseCursor_": "imgui:1562",
"ImGuiNavInput_": "imgui:1321",
"ImGuiOnceUponAFrame": "imgui:2026",
"ImGuiPayload": "imgui:1922",
"ImGuiPopupFlags_": "imgui:981",
"ImGuiSelectableFlags_": "imgui:997",
"ImGuiSizeCallbackData": "imgui:1913",
"ImGuiSliderFlags_": "imgui:1535",
"ImGuiSortDirection_": "imgui:1272",
"ImGuiStorage": "imgui:2088",
"ImGuiStoragePair": "imgui:2091",
"ImGuiStyle": "imgui:1686",
"ImGuiStyleVar_": "imgui:1444",
"ImGuiTabBarFlags_": "imgui:1022",
"ImGuiTabItemFlags_": "imgui:1038",
"ImGuiTableBgTarget_": "imgui:1186",
"ImGuiTableColumnFlags_": "imgui:1131",
"ImGuiTableColumnSortSpecs": "imgui:1944",
"ImGuiTableFlags_": "imgui:1074",
"ImGuiTableRowFlags_": "imgui:1171",
"ImGuiTableSortSpecs": "imgui:1958",
"ImGuiTextBuffer": "imgui:2061",
"ImGuiTextFilter": "imgui:2034",
"ImGuiTextRange": "imgui:2044",
"ImGuiTreeNodeFlags_": "imgui:952",
"ImGuiViewport": "imgui:2757",
"ImGuiViewportFlags_": "imgui:2742",
"ImGuiWindowFlags_": "imgui:883",
"ImVec2": "imgui:227",
"ImVec4": "imgui:240"
},
"structs": {
"ImColor": [
@ -2464,10 +2488,6 @@
"name": "Valid",
"type": "bool"
},
{
"name": "CmdLists",
"type": "ImDrawList**"
},
{
"name": "CmdListsCount",
"type": "int"
@ -2480,6 +2500,10 @@
"name": "TotalVtxCount",
"type": "int"
},
{
"name": "CmdLists",
"type": "ImDrawList**"
},
{
"name": "DisplayPos",
"type": "ImVec2"
@ -2729,6 +2753,14 @@
"size": 64,
"type": "ImVec4"
},
{
"name": "FontBuilderIO",
"type": "const ImFontBuilderIO*"
},
{
"name": "FontBuilderFlags",
"type": "unsigned int"
},
{
"name": "PackIdMouseCursors",
"type": "int"
@ -2830,7 +2862,7 @@
"type": "bool"
},
{
"name": "RasterizerFlags",
"name": "FontBuilderFlags",
"type": "unsigned int"
},
{
@ -2853,8 +2885,8 @@
],
"ImFontGlyph": [
{
"bitfield": "31",
"name": "Codepoint",
"bitfield": "1",
"name": "Colored",
"type": "unsigned int"
},
{
@ -2862,6 +2894,11 @@
"name": "Visible",
"type": "unsigned int"
},
{
"bitfield": "30",
"name": "Codepoint",
"type": "unsigned int"
},
{
"name": "AdvanceX",
"type": "float"
@ -3633,6 +3670,28 @@
"type": "const char*"
}
],
"ImGuiViewport": [
{
"name": "Flags",
"type": "ImGuiViewportFlags"
},
{
"name": "Pos",
"type": "ImVec2"
},
{
"name": "Size",
"type": "ImVec2"
},
{
"name": "WorkPos",
"type": "ImVec2"
},
{
"name": "WorkSize",
"type": "ImVec2"
}
],
"ImVec2": [
{
"name": "x",

View File

@ -1721,6 +1721,23 @@ defs["enums"]["ImGuiTreeNodeFlags_"][16] = {}
defs["enums"]["ImGuiTreeNodeFlags_"][16]["calc_value"] = 26
defs["enums"]["ImGuiTreeNodeFlags_"][16]["name"] = "ImGuiTreeNodeFlags_CollapsingHeader"
defs["enums"]["ImGuiTreeNodeFlags_"][16]["value"] = "ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog"
defs["enums"]["ImGuiViewportFlags_"] = {}
defs["enums"]["ImGuiViewportFlags_"][1] = {}
defs["enums"]["ImGuiViewportFlags_"][1]["calc_value"] = 0
defs["enums"]["ImGuiViewportFlags_"][1]["name"] = "ImGuiViewportFlags_None"
defs["enums"]["ImGuiViewportFlags_"][1]["value"] = "0"
defs["enums"]["ImGuiViewportFlags_"][2] = {}
defs["enums"]["ImGuiViewportFlags_"][2]["calc_value"] = 1
defs["enums"]["ImGuiViewportFlags_"][2]["name"] = "ImGuiViewportFlags_IsPlatformWindow"
defs["enums"]["ImGuiViewportFlags_"][2]["value"] = "1 << 0"
defs["enums"]["ImGuiViewportFlags_"][3] = {}
defs["enums"]["ImGuiViewportFlags_"][3]["calc_value"] = 2
defs["enums"]["ImGuiViewportFlags_"][3]["name"] = "ImGuiViewportFlags_IsPlatformMonitor"
defs["enums"]["ImGuiViewportFlags_"][3]["value"] = "1 << 1"
defs["enums"]["ImGuiViewportFlags_"][4] = {}
defs["enums"]["ImGuiViewportFlags_"][4]["calc_value"] = 4
defs["enums"]["ImGuiViewportFlags_"][4]["name"] = "ImGuiViewportFlags_OwnedByApp"
defs["enums"]["ImGuiViewportFlags_"][4]["value"] = "1 << 2"
defs["enums"]["ImGuiWindowFlags_"] = {}
defs["enums"]["ImGuiWindowFlags_"][1] = {}
defs["enums"]["ImGuiWindowFlags_"][1]["calc_value"] = 0
@ -1844,70 +1861,72 @@ defs["enums"]["ImGuiWindowFlags_"][30]["name"] = "ImGuiWindowFlags_ChildMenu"
defs["enums"]["ImGuiWindowFlags_"][30]["value"] = "1 << 28"
defs["enumtypes"] = {}
defs["locations"] = {}
defs["locations"]["ImColor"] = "imgui:2179"
defs["locations"]["ImDrawChannel"] = "imgui:2273"
defs["locations"]["ImDrawCmd"] = "imgui:2228"
defs["locations"]["ImDrawCmdHeader"] = "imgui:2265"
defs["locations"]["ImDrawCornerFlags_"] = "imgui:2297"
defs["locations"]["ImDrawData"] = "imgui:2452"
defs["locations"]["ImDrawList"] = "imgui:2330"
defs["locations"]["ImDrawListFlags_"] = "imgui:2313"
defs["locations"]["ImDrawListSplitter"] = "imgui:2282"
defs["locations"]["ImDrawVert"] = "imgui:2250"
defs["locations"]["ImFont"] = "imgui:2663"
defs["locations"]["ImFontAtlas"] = "imgui:2568"
defs["locations"]["ImFontAtlasCustomRect"] = "imgui:2530"
defs["locations"]["ImFontAtlasFlags_"] = "imgui:2543"
defs["locations"]["ImFontConfig"] = "imgui:2475"
defs["locations"]["ImFontGlyph"] = "imgui:2504"
defs["locations"]["ImFontGlyphRangesBuilder"] = "imgui:2515"
defs["locations"]["ImGuiBackendFlags_"] = "imgui:1355"
defs["locations"]["ImGuiButtonFlags_"] = "imgui:1461"
defs["locations"]["ImGuiCol_"] = "imgui:1365"
defs["locations"]["ImGuiColorEditFlags_"] = "imgui:1474"
defs["locations"]["ImGuiComboFlags_"] = "imgui:994"
defs["locations"]["ImGuiCond_"] = "imgui:1566"
defs["locations"]["ImGuiConfigFlags_"] = "imgui:1339"
defs["locations"]["ImGuiDataType_"] = "imgui:1231"
defs["locations"]["ImGuiDir_"] = "imgui:1247"
defs["locations"]["ImGuiDragDropFlags_"] = "imgui:1209"
defs["locations"]["ImGuiFocusedFlags_"] = "imgui:1181"
defs["locations"]["ImGuiHoveredFlags_"] = "imgui:1193"
defs["locations"]["ImGuiIO"] = "imgui:1726"
defs["locations"]["ImGuiInputTextCallbackData"] = "imgui:1868"
defs["locations"]["ImGuiInputTextFlags_"] = "imgui:909"
defs["locations"]["ImGuiKeyModFlags_"] = "imgui:1294"
defs["locations"]["ImGuiKey_"] = "imgui:1266"
defs["locations"]["ImGuiListClipper"] = "imgui:2130"
defs["locations"]["ImGuiMouseButton_"] = "imgui:1538"
defs["locations"]["ImGuiMouseCursor_"] = "imgui:1548"
defs["locations"]["ImGuiNavInput_"] = "imgui:1307"
defs["locations"]["ImGuiOnceUponAFrame"] = "imgui:2008"
defs["locations"]["ImGuiPayload"] = "imgui:1908"
defs["locations"]["ImGuiPopupFlags_"] = "imgui:967"
defs["locations"]["ImGuiSelectableFlags_"] = "imgui:983"
defs["locations"]["ImGuiSizeCallbackData"] = "imgui:1899"
defs["locations"]["ImGuiSliderFlags_"] = "imgui:1521"
defs["locations"]["ImGuiSortDirection_"] = "imgui:1258"
defs["locations"]["ImGuiStorage"] = "imgui:2070"
defs["locations"]["ImGuiStoragePair"] = "imgui:2073"
defs["locations"]["ImGuiStyle"] = "imgui:1672"
defs["locations"]["ImGuiStyleVar_"] = "imgui:1430"
defs["locations"]["ImGuiTabBarFlags_"] = "imgui:1008"
defs["locations"]["ImGuiTabItemFlags_"] = "imgui:1024"
defs["locations"]["ImGuiTableBgTarget_"] = "imgui:1172"
defs["locations"]["ImGuiTableColumnFlags_"] = "imgui:1117"
defs["locations"]["ImGuiTableColumnSortSpecs"] = "imgui:1930"
defs["locations"]["ImGuiTableFlags_"] = "imgui:1060"
defs["locations"]["ImGuiTableRowFlags_"] = "imgui:1157"
defs["locations"]["ImGuiTableSortSpecs"] = "imgui:1944"
defs["locations"]["ImGuiTextBuffer"] = "imgui:2043"
defs["locations"]["ImGuiTextFilter"] = "imgui:2016"
defs["locations"]["ImGuiTextRange"] = "imgui:2026"
defs["locations"]["ImGuiTreeNodeFlags_"] = "imgui:938"
defs["locations"]["ImGuiWindowFlags_"] = "imgui:869"
defs["locations"]["ImVec2"] = "imgui:223"
defs["locations"]["ImVec4"] = "imgui:236"
defs["locations"]["ImColor"] = "imgui:2197"
defs["locations"]["ImDrawChannel"] = "imgui:2291"
defs["locations"]["ImDrawCmd"] = "imgui:2246"
defs["locations"]["ImDrawCmdHeader"] = "imgui:2283"
defs["locations"]["ImDrawCornerFlags_"] = "imgui:2315"
defs["locations"]["ImDrawData"] = "imgui:2471"
defs["locations"]["ImDrawList"] = "imgui:2349"
defs["locations"]["ImDrawListFlags_"] = "imgui:2331"
defs["locations"]["ImDrawListSplitter"] = "imgui:2300"
defs["locations"]["ImDrawVert"] = "imgui:2268"
defs["locations"]["ImFont"] = "imgui:2686"
defs["locations"]["ImFontAtlas"] = "imgui:2587"
defs["locations"]["ImFontAtlasCustomRect"] = "imgui:2549"
defs["locations"]["ImFontAtlasFlags_"] = "imgui:2562"
defs["locations"]["ImFontConfig"] = "imgui:2493"
defs["locations"]["ImFontGlyph"] = "imgui:2522"
defs["locations"]["ImFontGlyphRangesBuilder"] = "imgui:2534"
defs["locations"]["ImGuiBackendFlags_"] = "imgui:1369"
defs["locations"]["ImGuiButtonFlags_"] = "imgui:1475"
defs["locations"]["ImGuiCol_"] = "imgui:1379"
defs["locations"]["ImGuiColorEditFlags_"] = "imgui:1488"
defs["locations"]["ImGuiComboFlags_"] = "imgui:1008"
defs["locations"]["ImGuiCond_"] = "imgui:1580"
defs["locations"]["ImGuiConfigFlags_"] = "imgui:1353"
defs["locations"]["ImGuiDataType_"] = "imgui:1245"
defs["locations"]["ImGuiDir_"] = "imgui:1261"
defs["locations"]["ImGuiDragDropFlags_"] = "imgui:1223"
defs["locations"]["ImGuiFocusedFlags_"] = "imgui:1195"
defs["locations"]["ImGuiHoveredFlags_"] = "imgui:1207"
defs["locations"]["ImGuiIO"] = "imgui:1740"
defs["locations"]["ImGuiInputTextCallbackData"] = "imgui:1882"
defs["locations"]["ImGuiInputTextFlags_"] = "imgui:923"
defs["locations"]["ImGuiKeyModFlags_"] = "imgui:1308"
defs["locations"]["ImGuiKey_"] = "imgui:1280"
defs["locations"]["ImGuiListClipper"] = "imgui:2148"
defs["locations"]["ImGuiMouseButton_"] = "imgui:1552"
defs["locations"]["ImGuiMouseCursor_"] = "imgui:1562"
defs["locations"]["ImGuiNavInput_"] = "imgui:1321"
defs["locations"]["ImGuiOnceUponAFrame"] = "imgui:2026"
defs["locations"]["ImGuiPayload"] = "imgui:1922"
defs["locations"]["ImGuiPopupFlags_"] = "imgui:981"
defs["locations"]["ImGuiSelectableFlags_"] = "imgui:997"
defs["locations"]["ImGuiSizeCallbackData"] = "imgui:1913"
defs["locations"]["ImGuiSliderFlags_"] = "imgui:1535"
defs["locations"]["ImGuiSortDirection_"] = "imgui:1272"
defs["locations"]["ImGuiStorage"] = "imgui:2088"
defs["locations"]["ImGuiStoragePair"] = "imgui:2091"
defs["locations"]["ImGuiStyle"] = "imgui:1686"
defs["locations"]["ImGuiStyleVar_"] = "imgui:1444"
defs["locations"]["ImGuiTabBarFlags_"] = "imgui:1022"
defs["locations"]["ImGuiTabItemFlags_"] = "imgui:1038"
defs["locations"]["ImGuiTableBgTarget_"] = "imgui:1186"
defs["locations"]["ImGuiTableColumnFlags_"] = "imgui:1131"
defs["locations"]["ImGuiTableColumnSortSpecs"] = "imgui:1944"
defs["locations"]["ImGuiTableFlags_"] = "imgui:1074"
defs["locations"]["ImGuiTableRowFlags_"] = "imgui:1171"
defs["locations"]["ImGuiTableSortSpecs"] = "imgui:1958"
defs["locations"]["ImGuiTextBuffer"] = "imgui:2061"
defs["locations"]["ImGuiTextFilter"] = "imgui:2034"
defs["locations"]["ImGuiTextRange"] = "imgui:2044"
defs["locations"]["ImGuiTreeNodeFlags_"] = "imgui:952"
defs["locations"]["ImGuiViewport"] = "imgui:2757"
defs["locations"]["ImGuiViewportFlags_"] = "imgui:2742"
defs["locations"]["ImGuiWindowFlags_"] = "imgui:883"
defs["locations"]["ImVec2"] = "imgui:227"
defs["locations"]["ImVec4"] = "imgui:240"
defs["structs"] = {}
defs["structs"]["ImColor"] = {}
defs["structs"]["ImColor"][1] = {}
@ -1959,17 +1978,17 @@ defs["structs"]["ImDrawData"][1] = {}
defs["structs"]["ImDrawData"][1]["name"] = "Valid"
defs["structs"]["ImDrawData"][1]["type"] = "bool"
defs["structs"]["ImDrawData"][2] = {}
defs["structs"]["ImDrawData"][2]["name"] = "CmdLists"
defs["structs"]["ImDrawData"][2]["type"] = "ImDrawList**"
defs["structs"]["ImDrawData"][2]["name"] = "CmdListsCount"
defs["structs"]["ImDrawData"][2]["type"] = "int"
defs["structs"]["ImDrawData"][3] = {}
defs["structs"]["ImDrawData"][3]["name"] = "CmdListsCount"
defs["structs"]["ImDrawData"][3]["name"] = "TotalIdxCount"
defs["structs"]["ImDrawData"][3]["type"] = "int"
defs["structs"]["ImDrawData"][4] = {}
defs["structs"]["ImDrawData"][4]["name"] = "TotalIdxCount"
defs["structs"]["ImDrawData"][4]["name"] = "TotalVtxCount"
defs["structs"]["ImDrawData"][4]["type"] = "int"
defs["structs"]["ImDrawData"][5] = {}
defs["structs"]["ImDrawData"][5]["name"] = "TotalVtxCount"
defs["structs"]["ImDrawData"][5]["type"] = "int"
defs["structs"]["ImDrawData"][5]["name"] = "CmdLists"
defs["structs"]["ImDrawData"][5]["type"] = "ImDrawList**"
defs["structs"]["ImDrawData"][6] = {}
defs["structs"]["ImDrawData"][6]["name"] = "DisplayPos"
defs["structs"]["ImDrawData"][6]["type"] = "ImVec2"
@ -2159,11 +2178,17 @@ defs["structs"]["ImFontAtlas"][15]["name"] = "TexUvLines[(63)+1]"
defs["structs"]["ImFontAtlas"][15]["size"] = 64
defs["structs"]["ImFontAtlas"][15]["type"] = "ImVec4"
defs["structs"]["ImFontAtlas"][16] = {}
defs["structs"]["ImFontAtlas"][16]["name"] = "PackIdMouseCursors"
defs["structs"]["ImFontAtlas"][16]["type"] = "int"
defs["structs"]["ImFontAtlas"][16]["name"] = "FontBuilderIO"
defs["structs"]["ImFontAtlas"][16]["type"] = "const ImFontBuilderIO*"
defs["structs"]["ImFontAtlas"][17] = {}
defs["structs"]["ImFontAtlas"][17]["name"] = "PackIdLines"
defs["structs"]["ImFontAtlas"][17]["type"] = "int"
defs["structs"]["ImFontAtlas"][17]["name"] = "FontBuilderFlags"
defs["structs"]["ImFontAtlas"][17]["type"] = "unsigned int"
defs["structs"]["ImFontAtlas"][18] = {}
defs["structs"]["ImFontAtlas"][18]["name"] = "PackIdMouseCursors"
defs["structs"]["ImFontAtlas"][18]["type"] = "int"
defs["structs"]["ImFontAtlas"][19] = {}
defs["structs"]["ImFontAtlas"][19]["name"] = "PackIdLines"
defs["structs"]["ImFontAtlas"][19]["type"] = "int"
defs["structs"]["ImFontAtlasCustomRect"] = {}
defs["structs"]["ImFontAtlasCustomRect"][1] = {}
defs["structs"]["ImFontAtlasCustomRect"][1]["name"] = "Width"
@ -2233,7 +2258,7 @@ defs["structs"]["ImFontConfig"][14] = {}
defs["structs"]["ImFontConfig"][14]["name"] = "MergeMode"
defs["structs"]["ImFontConfig"][14]["type"] = "bool"
defs["structs"]["ImFontConfig"][15] = {}
defs["structs"]["ImFontConfig"][15]["name"] = "RasterizerFlags"
defs["structs"]["ImFontConfig"][15]["name"] = "FontBuilderFlags"
defs["structs"]["ImFontConfig"][15]["type"] = "unsigned int"
defs["structs"]["ImFontConfig"][16] = {}
defs["structs"]["ImFontConfig"][16]["name"] = "RasterizerMultiply"
@ -2250,40 +2275,44 @@ defs["structs"]["ImFontConfig"][19]["name"] = "DstFont"
defs["structs"]["ImFontConfig"][19]["type"] = "ImFont*"
defs["structs"]["ImFontGlyph"] = {}
defs["structs"]["ImFontGlyph"][1] = {}
defs["structs"]["ImFontGlyph"][1]["bitfield"] = "31"
defs["structs"]["ImFontGlyph"][1]["name"] = "Codepoint"
defs["structs"]["ImFontGlyph"][1]["bitfield"] = "1"
defs["structs"]["ImFontGlyph"][1]["name"] = "Colored"
defs["structs"]["ImFontGlyph"][1]["type"] = "unsigned int"
defs["structs"]["ImFontGlyph"][2] = {}
defs["structs"]["ImFontGlyph"][2]["bitfield"] = "1"
defs["structs"]["ImFontGlyph"][2]["name"] = "Visible"
defs["structs"]["ImFontGlyph"][2]["type"] = "unsigned int"
defs["structs"]["ImFontGlyph"][3] = {}
defs["structs"]["ImFontGlyph"][3]["name"] = "AdvanceX"
defs["structs"]["ImFontGlyph"][3]["type"] = "float"
defs["structs"]["ImFontGlyph"][3]["bitfield"] = "30"
defs["structs"]["ImFontGlyph"][3]["name"] = "Codepoint"
defs["structs"]["ImFontGlyph"][3]["type"] = "unsigned int"
defs["structs"]["ImFontGlyph"][4] = {}
defs["structs"]["ImFontGlyph"][4]["name"] = "X0"
defs["structs"]["ImFontGlyph"][4]["name"] = "AdvanceX"
defs["structs"]["ImFontGlyph"][4]["type"] = "float"
defs["structs"]["ImFontGlyph"][5] = {}
defs["structs"]["ImFontGlyph"][5]["name"] = "Y0"
defs["structs"]["ImFontGlyph"][5]["name"] = "X0"
defs["structs"]["ImFontGlyph"][5]["type"] = "float"
defs["structs"]["ImFontGlyph"][6] = {}
defs["structs"]["ImFontGlyph"][6]["name"] = "X1"
defs["structs"]["ImFontGlyph"][6]["name"] = "Y0"
defs["structs"]["ImFontGlyph"][6]["type"] = "float"
defs["structs"]["ImFontGlyph"][7] = {}
defs["structs"]["ImFontGlyph"][7]["name"] = "Y1"
defs["structs"]["ImFontGlyph"][7]["name"] = "X1"
defs["structs"]["ImFontGlyph"][7]["type"] = "float"
defs["structs"]["ImFontGlyph"][8] = {}
defs["structs"]["ImFontGlyph"][8]["name"] = "U0"
defs["structs"]["ImFontGlyph"][8]["name"] = "Y1"
defs["structs"]["ImFontGlyph"][8]["type"] = "float"
defs["structs"]["ImFontGlyph"][9] = {}
defs["structs"]["ImFontGlyph"][9]["name"] = "V0"
defs["structs"]["ImFontGlyph"][9]["name"] = "U0"
defs["structs"]["ImFontGlyph"][9]["type"] = "float"
defs["structs"]["ImFontGlyph"][10] = {}
defs["structs"]["ImFontGlyph"][10]["name"] = "U1"
defs["structs"]["ImFontGlyph"][10]["name"] = "V0"
defs["structs"]["ImFontGlyph"][10]["type"] = "float"
defs["structs"]["ImFontGlyph"][11] = {}
defs["structs"]["ImFontGlyph"][11]["name"] = "V1"
defs["structs"]["ImFontGlyph"][11]["name"] = "U1"
defs["structs"]["ImFontGlyph"][11]["type"] = "float"
defs["structs"]["ImFontGlyph"][12] = {}
defs["structs"]["ImFontGlyph"][12]["name"] = "V1"
defs["structs"]["ImFontGlyph"][12]["type"] = "float"
defs["structs"]["ImFontGlyphRangesBuilder"] = {}
defs["structs"]["ImFontGlyphRangesBuilder"][1] = {}
defs["structs"]["ImFontGlyphRangesBuilder"][1]["name"] = "UsedChars"
@ -2834,6 +2863,22 @@ defs["structs"]["ImGuiTextRange"][1]["type"] = "const char*"
defs["structs"]["ImGuiTextRange"][2] = {}
defs["structs"]["ImGuiTextRange"][2]["name"] = "e"
defs["structs"]["ImGuiTextRange"][2]["type"] = "const char*"
defs["structs"]["ImGuiViewport"] = {}
defs["structs"]["ImGuiViewport"][1] = {}
defs["structs"]["ImGuiViewport"][1]["name"] = "Flags"
defs["structs"]["ImGuiViewport"][1]["type"] = "ImGuiViewportFlags"
defs["structs"]["ImGuiViewport"][2] = {}
defs["structs"]["ImGuiViewport"][2]["name"] = "Pos"
defs["structs"]["ImGuiViewport"][2]["type"] = "ImVec2"
defs["structs"]["ImGuiViewport"][3] = {}
defs["structs"]["ImGuiViewport"][3]["name"] = "Size"
defs["structs"]["ImGuiViewport"][3]["type"] = "ImVec2"
defs["structs"]["ImGuiViewport"][4] = {}
defs["structs"]["ImGuiViewport"][4]["name"] = "WorkPos"
defs["structs"]["ImGuiViewport"][4]["type"] = "ImVec2"
defs["structs"]["ImGuiViewport"][5] = {}
defs["structs"]["ImGuiViewport"][5]["name"] = "WorkSize"
defs["structs"]["ImGuiViewport"][5]["type"] = "ImVec2"
defs["structs"]["ImVec2"] = {}
defs["structs"]["ImVec2"][1] = {}
defs["structs"]["ImVec2"][1]["name"] = "x"

View File

@ -16,6 +16,7 @@
"ImFontAtlas": "struct ImFontAtlas",
"ImFontAtlasCustomRect": "struct ImFontAtlasCustomRect",
"ImFontAtlasFlags": "int",
"ImFontBuilderIO": "struct ImFontBuilderIO",
"ImFontConfig": "struct ImFontConfig",
"ImFontGlyph": "struct ImFontGlyph",
"ImFontGlyphRangesBuilder": "struct ImFontGlyphRangesBuilder",
@ -67,6 +68,8 @@
"ImGuiTextFilter": "struct ImGuiTextFilter",
"ImGuiTextRange": "struct ImGuiTextRange",
"ImGuiTreeNodeFlags": "int",
"ImGuiViewport": "struct ImGuiViewport",
"ImGuiViewportFlags": "int",
"ImGuiWindowFlags": "int",
"ImS16": "signed short",
"ImS32": "signed int",

View File

@ -16,6 +16,7 @@ defs["ImFont"] = "struct ImFont"
defs["ImFontAtlas"] = "struct ImFontAtlas"
defs["ImFontAtlasCustomRect"] = "struct ImFontAtlasCustomRect"
defs["ImFontAtlasFlags"] = "int"
defs["ImFontBuilderIO"] = "struct ImFontBuilderIO"
defs["ImFontConfig"] = "struct ImFontConfig"
defs["ImFontGlyph"] = "struct ImFontGlyph"
defs["ImFontGlyphRangesBuilder"] = "struct ImFontGlyphRangesBuilder"
@ -67,6 +68,8 @@ defs["ImGuiTextBuffer"] = "struct ImGuiTextBuffer"
defs["ImGuiTextFilter"] = "struct ImGuiTextFilter"
defs["ImGuiTextRange"] = "struct ImGuiTextRange"
defs["ImGuiTreeNodeFlags"] = "int"
defs["ImGuiViewport"] = "struct ImGuiViewport"
defs["ImGuiViewportFlags"] = "int"
defs["ImGuiWindowFlags"] = "int"
defs["ImS16"] = "signed short"
defs["ImS32"] = "signed int"

View File

@ -58,6 +58,8 @@ pub struct FontAtlas {
custom_rects: sys::ImVector_ImFontAtlasCustomRect,
config_data: sys::ImVector_ImFontConfig,
tex_uv_lines: [[f32; 4]; 64],
font_builder_io: *const sys::ImFontBuilderIO,
font_builder_flags: i32,
pack_id_mouse_cursors: i32,
pack_id_lines: i32,
}
@ -310,7 +312,7 @@ pub struct FontConfig {
/// Maximum advance_x for glyphs
pub glyph_max_advance_x: f32,
/// Settings for a custom font rasterizer if used
pub rasterizer_flags: u32,
pub font_builder_flags: u32,
/// Brighten (>1.0) or darken (<1.0) font output
pub rasterizer_multiply: f32,
/// Explicitly specify the ellipsis character.
@ -332,7 +334,7 @@ impl Default for FontConfig {
glyph_ranges: FontGlyphRanges::default(),
glyph_min_advance_x: 0.0,
glyph_max_advance_x: f32::MAX,
rasterizer_flags: 0,
font_builder_flags: 0,
rasterizer_multiply: 1.0,
ellipsis_char: None,
name: None,
@ -351,7 +353,7 @@ impl FontConfig {
raw.GlyphRanges = unsafe { self.glyph_ranges.to_ptr(atlas) };
raw.GlyphMinAdvanceX = self.glyph_min_advance_x;
raw.GlyphMaxAdvanceX = self.glyph_max_advance_x;
raw.RasterizerFlags = self.rasterizer_flags;
raw.FontBuilderFlags = self.font_builder_flags;
raw.RasterizerMultiply = self.rasterizer_multiply;
raw.EllipsisChar = self.ellipsis_char.map(|x| x as u16).unwrap_or(0xffff);
if let Some(name) = self.name.as_ref() {
@ -404,8 +406,8 @@ fn test_font_config_default() {
sys_font_config.GlyphMaxAdvanceX
);
assert_eq!(
font_config.rasterizer_flags,
sys_font_config.RasterizerFlags
font_config.font_builder_flags,
sys_font_config.FontBuilderFlags
);
assert_eq!(
font_config.rasterizer_multiply,

View File

@ -100,7 +100,7 @@ pub fn dear_imgui_version() -> &'static str {
#[test]
fn test_version() {
// TODO: what's the point of this test?
assert_eq!(dear_imgui_version(), "1.80");
assert_eq!(dear_imgui_version(), "1.81");
}
impl Context {

View File

@ -9,14 +9,14 @@ use crate::sys;
pub struct DrawData {
/// Only valid after render() is called and before the next new frame() is called.
valid: bool,
// Array of DrawList.
cmd_lists: *mut *mut DrawList,
/// Number of DrawList to render.
cmd_lists_count: i32,
/// For convenience, sum of all draw list index buffer sizes.
pub total_idx_count: i32,
/// For convenience, sum of all draw list vertex buffer sizes.
pub total_vtx_count: i32,
// Array of DrawList.
cmd_lists: *mut *mut DrawList,
/// Upper-left position of the viewport to render.
///
/// (= upper-left corner of the orthogonal projection matrix to use)

View File

@ -4,20 +4,12 @@ use crate::string::ImStr;
use crate::sys;
use crate::Ui;
#[derive(Copy, Clone, Debug)]
enum Size {
Vec(sys::ImVec2),
Items {
items_count: i32,
height_in_items: i32,
},
}
/// Builder for a list box widget
#[derive(Copy, Clone, Debug)]
#[must_use]
pub struct ListBox<'a> {
label: &'a ImStr,
size: Size,
size: sys::ImVec2,
}
impl<'a> ListBox<'a> {
@ -26,21 +18,9 @@ impl<'a> ListBox<'a> {
pub const fn new(label: &'a ImStr) -> ListBox<'a> {
ListBox {
label,
size: Size::Vec(sys::ImVec2::zero()),
size: sys::ImVec2::zero(),
}
}
/// Sets the list box size based on the number of items that you want to make visible
/// Size default to hold ~7.25 items.
/// We add +25% worth of item height to allow the user to see at a glance if there are more items up/down, without looking at the scrollbar.
/// We don't add this extra bit if items_count <= height_in_items. It is slightly dodgy, because it means a dynamic list of items will make the widget resize occasionally when it crosses that size.
#[inline]
pub const fn calculate_size(mut self, items_count: i32, height_in_items: i32) -> Self {
self.size = Size::Items {
items_count,
height_in_items,
};
self
}
/// Sets the list box size based on the given width and height
/// If width or height are 0 or smaller, a default value is calculated
@ -50,7 +30,7 @@ impl<'a> ListBox<'a> {
/// Default: [0.0, 0.0], in which case the combobox calculates a sensible width and height
#[inline]
pub const fn size(mut self, size: [f32; 2]) -> Self {
self.size = Size::Vec(sys::ImVec2::new(size[0], size[1]));
self.size = sys::ImVec2::new(size[0], size[1]);
self
}
/// Creates a list box and starts appending to it.
@ -61,15 +41,7 @@ impl<'a> ListBox<'a> {
/// Returns `None` if the list box is not open and no content should be rendered.
#[must_use]
pub fn begin<'ui>(self, ui: &Ui<'ui>) -> Option<ListBoxToken<'ui>> {
let should_render = unsafe {
match self.size {
Size::Vec(size) => sys::igListBoxHeaderVec2(self.label.as_ptr(), size),
Size::Items {
items_count,
height_in_items,
} => sys::igListBoxHeaderInt(self.label.as_ptr(), items_count, height_in_items),
}
};
let should_render = unsafe { sys::igBeginListBox(self.label.as_ptr(), self.size) };
if should_render {
Some(ListBoxToken::new(ui))
} else {
@ -92,7 +64,7 @@ create_token!(
pub struct ListBoxToken<'ui>;
/// Ends a list box
drop { sys::igListBoxFooter() }
drop { sys::igEndListBox() }
);
/// # Convenience functions