From 3ca1b7b4ec19414b5499e4dc138b4cef9a282e9f Mon Sep 17 00:00:00 2001 From: Joonas Javanainen Date: Wed, 26 Jun 2019 22:55:45 +0300 Subject: [PATCH] Use automatically generated 1.71 bindings from 0.1-dev This is the minimal first step that compiles but doesn't work --- Cargo.toml | 1 + imgui-sys-bindgen/Cargo.toml | 16 + imgui-sys-bindgen/src/lib.rs | 120 + imgui-sys-bindgen/src/main.rs | 20 + imgui-sys/Cargo.toml | 2 +- imgui-sys/src/bindings.rs | 9801 +++++++++++++++++++++++++++++++++ imgui-sys/src/legacy.rs | 984 ++++ imgui-sys/src/lib.rs | 1178 +--- imgui-sys/src/structs.rs | 34 - imgui-sys/third-party/cimgui | 2 +- src/input.rs | 10 +- 11 files changed, 11102 insertions(+), 1066 deletions(-) create mode 100644 imgui-sys-bindgen/Cargo.toml create mode 100644 imgui-sys-bindgen/src/lib.rs create mode 100644 imgui-sys-bindgen/src/main.rs create mode 100644 imgui-sys/src/bindings.rs create mode 100644 imgui-sys/src/legacy.rs diff --git a/Cargo.toml b/Cargo.toml index 70c09c9..1434e8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,4 +26,5 @@ members = [ exclude = [ "imgui-examples", "imgui-glium-examples", + "imgui-sys-bindgen" ] diff --git a/imgui-sys-bindgen/Cargo.toml b/imgui-sys-bindgen/Cargo.toml new file mode 100644 index 0000000..196bcce --- /dev/null +++ b/imgui-sys-bindgen/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "imgui-sys-bindgen" +version = "0.0.0" +authors = ["Joonas Javanainen ", "imgui-rs contributors"] +description = "imgui-sys bindings updater" +homepage = "https://github.com/Gekkio/imgui-rs" +repository = "https://github.com/Gekkio/imgui-rs" +license = "MIT/Apache-2.0" +publish = false + +[dependencies] +bindgen = "0.49" +failure = "0.1" +serde = "1.0" +serde_derive = "1.0" +serde_json = "1.0" diff --git a/imgui-sys-bindgen/src/lib.rs b/imgui-sys-bindgen/src/lib.rs new file mode 100644 index 0000000..0a3233f --- /dev/null +++ b/imgui-sys-bindgen/src/lib.rs @@ -0,0 +1,120 @@ +extern crate bindgen; +#[macro_use] +extern crate failure; +#[macro_use] +extern crate serde_derive; +extern crate serde_json; + +use bindgen::{Bindings, EnumVariation, RustTarget}; +use failure::Error; +use std::collections::HashMap; +use std::fs::{read_to_string, File}; +use std::io::Read; +use std::path::Path; + +#[derive(Deserialize)] +struct StructsAndEnums { + enums: HashMap, + structs: HashMap, +} + +#[derive(Deserialize)] +struct DefinitionArg { + #[serde(rename = "type")] + type_: String, +} + +#[derive(Deserialize)] +struct Definition { + #[serde(rename = "argsT")] + args_t: Vec, + ov_cimguiname: String, + #[serde(rename = "nonUDT")] + non_udt: Option, +} + +#[derive(Debug, Clone)] +struct Whitelist { + enums: Vec, + structs: Vec, + definitions: Vec, +} + +fn only_key((key, _): (K, V)) -> K { + key +} + +fn parse_whitelist( + structs_and_enums: R, + definitions: R, +) -> Result { + let StructsAndEnums { enums, structs } = serde_json::from_reader(structs_and_enums)?; + let enums = enums.into_iter().map(only_key).collect(); + let structs = structs.into_iter().map(only_key).collect(); + + let definitions: HashMap> = serde_json::from_reader(definitions)?; + let definitions = definitions + .into_iter() + .flat_map(|(_, defs)| { + let require_non_udt = defs.iter().any(|def| def.non_udt.is_some()); + defs.into_iter() + .filter(move |def| !require_non_udt || def.non_udt.is_some()) + }) + .filter_map(|d| { + let uses_va_list = d.args_t.iter().any(|a| a.type_ == "va_list"); + if uses_va_list { + None + } else { + Some(d.ov_cimguiname) + } + }) + .collect(); + + Ok(Whitelist { + enums, + structs, + definitions, + }) +} + +pub fn generate_bindings>(cimgui_path: &P) -> Result { + let cimgui_output_path = cimgui_path.as_ref().join("generator").join("output"); + let structs_and_enums = File::open(cimgui_output_path.join("structs_and_enums.json"))?; + let definitions = File::open(cimgui_output_path.join("definitions.json"))?; + let header = read_to_string(cimgui_output_path.join("cimgui.h"))?; + + let whitelist = parse_whitelist(structs_and_enums, definitions)?; + let mut builder = bindgen::builder() + .raw_line("#![allow(non_upper_case_globals)]") + .raw_line("#![allow(non_camel_case_types)]") + .raw_line("#![allow(non_snake_case)]") + .raw_line("#![allow(clippy::all)]") + .header_contents("cimgui.h", &header) + .rust_target(RustTarget::Stable_1_28) + .default_enum_style(EnumVariation::Consts) + .prepend_enum_name(false) + .generate_comments(false) + .layout_tests(true) + .derive_copy(true) + .derive_debug(true) + .derive_default(true) + .derive_hash(true) + .derive_partialeq(true) + .derive_eq(true) + .impl_debug(true) + .rustfmt_bindings(true) + .clang_arg("-DCIMGUI_DEFINE_ENUMS_AND_STRUCTS=1"); + for e in whitelist.structs { + builder = builder.whitelist_type(format!("^{}", e)); + } + for e in whitelist.enums { + builder = builder.whitelist_type(format!("^{}", e)); + } + for e in whitelist.definitions { + builder = builder.whitelist_function(format!("^{}", e)); + } + let bindings = builder + .generate() + .map_err(|_| format_err!("Failed to generate bindings"))?; + Ok(bindings) +} diff --git a/imgui-sys-bindgen/src/main.rs b/imgui-sys-bindgen/src/main.rs new file mode 100644 index 0000000..8ae73cb --- /dev/null +++ b/imgui-sys-bindgen/src/main.rs @@ -0,0 +1,20 @@ +extern crate imgui_sys_bindgen; + +use imgui_sys_bindgen::generate_bindings; +use std::env; + +fn main() { + let cwd = env::current_dir().expect("Failed to read current directory"); + let sys_path = cwd + .join("..") + .join("imgui-sys") + .canonicalize() + .expect("Failed to find imgui-sys directory"); + let bindings = generate_bindings(&sys_path.join("third-party").join("cimgui")) + .expect("Failed to generate bindings"); + let output_path = sys_path.join("src").join("bindings.rs"); + bindings + .write_to_file(&output_path) + .expect("Failed to write bindings"); + println!("Wrote bindings to {}", output_path.to_string_lossy()); +} diff --git a/imgui-sys/Cargo.toml b/imgui-sys/Cargo.toml index 014e3f3..f3d1753 100644 --- a/imgui-sys/Cargo.toml +++ b/imgui-sys/Cargo.toml @@ -14,10 +14,10 @@ build = "build.rs" travis-ci = { repository = "Gekkio/imgui-rs" } [dependencies] -libc = "0.2" bitflags = "1.0" glium = { version = "0.25", default-features = false, optional = true } gfx = { version = "0.18", optional = true } +libc = "0.2" [build-dependencies] cc = "1.0" diff --git a/imgui-sys/src/bindings.rs b/imgui-sys/src/bindings.rs new file mode 100644 index 0000000..21f9adc --- /dev/null +++ b/imgui-sys/src/bindings.rs @@ -0,0 +1,9801 @@ +/* automatically generated by rust-bindgen */ + +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(clippy::all)] + +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct ImVec2_Simple { + pub x: f32, + pub y: f32, +} +#[test] +fn bindgen_test_layout_ImVec2_Simple() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(ImVec2_Simple)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImVec2_Simple)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVec2_Simple), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVec2_Simple), + "::", + stringify!(y) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct ImVec4_Simple { + pub x: f32, + pub y: f32, + pub z: f32, + pub w: f32, +} +#[test] +fn bindgen_test_layout_ImVec4_Simple() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVec4_Simple)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImVec4_Simple)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVec4_Simple), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVec4_Simple), + "::", + stringify!(y) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVec4_Simple), + "::", + stringify!(z) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(ImVec4_Simple), + "::", + stringify!(w) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct ImColor_Simple { + pub Value: ImVec4_Simple, +} +#[test] +fn bindgen_test_layout_ImColor_Simple() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImColor_Simple)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImColor_Simple)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Value as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImColor_Simple), + "::", + stringify!(Value) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ImGuiContext { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ImDrawListSharedData { + _unused: [u8; 0], +} +pub type ImTextureID = *mut ::std::os::raw::c_void; +pub type ImGuiID = ::std::os::raw::c_uint; +pub type ImWchar = ::std::os::raw::c_ushort; +pub type ImGuiCol = ::std::os::raw::c_int; +pub type ImGuiCond = ::std::os::raw::c_int; +pub type ImGuiDataType = ::std::os::raw::c_int; +pub type ImGuiDir = ::std::os::raw::c_int; +pub type ImGuiKey = ::std::os::raw::c_int; +pub type ImGuiMouseCursor = ::std::os::raw::c_int; +pub type ImGuiStyleVar = ::std::os::raw::c_int; +pub type ImDrawListFlags = ::std::os::raw::c_int; +pub type ImFontAtlasFlags = ::std::os::raw::c_int; +pub type ImGuiBackendFlags = ::std::os::raw::c_int; +pub type ImGuiColorEditFlags = ::std::os::raw::c_int; +pub type ImGuiConfigFlags = ::std::os::raw::c_int; +pub type ImGuiComboFlags = ::std::os::raw::c_int; +pub type ImGuiDragDropFlags = ::std::os::raw::c_int; +pub type ImGuiFocusedFlags = ::std::os::raw::c_int; +pub type ImGuiHoveredFlags = ::std::os::raw::c_int; +pub type ImGuiInputTextFlags = ::std::os::raw::c_int; +pub type ImGuiSelectableFlags = ::std::os::raw::c_int; +pub type ImGuiTabBarFlags = ::std::os::raw::c_int; +pub type ImGuiTabItemFlags = ::std::os::raw::c_int; +pub type ImGuiTreeNodeFlags = ::std::os::raw::c_int; +pub type ImGuiWindowFlags = ::std::os::raw::c_int; +pub type ImGuiInputTextCallback = ::std::option::Option< + unsafe extern "C" fn(data: *mut ImGuiInputTextCallbackData) -> ::std::os::raw::c_int, +>; +pub type ImGuiSizeCallback = + ::std::option::Option; +pub type ImU32 = ::std::os::raw::c_uint; +pub type ImDrawCallback = ::std::option::Option< + unsafe extern "C" fn(parent_list: *const ImDrawList, cmd: *const ImDrawCmd), +>; +pub type ImDrawIdx = ::std::os::raw::c_ushort; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_float { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut f32, +} +#[test] +fn bindgen_test_layout_ImVector_float() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_float)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_float)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_float), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_float), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_float), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_float { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImWchar { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImWchar, +} +#[test] +fn bindgen_test_layout_ImVector_ImWchar() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImWchar)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImWchar)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImWchar), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImWchar), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImWchar), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImWchar { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImFontConfig { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImFontConfig, +} +#[test] +fn bindgen_test_layout_ImVector_ImFontConfig() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImFontConfig)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImFontConfig)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImFontConfig), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImFontConfig), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImFontConfig), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImFontConfig { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImFontGlyph { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImFontGlyph, +} +#[test] +fn bindgen_test_layout_ImVector_ImFontGlyph() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImFontGlyph)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImFontGlyph)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImFontGlyph), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImFontGlyph), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImFontGlyph), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImFontGlyph { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_TextRange { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut TextRange, +} +#[test] +fn bindgen_test_layout_ImVector_TextRange() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_TextRange)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_TextRange)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_TextRange), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_TextRange), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_TextRange), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_TextRange { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_CustomRect { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut CustomRect, +} +#[test] +fn bindgen_test_layout_ImVector_CustomRect() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_CustomRect)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_CustomRect)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_CustomRect), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_CustomRect), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_CustomRect), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_CustomRect { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImVec4 { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImVec4, +} +#[test] +fn bindgen_test_layout_ImVector_ImVec4() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImVec4)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImVec4)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImVec4), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImVec4), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImVec4), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImVec4 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_char { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout_ImVector_char() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_char)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_char)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_char), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_char), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_char), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_char { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImU32 { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImU32, +} +#[test] +fn bindgen_test_layout_ImVector_ImU32() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImU32)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImU32)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImU32), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImU32), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImU32), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImU32 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImTextureID { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImTextureID, +} +#[test] +fn bindgen_test_layout_ImVector_ImTextureID() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImTextureID)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImTextureID)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImTextureID), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImTextureID), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImTextureID), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImTextureID { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImDrawVert { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImDrawVert, +} +#[test] +fn bindgen_test_layout_ImVector_ImDrawVert() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImDrawVert)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImDrawVert)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawVert), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawVert), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawVert), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImDrawVert { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImFontPtr { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut *mut ImFont, +} +#[test] +fn bindgen_test_layout_ImVector_ImFontPtr() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImFontPtr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImFontPtr)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImFontPtr), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImFontPtr), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImFontPtr), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImFontPtr { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImDrawCmd { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImDrawCmd, +} +#[test] +fn bindgen_test_layout_ImVector_ImDrawCmd() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImDrawCmd)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImDrawCmd)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawCmd), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawCmd), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawCmd), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImDrawCmd { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_Pair { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut Pair, +} +#[test] +fn bindgen_test_layout_ImVector_Pair() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_Pair)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_Pair)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_Pair), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_Pair), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_Pair), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_Pair { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImDrawChannel { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImDrawChannel, +} +#[test] +fn bindgen_test_layout_ImVector_ImDrawChannel() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImDrawChannel)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImDrawChannel)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawChannel), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawChannel), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawChannel), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImDrawChannel { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImDrawIdx { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImDrawIdx, +} +#[test] +fn bindgen_test_layout_ImVector_ImDrawIdx() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImDrawIdx)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImDrawIdx)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawIdx), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawIdx), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImDrawIdx), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImDrawIdx { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImVector_ImVec2 { + pub Size: ::std::os::raw::c_int, + pub Capacity: ::std::os::raw::c_int, + pub Data: *mut ImVec2, +} +#[test] +fn bindgen_test_layout_ImVector_ImVec2() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVector_ImVec2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImVector_ImVec2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Size as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImVec2), + "::", + stringify!(Size) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Capacity as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImVec2), + "::", + stringify!(Capacity) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImVector_ImVec2), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImVector_ImVec2 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct ImVec2 { + pub x: f32, + pub y: f32, +} +#[test] +fn bindgen_test_layout_ImVec2() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(ImVec2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImVec2)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + 0usize, + concat!("Offset of field: ", stringify!(ImVec2), "::", stringify!(x)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + 4usize, + concat!("Offset of field: ", stringify!(ImVec2), "::", stringify!(y)) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct ImVec4 { + pub x: f32, + pub y: f32, + pub z: f32, + pub w: f32, +} +#[test] +fn bindgen_test_layout_ImVec4() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImVec4)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImVec4)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, + 0usize, + concat!("Offset of field: ", stringify!(ImVec4), "::", stringify!(x)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, + 4usize, + concat!("Offset of field: ", stringify!(ImVec4), "::", stringify!(y)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, + 8usize, + concat!("Offset of field: ", stringify!(ImVec4), "::", stringify!(z)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, + 12usize, + concat!("Offset of field: ", stringify!(ImVec4), "::", stringify!(w)) + ); +} +pub const ImGuiWindowFlags_None: ImGuiWindowFlags_ = 0; +pub const ImGuiWindowFlags_NoTitleBar: ImGuiWindowFlags_ = 1; +pub const ImGuiWindowFlags_NoResize: ImGuiWindowFlags_ = 2; +pub const ImGuiWindowFlags_NoMove: ImGuiWindowFlags_ = 4; +pub const ImGuiWindowFlags_NoScrollbar: ImGuiWindowFlags_ = 8; +pub const ImGuiWindowFlags_NoScrollWithMouse: ImGuiWindowFlags_ = 16; +pub const ImGuiWindowFlags_NoCollapse: ImGuiWindowFlags_ = 32; +pub const ImGuiWindowFlags_AlwaysAutoResize: ImGuiWindowFlags_ = 64; +pub const ImGuiWindowFlags_NoBackground: ImGuiWindowFlags_ = 128; +pub const ImGuiWindowFlags_NoSavedSettings: ImGuiWindowFlags_ = 256; +pub const ImGuiWindowFlags_NoMouseInputs: ImGuiWindowFlags_ = 512; +pub const ImGuiWindowFlags_MenuBar: ImGuiWindowFlags_ = 1024; +pub const ImGuiWindowFlags_HorizontalScrollbar: ImGuiWindowFlags_ = 2048; +pub const ImGuiWindowFlags_NoFocusOnAppearing: ImGuiWindowFlags_ = 4096; +pub const ImGuiWindowFlags_NoBringToFrontOnFocus: ImGuiWindowFlags_ = 8192; +pub const ImGuiWindowFlags_AlwaysVerticalScrollbar: ImGuiWindowFlags_ = 16384; +pub const ImGuiWindowFlags_AlwaysHorizontalScrollbar: ImGuiWindowFlags_ = 32768; +pub const ImGuiWindowFlags_AlwaysUseWindowPadding: ImGuiWindowFlags_ = 65536; +pub const ImGuiWindowFlags_NoNavInputs: ImGuiWindowFlags_ = 262144; +pub const ImGuiWindowFlags_NoNavFocus: ImGuiWindowFlags_ = 524288; +pub const ImGuiWindowFlags_UnsavedDocument: ImGuiWindowFlags_ = 1048576; +pub const ImGuiWindowFlags_NoNav: ImGuiWindowFlags_ = 786432; +pub const ImGuiWindowFlags_NoDecoration: ImGuiWindowFlags_ = 43; +pub const ImGuiWindowFlags_NoInputs: ImGuiWindowFlags_ = 786944; +pub const ImGuiWindowFlags_NavFlattened: ImGuiWindowFlags_ = 8388608; +pub const ImGuiWindowFlags_ChildWindow: ImGuiWindowFlags_ = 16777216; +pub const ImGuiWindowFlags_Tooltip: ImGuiWindowFlags_ = 33554432; +pub const ImGuiWindowFlags_Popup: ImGuiWindowFlags_ = 67108864; +pub const ImGuiWindowFlags_Modal: ImGuiWindowFlags_ = 134217728; +pub const ImGuiWindowFlags_ChildMenu: ImGuiWindowFlags_ = 268435456; +pub type ImGuiWindowFlags_ = u32; +pub const ImGuiInputTextFlags_None: ImGuiInputTextFlags_ = 0; +pub const ImGuiInputTextFlags_CharsDecimal: ImGuiInputTextFlags_ = 1; +pub const ImGuiInputTextFlags_CharsHexadecimal: ImGuiInputTextFlags_ = 2; +pub const ImGuiInputTextFlags_CharsUppercase: ImGuiInputTextFlags_ = 4; +pub const ImGuiInputTextFlags_CharsNoBlank: ImGuiInputTextFlags_ = 8; +pub const ImGuiInputTextFlags_AutoSelectAll: ImGuiInputTextFlags_ = 16; +pub const ImGuiInputTextFlags_EnterReturnsTrue: ImGuiInputTextFlags_ = 32; +pub const ImGuiInputTextFlags_CallbackCompletion: ImGuiInputTextFlags_ = 64; +pub const ImGuiInputTextFlags_CallbackHistory: ImGuiInputTextFlags_ = 128; +pub const ImGuiInputTextFlags_CallbackAlways: ImGuiInputTextFlags_ = 256; +pub const ImGuiInputTextFlags_CallbackCharFilter: ImGuiInputTextFlags_ = 512; +pub const ImGuiInputTextFlags_AllowTabInput: ImGuiInputTextFlags_ = 1024; +pub const ImGuiInputTextFlags_CtrlEnterForNewLine: ImGuiInputTextFlags_ = 2048; +pub const ImGuiInputTextFlags_NoHorizontalScroll: ImGuiInputTextFlags_ = 4096; +pub const ImGuiInputTextFlags_AlwaysInsertMode: ImGuiInputTextFlags_ = 8192; +pub const ImGuiInputTextFlags_ReadOnly: ImGuiInputTextFlags_ = 16384; +pub const ImGuiInputTextFlags_Password: ImGuiInputTextFlags_ = 32768; +pub const ImGuiInputTextFlags_NoUndoRedo: ImGuiInputTextFlags_ = 65536; +pub const ImGuiInputTextFlags_CharsScientific: ImGuiInputTextFlags_ = 131072; +pub const ImGuiInputTextFlags_CallbackResize: ImGuiInputTextFlags_ = 262144; +pub const ImGuiInputTextFlags_Multiline: ImGuiInputTextFlags_ = 1048576; +pub const ImGuiInputTextFlags_NoMarkEdited: ImGuiInputTextFlags_ = 2097152; +pub type ImGuiInputTextFlags_ = u32; +pub const ImGuiTreeNodeFlags_None: ImGuiTreeNodeFlags_ = 0; +pub const ImGuiTreeNodeFlags_Selected: ImGuiTreeNodeFlags_ = 1; +pub const ImGuiTreeNodeFlags_Framed: ImGuiTreeNodeFlags_ = 2; +pub const ImGuiTreeNodeFlags_AllowItemOverlap: ImGuiTreeNodeFlags_ = 4; +pub const ImGuiTreeNodeFlags_NoTreePushOnOpen: ImGuiTreeNodeFlags_ = 8; +pub const ImGuiTreeNodeFlags_NoAutoOpenOnLog: ImGuiTreeNodeFlags_ = 16; +pub const ImGuiTreeNodeFlags_DefaultOpen: ImGuiTreeNodeFlags_ = 32; +pub const ImGuiTreeNodeFlags_OpenOnDoubleClick: ImGuiTreeNodeFlags_ = 64; +pub const ImGuiTreeNodeFlags_OpenOnArrow: ImGuiTreeNodeFlags_ = 128; +pub const ImGuiTreeNodeFlags_Leaf: ImGuiTreeNodeFlags_ = 256; +pub const ImGuiTreeNodeFlags_Bullet: ImGuiTreeNodeFlags_ = 512; +pub const ImGuiTreeNodeFlags_FramePadding: ImGuiTreeNodeFlags_ = 1024; +pub const ImGuiTreeNodeFlags_NavLeftJumpsBackHere: ImGuiTreeNodeFlags_ = 8192; +pub const ImGuiTreeNodeFlags_CollapsingHeader: ImGuiTreeNodeFlags_ = 26; +pub type ImGuiTreeNodeFlags_ = u32; +pub const ImGuiSelectableFlags_None: ImGuiSelectableFlags_ = 0; +pub const ImGuiSelectableFlags_DontClosePopups: ImGuiSelectableFlags_ = 1; +pub const ImGuiSelectableFlags_SpanAllColumns: ImGuiSelectableFlags_ = 2; +pub const ImGuiSelectableFlags_AllowDoubleClick: ImGuiSelectableFlags_ = 4; +pub const ImGuiSelectableFlags_Disabled: ImGuiSelectableFlags_ = 8; +pub type ImGuiSelectableFlags_ = u32; +pub const ImGuiComboFlags_None: ImGuiComboFlags_ = 0; +pub const ImGuiComboFlags_PopupAlignLeft: ImGuiComboFlags_ = 1; +pub const ImGuiComboFlags_HeightSmall: ImGuiComboFlags_ = 2; +pub const ImGuiComboFlags_HeightRegular: ImGuiComboFlags_ = 4; +pub const ImGuiComboFlags_HeightLarge: ImGuiComboFlags_ = 8; +pub const ImGuiComboFlags_HeightLargest: ImGuiComboFlags_ = 16; +pub const ImGuiComboFlags_NoArrowButton: ImGuiComboFlags_ = 32; +pub const ImGuiComboFlags_NoPreview: ImGuiComboFlags_ = 64; +pub const ImGuiComboFlags_HeightMask_: ImGuiComboFlags_ = 30; +pub type ImGuiComboFlags_ = u32; +pub const ImGuiTabBarFlags_None: ImGuiTabBarFlags_ = 0; +pub const ImGuiTabBarFlags_Reorderable: ImGuiTabBarFlags_ = 1; +pub const ImGuiTabBarFlags_AutoSelectNewTabs: ImGuiTabBarFlags_ = 2; +pub const ImGuiTabBarFlags_TabListPopupButton: ImGuiTabBarFlags_ = 4; +pub const ImGuiTabBarFlags_NoCloseWithMiddleMouseButton: ImGuiTabBarFlags_ = 8; +pub const ImGuiTabBarFlags_NoTabListScrollingButtons: ImGuiTabBarFlags_ = 16; +pub const ImGuiTabBarFlags_NoTooltip: ImGuiTabBarFlags_ = 32; +pub const ImGuiTabBarFlags_FittingPolicyResizeDown: ImGuiTabBarFlags_ = 64; +pub const ImGuiTabBarFlags_FittingPolicyScroll: ImGuiTabBarFlags_ = 128; +pub const ImGuiTabBarFlags_FittingPolicyMask_: ImGuiTabBarFlags_ = 192; +pub const ImGuiTabBarFlags_FittingPolicyDefault_: ImGuiTabBarFlags_ = 64; +pub type ImGuiTabBarFlags_ = u32; +pub const ImGuiTabItemFlags_None: ImGuiTabItemFlags_ = 0; +pub const ImGuiTabItemFlags_UnsavedDocument: ImGuiTabItemFlags_ = 1; +pub const ImGuiTabItemFlags_SetSelected: ImGuiTabItemFlags_ = 2; +pub const ImGuiTabItemFlags_NoCloseWithMiddleMouseButton: ImGuiTabItemFlags_ = 4; +pub const ImGuiTabItemFlags_NoPushId: ImGuiTabItemFlags_ = 8; +pub type ImGuiTabItemFlags_ = u32; +pub const ImGuiFocusedFlags_None: ImGuiFocusedFlags_ = 0; +pub const ImGuiFocusedFlags_ChildWindows: ImGuiFocusedFlags_ = 1; +pub const ImGuiFocusedFlags_RootWindow: ImGuiFocusedFlags_ = 2; +pub const ImGuiFocusedFlags_AnyWindow: ImGuiFocusedFlags_ = 4; +pub const ImGuiFocusedFlags_RootAndChildWindows: ImGuiFocusedFlags_ = 3; +pub type ImGuiFocusedFlags_ = u32; +pub const ImGuiHoveredFlags_None: ImGuiHoveredFlags_ = 0; +pub const ImGuiHoveredFlags_ChildWindows: ImGuiHoveredFlags_ = 1; +pub const ImGuiHoveredFlags_RootWindow: ImGuiHoveredFlags_ = 2; +pub const ImGuiHoveredFlags_AnyWindow: ImGuiHoveredFlags_ = 4; +pub const ImGuiHoveredFlags_AllowWhenBlockedByPopup: ImGuiHoveredFlags_ = 8; +pub const ImGuiHoveredFlags_AllowWhenBlockedByActiveItem: ImGuiHoveredFlags_ = 32; +pub const ImGuiHoveredFlags_AllowWhenOverlapped: ImGuiHoveredFlags_ = 64; +pub const ImGuiHoveredFlags_AllowWhenDisabled: ImGuiHoveredFlags_ = 128; +pub const ImGuiHoveredFlags_RectOnly: ImGuiHoveredFlags_ = 104; +pub const ImGuiHoveredFlags_RootAndChildWindows: ImGuiHoveredFlags_ = 3; +pub type ImGuiHoveredFlags_ = u32; +pub const ImGuiDragDropFlags_None: ImGuiDragDropFlags_ = 0; +pub const ImGuiDragDropFlags_SourceNoPreviewTooltip: ImGuiDragDropFlags_ = 1; +pub const ImGuiDragDropFlags_SourceNoDisableHover: ImGuiDragDropFlags_ = 2; +pub const ImGuiDragDropFlags_SourceNoHoldToOpenOthers: ImGuiDragDropFlags_ = 4; +pub const ImGuiDragDropFlags_SourceAllowNullID: ImGuiDragDropFlags_ = 8; +pub const ImGuiDragDropFlags_SourceExtern: ImGuiDragDropFlags_ = 16; +pub const ImGuiDragDropFlags_SourceAutoExpirePayload: ImGuiDragDropFlags_ = 32; +pub const ImGuiDragDropFlags_AcceptBeforeDelivery: ImGuiDragDropFlags_ = 1024; +pub const ImGuiDragDropFlags_AcceptNoDrawDefaultRect: ImGuiDragDropFlags_ = 2048; +pub const ImGuiDragDropFlags_AcceptNoPreviewTooltip: ImGuiDragDropFlags_ = 4096; +pub const ImGuiDragDropFlags_AcceptPeekOnly: ImGuiDragDropFlags_ = 3072; +pub type ImGuiDragDropFlags_ = u32; +pub const ImGuiDataType_S8: ImGuiDataType_ = 0; +pub const ImGuiDataType_U8: ImGuiDataType_ = 1; +pub const ImGuiDataType_S16: ImGuiDataType_ = 2; +pub const ImGuiDataType_U16: ImGuiDataType_ = 3; +pub const ImGuiDataType_S32: ImGuiDataType_ = 4; +pub const ImGuiDataType_U32: ImGuiDataType_ = 5; +pub const ImGuiDataType_S64: ImGuiDataType_ = 6; +pub const ImGuiDataType_U64: ImGuiDataType_ = 7; +pub const ImGuiDataType_Float: ImGuiDataType_ = 8; +pub const ImGuiDataType_Double: ImGuiDataType_ = 9; +pub const ImGuiDataType_COUNT: ImGuiDataType_ = 10; +pub type ImGuiDataType_ = u32; +pub const ImGuiDir_None: ImGuiDir_ = -1; +pub const ImGuiDir_Left: ImGuiDir_ = 0; +pub const ImGuiDir_Right: ImGuiDir_ = 1; +pub const ImGuiDir_Up: ImGuiDir_ = 2; +pub const ImGuiDir_Down: ImGuiDir_ = 3; +pub const ImGuiDir_COUNT: ImGuiDir_ = 4; +pub type ImGuiDir_ = i32; +pub const ImGuiKey_Tab: ImGuiKey_ = 0; +pub const ImGuiKey_LeftArrow: ImGuiKey_ = 1; +pub const ImGuiKey_RightArrow: ImGuiKey_ = 2; +pub const ImGuiKey_UpArrow: ImGuiKey_ = 3; +pub const ImGuiKey_DownArrow: ImGuiKey_ = 4; +pub const ImGuiKey_PageUp: ImGuiKey_ = 5; +pub const ImGuiKey_PageDown: ImGuiKey_ = 6; +pub const ImGuiKey_Home: ImGuiKey_ = 7; +pub const ImGuiKey_End: ImGuiKey_ = 8; +pub const ImGuiKey_Insert: ImGuiKey_ = 9; +pub const ImGuiKey_Delete: ImGuiKey_ = 10; +pub const ImGuiKey_Backspace: ImGuiKey_ = 11; +pub const ImGuiKey_Space: ImGuiKey_ = 12; +pub const ImGuiKey_Enter: ImGuiKey_ = 13; +pub const ImGuiKey_Escape: ImGuiKey_ = 14; +pub const ImGuiKey_A: ImGuiKey_ = 15; +pub const ImGuiKey_C: ImGuiKey_ = 16; +pub const ImGuiKey_V: ImGuiKey_ = 17; +pub const ImGuiKey_X: ImGuiKey_ = 18; +pub const ImGuiKey_Y: ImGuiKey_ = 19; +pub const ImGuiKey_Z: ImGuiKey_ = 20; +pub const ImGuiKey_COUNT: ImGuiKey_ = 21; +pub type ImGuiKey_ = u32; +pub const ImGuiNavInput_Activate: ImGuiNavInput_ = 0; +pub const ImGuiNavInput_Cancel: ImGuiNavInput_ = 1; +pub const ImGuiNavInput_Input: ImGuiNavInput_ = 2; +pub const ImGuiNavInput_Menu: ImGuiNavInput_ = 3; +pub const ImGuiNavInput_DpadLeft: ImGuiNavInput_ = 4; +pub const ImGuiNavInput_DpadRight: ImGuiNavInput_ = 5; +pub const ImGuiNavInput_DpadUp: ImGuiNavInput_ = 6; +pub const ImGuiNavInput_DpadDown: ImGuiNavInput_ = 7; +pub const ImGuiNavInput_LStickLeft: ImGuiNavInput_ = 8; +pub const ImGuiNavInput_LStickRight: ImGuiNavInput_ = 9; +pub const ImGuiNavInput_LStickUp: ImGuiNavInput_ = 10; +pub const ImGuiNavInput_LStickDown: ImGuiNavInput_ = 11; +pub const ImGuiNavInput_FocusPrev: ImGuiNavInput_ = 12; +pub const ImGuiNavInput_FocusNext: ImGuiNavInput_ = 13; +pub const ImGuiNavInput_TweakSlow: ImGuiNavInput_ = 14; +pub const ImGuiNavInput_TweakFast: ImGuiNavInput_ = 15; +pub const ImGuiNavInput_KeyMenu_: ImGuiNavInput_ = 16; +pub const ImGuiNavInput_KeyTab_: ImGuiNavInput_ = 17; +pub const ImGuiNavInput_KeyLeft_: ImGuiNavInput_ = 18; +pub const ImGuiNavInput_KeyRight_: ImGuiNavInput_ = 19; +pub const ImGuiNavInput_KeyUp_: ImGuiNavInput_ = 20; +pub const ImGuiNavInput_KeyDown_: ImGuiNavInput_ = 21; +pub const ImGuiNavInput_COUNT: ImGuiNavInput_ = 22; +pub const ImGuiNavInput_InternalStart_: ImGuiNavInput_ = 16; +pub type ImGuiNavInput_ = u32; +pub const ImGuiConfigFlags_None: ImGuiConfigFlags_ = 0; +pub const ImGuiConfigFlags_NavEnableKeyboard: ImGuiConfigFlags_ = 1; +pub const ImGuiConfigFlags_NavEnableGamepad: ImGuiConfigFlags_ = 2; +pub const ImGuiConfigFlags_NavEnableSetMousePos: ImGuiConfigFlags_ = 4; +pub const ImGuiConfigFlags_NavNoCaptureKeyboard: ImGuiConfigFlags_ = 8; +pub const ImGuiConfigFlags_NoMouse: ImGuiConfigFlags_ = 16; +pub const ImGuiConfigFlags_NoMouseCursorChange: ImGuiConfigFlags_ = 32; +pub const ImGuiConfigFlags_IsSRGB: ImGuiConfigFlags_ = 1048576; +pub const ImGuiConfigFlags_IsTouchScreen: ImGuiConfigFlags_ = 2097152; +pub type ImGuiConfigFlags_ = u32; +pub const ImGuiBackendFlags_None: ImGuiBackendFlags_ = 0; +pub const ImGuiBackendFlags_HasGamepad: ImGuiBackendFlags_ = 1; +pub const ImGuiBackendFlags_HasMouseCursors: ImGuiBackendFlags_ = 2; +pub const ImGuiBackendFlags_HasSetMousePos: ImGuiBackendFlags_ = 4; +pub const ImGuiBackendFlags_RendererHasVtxOffset: ImGuiBackendFlags_ = 8; +pub type ImGuiBackendFlags_ = u32; +pub const ImGuiCol_Text: ImGuiCol_ = 0; +pub const ImGuiCol_TextDisabled: ImGuiCol_ = 1; +pub const ImGuiCol_WindowBg: ImGuiCol_ = 2; +pub const ImGuiCol_ChildBg: ImGuiCol_ = 3; +pub const ImGuiCol_PopupBg: ImGuiCol_ = 4; +pub const ImGuiCol_Border: ImGuiCol_ = 5; +pub const ImGuiCol_BorderShadow: ImGuiCol_ = 6; +pub const ImGuiCol_FrameBg: ImGuiCol_ = 7; +pub const ImGuiCol_FrameBgHovered: ImGuiCol_ = 8; +pub const ImGuiCol_FrameBgActive: ImGuiCol_ = 9; +pub const ImGuiCol_TitleBg: ImGuiCol_ = 10; +pub const ImGuiCol_TitleBgActive: ImGuiCol_ = 11; +pub const ImGuiCol_TitleBgCollapsed: ImGuiCol_ = 12; +pub const ImGuiCol_MenuBarBg: ImGuiCol_ = 13; +pub const ImGuiCol_ScrollbarBg: ImGuiCol_ = 14; +pub const ImGuiCol_ScrollbarGrab: ImGuiCol_ = 15; +pub const ImGuiCol_ScrollbarGrabHovered: ImGuiCol_ = 16; +pub const ImGuiCol_ScrollbarGrabActive: ImGuiCol_ = 17; +pub const ImGuiCol_CheckMark: ImGuiCol_ = 18; +pub const ImGuiCol_SliderGrab: ImGuiCol_ = 19; +pub const ImGuiCol_SliderGrabActive: ImGuiCol_ = 20; +pub const ImGuiCol_Button: ImGuiCol_ = 21; +pub const ImGuiCol_ButtonHovered: ImGuiCol_ = 22; +pub const ImGuiCol_ButtonActive: ImGuiCol_ = 23; +pub const ImGuiCol_Header: ImGuiCol_ = 24; +pub const ImGuiCol_HeaderHovered: ImGuiCol_ = 25; +pub const ImGuiCol_HeaderActive: ImGuiCol_ = 26; +pub const ImGuiCol_Separator: ImGuiCol_ = 27; +pub const ImGuiCol_SeparatorHovered: ImGuiCol_ = 28; +pub const ImGuiCol_SeparatorActive: ImGuiCol_ = 29; +pub const ImGuiCol_ResizeGrip: ImGuiCol_ = 30; +pub const ImGuiCol_ResizeGripHovered: ImGuiCol_ = 31; +pub const ImGuiCol_ResizeGripActive: ImGuiCol_ = 32; +pub const ImGuiCol_Tab: ImGuiCol_ = 33; +pub const ImGuiCol_TabHovered: ImGuiCol_ = 34; +pub const ImGuiCol_TabActive: ImGuiCol_ = 35; +pub const ImGuiCol_TabUnfocused: ImGuiCol_ = 36; +pub const ImGuiCol_TabUnfocusedActive: ImGuiCol_ = 37; +pub const ImGuiCol_PlotLines: ImGuiCol_ = 38; +pub const ImGuiCol_PlotLinesHovered: ImGuiCol_ = 39; +pub const ImGuiCol_PlotHistogram: ImGuiCol_ = 40; +pub const ImGuiCol_PlotHistogramHovered: ImGuiCol_ = 41; +pub const ImGuiCol_TextSelectedBg: ImGuiCol_ = 42; +pub const ImGuiCol_DragDropTarget: ImGuiCol_ = 43; +pub const ImGuiCol_NavHighlight: ImGuiCol_ = 44; +pub const ImGuiCol_NavWindowingHighlight: ImGuiCol_ = 45; +pub const ImGuiCol_NavWindowingDimBg: ImGuiCol_ = 46; +pub const ImGuiCol_ModalWindowDimBg: ImGuiCol_ = 47; +pub const ImGuiCol_COUNT: ImGuiCol_ = 48; +pub type ImGuiCol_ = u32; +pub const ImGuiStyleVar_Alpha: ImGuiStyleVar_ = 0; +pub const ImGuiStyleVar_WindowPadding: ImGuiStyleVar_ = 1; +pub const ImGuiStyleVar_WindowRounding: ImGuiStyleVar_ = 2; +pub const ImGuiStyleVar_WindowBorderSize: ImGuiStyleVar_ = 3; +pub const ImGuiStyleVar_WindowMinSize: ImGuiStyleVar_ = 4; +pub const ImGuiStyleVar_WindowTitleAlign: ImGuiStyleVar_ = 5; +pub const ImGuiStyleVar_ChildRounding: ImGuiStyleVar_ = 6; +pub const ImGuiStyleVar_ChildBorderSize: ImGuiStyleVar_ = 7; +pub const ImGuiStyleVar_PopupRounding: ImGuiStyleVar_ = 8; +pub const ImGuiStyleVar_PopupBorderSize: ImGuiStyleVar_ = 9; +pub const ImGuiStyleVar_FramePadding: ImGuiStyleVar_ = 10; +pub const ImGuiStyleVar_FrameRounding: ImGuiStyleVar_ = 11; +pub const ImGuiStyleVar_FrameBorderSize: ImGuiStyleVar_ = 12; +pub const ImGuiStyleVar_ItemSpacing: ImGuiStyleVar_ = 13; +pub const ImGuiStyleVar_ItemInnerSpacing: ImGuiStyleVar_ = 14; +pub const ImGuiStyleVar_IndentSpacing: ImGuiStyleVar_ = 15; +pub const ImGuiStyleVar_ScrollbarSize: ImGuiStyleVar_ = 16; +pub const ImGuiStyleVar_ScrollbarRounding: ImGuiStyleVar_ = 17; +pub const ImGuiStyleVar_GrabMinSize: ImGuiStyleVar_ = 18; +pub const ImGuiStyleVar_GrabRounding: ImGuiStyleVar_ = 19; +pub const ImGuiStyleVar_TabRounding: ImGuiStyleVar_ = 20; +pub const ImGuiStyleVar_ButtonTextAlign: ImGuiStyleVar_ = 21; +pub const ImGuiStyleVar_SelectableTextAlign: ImGuiStyleVar_ = 22; +pub const ImGuiStyleVar_COUNT: ImGuiStyleVar_ = 23; +pub type ImGuiStyleVar_ = u32; +pub const ImGuiColorEditFlags_None: ImGuiColorEditFlags_ = 0; +pub const ImGuiColorEditFlags_NoAlpha: ImGuiColorEditFlags_ = 2; +pub const ImGuiColorEditFlags_NoPicker: ImGuiColorEditFlags_ = 4; +pub const ImGuiColorEditFlags_NoOptions: ImGuiColorEditFlags_ = 8; +pub const ImGuiColorEditFlags_NoSmallPreview: ImGuiColorEditFlags_ = 16; +pub const ImGuiColorEditFlags_NoInputs: ImGuiColorEditFlags_ = 32; +pub const ImGuiColorEditFlags_NoTooltip: ImGuiColorEditFlags_ = 64; +pub const ImGuiColorEditFlags_NoLabel: ImGuiColorEditFlags_ = 128; +pub const ImGuiColorEditFlags_NoSidePreview: ImGuiColorEditFlags_ = 256; +pub const ImGuiColorEditFlags_NoDragDrop: ImGuiColorEditFlags_ = 512; +pub const ImGuiColorEditFlags_AlphaBar: ImGuiColorEditFlags_ = 65536; +pub const ImGuiColorEditFlags_AlphaPreview: ImGuiColorEditFlags_ = 131072; +pub const ImGuiColorEditFlags_AlphaPreviewHalf: ImGuiColorEditFlags_ = 262144; +pub const ImGuiColorEditFlags_HDR: ImGuiColorEditFlags_ = 524288; +pub const ImGuiColorEditFlags_DisplayRGB: ImGuiColorEditFlags_ = 1048576; +pub const ImGuiColorEditFlags_DisplayHSV: ImGuiColorEditFlags_ = 2097152; +pub const ImGuiColorEditFlags_DisplayHex: ImGuiColorEditFlags_ = 4194304; +pub const ImGuiColorEditFlags_Uint8: ImGuiColorEditFlags_ = 8388608; +pub const ImGuiColorEditFlags_Float: ImGuiColorEditFlags_ = 16777216; +pub const ImGuiColorEditFlags_PickerHueBar: ImGuiColorEditFlags_ = 33554432; +pub const ImGuiColorEditFlags_PickerHueWheel: ImGuiColorEditFlags_ = 67108864; +pub const ImGuiColorEditFlags_InputRGB: ImGuiColorEditFlags_ = 134217728; +pub const ImGuiColorEditFlags_InputHSV: ImGuiColorEditFlags_ = 268435456; +pub const ImGuiColorEditFlags__OptionsDefault: ImGuiColorEditFlags_ = 177209344; +pub const ImGuiColorEditFlags__DisplayMask: ImGuiColorEditFlags_ = 7340032; +pub const ImGuiColorEditFlags__DataTypeMask: ImGuiColorEditFlags_ = 25165824; +pub const ImGuiColorEditFlags__PickerMask: ImGuiColorEditFlags_ = 100663296; +pub const ImGuiColorEditFlags__InputMask: ImGuiColorEditFlags_ = 402653184; +pub type ImGuiColorEditFlags_ = u32; +pub const ImGuiMouseCursor_None: ImGuiMouseCursor_ = -1; +pub const ImGuiMouseCursor_Arrow: ImGuiMouseCursor_ = 0; +pub const ImGuiMouseCursor_TextInput: ImGuiMouseCursor_ = 1; +pub const ImGuiMouseCursor_ResizeAll: ImGuiMouseCursor_ = 2; +pub const ImGuiMouseCursor_ResizeNS: ImGuiMouseCursor_ = 3; +pub const ImGuiMouseCursor_ResizeEW: ImGuiMouseCursor_ = 4; +pub const ImGuiMouseCursor_ResizeNESW: ImGuiMouseCursor_ = 5; +pub const ImGuiMouseCursor_ResizeNWSE: ImGuiMouseCursor_ = 6; +pub const ImGuiMouseCursor_Hand: ImGuiMouseCursor_ = 7; +pub const ImGuiMouseCursor_COUNT: ImGuiMouseCursor_ = 8; +pub type ImGuiMouseCursor_ = i32; +pub const ImGuiCond_Always: ImGuiCond_ = 1; +pub const ImGuiCond_Once: ImGuiCond_ = 2; +pub const ImGuiCond_FirstUseEver: ImGuiCond_ = 4; +pub const ImGuiCond_Appearing: ImGuiCond_ = 8; +pub type ImGuiCond_ = u32; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct ImGuiStyle { + pub Alpha: f32, + pub WindowPadding: ImVec2, + pub WindowRounding: f32, + pub WindowBorderSize: f32, + pub WindowMinSize: ImVec2, + pub WindowTitleAlign: ImVec2, + pub WindowMenuButtonPosition: ImGuiDir, + pub ChildRounding: f32, + pub ChildBorderSize: f32, + pub PopupRounding: f32, + pub PopupBorderSize: f32, + pub FramePadding: ImVec2, + pub FrameRounding: f32, + pub FrameBorderSize: f32, + pub ItemSpacing: ImVec2, + pub ItemInnerSpacing: ImVec2, + pub TouchExtraPadding: ImVec2, + pub IndentSpacing: f32, + pub ColumnsMinSpacing: f32, + pub ScrollbarSize: f32, + pub ScrollbarRounding: f32, + pub GrabMinSize: f32, + pub GrabRounding: f32, + pub TabRounding: f32, + pub TabBorderSize: f32, + pub ButtonTextAlign: ImVec2, + pub SelectableTextAlign: ImVec2, + pub DisplayWindowPadding: ImVec2, + pub DisplaySafeAreaPadding: ImVec2, + pub MouseCursorScale: f32, + pub AntiAliasedLines: bool, + pub AntiAliasedFill: bool, + pub CurveTessellationTol: f32, + pub Colors: [ImVec4; 48usize], +} +#[test] +fn bindgen_test_layout_ImGuiStyle() { + assert_eq!( + ::std::mem::size_of::(), + 940usize, + concat!("Size of: ", stringify!(ImGuiStyle)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImGuiStyle)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Alpha as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(Alpha) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WindowPadding as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(WindowPadding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WindowRounding as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(WindowRounding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WindowBorderSize as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(WindowBorderSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WindowMinSize as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(WindowMinSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WindowTitleAlign as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(WindowTitleAlign) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).WindowMenuButtonPosition as *const _ as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(WindowMenuButtonPosition) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ChildRounding as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(ChildRounding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ChildBorderSize as *const _ as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(ChildBorderSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).PopupRounding as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(PopupRounding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).PopupBorderSize as *const _ as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(PopupBorderSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FramePadding as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(FramePadding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FrameRounding as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(FrameRounding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FrameBorderSize as *const _ as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(FrameBorderSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ItemSpacing as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(ItemSpacing) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ItemInnerSpacing as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(ItemInnerSpacing) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TouchExtraPadding as *const _ as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(TouchExtraPadding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IndentSpacing as *const _ as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(IndentSpacing) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ColumnsMinSpacing as *const _ as usize }, + 100usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(ColumnsMinSpacing) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ScrollbarSize as *const _ as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(ScrollbarSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ScrollbarRounding as *const _ as usize }, + 108usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(ScrollbarRounding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GrabMinSize as *const _ as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(GrabMinSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GrabRounding as *const _ as usize }, + 116usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(GrabRounding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TabRounding as *const _ as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(TabRounding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TabBorderSize as *const _ as usize }, + 124usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(TabBorderSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ButtonTextAlign as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(ButtonTextAlign) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).SelectableTextAlign as *const _ as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(SelectableTextAlign) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DisplayWindowPadding as *const _ as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(DisplayWindowPadding) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).DisplaySafeAreaPadding as *const _ as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(DisplaySafeAreaPadding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseCursorScale as *const _ as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(MouseCursorScale) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).AntiAliasedLines as *const _ as usize }, + 164usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(AntiAliasedLines) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).AntiAliasedFill as *const _ as usize }, + 165usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(AntiAliasedFill) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).CurveTessellationTol as *const _ as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(CurveTessellationTol) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Colors as *const _ as usize }, + 172usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStyle), + "::", + stringify!(Colors) + ) + ); +} +impl Default for ImGuiStyle { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl ::std::fmt::Debug for ImGuiStyle { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! ( f , "ImGuiStyle {{ Alpha: {:?}, WindowPadding: {:?}, WindowRounding: {:?}, WindowBorderSize: {:?}, WindowMinSize: {:?}, WindowTitleAlign: {:?}, WindowMenuButtonPosition: {:?}, ChildRounding: {:?}, ChildBorderSize: {:?}, PopupRounding: {:?}, PopupBorderSize: {:?}, FramePadding: {:?}, FrameRounding: {:?}, FrameBorderSize: {:?}, ItemSpacing: {:?}, ItemInnerSpacing: {:?}, TouchExtraPadding: {:?}, IndentSpacing: {:?}, ColumnsMinSpacing: {:?}, ScrollbarSize: {:?}, ScrollbarRounding: {:?}, GrabMinSize: {:?}, GrabRounding: {:?}, TabRounding: {:?}, TabBorderSize: {:?}, ButtonTextAlign: {:?}, SelectableTextAlign: {:?}, DisplayWindowPadding: {:?}, DisplaySafeAreaPadding: {:?}, MouseCursorScale: {:?}, AntiAliasedLines: {:?}, AntiAliasedFill: {:?}, CurveTessellationTol: {:?}, Colors: [{}] }}" , self . Alpha , self . WindowPadding , self . WindowRounding , self . WindowBorderSize , self . WindowMinSize , self . WindowTitleAlign , self . WindowMenuButtonPosition , self . ChildRounding , self . ChildBorderSize , self . PopupRounding , self . PopupBorderSize , self . FramePadding , self . FrameRounding , self . FrameBorderSize , self . ItemSpacing , self . ItemInnerSpacing , self . TouchExtraPadding , self . IndentSpacing , self . ColumnsMinSpacing , self . ScrollbarSize , self . ScrollbarRounding , self . GrabMinSize , self . GrabRounding , self . TabRounding , self . TabBorderSize , self . ButtonTextAlign , self . SelectableTextAlign , self . DisplayWindowPadding , self . DisplaySafeAreaPadding , self . MouseCursorScale , self . AntiAliasedLines , self . AntiAliasedFill , self . CurveTessellationTol , self . Colors . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) ) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct ImGuiIO { + pub ConfigFlags: ImGuiConfigFlags, + pub BackendFlags: ImGuiBackendFlags, + pub DisplaySize: ImVec2, + pub DeltaTime: f32, + pub IniSavingRate: f32, + pub IniFilename: *const ::std::os::raw::c_char, + pub LogFilename: *const ::std::os::raw::c_char, + pub MouseDoubleClickTime: f32, + pub MouseDoubleClickMaxDist: f32, + pub MouseDragThreshold: f32, + pub KeyMap: [::std::os::raw::c_int; 21usize], + pub KeyRepeatDelay: f32, + pub KeyRepeatRate: f32, + pub UserData: *mut ::std::os::raw::c_void, + pub Fonts: *mut ImFontAtlas, + pub FontGlobalScale: f32, + pub FontAllowUserScaling: bool, + pub FontDefault: *mut ImFont, + pub DisplayFramebufferScale: ImVec2, + pub MouseDrawCursor: bool, + pub ConfigMacOSXBehaviors: bool, + pub ConfigInputTextCursorBlink: bool, + pub ConfigWindowsResizeFromEdges: bool, + pub ConfigWindowsMoveFromTitleBarOnly: bool, + pub BackendPlatformName: *const ::std::os::raw::c_char, + pub BackendRendererName: *const ::std::os::raw::c_char, + pub BackendPlatformUserData: *mut ::std::os::raw::c_void, + pub BackendRendererUserData: *mut ::std::os::raw::c_void, + pub BackendLanguageUserData: *mut ::std::os::raw::c_void, + pub GetClipboardTextFn: ::std::option::Option< + unsafe extern "C" fn( + user_data: *mut ::std::os::raw::c_void, + ) -> *const ::std::os::raw::c_char, + >, + pub SetClipboardTextFn: ::std::option::Option< + unsafe extern "C" fn( + user_data: *mut ::std::os::raw::c_void, + text: *const ::std::os::raw::c_char, + ), + >, + pub ClipboardUserData: *mut ::std::os::raw::c_void, + pub ImeSetInputScreenPosFn: ::std::option::Option< + unsafe extern "C" fn(x: ::std::os::raw::c_int, y: ::std::os::raw::c_int), + >, + pub ImeWindowHandle: *mut ::std::os::raw::c_void, + pub RenderDrawListsFnUnused: *mut ::std::os::raw::c_void, + pub MousePos: ImVec2, + pub MouseDown: [bool; 5usize], + pub MouseWheel: f32, + pub MouseWheelH: f32, + pub KeyCtrl: bool, + pub KeyShift: bool, + pub KeyAlt: bool, + pub KeySuper: bool, + pub KeysDown: [bool; 512usize], + pub NavInputs: [f32; 22usize], + pub WantCaptureMouse: bool, + pub WantCaptureKeyboard: bool, + pub WantTextInput: bool, + pub WantSetMousePos: bool, + pub WantSaveIniSettings: bool, + pub NavActive: bool, + pub NavVisible: bool, + pub Framerate: f32, + pub MetricsRenderVertices: ::std::os::raw::c_int, + pub MetricsRenderIndices: ::std::os::raw::c_int, + pub MetricsRenderWindows: ::std::os::raw::c_int, + pub MetricsActiveWindows: ::std::os::raw::c_int, + pub MetricsActiveAllocations: ::std::os::raw::c_int, + pub MouseDelta: ImVec2, + pub MousePosPrev: ImVec2, + pub MouseClickedPos: [ImVec2; 5usize], + pub MouseClickedTime: [f64; 5usize], + pub MouseClicked: [bool; 5usize], + pub MouseDoubleClicked: [bool; 5usize], + pub MouseReleased: [bool; 5usize], + pub MouseDownOwned: [bool; 5usize], + pub MouseDownWasDoubleClick: [bool; 5usize], + pub MouseDownDuration: [f32; 5usize], + pub MouseDownDurationPrev: [f32; 5usize], + pub MouseDragMaxDistanceAbs: [ImVec2; 5usize], + pub MouseDragMaxDistanceSqr: [f32; 5usize], + pub KeysDownDuration: [f32; 512usize], + pub KeysDownDurationPrev: [f32; 512usize], + pub NavInputsDownDuration: [f32; 22usize], + pub NavInputsDownDurationPrev: [f32; 22usize], + pub InputQueueCharacters: ImVector_ImWchar, +} +#[test] +fn bindgen_test_layout_ImGuiIO() { + assert_eq!( + ::std::mem::size_of::(), + 5456usize, + concat!("Size of: ", stringify!(ImGuiIO)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImGuiIO)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ConfigFlags as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(ConfigFlags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).BackendFlags as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(BackendFlags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DisplaySize as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(DisplaySize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DeltaTime as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(DeltaTime) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IniSavingRate as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(IniSavingRate) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IniFilename as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(IniFilename) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).LogFilename as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(LogFilename) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDoubleClickTime as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDoubleClickTime) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDoubleClickMaxDist as *const _ as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDoubleClickMaxDist) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDragThreshold as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDragThreshold) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeyMap as *const _ as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeyMap) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeyRepeatDelay as *const _ as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeyRepeatDelay) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeyRepeatRate as *const _ as usize }, + 140usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeyRepeatRate) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).UserData as *const _ as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(UserData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Fonts as *const _ as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(Fonts) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FontGlobalScale as *const _ as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(FontGlobalScale) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FontAllowUserScaling as *const _ as usize }, + 164usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(FontAllowUserScaling) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FontDefault as *const _ as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(FontDefault) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DisplayFramebufferScale as *const _ as usize }, + 176usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(DisplayFramebufferScale) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDrawCursor as *const _ as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDrawCursor) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ConfigMacOSXBehaviors as *const _ as usize }, + 185usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(ConfigMacOSXBehaviors) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).ConfigInputTextCursorBlink as *const _ as usize + }, + 186usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(ConfigInputTextCursorBlink) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).ConfigWindowsResizeFromEdges as *const _ as usize + }, + 187usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(ConfigWindowsResizeFromEdges) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).ConfigWindowsMoveFromTitleBarOnly as *const _ + as usize + }, + 188usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(ConfigWindowsMoveFromTitleBarOnly) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).BackendPlatformName as *const _ as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(BackendPlatformName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).BackendRendererName as *const _ as usize }, + 200usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(BackendRendererName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).BackendPlatformUserData as *const _ as usize }, + 208usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(BackendPlatformUserData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).BackendRendererUserData as *const _ as usize }, + 216usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(BackendRendererUserData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).BackendLanguageUserData as *const _ as usize }, + 224usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(BackendLanguageUserData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GetClipboardTextFn as *const _ as usize }, + 232usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(GetClipboardTextFn) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).SetClipboardTextFn as *const _ as usize }, + 240usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(SetClipboardTextFn) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ClipboardUserData as *const _ as usize }, + 248usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(ClipboardUserData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ImeSetInputScreenPosFn as *const _ as usize }, + 256usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(ImeSetInputScreenPosFn) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ImeWindowHandle as *const _ as usize }, + 264usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(ImeWindowHandle) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).RenderDrawListsFnUnused as *const _ as usize }, + 272usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(RenderDrawListsFnUnused) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MousePos as *const _ as usize }, + 280usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MousePos) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDown as *const _ as usize }, + 288usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDown) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseWheel as *const _ as usize }, + 296usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseWheel) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseWheelH as *const _ as usize }, + 300usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseWheelH) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeyCtrl as *const _ as usize }, + 304usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeyCtrl) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeyShift as *const _ as usize }, + 305usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeyShift) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeyAlt as *const _ as usize }, + 306usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeyAlt) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeySuper as *const _ as usize }, + 307usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeySuper) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeysDown as *const _ as usize }, + 308usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeysDown) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).NavInputs as *const _ as usize }, + 820usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(NavInputs) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WantCaptureMouse as *const _ as usize }, + 908usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(WantCaptureMouse) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WantCaptureKeyboard as *const _ as usize }, + 909usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(WantCaptureKeyboard) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WantTextInput as *const _ as usize }, + 910usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(WantTextInput) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WantSetMousePos as *const _ as usize }, + 911usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(WantSetMousePos) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).WantSaveIniSettings as *const _ as usize }, + 912usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(WantSaveIniSettings) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).NavActive as *const _ as usize }, + 913usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(NavActive) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).NavVisible as *const _ as usize }, + 914usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(NavVisible) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Framerate as *const _ as usize }, + 916usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(Framerate) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MetricsRenderVertices as *const _ as usize }, + 920usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MetricsRenderVertices) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MetricsRenderIndices as *const _ as usize }, + 924usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MetricsRenderIndices) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MetricsRenderWindows as *const _ as usize }, + 928usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MetricsRenderWindows) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MetricsActiveWindows as *const _ as usize }, + 932usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MetricsActiveWindows) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).MetricsActiveAllocations as *const _ as usize + }, + 936usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MetricsActiveAllocations) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDelta as *const _ as usize }, + 940usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDelta) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MousePosPrev as *const _ as usize }, + 948usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MousePosPrev) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseClickedPos as *const _ as usize }, + 956usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseClickedPos) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseClickedTime as *const _ as usize }, + 1000usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseClickedTime) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseClicked as *const _ as usize }, + 1040usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseClicked) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDoubleClicked as *const _ as usize }, + 1045usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDoubleClicked) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseReleased as *const _ as usize }, + 1050usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseReleased) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDownOwned as *const _ as usize }, + 1055usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDownOwned) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDownWasDoubleClick as *const _ as usize }, + 1060usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDownWasDoubleClick) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDownDuration as *const _ as usize }, + 1068usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDownDuration) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDownDurationPrev as *const _ as usize }, + 1088usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDownDurationPrev) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDragMaxDistanceAbs as *const _ as usize }, + 1108usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDragMaxDistanceAbs) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MouseDragMaxDistanceSqr as *const _ as usize }, + 1148usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(MouseDragMaxDistanceSqr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeysDownDuration as *const _ as usize }, + 1168usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeysDownDuration) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).KeysDownDurationPrev as *const _ as usize }, + 3216usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(KeysDownDurationPrev) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).NavInputsDownDuration as *const _ as usize }, + 5264usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(NavInputsDownDuration) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).NavInputsDownDurationPrev as *const _ as usize + }, + 5352usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(NavInputsDownDurationPrev) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).InputQueueCharacters as *const _ as usize }, + 5440usize, + concat!( + "Offset of field: ", + stringify!(ImGuiIO), + "::", + stringify!(InputQueueCharacters) + ) + ); +} +impl Default for ImGuiIO { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl ::std::fmt::Debug for ImGuiIO { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! ( f , "ImGuiIO {{ ConfigFlags: {:?}, BackendFlags: {:?}, DisplaySize: {:?}, DeltaTime: {:?}, IniSavingRate: {:?}, IniFilename: {:?}, LogFilename: {:?}, MouseDoubleClickTime: {:?}, MouseDoubleClickMaxDist: {:?}, MouseDragThreshold: {:?}, KeyMap: {:?}, KeyRepeatDelay: {:?}, KeyRepeatRate: {:?}, UserData: {:?}, Fonts: {:?}, FontGlobalScale: {:?}, FontAllowUserScaling: {:?}, FontDefault: {:?}, DisplayFramebufferScale: {:?}, MouseDrawCursor: {:?}, ConfigMacOSXBehaviors: {:?}, ConfigInputTextCursorBlink: {:?}, ConfigWindowsResizeFromEdges: {:?}, ConfigWindowsMoveFromTitleBarOnly: {:?}, BackendPlatformName: {:?}, BackendRendererName: {:?}, BackendPlatformUserData: {:?}, BackendRendererUserData: {:?}, BackendLanguageUserData: {:?}, GetClipboardTextFn: {:?}, SetClipboardTextFn: {:?}, ClipboardUserData: {:?}, ImeSetInputScreenPosFn: {:?}, ImeWindowHandle: {:?}, RenderDrawListsFnUnused: {:?}, MousePos: {:?}, MouseDown: {:?}, MouseWheel: {:?}, MouseWheelH: {:?}, KeyCtrl: {:?}, KeyShift: {:?}, KeyAlt: {:?}, KeySuper: {:?}, KeysDown: [{}], NavInputs: {:?}, WantCaptureMouse: {:?}, WantCaptureKeyboard: {:?}, WantTextInput: {:?}, WantSetMousePos: {:?}, WantSaveIniSettings: {:?}, NavActive: {:?}, NavVisible: {:?}, Framerate: {:?}, MetricsRenderVertices: {:?}, MetricsRenderIndices: {:?}, MetricsRenderWindows: {:?}, MetricsActiveWindows: {:?}, MetricsActiveAllocations: {:?}, MouseDelta: {:?}, MousePosPrev: {:?}, MouseClickedPos: {:?}, MouseClickedTime: {:?}, MouseClicked: {:?}, MouseDoubleClicked: {:?}, MouseReleased: {:?}, MouseDownOwned: {:?}, MouseDownWasDoubleClick: {:?}, MouseDownDuration: {:?}, MouseDownDurationPrev: {:?}, MouseDragMaxDistanceAbs: {:?}, MouseDragMaxDistanceSqr: {:?}, KeysDownDuration: [{}], KeysDownDurationPrev: [{}], NavInputsDownDuration: {:?}, NavInputsDownDurationPrev: {:?}, InputQueueCharacters: {:?} }}" , self . ConfigFlags , self . BackendFlags , self . DisplaySize , self . DeltaTime , self . IniSavingRate , self . IniFilename , self . LogFilename , self . MouseDoubleClickTime , self . MouseDoubleClickMaxDist , self . MouseDragThreshold , self . KeyMap , self . KeyRepeatDelay , self . KeyRepeatRate , self . UserData , self . Fonts , self . FontGlobalScale , self . FontAllowUserScaling , self . FontDefault , self . DisplayFramebufferScale , self . MouseDrawCursor , self . ConfigMacOSXBehaviors , self . ConfigInputTextCursorBlink , self . ConfigWindowsResizeFromEdges , self . ConfigWindowsMoveFromTitleBarOnly , self . BackendPlatformName , self . BackendRendererName , self . BackendPlatformUserData , self . BackendRendererUserData , self . BackendLanguageUserData , self . GetClipboardTextFn , self . SetClipboardTextFn , self . ClipboardUserData , self . ImeSetInputScreenPosFn , self . ImeWindowHandle , self . RenderDrawListsFnUnused , self . MousePos , self . MouseDown , self . MouseWheel , self . MouseWheelH , self . KeyCtrl , self . KeyShift , self . KeyAlt , self . KeySuper , self . KeysDown . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . NavInputs , self . WantCaptureMouse , self . WantCaptureKeyboard , self . WantTextInput , self . WantSetMousePos , self . WantSaveIniSettings , self . NavActive , self . NavVisible , self . Framerate , self . MetricsRenderVertices , self . MetricsRenderIndices , self . MetricsRenderWindows , self . MetricsActiveWindows , self . MetricsActiveAllocations , self . MouseDelta , self . MousePosPrev , self . MouseClickedPos , self . MouseClickedTime , self . MouseClicked , self . MouseDoubleClicked , self . MouseReleased , self . MouseDownOwned , self . MouseDownWasDoubleClick , self . MouseDownDuration , self . MouseDownDurationPrev , self . MouseDragMaxDistanceAbs , self . MouseDragMaxDistanceSqr , self . KeysDownDuration . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . KeysDownDurationPrev . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . NavInputsDownDuration , self . NavInputsDownDurationPrev , self . InputQueueCharacters ) + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImGuiInputTextCallbackData { + pub EventFlag: ImGuiInputTextFlags, + pub Flags: ImGuiInputTextFlags, + pub UserData: *mut ::std::os::raw::c_void, + pub EventChar: ImWchar, + pub EventKey: ImGuiKey, + pub Buf: *mut ::std::os::raw::c_char, + pub BufTextLen: ::std::os::raw::c_int, + pub BufSize: ::std::os::raw::c_int, + pub BufDirty: bool, + pub CursorPos: ::std::os::raw::c_int, + pub SelectionStart: ::std::os::raw::c_int, + pub SelectionEnd: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_ImGuiInputTextCallbackData() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(ImGuiInputTextCallbackData)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImGuiInputTextCallbackData)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).EventFlag as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(EventFlag) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).Flags as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(Flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).UserData as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(UserData) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).EventChar as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(EventChar) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).EventKey as *const _ as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(EventKey) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Buf as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(Buf) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).BufTextLen as *const _ as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(BufTextLen) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).BufSize as *const _ as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(BufSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).BufDirty as *const _ as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(BufDirty) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).CursorPos as *const _ as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(CursorPos) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SelectionStart as *const _ + as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(SelectionStart) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).SelectionEnd as *const _ as usize + }, + 52usize, + concat!( + "Offset of field: ", + stringify!(ImGuiInputTextCallbackData), + "::", + stringify!(SelectionEnd) + ) + ); +} +impl Default for ImGuiInputTextCallbackData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct ImGuiSizeCallbackData { + pub UserData: *mut ::std::os::raw::c_void, + pub Pos: ImVec2, + pub CurrentSize: ImVec2, + pub DesiredSize: ImVec2, +} +#[test] +fn bindgen_test_layout_ImGuiSizeCallbackData() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(ImGuiSizeCallbackData)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImGuiSizeCallbackData)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).UserData as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiSizeCallbackData), + "::", + stringify!(UserData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Pos as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImGuiSizeCallbackData), + "::", + stringify!(Pos) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).CurrentSize as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImGuiSizeCallbackData), + "::", + stringify!(CurrentSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).DesiredSize as *const _ as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImGuiSizeCallbackData), + "::", + stringify!(DesiredSize) + ) + ); +} +impl Default for ImGuiSizeCallbackData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct ImGuiPayload { + pub Data: *mut ::std::os::raw::c_void, + pub DataSize: ::std::os::raw::c_int, + pub SourceId: ImGuiID, + pub SourceParentId: ImGuiID, + pub DataFrameCount: ::std::os::raw::c_int, + pub DataType: [::std::os::raw::c_char; 33usize], + pub Preview: bool, + pub Delivery: bool, +} +#[test] +fn bindgen_test_layout_ImGuiPayload() { + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(ImGuiPayload)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImGuiPayload)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiPayload), + "::", + stringify!(Data) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DataSize as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImGuiPayload), + "::", + stringify!(DataSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).SourceId as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(ImGuiPayload), + "::", + stringify!(SourceId) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).SourceParentId as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImGuiPayload), + "::", + stringify!(SourceParentId) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DataFrameCount as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImGuiPayload), + "::", + stringify!(DataFrameCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DataType as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImGuiPayload), + "::", + stringify!(DataType) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Preview as *const _ as usize }, + 57usize, + concat!( + "Offset of field: ", + stringify!(ImGuiPayload), + "::", + stringify!(Preview) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Delivery as *const _ as usize }, + 58usize, + concat!( + "Offset of field: ", + stringify!(ImGuiPayload), + "::", + stringify!(Delivery) + ) + ); +} +impl Default for ImGuiPayload { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl ::std::fmt::Debug for ImGuiPayload { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! ( f , "ImGuiPayload {{ Data: {:?}, DataSize: {:?}, SourceId: {:?}, SourceParentId: {:?}, DataFrameCount: {:?}, DataType: [{}], Preview: {:?}, Delivery: {:?} }}" , self . Data , self . DataSize , self . SourceId , self . SourceParentId , self . DataFrameCount , self . DataType . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . Preview , self . Delivery ) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImGuiOnceUponAFrame { + pub RefFrame: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_ImGuiOnceUponAFrame() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(ImGuiOnceUponAFrame)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImGuiOnceUponAFrame)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).RefFrame as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiOnceUponAFrame), + "::", + stringify!(RefFrame) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct ImGuiTextFilter { + pub InputBuf: [::std::os::raw::c_char; 256usize], + pub Filters: ImVector_TextRange, + pub CountGrep: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_ImGuiTextFilter() { + assert_eq!( + ::std::mem::size_of::(), + 280usize, + concat!("Size of: ", stringify!(ImGuiTextFilter)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImGuiTextFilter)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).InputBuf as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiTextFilter), + "::", + stringify!(InputBuf) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Filters as *const _ as usize }, + 256usize, + concat!( + "Offset of field: ", + stringify!(ImGuiTextFilter), + "::", + stringify!(Filters) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).CountGrep as *const _ as usize }, + 272usize, + concat!( + "Offset of field: ", + stringify!(ImGuiTextFilter), + "::", + stringify!(CountGrep) + ) + ); +} +impl Default for ImGuiTextFilter { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl ::std::fmt::Debug for ImGuiTextFilter { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "ImGuiTextFilter {{ InputBuf: [{}], Filters: {:?}, CountGrep: {:?} }}", + self.InputBuf + .iter() + .enumerate() + .map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v)) + .collect::(), + self.Filters, + self.CountGrep + ) + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImGuiTextBuffer { + pub Buf: ImVector_char, +} +#[test] +fn bindgen_test_layout_ImGuiTextBuffer() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImGuiTextBuffer)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImGuiTextBuffer)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Buf as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiTextBuffer), + "::", + stringify!(Buf) + ) + ); +} +impl Default for ImGuiTextBuffer { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImGuiStorage { + pub Data: ImVector_Pair, +} +#[test] +fn bindgen_test_layout_ImGuiStorage() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImGuiStorage)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImGuiStorage)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Data as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiStorage), + "::", + stringify!(Data) + ) + ); +} +impl Default for ImGuiStorage { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct ImGuiListClipper { + pub StartPosY: f32, + pub ItemsHeight: f32, + pub ItemsCount: ::std::os::raw::c_int, + pub StepNo: ::std::os::raw::c_int, + pub DisplayStart: ::std::os::raw::c_int, + pub DisplayEnd: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_ImGuiListClipper() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(ImGuiListClipper)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImGuiListClipper)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).StartPosY as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImGuiListClipper), + "::", + stringify!(StartPosY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ItemsHeight as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImGuiListClipper), + "::", + stringify!(ItemsHeight) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ItemsCount as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImGuiListClipper), + "::", + stringify!(ItemsCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).StepNo as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(ImGuiListClipper), + "::", + stringify!(StepNo) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DisplayStart as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImGuiListClipper), + "::", + stringify!(DisplayStart) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DisplayEnd as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImGuiListClipper), + "::", + stringify!(DisplayEnd) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct ImColor { + pub Value: ImVec4, +} +#[test] +fn bindgen_test_layout_ImColor() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImColor)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImColor)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Value as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImColor), + "::", + stringify!(Value) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct ImDrawCmd { + pub ElemCount: ::std::os::raw::c_uint, + pub ClipRect: ImVec4, + pub TextureId: ImTextureID, + pub VtxOffset: ::std::os::raw::c_uint, + pub IdxOffset: ::std::os::raw::c_uint, + pub UserCallback: ImDrawCallback, + pub UserCallbackData: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_ImDrawCmd() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(ImDrawCmd)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImDrawCmd)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ElemCount as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImDrawCmd), + "::", + stringify!(ElemCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ClipRect as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImDrawCmd), + "::", + stringify!(ClipRect) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TextureId as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImDrawCmd), + "::", + stringify!(TextureId) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).VtxOffset as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(ImDrawCmd), + "::", + stringify!(VtxOffset) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IdxOffset as *const _ as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(ImDrawCmd), + "::", + stringify!(IdxOffset) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).UserCallback as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(ImDrawCmd), + "::", + stringify!(UserCallback) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).UserCallbackData as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(ImDrawCmd), + "::", + stringify!(UserCallbackData) + ) + ); +} +impl Default for ImDrawCmd { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct ImDrawVert { + pub pos: ImVec2, + pub uv: ImVec2, + pub col: ImU32, +} +#[test] +fn bindgen_test_layout_ImDrawVert() { + assert_eq!( + ::std::mem::size_of::(), + 20usize, + concat!("Size of: ", stringify!(ImDrawVert)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImDrawVert)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImDrawVert), + "::", + stringify!(pos) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).uv as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImDrawVert), + "::", + stringify!(uv) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).col as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImDrawVert), + "::", + stringify!(col) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImDrawChannel { + pub _CmdBuffer: ImVector_ImDrawCmd, + pub _IdxBuffer: ImVector_ImDrawIdx, +} +#[test] +fn bindgen_test_layout_ImDrawChannel() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(ImDrawChannel)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImDrawChannel)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._CmdBuffer as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImDrawChannel), + "::", + stringify!(_CmdBuffer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._IdxBuffer as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImDrawChannel), + "::", + stringify!(_IdxBuffer) + ) + ); +} +impl Default for ImDrawChannel { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImDrawListSplitter { + pub _Current: ::std::os::raw::c_int, + pub _Count: ::std::os::raw::c_int, + pub _Channels: ImVector_ImDrawChannel, +} +#[test] +fn bindgen_test_layout_ImDrawListSplitter() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(ImDrawListSplitter)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImDrawListSplitter)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._Current as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImDrawListSplitter), + "::", + stringify!(_Current) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._Count as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImDrawListSplitter), + "::", + stringify!(_Count) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._Channels as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImDrawListSplitter), + "::", + stringify!(_Channels) + ) + ); +} +impl Default for ImDrawListSplitter { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub const ImDrawCornerFlags_TopLeft: ImDrawCornerFlags_ = 1; +pub const ImDrawCornerFlags_TopRight: ImDrawCornerFlags_ = 2; +pub const ImDrawCornerFlags_BotLeft: ImDrawCornerFlags_ = 4; +pub const ImDrawCornerFlags_BotRight: ImDrawCornerFlags_ = 8; +pub const ImDrawCornerFlags_Top: ImDrawCornerFlags_ = 3; +pub const ImDrawCornerFlags_Bot: ImDrawCornerFlags_ = 12; +pub const ImDrawCornerFlags_Left: ImDrawCornerFlags_ = 5; +pub const ImDrawCornerFlags_Right: ImDrawCornerFlags_ = 10; +pub const ImDrawCornerFlags_All: ImDrawCornerFlags_ = 15; +pub type ImDrawCornerFlags_ = u32; +pub const ImDrawListFlags_None: ImDrawListFlags_ = 0; +pub const ImDrawListFlags_AntiAliasedLines: ImDrawListFlags_ = 1; +pub const ImDrawListFlags_AntiAliasedFill: ImDrawListFlags_ = 2; +pub const ImDrawListFlags_AllowVtxOffset: ImDrawListFlags_ = 4; +pub type ImDrawListFlags_ = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImDrawList { + pub CmdBuffer: ImVector_ImDrawCmd, + pub IdxBuffer: ImVector_ImDrawIdx, + pub VtxBuffer: ImVector_ImDrawVert, + pub Flags: ImDrawListFlags, + pub _Data: *const ImDrawListSharedData, + pub _OwnerName: *const ::std::os::raw::c_char, + pub _VtxCurrentOffset: ::std::os::raw::c_uint, + pub _VtxCurrentIdx: ::std::os::raw::c_uint, + pub _VtxWritePtr: *mut ImDrawVert, + pub _IdxWritePtr: *mut ImDrawIdx, + pub _ClipRectStack: ImVector_ImVec4, + pub _TextureIdStack: ImVector_ImTextureID, + pub _Path: ImVector_ImVec2, + pub _Splitter: ImDrawListSplitter, +} +#[test] +fn bindgen_test_layout_ImDrawList() { + assert_eq!( + ::std::mem::size_of::(), + 168usize, + concat!("Size of: ", stringify!(ImDrawList)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImDrawList)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).CmdBuffer as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(CmdBuffer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IdxBuffer as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(IdxBuffer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).VtxBuffer as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(VtxBuffer) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Flags as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(Flags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._Data as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_Data) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._OwnerName as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_OwnerName) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._VtxCurrentOffset as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_VtxCurrentOffset) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._VtxCurrentIdx as *const _ as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_VtxCurrentIdx) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._VtxWritePtr as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_VtxWritePtr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._IdxWritePtr as *const _ as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_IdxWritePtr) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._ClipRectStack as *const _ as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_ClipRectStack) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._TextureIdStack as *const _ as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_TextureIdStack) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._Path as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_Path) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::()))._Splitter as *const _ as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(ImDrawList), + "::", + stringify!(_Splitter) + ) + ); +} +impl Default for ImDrawList { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct ImDrawData { + pub Valid: bool, + pub CmdLists: *mut *mut ImDrawList, + pub CmdListsCount: ::std::os::raw::c_int, + pub TotalIdxCount: ::std::os::raw::c_int, + pub TotalVtxCount: ::std::os::raw::c_int, + pub DisplayPos: ImVec2, + pub DisplaySize: ImVec2, + pub FramebufferScale: ImVec2, +} +#[test] +fn bindgen_test_layout_ImDrawData() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(ImDrawData)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImDrawData)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Valid as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImDrawData), + "::", + stringify!(Valid) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).CmdLists as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImDrawData), + "::", + stringify!(CmdLists) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).CmdListsCount as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImDrawData), + "::", + stringify!(CmdListsCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TotalIdxCount as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImDrawData), + "::", + stringify!(TotalIdxCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TotalVtxCount as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImDrawData), + "::", + stringify!(TotalVtxCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DisplayPos as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(ImDrawData), + "::", + stringify!(DisplayPos) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DisplaySize as *const _ as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(ImDrawData), + "::", + stringify!(DisplaySize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FramebufferScale as *const _ as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(ImDrawData), + "::", + stringify!(FramebufferScale) + ) + ); +} +impl Default for ImDrawData { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct ImFontConfig { + pub FontData: *mut ::std::os::raw::c_void, + pub FontDataSize: ::std::os::raw::c_int, + pub FontDataOwnedByAtlas: bool, + pub FontNo: ::std::os::raw::c_int, + pub SizePixels: f32, + pub OversampleH: ::std::os::raw::c_int, + pub OversampleV: ::std::os::raw::c_int, + pub PixelSnapH: bool, + pub GlyphExtraSpacing: ImVec2, + pub GlyphOffset: ImVec2, + pub GlyphRanges: *const ImWchar, + pub GlyphMinAdvanceX: f32, + pub GlyphMaxAdvanceX: f32, + pub MergeMode: bool, + pub RasterizerFlags: ::std::os::raw::c_uint, + pub RasterizerMultiply: f32, + pub Name: [::std::os::raw::c_char; 40usize], + pub DstFont: *mut ImFont, +} +#[test] +fn bindgen_test_layout_ImFontConfig() { + assert_eq!( + ::std::mem::size_of::(), + 136usize, + concat!("Size of: ", stringify!(ImFontConfig)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImFontConfig)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FontData as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(FontData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FontDataSize as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(FontDataSize) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).FontDataOwnedByAtlas as *const _ as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(FontDataOwnedByAtlas) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FontNo as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(FontNo) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).SizePixels as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(SizePixels) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).OversampleH as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(OversampleH) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).OversampleV as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(OversampleV) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).PixelSnapH as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(PixelSnapH) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GlyphExtraSpacing as *const _ as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(GlyphExtraSpacing) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GlyphOffset as *const _ as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(GlyphOffset) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GlyphRanges as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(GlyphRanges) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GlyphMinAdvanceX as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(GlyphMinAdvanceX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GlyphMaxAdvanceX as *const _ as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(GlyphMaxAdvanceX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MergeMode as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(MergeMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).RasterizerFlags as *const _ as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(RasterizerFlags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).RasterizerMultiply as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(RasterizerMultiply) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Name as *const _ as usize }, + 84usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(Name) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DstFont as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(ImFontConfig), + "::", + stringify!(DstFont) + ) + ); +} +impl Default for ImFontConfig { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl ::std::fmt::Debug for ImFontConfig { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! ( f , "ImFontConfig {{ FontData: {:?}, FontDataSize: {:?}, FontDataOwnedByAtlas: {:?}, FontNo: {:?}, SizePixels: {:?}, OversampleH: {:?}, OversampleV: {:?}, PixelSnapH: {:?}, GlyphExtraSpacing: {:?}, GlyphOffset: {:?}, GlyphRanges: {:?}, GlyphMinAdvanceX: {:?}, GlyphMaxAdvanceX: {:?}, MergeMode: {:?}, RasterizerFlags: {:?}, RasterizerMultiply: {:?}, 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 . Name . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . DstFont ) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct ImFontGlyph { + pub Codepoint: ImWchar, + pub AdvanceX: f32, + pub X0: f32, + pub Y0: f32, + pub X1: f32, + pub Y1: f32, + pub U0: f32, + pub V0: f32, + pub U1: f32, + pub V1: f32, +} +#[test] +fn bindgen_test_layout_ImFontGlyph() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(ImFontGlyph)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(ImFontGlyph)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Codepoint as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(Codepoint) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).AdvanceX as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(AdvanceX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).X0 as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(X0) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Y0 as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(Y0) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).X1 as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(X1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Y1 as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(Y1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).U0 as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(U0) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).V0 as *const _ as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(V0) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).U1 as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(U1) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).V1 as *const _ as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyph), + "::", + stringify!(V1) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ImFontGlyphRangesBuilder { + pub UsedChars: ImVector_ImU32, +} +#[test] +fn bindgen_test_layout_ImFontGlyphRangesBuilder() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ImFontGlyphRangesBuilder)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImFontGlyphRangesBuilder)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::())).UsedChars as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImFontGlyphRangesBuilder), + "::", + stringify!(UsedChars) + ) + ); +} +impl Default for ImFontGlyphRangesBuilder { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +pub const ImFontAtlasFlags_None: ImFontAtlasFlags_ = 0; +pub const ImFontAtlasFlags_NoPowerOfTwoHeight: ImFontAtlasFlags_ = 1; +pub const ImFontAtlasFlags_NoMouseCursors: ImFontAtlasFlags_ = 2; +pub type ImFontAtlasFlags_ = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct ImFontAtlas { + pub Locked: bool, + pub Flags: ImFontAtlasFlags, + pub TexID: ImTextureID, + pub TexDesiredWidth: ::std::os::raw::c_int, + pub TexGlyphPadding: ::std::os::raw::c_int, + pub TexPixelsAlpha8: *mut ::std::os::raw::c_uchar, + pub TexPixelsRGBA32: *mut ::std::os::raw::c_uint, + pub TexWidth: ::std::os::raw::c_int, + pub TexHeight: ::std::os::raw::c_int, + pub TexUvScale: ImVec2, + pub TexUvWhitePixel: ImVec2, + pub Fonts: ImVector_ImFontPtr, + pub CustomRects: ImVector_CustomRect, + pub ConfigData: ImVector_ImFontConfig, + pub CustomRectIds: [::std::os::raw::c_int; 1usize], +} +#[test] +fn bindgen_test_layout_ImFontAtlas() { + assert_eq!( + ::std::mem::size_of::(), + 120usize, + concat!("Size of: ", stringify!(ImFontAtlas)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImFontAtlas)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Locked as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(Locked) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Flags as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(Flags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TexID as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(TexID) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TexDesiredWidth as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(TexDesiredWidth) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TexGlyphPadding as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(TexGlyphPadding) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TexPixelsAlpha8 as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(TexPixelsAlpha8) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TexPixelsRGBA32 as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(TexPixelsRGBA32) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TexWidth as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(TexWidth) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TexHeight as *const _ as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(TexHeight) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TexUvScale as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(TexUvScale) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).TexUvWhitePixel as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(TexUvWhitePixel) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Fonts as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(Fonts) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).CustomRects as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(CustomRects) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ConfigData as *const _ as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(ConfigData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).CustomRectIds as *const _ as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(ImFontAtlas), + "::", + stringify!(CustomRectIds) + ) + ); +} +impl Default for ImFontAtlas { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct ImFont { + pub IndexAdvanceX: ImVector_float, + pub FallbackAdvanceX: f32, + pub FontSize: f32, + pub IndexLookup: ImVector_ImWchar, + pub Glyphs: ImVector_ImFontGlyph, + pub FallbackGlyph: *const ImFontGlyph, + pub DisplayOffset: ImVec2, + pub ContainerAtlas: *mut ImFontAtlas, + pub ConfigData: *const ImFontConfig, + pub ConfigDataCount: ::std::os::raw::c_short, + pub FallbackChar: ImWchar, + pub Scale: f32, + pub Ascent: f32, + pub Descent: f32, + pub MetricsTotalSurface: ::std::os::raw::c_int, + pub DirtyLookupTables: bool, +} +#[test] +fn bindgen_test_layout_ImFont() { + assert_eq!( + ::std::mem::size_of::(), + 112usize, + concat!("Size of: ", stringify!(ImFont)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ImFont)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IndexAdvanceX as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(IndexAdvanceX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FallbackAdvanceX as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(FallbackAdvanceX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FontSize as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(FontSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).IndexLookup as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(IndexLookup) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Glyphs as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(Glyphs) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FallbackGlyph as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(FallbackGlyph) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DisplayOffset as *const _ as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(DisplayOffset) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ContainerAtlas as *const _ as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(ContainerAtlas) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ConfigData as *const _ as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(ConfigData) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ConfigDataCount as *const _ as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(ConfigDataCount) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).FallbackChar as *const _ as usize }, + 90usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(FallbackChar) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Scale as *const _ as usize }, + 92usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(Scale) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Ascent as *const _ as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(Ascent) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Descent as *const _ as usize }, + 100usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(Descent) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).MetricsTotalSurface as *const _ as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(MetricsTotalSurface) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).DirtyLookupTables as *const _ as usize }, + 108usize, + concat!( + "Offset of field: ", + stringify!(ImFont), + "::", + stringify!(DirtyLookupTables) + ) + ); +} +impl Default for ImFont { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct TextRange { + pub b: *const ::std::os::raw::c_char, + pub e: *const ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout_TextRange() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(TextRange)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(TextRange)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(TextRange), + "::", + stringify!(b) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).e as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(TextRange), + "::", + stringify!(e) + ) + ); +} +impl Default for TextRange { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct Pair { + pub key: ImGuiID, + pub __bindgen_anon_1: Pair__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union Pair__bindgen_ty_1 { + pub val_i: ::std::os::raw::c_int, + pub val_f: f32, + pub val_p: *mut ::std::os::raw::c_void, + _bindgen_union_align: u64, +} +#[test] +fn bindgen_test_layout_Pair__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(Pair__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(Pair__bindgen_ty_1)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).val_i as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(Pair__bindgen_ty_1), + "::", + stringify!(val_i) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).val_f as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(Pair__bindgen_ty_1), + "::", + stringify!(val_f) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).val_p as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(Pair__bindgen_ty_1), + "::", + stringify!(val_p) + ) + ); +} +impl Default for Pair__bindgen_ty_1 { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl ::std::fmt::Debug for Pair__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "Pair__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_Pair() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(Pair)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(Pair)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, + 0usize, + concat!("Offset of field: ", stringify!(Pair), "::", stringify!(key)) + ); +} +impl Default for Pair { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +impl ::std::fmt::Debug for Pair { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "Pair {{ key: {:?}, __bindgen_anon_1: {:?} }}", + self.key, self.__bindgen_anon_1 + ) + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct CustomRect { + pub ID: ::std::os::raw::c_uint, + pub Width: ::std::os::raw::c_ushort, + pub Height: ::std::os::raw::c_ushort, + pub X: ::std::os::raw::c_ushort, + pub Y: ::std::os::raw::c_ushort, + pub GlyphAdvanceX: f32, + pub GlyphOffset: ImVec2, + pub Font: *mut ImFont, +} +#[test] +fn bindgen_test_layout_CustomRect() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(CustomRect)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(CustomRect)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).ID as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CustomRect), + "::", + stringify!(ID) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Width as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(CustomRect), + "::", + stringify!(Width) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Height as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(CustomRect), + "::", + stringify!(Height) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).X as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(CustomRect), + "::", + stringify!(X) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Y as *const _ as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(CustomRect), + "::", + stringify!(Y) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GlyphAdvanceX as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(CustomRect), + "::", + stringify!(GlyphAdvanceX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).GlyphOffset as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(CustomRect), + "::", + stringify!(GlyphOffset) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).Font as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(CustomRect), + "::", + stringify!(Font) + ) + ); +} +impl Default for CustomRect { + fn default() -> Self { + unsafe { ::std::mem::zeroed() } + } +} +extern "C" { + pub fn ImVec2_ImVec2() -> *mut ImVec2; +} +extern "C" { + pub fn ImVec2_destroy(self_: *mut ImVec2); +} +extern "C" { + pub fn ImVec2_ImVec2Float(_x: f32, _y: f32) -> *mut ImVec2; +} +extern "C" { + pub fn ImVec4_ImVec4() -> *mut ImVec4; +} +extern "C" { + pub fn ImVec4_destroy(self_: *mut ImVec4); +} +extern "C" { + pub fn ImVec4_ImVec4Float(_x: f32, _y: f32, _z: f32, _w: f32) -> *mut ImVec4; +} +extern "C" { + pub fn igCreateContext(shared_font_atlas: *mut ImFontAtlas) -> *mut ImGuiContext; +} +extern "C" { + pub fn igDestroyContext(ctx: *mut ImGuiContext); +} +extern "C" { + pub fn igGetCurrentContext() -> *mut ImGuiContext; +} +extern "C" { + pub fn igSetCurrentContext(ctx: *mut ImGuiContext); +} +extern "C" { + pub fn igDebugCheckVersionAndDataLayout( + version_str: *const ::std::os::raw::c_char, + sz_io: usize, + sz_style: usize, + sz_vec2: usize, + sz_vec4: usize, + sz_drawvert: usize, + sz_drawidx: usize, + ) -> bool; +} +extern "C" { + pub fn igGetIO() -> *mut ImGuiIO; +} +extern "C" { + pub fn igGetStyle() -> *mut ImGuiStyle; +} +extern "C" { + pub fn igNewFrame(); +} +extern "C" { + pub fn igEndFrame(); +} +extern "C" { + pub fn igRender(); +} +extern "C" { + pub fn igGetDrawData() -> *mut ImDrawData; +} +extern "C" { + pub fn igShowDemoWindow(p_open: *mut bool); +} +extern "C" { + pub fn igShowAboutWindow(p_open: *mut bool); +} +extern "C" { + pub fn igShowMetricsWindow(p_open: *mut bool); +} +extern "C" { + pub fn igShowStyleEditor(ref_: *mut ImGuiStyle); +} +extern "C" { + pub fn igShowStyleSelector(label: *const ::std::os::raw::c_char) -> bool; +} +extern "C" { + pub fn igShowFontSelector(label: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igShowUserGuide(); +} +extern "C" { + pub fn igGetVersion() -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn igStyleColorsDark(dst: *mut ImGuiStyle); +} +extern "C" { + pub fn igStyleColorsClassic(dst: *mut ImGuiStyle); +} +extern "C" { + pub fn igStyleColorsLight(dst: *mut ImGuiStyle); +} +extern "C" { + pub fn igBegin( + name: *const ::std::os::raw::c_char, + p_open: *mut bool, + flags: ImGuiWindowFlags, + ) -> bool; +} +extern "C" { + pub fn igEnd(); +} +extern "C" { + pub fn igBeginChild( + str_id: *const ::std::os::raw::c_char, + size: ImVec2, + border: bool, + flags: ImGuiWindowFlags, + ) -> bool; +} +extern "C" { + pub fn igBeginChildID(id: ImGuiID, size: ImVec2, border: bool, flags: ImGuiWindowFlags) + -> bool; +} +extern "C" { + pub fn igEndChild(); +} +extern "C" { + pub fn igIsWindowAppearing() -> bool; +} +extern "C" { + pub fn igIsWindowCollapsed() -> bool; +} +extern "C" { + pub fn igIsWindowFocused(flags: ImGuiFocusedFlags) -> bool; +} +extern "C" { + pub fn igIsWindowHovered(flags: ImGuiHoveredFlags) -> bool; +} +extern "C" { + pub fn igGetWindowDrawList() -> *mut ImDrawList; +} +extern "C" { + pub fn igGetWindowWidth() -> f32; +} +extern "C" { + pub fn igGetWindowHeight() -> f32; +} +extern "C" { + pub fn igSetNextWindowPos(pos: ImVec2, cond: ImGuiCond, pivot: ImVec2); +} +extern "C" { + pub fn igSetNextWindowSize(size: ImVec2, cond: ImGuiCond); +} +extern "C" { + pub fn igSetNextWindowSizeConstraints( + size_min: ImVec2, + size_max: ImVec2, + custom_callback: ImGuiSizeCallback, + custom_callback_data: *mut ::std::os::raw::c_void, + ); +} +extern "C" { + pub fn igSetNextWindowContentSize(size: ImVec2); +} +extern "C" { + pub fn igSetNextWindowCollapsed(collapsed: bool, cond: ImGuiCond); +} +extern "C" { + pub fn igSetNextWindowFocus(); +} +extern "C" { + pub fn igSetNextWindowBgAlpha(alpha: f32); +} +extern "C" { + pub fn igSetWindowPosVec2(pos: ImVec2, cond: ImGuiCond); +} +extern "C" { + pub fn igSetWindowSizeVec2(size: ImVec2, cond: ImGuiCond); +} +extern "C" { + pub fn igSetWindowCollapsedBool(collapsed: bool, cond: ImGuiCond); +} +extern "C" { + pub fn igSetWindowFocus(); +} +extern "C" { + pub fn igSetWindowFontScale(scale: f32); +} +extern "C" { + pub fn igSetWindowPosStr(name: *const ::std::os::raw::c_char, pos: ImVec2, cond: ImGuiCond); +} +extern "C" { + pub fn igSetWindowSizeStr(name: *const ::std::os::raw::c_char, size: ImVec2, cond: ImGuiCond); +} +extern "C" { + pub fn igSetWindowCollapsedStr( + name: *const ::std::os::raw::c_char, + collapsed: bool, + cond: ImGuiCond, + ); +} +extern "C" { + pub fn igSetWindowFocusStr(name: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igGetWindowContentRegionWidth() -> f32; +} +extern "C" { + pub fn igGetScrollX() -> f32; +} +extern "C" { + pub fn igGetScrollY() -> f32; +} +extern "C" { + pub fn igGetScrollMaxX() -> f32; +} +extern "C" { + pub fn igGetScrollMaxY() -> f32; +} +extern "C" { + pub fn igSetScrollX(scroll_x: f32); +} +extern "C" { + pub fn igSetScrollY(scroll_y: f32); +} +extern "C" { + pub fn igSetScrollHereY(center_y_ratio: f32); +} +extern "C" { + pub fn igSetScrollFromPosY(local_y: f32, center_y_ratio: f32); +} +extern "C" { + pub fn igPushFont(font: *mut ImFont); +} +extern "C" { + pub fn igPopFont(); +} +extern "C" { + pub fn igPushStyleColorU32(idx: ImGuiCol, col: ImU32); +} +extern "C" { + pub fn igPushStyleColor(idx: ImGuiCol, col: ImVec4); +} +extern "C" { + pub fn igPopStyleColor(count: ::std::os::raw::c_int); +} +extern "C" { + pub fn igPushStyleVarFloat(idx: ImGuiStyleVar, val: f32); +} +extern "C" { + pub fn igPushStyleVarVec2(idx: ImGuiStyleVar, val: ImVec2); +} +extern "C" { + pub fn igPopStyleVar(count: ::std::os::raw::c_int); +} +extern "C" { + pub fn igGetStyleColorVec4(idx: ImGuiCol) -> *const ImVec4; +} +extern "C" { + pub fn igGetFont() -> *mut ImFont; +} +extern "C" { + pub fn igGetFontSize() -> f32; +} +extern "C" { + pub fn igGetColorU32(idx: ImGuiCol, alpha_mul: f32) -> ImU32; +} +extern "C" { + pub fn igGetColorU32Vec4(col: ImVec4) -> ImU32; +} +extern "C" { + pub fn igGetColorU32U32(col: ImU32) -> ImU32; +} +extern "C" { + pub fn igPushItemWidth(item_width: f32); +} +extern "C" { + pub fn igPopItemWidth(); +} +extern "C" { + pub fn igSetNextItemWidth(item_width: f32); +} +extern "C" { + pub fn igCalcItemWidth() -> f32; +} +extern "C" { + pub fn igPushTextWrapPos(wrap_local_pos_x: f32); +} +extern "C" { + pub fn igPopTextWrapPos(); +} +extern "C" { + pub fn igPushAllowKeyboardFocus(allow_keyboard_focus: bool); +} +extern "C" { + pub fn igPopAllowKeyboardFocus(); +} +extern "C" { + pub fn igPushButtonRepeat(repeat: bool); +} +extern "C" { + pub fn igPopButtonRepeat(); +} +extern "C" { + pub fn igSeparator(); +} +extern "C" { + pub fn igSameLine(offset_from_start_x: f32, spacing: f32); +} +extern "C" { + pub fn igNewLine(); +} +extern "C" { + pub fn igSpacing(); +} +extern "C" { + pub fn igDummy(size: ImVec2); +} +extern "C" { + pub fn igIndent(indent_w: f32); +} +extern "C" { + pub fn igUnindent(indent_w: f32); +} +extern "C" { + pub fn igBeginGroup(); +} +extern "C" { + pub fn igEndGroup(); +} +extern "C" { + pub fn igGetCursorPosX() -> f32; +} +extern "C" { + pub fn igGetCursorPosY() -> f32; +} +extern "C" { + pub fn igSetCursorPos(local_pos: ImVec2); +} +extern "C" { + pub fn igSetCursorPosX(local_x: f32); +} +extern "C" { + pub fn igSetCursorPosY(local_y: f32); +} +extern "C" { + pub fn igSetCursorScreenPos(pos: ImVec2); +} +extern "C" { + pub fn igAlignTextToFramePadding(); +} +extern "C" { + pub fn igGetTextLineHeight() -> f32; +} +extern "C" { + pub fn igGetTextLineHeightWithSpacing() -> f32; +} +extern "C" { + pub fn igGetFrameHeight() -> f32; +} +extern "C" { + pub fn igGetFrameHeightWithSpacing() -> f32; +} +extern "C" { + pub fn igPushIDStr(str_id: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igPushIDRange( + str_id_begin: *const ::std::os::raw::c_char, + str_id_end: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn igPushIDPtr(ptr_id: *const ::std::os::raw::c_void); +} +extern "C" { + pub fn igPushIDInt(int_id: ::std::os::raw::c_int); +} +extern "C" { + pub fn igPopID(); +} +extern "C" { + pub fn igGetIDStr(str_id: *const ::std::os::raw::c_char) -> ImGuiID; +} +extern "C" { + pub fn igGetIDRange( + str_id_begin: *const ::std::os::raw::c_char, + str_id_end: *const ::std::os::raw::c_char, + ) -> ImGuiID; +} +extern "C" { + pub fn igGetIDPtr(ptr_id: *const ::std::os::raw::c_void) -> ImGuiID; +} +extern "C" { + pub fn igTextUnformatted( + text: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn igText(fmt: *const ::std::os::raw::c_char, ...); +} +extern "C" { + pub fn igTextColored(col: ImVec4, fmt: *const ::std::os::raw::c_char, ...); +} +extern "C" { + pub fn igTextDisabled(fmt: *const ::std::os::raw::c_char, ...); +} +extern "C" { + pub fn igTextWrapped(fmt: *const ::std::os::raw::c_char, ...); +} +extern "C" { + pub fn igLabelText( + label: *const ::std::os::raw::c_char, + fmt: *const ::std::os::raw::c_char, + ... + ); +} +extern "C" { + pub fn igBulletText(fmt: *const ::std::os::raw::c_char, ...); +} +extern "C" { + pub fn igButton(label: *const ::std::os::raw::c_char, size: ImVec2) -> bool; +} +extern "C" { + pub fn igSmallButton(label: *const ::std::os::raw::c_char) -> bool; +} +extern "C" { + pub fn igInvisibleButton(str_id: *const ::std::os::raw::c_char, size: ImVec2) -> bool; +} +extern "C" { + pub fn igArrowButton(str_id: *const ::std::os::raw::c_char, dir: ImGuiDir) -> bool; +} +extern "C" { + pub fn igImage( + user_texture_id: ImTextureID, + size: ImVec2, + uv0: ImVec2, + uv1: ImVec2, + tint_col: ImVec4, + border_col: ImVec4, + ); +} +extern "C" { + pub fn igImageButton( + user_texture_id: ImTextureID, + size: ImVec2, + uv0: ImVec2, + uv1: ImVec2, + frame_padding: ::std::os::raw::c_int, + bg_col: ImVec4, + tint_col: ImVec4, + ) -> bool; +} +extern "C" { + pub fn igCheckbox(label: *const ::std::os::raw::c_char, v: *mut bool) -> bool; +} +extern "C" { + pub fn igCheckboxFlags( + label: *const ::std::os::raw::c_char, + flags: *mut ::std::os::raw::c_uint, + flags_value: ::std::os::raw::c_uint, + ) -> bool; +} +extern "C" { + pub fn igRadioButtonBool(label: *const ::std::os::raw::c_char, active: bool) -> bool; +} +extern "C" { + pub fn igRadioButtonIntPtr( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + v_button: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igProgressBar(fraction: f32, size_arg: ImVec2, overlay: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igBullet(); +} +extern "C" { + pub fn igBeginCombo( + label: *const ::std::os::raw::c_char, + preview_value: *const ::std::os::raw::c_char, + flags: ImGuiComboFlags, + ) -> bool; +} +extern "C" { + pub fn igEndCombo(); +} +extern "C" { + pub fn igCombo( + label: *const ::std::os::raw::c_char, + current_item: *mut ::std::os::raw::c_int, + items: *const *const ::std::os::raw::c_char, + items_count: ::std::os::raw::c_int, + popup_max_height_in_items: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igComboStr( + label: *const ::std::os::raw::c_char, + current_item: *mut ::std::os::raw::c_int, + items_separated_by_zeros: *const ::std::os::raw::c_char, + popup_max_height_in_items: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igComboFnPtr( + label: *const ::std::os::raw::c_char, + current_item: *mut ::std::os::raw::c_int, + items_getter: ::std::option::Option< + unsafe extern "C" fn( + data: *mut ::std::os::raw::c_void, + idx: ::std::os::raw::c_int, + out_text: *mut *const ::std::os::raw::c_char, + ) -> bool, + >, + data: *mut ::std::os::raw::c_void, + items_count: ::std::os::raw::c_int, + popup_max_height_in_items: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igDragFloat( + label: *const ::std::os::raw::c_char, + v: *mut f32, + v_speed: f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igDragFloat2( + label: *const ::std::os::raw::c_char, + v: *mut f32, + v_speed: f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igDragFloat3( + label: *const ::std::os::raw::c_char, + v: *mut f32, + v_speed: f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igDragFloat4( + label: *const ::std::os::raw::c_char, + v: *mut f32, + v_speed: f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igDragFloatRange2( + label: *const ::std::os::raw::c_char, + v_current_min: *mut f32, + v_current_max: *mut f32, + v_speed: f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + format_max: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igDragInt( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + v_speed: f32, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igDragInt2( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + v_speed: f32, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igDragInt3( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + v_speed: f32, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igDragInt4( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + v_speed: f32, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igDragIntRange2( + label: *const ::std::os::raw::c_char, + v_current_min: *mut ::std::os::raw::c_int, + v_current_max: *mut ::std::os::raw::c_int, + v_speed: f32, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + format_max: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igDragScalar( + label: *const ::std::os::raw::c_char, + data_type: ImGuiDataType, + v: *mut ::std::os::raw::c_void, + v_speed: f32, + v_min: *const ::std::os::raw::c_void, + v_max: *const ::std::os::raw::c_void, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igDragScalarN( + label: *const ::std::os::raw::c_char, + data_type: ImGuiDataType, + v: *mut ::std::os::raw::c_void, + components: ::std::os::raw::c_int, + v_speed: f32, + v_min: *const ::std::os::raw::c_void, + v_max: *const ::std::os::raw::c_void, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igSliderFloat( + label: *const ::std::os::raw::c_char, + v: *mut f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igSliderFloat2( + label: *const ::std::os::raw::c_char, + v: *mut f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igSliderFloat3( + label: *const ::std::os::raw::c_char, + v: *mut f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igSliderFloat4( + label: *const ::std::os::raw::c_char, + v: *mut f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igSliderAngle( + label: *const ::std::os::raw::c_char, + v_rad: *mut f32, + v_degrees_min: f32, + v_degrees_max: f32, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igSliderInt( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igSliderInt2( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igSliderInt3( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igSliderInt4( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igSliderScalar( + label: *const ::std::os::raw::c_char, + data_type: ImGuiDataType, + v: *mut ::std::os::raw::c_void, + v_min: *const ::std::os::raw::c_void, + v_max: *const ::std::os::raw::c_void, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igSliderScalarN( + label: *const ::std::os::raw::c_char, + data_type: ImGuiDataType, + v: *mut ::std::os::raw::c_void, + components: ::std::os::raw::c_int, + v_min: *const ::std::os::raw::c_void, + v_max: *const ::std::os::raw::c_void, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igVSliderFloat( + label: *const ::std::os::raw::c_char, + size: ImVec2, + v: *mut f32, + v_min: f32, + v_max: f32, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igVSliderInt( + label: *const ::std::os::raw::c_char, + size: ImVec2, + v: *mut ::std::os::raw::c_int, + v_min: ::std::os::raw::c_int, + v_max: ::std::os::raw::c_int, + format: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn igVSliderScalar( + label: *const ::std::os::raw::c_char, + size: ImVec2, + data_type: ImGuiDataType, + v: *mut ::std::os::raw::c_void, + v_min: *const ::std::os::raw::c_void, + v_max: *const ::std::os::raw::c_void, + format: *const ::std::os::raw::c_char, + power: f32, + ) -> bool; +} +extern "C" { + pub fn igInputText( + label: *const ::std::os::raw::c_char, + buf: *mut ::std::os::raw::c_char, + buf_size: usize, + flags: ImGuiInputTextFlags, + callback: ImGuiInputTextCallback, + user_data: *mut ::std::os::raw::c_void, + ) -> bool; +} +extern "C" { + pub fn igInputTextMultiline( + label: *const ::std::os::raw::c_char, + buf: *mut ::std::os::raw::c_char, + buf_size: usize, + size: ImVec2, + flags: ImGuiInputTextFlags, + callback: ImGuiInputTextCallback, + user_data: *mut ::std::os::raw::c_void, + ) -> bool; +} +extern "C" { + pub fn igInputTextWithHint( + label: *const ::std::os::raw::c_char, + hint: *const ::std::os::raw::c_char, + buf: *mut ::std::os::raw::c_char, + buf_size: usize, + flags: ImGuiInputTextFlags, + callback: ImGuiInputTextCallback, + user_data: *mut ::std::os::raw::c_void, + ) -> bool; +} +extern "C" { + pub fn igInputFloat( + label: *const ::std::os::raw::c_char, + v: *mut f32, + step: f32, + step_fast: f32, + format: *const ::std::os::raw::c_char, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputFloat2( + label: *const ::std::os::raw::c_char, + v: *mut f32, + format: *const ::std::os::raw::c_char, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputFloat3( + label: *const ::std::os::raw::c_char, + v: *mut f32, + format: *const ::std::os::raw::c_char, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputFloat4( + label: *const ::std::os::raw::c_char, + v: *mut f32, + format: *const ::std::os::raw::c_char, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputInt( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + step: ::std::os::raw::c_int, + step_fast: ::std::os::raw::c_int, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputInt2( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputInt3( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputInt4( + label: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_int, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputDouble( + label: *const ::std::os::raw::c_char, + v: *mut f64, + step: f64, + step_fast: f64, + format: *const ::std::os::raw::c_char, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputScalar( + label: *const ::std::os::raw::c_char, + data_type: ImGuiDataType, + v: *mut ::std::os::raw::c_void, + step: *const ::std::os::raw::c_void, + step_fast: *const ::std::os::raw::c_void, + format: *const ::std::os::raw::c_char, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igInputScalarN( + label: *const ::std::os::raw::c_char, + data_type: ImGuiDataType, + v: *mut ::std::os::raw::c_void, + components: ::std::os::raw::c_int, + step: *const ::std::os::raw::c_void, + step_fast: *const ::std::os::raw::c_void, + format: *const ::std::os::raw::c_char, + flags: ImGuiInputTextFlags, + ) -> bool; +} +extern "C" { + pub fn igColorEdit3( + label: *const ::std::os::raw::c_char, + col: *mut f32, + flags: ImGuiColorEditFlags, + ) -> bool; +} +extern "C" { + pub fn igColorEdit4( + label: *const ::std::os::raw::c_char, + col: *mut f32, + flags: ImGuiColorEditFlags, + ) -> bool; +} +extern "C" { + pub fn igColorPicker3( + label: *const ::std::os::raw::c_char, + col: *mut f32, + flags: ImGuiColorEditFlags, + ) -> bool; +} +extern "C" { + pub fn igColorPicker4( + label: *const ::std::os::raw::c_char, + col: *mut f32, + flags: ImGuiColorEditFlags, + ref_col: *const f32, + ) -> bool; +} +extern "C" { + pub fn igColorButton( + desc_id: *const ::std::os::raw::c_char, + col: ImVec4, + flags: ImGuiColorEditFlags, + size: ImVec2, + ) -> bool; +} +extern "C" { + pub fn igSetColorEditOptions(flags: ImGuiColorEditFlags); +} +extern "C" { + pub fn igTreeNodeStr(label: *const ::std::os::raw::c_char) -> bool; +} +extern "C" { + pub fn igTreeNodeStrStr( + str_id: *const ::std::os::raw::c_char, + fmt: *const ::std::os::raw::c_char, + ... + ) -> bool; +} +extern "C" { + pub fn igTreeNodePtr( + ptr_id: *const ::std::os::raw::c_void, + fmt: *const ::std::os::raw::c_char, + ... + ) -> bool; +} +extern "C" { + pub fn igTreeNodeExStr(label: *const ::std::os::raw::c_char, flags: ImGuiTreeNodeFlags) + -> bool; +} +extern "C" { + pub fn igTreeNodeExStrStr( + str_id: *const ::std::os::raw::c_char, + flags: ImGuiTreeNodeFlags, + fmt: *const ::std::os::raw::c_char, + ... + ) -> bool; +} +extern "C" { + pub fn igTreeNodeExPtr( + ptr_id: *const ::std::os::raw::c_void, + flags: ImGuiTreeNodeFlags, + fmt: *const ::std::os::raw::c_char, + ... + ) -> bool; +} +extern "C" { + pub fn igTreePushStr(str_id: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igTreePushPtr(ptr_id: *const ::std::os::raw::c_void); +} +extern "C" { + pub fn igTreePop(); +} +extern "C" { + pub fn igTreeAdvanceToLabelPos(); +} +extern "C" { + pub fn igGetTreeNodeToLabelSpacing() -> f32; +} +extern "C" { + pub fn igCollapsingHeader( + label: *const ::std::os::raw::c_char, + flags: ImGuiTreeNodeFlags, + ) -> bool; +} +extern "C" { + pub fn igCollapsingHeaderBoolPtr( + label: *const ::std::os::raw::c_char, + p_open: *mut bool, + flags: ImGuiTreeNodeFlags, + ) -> bool; +} +extern "C" { + pub fn igSetNextItemOpen(is_open: bool, cond: ImGuiCond); +} +extern "C" { + pub fn igSelectable( + label: *const ::std::os::raw::c_char, + selected: bool, + flags: ImGuiSelectableFlags, + size: ImVec2, + ) -> bool; +} +extern "C" { + pub fn igSelectableBoolPtr( + label: *const ::std::os::raw::c_char, + p_selected: *mut bool, + flags: ImGuiSelectableFlags, + size: ImVec2, + ) -> bool; +} +extern "C" { + pub fn igListBoxStr_arr( + label: *const ::std::os::raw::c_char, + current_item: *mut ::std::os::raw::c_int, + items: *const *const ::std::os::raw::c_char, + items_count: ::std::os::raw::c_int, + height_in_items: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igListBoxFnPtr( + label: *const ::std::os::raw::c_char, + current_item: *mut ::std::os::raw::c_int, + items_getter: ::std::option::Option< + unsafe extern "C" fn( + data: *mut ::std::os::raw::c_void, + idx: ::std::os::raw::c_int, + out_text: *mut *const ::std::os::raw::c_char, + ) -> bool, + >, + data: *mut ::std::os::raw::c_void, + items_count: ::std::os::raw::c_int, + height_in_items: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igListBoxHeaderVec2(label: *const ::std::os::raw::c_char, size: ImVec2) -> bool; +} +extern "C" { + pub fn igListBoxHeaderInt( + label: *const ::std::os::raw::c_char, + items_count: ::std::os::raw::c_int, + height_in_items: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igListBoxFooter(); +} +extern "C" { + pub fn igPlotLines( + label: *const ::std::os::raw::c_char, + values: *const f32, + values_count: ::std::os::raw::c_int, + values_offset: ::std::os::raw::c_int, + overlay_text: *const ::std::os::raw::c_char, + scale_min: f32, + scale_max: f32, + graph_size: ImVec2, + stride: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn igPlotLinesFnPtr( + label: *const ::std::os::raw::c_char, + values_getter: ::std::option::Option< + unsafe extern "C" fn( + data: *mut ::std::os::raw::c_void, + idx: ::std::os::raw::c_int, + ) -> f32, + >, + data: *mut ::std::os::raw::c_void, + values_count: ::std::os::raw::c_int, + values_offset: ::std::os::raw::c_int, + overlay_text: *const ::std::os::raw::c_char, + scale_min: f32, + scale_max: f32, + graph_size: ImVec2, + ); +} +extern "C" { + pub fn igPlotHistogramFloatPtr( + label: *const ::std::os::raw::c_char, + values: *const f32, + values_count: ::std::os::raw::c_int, + values_offset: ::std::os::raw::c_int, + overlay_text: *const ::std::os::raw::c_char, + scale_min: f32, + scale_max: f32, + graph_size: ImVec2, + stride: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn igPlotHistogramFnPtr( + label: *const ::std::os::raw::c_char, + values_getter: ::std::option::Option< + unsafe extern "C" fn( + data: *mut ::std::os::raw::c_void, + idx: ::std::os::raw::c_int, + ) -> f32, + >, + data: *mut ::std::os::raw::c_void, + values_count: ::std::os::raw::c_int, + values_offset: ::std::os::raw::c_int, + overlay_text: *const ::std::os::raw::c_char, + scale_min: f32, + scale_max: f32, + graph_size: ImVec2, + ); +} +extern "C" { + pub fn igValueBool(prefix: *const ::std::os::raw::c_char, b: bool); +} +extern "C" { + pub fn igValueInt(prefix: *const ::std::os::raw::c_char, v: ::std::os::raw::c_int); +} +extern "C" { + pub fn igValueUint(prefix: *const ::std::os::raw::c_char, v: ::std::os::raw::c_uint); +} +extern "C" { + pub fn igValueFloat( + prefix: *const ::std::os::raw::c_char, + v: f32, + float_format: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn igBeginMainMenuBar() -> bool; +} +extern "C" { + pub fn igEndMainMenuBar(); +} +extern "C" { + pub fn igBeginMenuBar() -> bool; +} +extern "C" { + pub fn igEndMenuBar(); +} +extern "C" { + pub fn igBeginMenu(label: *const ::std::os::raw::c_char, enabled: bool) -> bool; +} +extern "C" { + pub fn igEndMenu(); +} +extern "C" { + pub fn igMenuItemBool( + label: *const ::std::os::raw::c_char, + shortcut: *const ::std::os::raw::c_char, + selected: bool, + enabled: bool, + ) -> bool; +} +extern "C" { + pub fn igMenuItemBoolPtr( + label: *const ::std::os::raw::c_char, + shortcut: *const ::std::os::raw::c_char, + p_selected: *mut bool, + enabled: bool, + ) -> bool; +} +extern "C" { + pub fn igBeginTooltip(); +} +extern "C" { + pub fn igEndTooltip(); +} +extern "C" { + pub fn igSetTooltip(fmt: *const ::std::os::raw::c_char, ...); +} +extern "C" { + pub fn igOpenPopup(str_id: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igBeginPopup(str_id: *const ::std::os::raw::c_char, flags: ImGuiWindowFlags) -> bool; +} +extern "C" { + pub fn igBeginPopupContextItem( + str_id: *const ::std::os::raw::c_char, + mouse_button: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igBeginPopupContextWindow( + str_id: *const ::std::os::raw::c_char, + mouse_button: ::std::os::raw::c_int, + also_over_items: bool, + ) -> bool; +} +extern "C" { + pub fn igBeginPopupContextVoid( + str_id: *const ::std::os::raw::c_char, + mouse_button: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igBeginPopupModal( + name: *const ::std::os::raw::c_char, + p_open: *mut bool, + flags: ImGuiWindowFlags, + ) -> bool; +} +extern "C" { + pub fn igEndPopup(); +} +extern "C" { + pub fn igOpenPopupOnItemClick( + str_id: *const ::std::os::raw::c_char, + mouse_button: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn igIsPopupOpen(str_id: *const ::std::os::raw::c_char) -> bool; +} +extern "C" { + pub fn igCloseCurrentPopup(); +} +extern "C" { + pub fn igColumns(count: ::std::os::raw::c_int, id: *const ::std::os::raw::c_char, border: bool); +} +extern "C" { + pub fn igNextColumn(); +} +extern "C" { + pub fn igGetColumnIndex() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn igGetColumnWidth(column_index: ::std::os::raw::c_int) -> f32; +} +extern "C" { + pub fn igSetColumnWidth(column_index: ::std::os::raw::c_int, width: f32); +} +extern "C" { + pub fn igGetColumnOffset(column_index: ::std::os::raw::c_int) -> f32; +} +extern "C" { + pub fn igSetColumnOffset(column_index: ::std::os::raw::c_int, offset_x: f32); +} +extern "C" { + pub fn igGetColumnsCount() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn igBeginTabBar(str_id: *const ::std::os::raw::c_char, flags: ImGuiTabBarFlags) -> bool; +} +extern "C" { + pub fn igEndTabBar(); +} +extern "C" { + pub fn igBeginTabItem( + label: *const ::std::os::raw::c_char, + p_open: *mut bool, + flags: ImGuiTabItemFlags, + ) -> bool; +} +extern "C" { + pub fn igEndTabItem(); +} +extern "C" { + pub fn igSetTabItemClosed(tab_or_docked_window_label: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igLogToTTY(auto_open_depth: ::std::os::raw::c_int); +} +extern "C" { + pub fn igLogToFile( + auto_open_depth: ::std::os::raw::c_int, + filename: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn igLogToClipboard(auto_open_depth: ::std::os::raw::c_int); +} +extern "C" { + pub fn igLogFinish(); +} +extern "C" { + pub fn igLogButtons(); +} +extern "C" { + pub fn igBeginDragDropSource(flags: ImGuiDragDropFlags) -> bool; +} +extern "C" { + pub fn igSetDragDropPayload( + type_: *const ::std::os::raw::c_char, + data: *const ::std::os::raw::c_void, + sz: usize, + cond: ImGuiCond, + ) -> bool; +} +extern "C" { + pub fn igEndDragDropSource(); +} +extern "C" { + pub fn igBeginDragDropTarget() -> bool; +} +extern "C" { + pub fn igAcceptDragDropPayload( + type_: *const ::std::os::raw::c_char, + flags: ImGuiDragDropFlags, + ) -> *const ImGuiPayload; +} +extern "C" { + pub fn igEndDragDropTarget(); +} +extern "C" { + pub fn igGetDragDropPayload() -> *const ImGuiPayload; +} +extern "C" { + pub fn igPushClipRect( + clip_rect_min: ImVec2, + clip_rect_max: ImVec2, + intersect_with_current_clip_rect: bool, + ); +} +extern "C" { + pub fn igPopClipRect(); +} +extern "C" { + pub fn igSetItemDefaultFocus(); +} +extern "C" { + pub fn igSetKeyboardFocusHere(offset: ::std::os::raw::c_int); +} +extern "C" { + pub fn igIsItemHovered(flags: ImGuiHoveredFlags) -> bool; +} +extern "C" { + pub fn igIsItemActive() -> bool; +} +extern "C" { + pub fn igIsItemFocused() -> bool; +} +extern "C" { + pub fn igIsItemClicked(mouse_button: ::std::os::raw::c_int) -> bool; +} +extern "C" { + pub fn igIsItemVisible() -> bool; +} +extern "C" { + pub fn igIsItemEdited() -> bool; +} +extern "C" { + pub fn igIsItemActivated() -> bool; +} +extern "C" { + pub fn igIsItemDeactivated() -> bool; +} +extern "C" { + pub fn igIsItemDeactivatedAfterEdit() -> bool; +} +extern "C" { + pub fn igIsAnyItemHovered() -> bool; +} +extern "C" { + pub fn igIsAnyItemActive() -> bool; +} +extern "C" { + pub fn igIsAnyItemFocused() -> bool; +} +extern "C" { + pub fn igSetItemAllowOverlap(); +} +extern "C" { + pub fn igIsRectVisible(size: ImVec2) -> bool; +} +extern "C" { + pub fn igIsRectVisibleVec2(rect_min: ImVec2, rect_max: ImVec2) -> bool; +} +extern "C" { + pub fn igGetTime() -> f64; +} +extern "C" { + pub fn igGetFrameCount() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn igGetBackgroundDrawList() -> *mut ImDrawList; +} +extern "C" { + pub fn igGetForegroundDrawList() -> *mut ImDrawList; +} +extern "C" { + pub fn igGetDrawListSharedData() -> *mut ImDrawListSharedData; +} +extern "C" { + pub fn igGetStyleColorName(idx: ImGuiCol) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn igSetStateStorage(storage: *mut ImGuiStorage); +} +extern "C" { + pub fn igGetStateStorage() -> *mut ImGuiStorage; +} +extern "C" { + pub fn igCalcListClipping( + items_count: ::std::os::raw::c_int, + items_height: f32, + out_items_display_start: *mut ::std::os::raw::c_int, + out_items_display_end: *mut ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn igBeginChildFrame(id: ImGuiID, size: ImVec2, flags: ImGuiWindowFlags) -> bool; +} +extern "C" { + pub fn igEndChildFrame(); +} +extern "C" { + pub fn igColorConvertFloat4ToU32(in_: ImVec4) -> ImU32; +} +extern "C" { + pub fn igGetKeyIndex(imgui_key: ImGuiKey) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn igIsKeyDown(user_key_index: ::std::os::raw::c_int) -> bool; +} +extern "C" { + pub fn igIsKeyPressed(user_key_index: ::std::os::raw::c_int, repeat: bool) -> bool; +} +extern "C" { + pub fn igIsKeyReleased(user_key_index: ::std::os::raw::c_int) -> bool; +} +extern "C" { + pub fn igGetKeyPressedAmount( + key_index: ::std::os::raw::c_int, + repeat_delay: f32, + rate: f32, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn igIsMouseDown(button: ::std::os::raw::c_int) -> bool; +} +extern "C" { + pub fn igIsAnyMouseDown() -> bool; +} +extern "C" { + pub fn igIsMouseClicked(button: ::std::os::raw::c_int, repeat: bool) -> bool; +} +extern "C" { + pub fn igIsMouseDoubleClicked(button: ::std::os::raw::c_int) -> bool; +} +extern "C" { + pub fn igIsMouseReleased(button: ::std::os::raw::c_int) -> bool; +} +extern "C" { + pub fn igIsMouseDragging(button: ::std::os::raw::c_int, lock_threshold: f32) -> bool; +} +extern "C" { + pub fn igIsMouseHoveringRect(r_min: ImVec2, r_max: ImVec2, clip: bool) -> bool; +} +extern "C" { + pub fn igIsMousePosValid(mouse_pos: *const ImVec2) -> bool; +} +extern "C" { + pub fn igResetMouseDragDelta(button: ::std::os::raw::c_int); +} +extern "C" { + pub fn igGetMouseCursor() -> ImGuiMouseCursor; +} +extern "C" { + pub fn igSetMouseCursor(type_: ImGuiMouseCursor); +} +extern "C" { + pub fn igCaptureKeyboardFromApp(want_capture_keyboard_value: bool); +} +extern "C" { + pub fn igCaptureMouseFromApp(want_capture_mouse_value: bool); +} +extern "C" { + pub fn igGetClipboardText() -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn igSetClipboardText(text: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igLoadIniSettingsFromDisk(ini_filename: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igLoadIniSettingsFromMemory(ini_data: *const ::std::os::raw::c_char, ini_size: usize); +} +extern "C" { + pub fn igSaveIniSettingsToDisk(ini_filename: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn igSaveIniSettingsToMemory(out_ini_size: *mut usize) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn igSetAllocatorFunctions( + alloc_func: ::std::option::Option< + unsafe extern "C" fn( + sz: usize, + user_data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + free_func: ::std::option::Option< + unsafe extern "C" fn( + ptr: *mut ::std::os::raw::c_void, + user_data: *mut ::std::os::raw::c_void, + ), + >, + user_data: *mut ::std::os::raw::c_void, + ); +} +extern "C" { + pub fn igMemAlloc(size: usize) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn igMemFree(ptr: *mut ::std::os::raw::c_void); +} +extern "C" { + pub fn ImGuiStyle_ImGuiStyle() -> *mut ImGuiStyle; +} +extern "C" { + pub fn ImGuiStyle_destroy(self_: *mut ImGuiStyle); +} +extern "C" { + pub fn ImGuiStyle_ScaleAllSizes(self_: *mut ImGuiStyle, scale_factor: f32); +} +extern "C" { + pub fn ImGuiIO_AddInputCharacter(self_: *mut ImGuiIO, c: ::std::os::raw::c_uint); +} +extern "C" { + pub fn ImGuiIO_AddInputCharactersUTF8(self_: *mut ImGuiIO, str: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn ImGuiIO_ClearInputCharacters(self_: *mut ImGuiIO); +} +extern "C" { + pub fn ImGuiIO_ImGuiIO() -> *mut ImGuiIO; +} +extern "C" { + pub fn ImGuiIO_destroy(self_: *mut ImGuiIO); +} +extern "C" { + pub fn ImGuiInputTextCallbackData_ImGuiInputTextCallbackData() -> *mut ImGuiInputTextCallbackData; +} +extern "C" { + pub fn ImGuiInputTextCallbackData_destroy(self_: *mut ImGuiInputTextCallbackData); +} +extern "C" { + pub fn ImGuiInputTextCallbackData_DeleteChars( + self_: *mut ImGuiInputTextCallbackData, + pos: ::std::os::raw::c_int, + bytes_count: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImGuiInputTextCallbackData_InsertChars( + self_: *mut ImGuiInputTextCallbackData, + pos: ::std::os::raw::c_int, + text: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn ImGuiInputTextCallbackData_HasSelection(self_: *mut ImGuiInputTextCallbackData) -> bool; +} +extern "C" { + pub fn ImGuiPayload_ImGuiPayload() -> *mut ImGuiPayload; +} +extern "C" { + pub fn ImGuiPayload_destroy(self_: *mut ImGuiPayload); +} +extern "C" { + pub fn ImGuiPayload_Clear(self_: *mut ImGuiPayload); +} +extern "C" { + pub fn ImGuiPayload_IsDataType( + self_: *mut ImGuiPayload, + type_: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn ImGuiPayload_IsPreview(self_: *mut ImGuiPayload) -> bool; +} +extern "C" { + pub fn ImGuiPayload_IsDelivery(self_: *mut ImGuiPayload) -> bool; +} +extern "C" { + pub fn ImGuiOnceUponAFrame_ImGuiOnceUponAFrame() -> *mut ImGuiOnceUponAFrame; +} +extern "C" { + pub fn ImGuiOnceUponAFrame_destroy(self_: *mut ImGuiOnceUponAFrame); +} +extern "C" { + pub fn ImGuiTextFilter_ImGuiTextFilter( + default_filter: *const ::std::os::raw::c_char, + ) -> *mut ImGuiTextFilter; +} +extern "C" { + pub fn ImGuiTextFilter_destroy(self_: *mut ImGuiTextFilter); +} +extern "C" { + pub fn ImGuiTextFilter_Draw( + self_: *mut ImGuiTextFilter, + label: *const ::std::os::raw::c_char, + width: f32, + ) -> bool; +} +extern "C" { + pub fn ImGuiTextFilter_PassFilter( + self_: *mut ImGuiTextFilter, + text: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + ) -> bool; +} +extern "C" { + pub fn ImGuiTextFilter_Build(self_: *mut ImGuiTextFilter); +} +extern "C" { + pub fn ImGuiTextFilter_Clear(self_: *mut ImGuiTextFilter); +} +extern "C" { + pub fn ImGuiTextFilter_IsActive(self_: *mut ImGuiTextFilter) -> bool; +} +extern "C" { + pub fn TextRange_TextRange() -> *mut TextRange; +} +extern "C" { + pub fn TextRange_destroy(self_: *mut TextRange); +} +extern "C" { + pub fn TextRange_TextRangeStr( + _b: *const ::std::os::raw::c_char, + _e: *const ::std::os::raw::c_char, + ) -> *mut TextRange; +} +extern "C" { + pub fn TextRange_begin(self_: *mut TextRange) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn TextRange_end(self_: *mut TextRange) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn TextRange_empty(self_: *mut TextRange) -> bool; +} +extern "C" { + pub fn TextRange_split( + self_: *mut TextRange, + separator: ::std::os::raw::c_char, + out: *mut ImVector_TextRange, + ); +} +extern "C" { + pub fn ImGuiTextBuffer_ImGuiTextBuffer() -> *mut ImGuiTextBuffer; +} +extern "C" { + pub fn ImGuiTextBuffer_destroy(self_: *mut ImGuiTextBuffer); +} +extern "C" { + pub fn ImGuiTextBuffer_begin(self_: *mut ImGuiTextBuffer) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn ImGuiTextBuffer_end(self_: *mut ImGuiTextBuffer) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn ImGuiTextBuffer_size(self_: *mut ImGuiTextBuffer) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImGuiTextBuffer_empty(self_: *mut ImGuiTextBuffer) -> bool; +} +extern "C" { + pub fn ImGuiTextBuffer_clear(self_: *mut ImGuiTextBuffer); +} +extern "C" { + pub fn ImGuiTextBuffer_reserve(self_: *mut ImGuiTextBuffer, capacity: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImGuiTextBuffer_c_str(self_: *mut ImGuiTextBuffer) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn ImGuiTextBuffer_append( + self_: *mut ImGuiTextBuffer, + str: *const ::std::os::raw::c_char, + str_end: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn Pair_PairInt(_key: ImGuiID, _val_i: ::std::os::raw::c_int) -> *mut Pair; +} +extern "C" { + pub fn Pair_destroy(self_: *mut Pair); +} +extern "C" { + pub fn Pair_PairFloat(_key: ImGuiID, _val_f: f32) -> *mut Pair; +} +extern "C" { + pub fn Pair_PairPtr(_key: ImGuiID, _val_p: *mut ::std::os::raw::c_void) -> *mut Pair; +} +extern "C" { + pub fn ImGuiStorage_Clear(self_: *mut ImGuiStorage); +} +extern "C" { + pub fn ImGuiStorage_GetInt( + self_: *mut ImGuiStorage, + key: ImGuiID, + default_val: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImGuiStorage_SetInt(self_: *mut ImGuiStorage, key: ImGuiID, val: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImGuiStorage_GetBool(self_: *mut ImGuiStorage, key: ImGuiID, default_val: bool) -> bool; +} +extern "C" { + pub fn ImGuiStorage_SetBool(self_: *mut ImGuiStorage, key: ImGuiID, val: bool); +} +extern "C" { + pub fn ImGuiStorage_GetFloat(self_: *mut ImGuiStorage, key: ImGuiID, default_val: f32) -> f32; +} +extern "C" { + pub fn ImGuiStorage_SetFloat(self_: *mut ImGuiStorage, key: ImGuiID, val: f32); +} +extern "C" { + pub fn ImGuiStorage_GetVoidPtr( + self_: *mut ImGuiStorage, + key: ImGuiID, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn ImGuiStorage_SetVoidPtr( + self_: *mut ImGuiStorage, + key: ImGuiID, + val: *mut ::std::os::raw::c_void, + ); +} +extern "C" { + pub fn ImGuiStorage_GetIntRef( + self_: *mut ImGuiStorage, + key: ImGuiID, + default_val: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_int; +} +extern "C" { + pub fn ImGuiStorage_GetBoolRef( + self_: *mut ImGuiStorage, + key: ImGuiID, + default_val: bool, + ) -> *mut bool; +} +extern "C" { + pub fn ImGuiStorage_GetFloatRef( + self_: *mut ImGuiStorage, + key: ImGuiID, + default_val: f32, + ) -> *mut f32; +} +extern "C" { + pub fn ImGuiStorage_GetVoidPtrRef( + self_: *mut ImGuiStorage, + key: ImGuiID, + default_val: *mut ::std::os::raw::c_void, + ) -> *mut *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn ImGuiStorage_SetAllInt(self_: *mut ImGuiStorage, val: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImGuiStorage_BuildSortByKey(self_: *mut ImGuiStorage); +} +extern "C" { + pub fn ImGuiListClipper_ImGuiListClipper( + items_count: ::std::os::raw::c_int, + items_height: f32, + ) -> *mut ImGuiListClipper; +} +extern "C" { + pub fn ImGuiListClipper_destroy(self_: *mut ImGuiListClipper); +} +extern "C" { + pub fn ImGuiListClipper_Step(self_: *mut ImGuiListClipper) -> bool; +} +extern "C" { + pub fn ImGuiListClipper_Begin( + self_: *mut ImGuiListClipper, + items_count: ::std::os::raw::c_int, + items_height: f32, + ); +} +extern "C" { + pub fn ImGuiListClipper_End(self_: *mut ImGuiListClipper); +} +extern "C" { + pub fn ImColor_ImColor() -> *mut ImColor; +} +extern "C" { + pub fn ImColor_destroy(self_: *mut ImColor); +} +extern "C" { + pub fn ImColor_ImColorInt( + r: ::std::os::raw::c_int, + g: ::std::os::raw::c_int, + b: ::std::os::raw::c_int, + a: ::std::os::raw::c_int, + ) -> *mut ImColor; +} +extern "C" { + pub fn ImColor_ImColorU32(rgba: ImU32) -> *mut ImColor; +} +extern "C" { + pub fn ImColor_ImColorFloat(r: f32, g: f32, b: f32, a: f32) -> *mut ImColor; +} +extern "C" { + pub fn ImColor_ImColorVec4(col: ImVec4) -> *mut ImColor; +} +extern "C" { + pub fn ImColor_SetHSV(self_: *mut ImColor, h: f32, s: f32, v: f32, a: f32); +} +extern "C" { + pub fn ImDrawCmd_ImDrawCmd() -> *mut ImDrawCmd; +} +extern "C" { + pub fn ImDrawCmd_destroy(self_: *mut ImDrawCmd); +} +extern "C" { + pub fn ImDrawListSplitter_ImDrawListSplitter() -> *mut ImDrawListSplitter; +} +extern "C" { + pub fn ImDrawListSplitter_destroy(self_: *mut ImDrawListSplitter); +} +extern "C" { + pub fn ImDrawListSplitter_Clear(self_: *mut ImDrawListSplitter); +} +extern "C" { + pub fn ImDrawListSplitter_ClearFreeMemory(self_: *mut ImDrawListSplitter); +} +extern "C" { + pub fn ImDrawListSplitter_Split( + self_: *mut ImDrawListSplitter, + draw_list: *mut ImDrawList, + count: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawListSplitter_Merge(self_: *mut ImDrawListSplitter, draw_list: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawListSplitter_SetCurrentChannel( + self_: *mut ImDrawListSplitter, + draw_list: *mut ImDrawList, + channel_idx: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_ImDrawList(shared_data: *const ImDrawListSharedData) -> *mut ImDrawList; +} +extern "C" { + pub fn ImDrawList_destroy(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_PushClipRect( + self_: *mut ImDrawList, + clip_rect_min: ImVec2, + clip_rect_max: ImVec2, + intersect_with_current_clip_rect: bool, + ); +} +extern "C" { + pub fn ImDrawList_PushClipRectFullScreen(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_PopClipRect(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_PushTextureID(self_: *mut ImDrawList, texture_id: ImTextureID); +} +extern "C" { + pub fn ImDrawList_PopTextureID(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_AddLine( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + col: ImU32, + thickness: f32, + ); +} +extern "C" { + pub fn ImDrawList_AddRect( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + col: ImU32, + rounding: f32, + rounding_corners_flags: ::std::os::raw::c_int, + thickness: f32, + ); +} +extern "C" { + pub fn ImDrawList_AddRectFilled( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + col: ImU32, + rounding: f32, + rounding_corners_flags: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_AddRectFilledMultiColor( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + col_upr_left: ImU32, + col_upr_right: ImU32, + col_bot_right: ImU32, + col_bot_left: ImU32, + ); +} +extern "C" { + pub fn ImDrawList_AddQuad( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + c: ImVec2, + d: ImVec2, + col: ImU32, + thickness: f32, + ); +} +extern "C" { + pub fn ImDrawList_AddQuadFilled( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + c: ImVec2, + d: ImVec2, + col: ImU32, + ); +} +extern "C" { + pub fn ImDrawList_AddTriangle( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + c: ImVec2, + col: ImU32, + thickness: f32, + ); +} +extern "C" { + pub fn ImDrawList_AddTriangleFilled( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + c: ImVec2, + col: ImU32, + ); +} +extern "C" { + pub fn ImDrawList_AddCircle( + self_: *mut ImDrawList, + centre: ImVec2, + radius: f32, + col: ImU32, + num_segments: ::std::os::raw::c_int, + thickness: f32, + ); +} +extern "C" { + pub fn ImDrawList_AddCircleFilled( + self_: *mut ImDrawList, + centre: ImVec2, + radius: f32, + col: ImU32, + num_segments: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_AddText( + self_: *mut ImDrawList, + pos: ImVec2, + col: ImU32, + text_begin: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn ImDrawList_AddTextFontPtr( + self_: *mut ImDrawList, + font: *const ImFont, + font_size: f32, + pos: ImVec2, + col: ImU32, + text_begin: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + wrap_width: f32, + cpu_fine_clip_rect: *const ImVec4, + ); +} +extern "C" { + pub fn ImDrawList_AddImage( + self_: *mut ImDrawList, + user_texture_id: ImTextureID, + a: ImVec2, + b: ImVec2, + uv_a: ImVec2, + uv_b: ImVec2, + col: ImU32, + ); +} +extern "C" { + pub fn ImDrawList_AddImageQuad( + self_: *mut ImDrawList, + user_texture_id: ImTextureID, + a: ImVec2, + b: ImVec2, + c: ImVec2, + d: ImVec2, + uv_a: ImVec2, + uv_b: ImVec2, + uv_c: ImVec2, + uv_d: ImVec2, + col: ImU32, + ); +} +extern "C" { + pub fn ImDrawList_AddImageRounded( + self_: *mut ImDrawList, + user_texture_id: ImTextureID, + a: ImVec2, + b: ImVec2, + uv_a: ImVec2, + uv_b: ImVec2, + col: ImU32, + rounding: f32, + rounding_corners: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_AddPolyline( + self_: *mut ImDrawList, + points: *const ImVec2, + num_points: ::std::os::raw::c_int, + col: ImU32, + closed: bool, + thickness: f32, + ); +} +extern "C" { + pub fn ImDrawList_AddConvexPolyFilled( + self_: *mut ImDrawList, + points: *const ImVec2, + num_points: ::std::os::raw::c_int, + col: ImU32, + ); +} +extern "C" { + pub fn ImDrawList_AddBezierCurve( + self_: *mut ImDrawList, + pos0: ImVec2, + cp0: ImVec2, + cp1: ImVec2, + pos1: ImVec2, + col: ImU32, + thickness: f32, + num_segments: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_PathClear(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_PathLineTo(self_: *mut ImDrawList, pos: ImVec2); +} +extern "C" { + pub fn ImDrawList_PathLineToMergeDuplicate(self_: *mut ImDrawList, pos: ImVec2); +} +extern "C" { + pub fn ImDrawList_PathFillConvex(self_: *mut ImDrawList, col: ImU32); +} +extern "C" { + pub fn ImDrawList_PathStroke(self_: *mut ImDrawList, col: ImU32, closed: bool, thickness: f32); +} +extern "C" { + pub fn ImDrawList_PathArcTo( + self_: *mut ImDrawList, + centre: ImVec2, + radius: f32, + a_min: f32, + a_max: f32, + num_segments: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_PathArcToFast( + self_: *mut ImDrawList, + centre: ImVec2, + radius: f32, + a_min_of_12: ::std::os::raw::c_int, + a_max_of_12: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_PathBezierCurveTo( + self_: *mut ImDrawList, + p1: ImVec2, + p2: ImVec2, + p3: ImVec2, + num_segments: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_PathRect( + self_: *mut ImDrawList, + rect_min: ImVec2, + rect_max: ImVec2, + rounding: f32, + rounding_corners_flags: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_AddCallback( + self_: *mut ImDrawList, + callback: ImDrawCallback, + callback_data: *mut ::std::os::raw::c_void, + ); +} +extern "C" { + pub fn ImDrawList_AddDrawCmd(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_CloneOutput(self_: *mut ImDrawList) -> *mut ImDrawList; +} +extern "C" { + pub fn ImDrawList_ChannelsSplit(self_: *mut ImDrawList, count: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImDrawList_ChannelsMerge(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_ChannelsSetCurrent(self_: *mut ImDrawList, n: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImDrawList_Clear(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_ClearFreeMemory(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_PrimReserve( + self_: *mut ImDrawList, + idx_count: ::std::os::raw::c_int, + vtx_count: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImDrawList_PrimRect(self_: *mut ImDrawList, a: ImVec2, b: ImVec2, col: ImU32); +} +extern "C" { + pub fn ImDrawList_PrimRectUV( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + uv_a: ImVec2, + uv_b: ImVec2, + col: ImU32, + ); +} +extern "C" { + pub fn ImDrawList_PrimQuadUV( + self_: *mut ImDrawList, + a: ImVec2, + b: ImVec2, + c: ImVec2, + d: ImVec2, + uv_a: ImVec2, + uv_b: ImVec2, + uv_c: ImVec2, + uv_d: ImVec2, + col: ImU32, + ); +} +extern "C" { + pub fn ImDrawList_PrimWriteVtx(self_: *mut ImDrawList, pos: ImVec2, uv: ImVec2, col: ImU32); +} +extern "C" { + pub fn ImDrawList_PrimWriteIdx(self_: *mut ImDrawList, idx: ImDrawIdx); +} +extern "C" { + pub fn ImDrawList_PrimVtx(self_: *mut ImDrawList, pos: ImVec2, uv: ImVec2, col: ImU32); +} +extern "C" { + pub fn ImDrawList_UpdateClipRect(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_UpdateTextureID(self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawData_ImDrawData() -> *mut ImDrawData; +} +extern "C" { + pub fn ImDrawData_destroy(self_: *mut ImDrawData); +} +extern "C" { + pub fn ImDrawData_Clear(self_: *mut ImDrawData); +} +extern "C" { + pub fn ImDrawData_DeIndexAllBuffers(self_: *mut ImDrawData); +} +extern "C" { + pub fn ImDrawData_ScaleClipRects(self_: *mut ImDrawData, fb_scale: ImVec2); +} +extern "C" { + pub fn ImFontConfig_ImFontConfig() -> *mut ImFontConfig; +} +extern "C" { + pub fn ImFontConfig_destroy(self_: *mut ImFontConfig); +} +extern "C" { + pub fn ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder() -> *mut ImFontGlyphRangesBuilder; +} +extern "C" { + pub fn ImFontGlyphRangesBuilder_destroy(self_: *mut ImFontGlyphRangesBuilder); +} +extern "C" { + pub fn ImFontGlyphRangesBuilder_Clear(self_: *mut ImFontGlyphRangesBuilder); +} +extern "C" { + pub fn ImFontGlyphRangesBuilder_GetBit( + self_: *mut ImFontGlyphRangesBuilder, + n: ::std::os::raw::c_int, + ) -> bool; +} +extern "C" { + pub fn ImFontGlyphRangesBuilder_SetBit( + self_: *mut ImFontGlyphRangesBuilder, + n: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImFontGlyphRangesBuilder_AddChar(self_: *mut ImFontGlyphRangesBuilder, c: ImWchar); +} +extern "C" { + pub fn ImFontGlyphRangesBuilder_AddText( + self_: *mut ImFontGlyphRangesBuilder, + text: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn ImFontGlyphRangesBuilder_AddRanges( + self_: *mut ImFontGlyphRangesBuilder, + ranges: *const ImWchar, + ); +} +extern "C" { + pub fn ImFontGlyphRangesBuilder_BuildRanges( + self_: *mut ImFontGlyphRangesBuilder, + out_ranges: *mut ImVector_ImWchar, + ); +} +extern "C" { + pub fn ImFontAtlas_ImFontAtlas() -> *mut ImFontAtlas; +} +extern "C" { + pub fn ImFontAtlas_destroy(self_: *mut ImFontAtlas); +} +extern "C" { + pub fn ImFontAtlas_AddFont( + self_: *mut ImFontAtlas, + font_cfg: *const ImFontConfig, + ) -> *mut ImFont; +} +extern "C" { + pub fn ImFontAtlas_AddFontDefault( + self_: *mut ImFontAtlas, + font_cfg: *const ImFontConfig, + ) -> *mut ImFont; +} +extern "C" { + pub fn ImFontAtlas_AddFontFromFileTTF( + self_: *mut ImFontAtlas, + filename: *const ::std::os::raw::c_char, + size_pixels: f32, + font_cfg: *const ImFontConfig, + glyph_ranges: *const ImWchar, + ) -> *mut ImFont; +} +extern "C" { + pub fn ImFontAtlas_AddFontFromMemoryTTF( + self_: *mut ImFontAtlas, + font_data: *mut ::std::os::raw::c_void, + font_size: ::std::os::raw::c_int, + size_pixels: f32, + font_cfg: *const ImFontConfig, + glyph_ranges: *const ImWchar, + ) -> *mut ImFont; +} +extern "C" { + pub fn ImFontAtlas_AddFontFromMemoryCompressedTTF( + self_: *mut ImFontAtlas, + compressed_font_data: *const ::std::os::raw::c_void, + compressed_font_size: ::std::os::raw::c_int, + size_pixels: f32, + font_cfg: *const ImFontConfig, + glyph_ranges: *const ImWchar, + ) -> *mut ImFont; +} +extern "C" { + pub fn ImFontAtlas_AddFontFromMemoryCompressedBase85TTF( + self_: *mut ImFontAtlas, + compressed_font_data_base85: *const ::std::os::raw::c_char, + size_pixels: f32, + font_cfg: *const ImFontConfig, + glyph_ranges: *const ImWchar, + ) -> *mut ImFont; +} +extern "C" { + pub fn ImFontAtlas_ClearInputData(self_: *mut ImFontAtlas); +} +extern "C" { + pub fn ImFontAtlas_ClearTexData(self_: *mut ImFontAtlas); +} +extern "C" { + pub fn ImFontAtlas_ClearFonts(self_: *mut ImFontAtlas); +} +extern "C" { + pub fn ImFontAtlas_Clear(self_: *mut ImFontAtlas); +} +extern "C" { + pub fn ImFontAtlas_Build(self_: *mut ImFontAtlas) -> bool; +} +extern "C" { + pub fn ImFontAtlas_GetTexDataAsAlpha8( + self_: *mut ImFontAtlas, + out_pixels: *mut *mut ::std::os::raw::c_uchar, + out_width: *mut ::std::os::raw::c_int, + out_height: *mut ::std::os::raw::c_int, + out_bytes_per_pixel: *mut ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImFontAtlas_GetTexDataAsRGBA32( + self_: *mut ImFontAtlas, + out_pixels: *mut *mut ::std::os::raw::c_uchar, + out_width: *mut ::std::os::raw::c_int, + out_height: *mut ::std::os::raw::c_int, + out_bytes_per_pixel: *mut ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImFontAtlas_IsBuilt(self_: *mut ImFontAtlas) -> bool; +} +extern "C" { + pub fn ImFontAtlas_SetTexID(self_: *mut ImFontAtlas, id: ImTextureID); +} +extern "C" { + pub fn ImFontAtlas_GetGlyphRangesDefault(self_: *mut ImFontAtlas) -> *const ImWchar; +} +extern "C" { + pub fn ImFontAtlas_GetGlyphRangesKorean(self_: *mut ImFontAtlas) -> *const ImWchar; +} +extern "C" { + pub fn ImFontAtlas_GetGlyphRangesJapanese(self_: *mut ImFontAtlas) -> *const ImWchar; +} +extern "C" { + pub fn ImFontAtlas_GetGlyphRangesChineseFull(self_: *mut ImFontAtlas) -> *const ImWchar; +} +extern "C" { + pub fn ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon( + self_: *mut ImFontAtlas, + ) -> *const ImWchar; +} +extern "C" { + pub fn ImFontAtlas_GetGlyphRangesCyrillic(self_: *mut ImFontAtlas) -> *const ImWchar; +} +extern "C" { + pub fn ImFontAtlas_GetGlyphRangesThai(self_: *mut ImFontAtlas) -> *const ImWchar; +} +extern "C" { + pub fn ImFontAtlas_GetGlyphRangesVietnamese(self_: *mut ImFontAtlas) -> *const ImWchar; +} +extern "C" { + pub fn CustomRect_CustomRect() -> *mut CustomRect; +} +extern "C" { + pub fn CustomRect_destroy(self_: *mut CustomRect); +} +extern "C" { + pub fn CustomRect_IsPacked(self_: *mut CustomRect) -> bool; +} +extern "C" { + pub fn ImFontAtlas_AddCustomRectRegular( + self_: *mut ImFontAtlas, + id: ::std::os::raw::c_uint, + width: ::std::os::raw::c_int, + height: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImFontAtlas_AddCustomRectFontGlyph( + self_: *mut ImFontAtlas, + font: *mut ImFont, + id: ImWchar, + width: ::std::os::raw::c_int, + height: ::std::os::raw::c_int, + advance_x: f32, + offset: ImVec2, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImFontAtlas_GetCustomRectByIndex( + self_: *mut ImFontAtlas, + index: ::std::os::raw::c_int, + ) -> *const CustomRect; +} +extern "C" { + pub fn ImFontAtlas_CalcCustomRectUV( + self_: *mut ImFontAtlas, + rect: *const CustomRect, + out_uv_min: *mut ImVec2, + out_uv_max: *mut ImVec2, + ); +} +extern "C" { + pub fn ImFontAtlas_GetMouseCursorTexData( + self_: *mut ImFontAtlas, + cursor: ImGuiMouseCursor, + out_offset: *mut ImVec2, + out_size: *mut ImVec2, + out_uv_border: *mut ImVec2, + out_uv_fill: *mut ImVec2, + ) -> bool; +} +extern "C" { + pub fn ImFont_ImFont() -> *mut ImFont; +} +extern "C" { + pub fn ImFont_destroy(self_: *mut ImFont); +} +extern "C" { + pub fn ImFont_FindGlyph(self_: *mut ImFont, c: ImWchar) -> *const ImFontGlyph; +} +extern "C" { + pub fn ImFont_FindGlyphNoFallback(self_: *mut ImFont, c: ImWchar) -> *const ImFontGlyph; +} +extern "C" { + pub fn ImFont_GetCharAdvance(self_: *mut ImFont, c: ImWchar) -> f32; +} +extern "C" { + pub fn ImFont_IsLoaded(self_: *mut ImFont) -> bool; +} +extern "C" { + pub fn ImFont_GetDebugName(self_: *mut ImFont) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn ImFont_CalcWordWrapPositionA( + self_: *mut ImFont, + scale: f32, + text: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + wrap_width: f32, + ) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn ImFont_RenderChar( + self_: *mut ImFont, + draw_list: *mut ImDrawList, + size: f32, + pos: ImVec2, + col: ImU32, + c: ImWchar, + ); +} +extern "C" { + pub fn ImFont_RenderText( + self_: *mut ImFont, + draw_list: *mut ImDrawList, + size: f32, + pos: ImVec2, + col: ImU32, + clip_rect: ImVec4, + text_begin: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + wrap_width: f32, + cpu_fine_clip: bool, + ); +} +extern "C" { + pub fn ImFont_BuildLookupTable(self_: *mut ImFont); +} +extern "C" { + pub fn ImFont_ClearOutputData(self_: *mut ImFont); +} +extern "C" { + pub fn ImFont_GrowIndex(self_: *mut ImFont, new_size: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImFont_AddGlyph( + self_: *mut ImFont, + c: ImWchar, + x0: f32, + y0: f32, + x1: f32, + y1: f32, + u0: f32, + v0: f32, + u1: f32, + v1: f32, + advance_x: f32, + ); +} +extern "C" { + pub fn ImFont_AddRemapChar(self_: *mut ImFont, dst: ImWchar, src: ImWchar, overwrite_dst: bool); +} +extern "C" { + pub fn ImFont_SetFallbackChar(self_: *mut ImFont, c: ImWchar); +} +extern "C" { + pub fn igGetWindowPos_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetWindowPos_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetWindowSize_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetWindowSize_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetContentRegionMax_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetContentRegionMax_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetContentRegionAvail_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetContentRegionAvail_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetWindowContentRegionMin_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetWindowContentRegionMin_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetWindowContentRegionMax_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetWindowContentRegionMax_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetFontTexUvWhitePixel_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetFontTexUvWhitePixel_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetCursorPos_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetCursorPos_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetCursorStartPos_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetCursorStartPos_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetCursorScreenPos_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetCursorScreenPos_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetItemRectMin_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetItemRectMin_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetItemRectMax_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetItemRectMax_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetItemRectSize_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetItemRectSize_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igCalcTextSize_nonUDT( + pOut: *mut ImVec2, + text: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + hide_text_after_double_hash: bool, + wrap_width: f32, + ); +} +extern "C" { + pub fn igCalcTextSize_nonUDT2( + text: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + hide_text_after_double_hash: bool, + wrap_width: f32, + ) -> ImVec2_Simple; +} +extern "C" { + pub fn igColorConvertU32ToFloat4_nonUDT(pOut: *mut ImVec4, in_: ImU32); +} +extern "C" { + pub fn igColorConvertU32ToFloat4_nonUDT2(in_: ImU32) -> ImVec4_Simple; +} +extern "C" { + pub fn igGetMousePos_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetMousePos_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetMousePosOnOpeningCurrentPopup_nonUDT(pOut: *mut ImVec2); +} +extern "C" { + pub fn igGetMousePosOnOpeningCurrentPopup_nonUDT2() -> ImVec2_Simple; +} +extern "C" { + pub fn igGetMouseDragDelta_nonUDT( + pOut: *mut ImVec2, + button: ::std::os::raw::c_int, + lock_threshold: f32, + ); +} +extern "C" { + pub fn igGetMouseDragDelta_nonUDT2( + button: ::std::os::raw::c_int, + lock_threshold: f32, + ) -> ImVec2_Simple; +} +extern "C" { + pub fn ImColor_HSV_nonUDT( + pOut: *mut ImColor, + self_: *mut ImColor, + h: f32, + s: f32, + v: f32, + a: f32, + ); +} +extern "C" { + pub fn ImColor_HSV_nonUDT2( + self_: *mut ImColor, + h: f32, + s: f32, + v: f32, + a: f32, + ) -> ImColor_Simple; +} +extern "C" { + pub fn ImDrawList_GetClipRectMin_nonUDT(pOut: *mut ImVec2, self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_GetClipRectMin_nonUDT2(self_: *mut ImDrawList) -> ImVec2_Simple; +} +extern "C" { + pub fn ImDrawList_GetClipRectMax_nonUDT(pOut: *mut ImVec2, self_: *mut ImDrawList); +} +extern "C" { + pub fn ImDrawList_GetClipRectMax_nonUDT2(self_: *mut ImDrawList) -> ImVec2_Simple; +} +extern "C" { + pub fn ImFont_CalcTextSizeA_nonUDT( + pOut: *mut ImVec2, + self_: *mut ImFont, + size: f32, + max_width: f32, + wrap_width: f32, + text_begin: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + remaining: *mut *const ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn ImFont_CalcTextSizeA_nonUDT2( + self_: *mut ImFont, + size: f32, + max_width: f32, + wrap_width: f32, + text_begin: *const ::std::os::raw::c_char, + text_end: *const ::std::os::raw::c_char, + remaining: *mut *const ::std::os::raw::c_char, + ) -> ImVec2_Simple; +} +extern "C" { + pub fn ImVector_float_ImVector_float() -> *mut ImVector_float; +} +extern "C" { + pub fn ImVector_float_destroy(self_: *mut ImVector_float); +} +extern "C" { + pub fn ImVector_ImWchar_ImVector_ImWchar() -> *mut ImVector_ImWchar; +} +extern "C" { + pub fn ImVector_ImWchar_destroy(self_: *mut ImVector_ImWchar); +} +extern "C" { + pub fn ImVector_ImFontConfig_ImVector_ImFontConfig() -> *mut ImVector_ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontConfig_destroy(self_: *mut ImVector_ImFontConfig); +} +extern "C" { + pub fn ImVector_ImFontGlyph_ImVector_ImFontGlyph() -> *mut ImVector_ImFontGlyph; +} +extern "C" { + pub fn ImVector_ImFontGlyph_destroy(self_: *mut ImVector_ImFontGlyph); +} +extern "C" { + pub fn ImVector_TextRange_ImVector_TextRange() -> *mut ImVector_TextRange; +} +extern "C" { + pub fn ImVector_TextRange_destroy(self_: *mut ImVector_TextRange); +} +extern "C" { + pub fn ImVector_CustomRect_ImVector_CustomRect() -> *mut ImVector_CustomRect; +} +extern "C" { + pub fn ImVector_CustomRect_destroy(self_: *mut ImVector_CustomRect); +} +extern "C" { + pub fn ImVector_ImVec4_ImVector_ImVec4() -> *mut ImVector_ImVec4; +} +extern "C" { + pub fn ImVector_ImVec4_destroy(self_: *mut ImVector_ImVec4); +} +extern "C" { + pub fn ImVector_char_ImVector_char() -> *mut ImVector_char; +} +extern "C" { + pub fn ImVector_char_destroy(self_: *mut ImVector_char); +} +extern "C" { + pub fn ImVector_ImU32_ImVector_ImU32() -> *mut ImVector_ImU32; +} +extern "C" { + pub fn ImVector_ImU32_destroy(self_: *mut ImVector_ImU32); +} +extern "C" { + pub fn ImVector_ImTextureID_ImVector_ImTextureID() -> *mut ImVector_ImTextureID; +} +extern "C" { + pub fn ImVector_ImTextureID_destroy(self_: *mut ImVector_ImTextureID); +} +extern "C" { + pub fn ImVector_ImDrawVert_ImVector_ImDrawVert() -> *mut ImVector_ImDrawVert; +} +extern "C" { + pub fn ImVector_ImDrawVert_destroy(self_: *mut ImVector_ImDrawVert); +} +extern "C" { + pub fn ImVector_ImFontPtr_ImVector_ImFontPtr() -> *mut ImVector_ImFontPtr; +} +extern "C" { + pub fn ImVector_ImFontPtr_destroy(self_: *mut ImVector_ImFontPtr); +} +extern "C" { + pub fn ImVector_ImDrawCmd_ImVector_ImDrawCmd() -> *mut ImVector_ImDrawCmd; +} +extern "C" { + pub fn ImVector_ImDrawCmd_destroy(self_: *mut ImVector_ImDrawCmd); +} +extern "C" { + pub fn ImVector_Pair_ImVector_Pair() -> *mut ImVector_Pair; +} +extern "C" { + pub fn ImVector_Pair_destroy(self_: *mut ImVector_Pair); +} +extern "C" { + pub fn ImVector_ImDrawChannel_ImVector_ImDrawChannel() -> *mut ImVector_ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawChannel_destroy(self_: *mut ImVector_ImDrawChannel); +} +extern "C" { + pub fn ImVector_ImDrawIdx_ImVector_ImDrawIdx() -> *mut ImVector_ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImDrawIdx_destroy(self_: *mut ImVector_ImDrawIdx); +} +extern "C" { + pub fn ImVector_ImVec2_ImVector_ImVec2() -> *mut ImVector_ImVec2; +} +extern "C" { + pub fn ImVector_ImVec2_destroy(self_: *mut ImVector_ImVec2); +} +extern "C" { + pub fn ImVector_float_ImVector_floatVector(src: ImVector_float) -> *mut ImVector_float; +} +extern "C" { + pub fn ImVector_ImWchar_ImVector_ImWcharVector(src: ImVector_ImWchar) -> *mut ImVector_ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_ImVector_ImFontConfigVector( + src: ImVector_ImFontConfig, + ) -> *mut ImVector_ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_ImVector_ImFontGlyphVector( + src: ImVector_ImFontGlyph, + ) -> *mut ImVector_ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_ImVector_TextRangeVector( + src: ImVector_TextRange, + ) -> *mut ImVector_TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_ImVector_CustomRectVector( + src: ImVector_CustomRect, + ) -> *mut ImVector_CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_ImVector_ImVec4Vector(src: ImVector_ImVec4) -> *mut ImVector_ImVec4; +} +extern "C" { + pub fn ImVector_char_ImVector_charVector(src: ImVector_char) -> *mut ImVector_char; +} +extern "C" { + pub fn ImVector_ImU32_ImVector_ImU32Vector(src: ImVector_ImU32) -> *mut ImVector_ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_ImVector_ImTextureIDVector( + src: ImVector_ImTextureID, + ) -> *mut ImVector_ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_ImVector_ImDrawVertVector( + src: ImVector_ImDrawVert, + ) -> *mut ImVector_ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_ImVector_ImFontPtrVector( + src: ImVector_ImFontPtr, + ) -> *mut ImVector_ImFontPtr; +} +extern "C" { + pub fn ImVector_ImDrawCmd_ImVector_ImDrawCmdVector( + src: ImVector_ImDrawCmd, + ) -> *mut ImVector_ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_ImVector_PairVector(src: ImVector_Pair) -> *mut ImVector_Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_ImVector_ImDrawChannelVector( + src: ImVector_ImDrawChannel, + ) -> *mut ImVector_ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_ImVector_ImDrawIdxVector( + src: ImVector_ImDrawIdx, + ) -> *mut ImVector_ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_ImVector_ImVec2Vector(src: ImVector_ImVec2) -> *mut ImVector_ImVec2; +} +extern "C" { + pub fn ImVector_float_empty(self_: *const ImVector_float) -> bool; +} +extern "C" { + pub fn ImVector_ImWchar_empty(self_: *const ImVector_ImWchar) -> bool; +} +extern "C" { + pub fn ImVector_ImFontConfig_empty(self_: *const ImVector_ImFontConfig) -> bool; +} +extern "C" { + pub fn ImVector_ImFontGlyph_empty(self_: *const ImVector_ImFontGlyph) -> bool; +} +extern "C" { + pub fn ImVector_TextRange_empty(self_: *const ImVector_TextRange) -> bool; +} +extern "C" { + pub fn ImVector_CustomRect_empty(self_: *const ImVector_CustomRect) -> bool; +} +extern "C" { + pub fn ImVector_ImVec4_empty(self_: *const ImVector_ImVec4) -> bool; +} +extern "C" { + pub fn ImVector_char_empty(self_: *const ImVector_char) -> bool; +} +extern "C" { + pub fn ImVector_ImU32_empty(self_: *const ImVector_ImU32) -> bool; +} +extern "C" { + pub fn ImVector_ImTextureID_empty(self_: *const ImVector_ImTextureID) -> bool; +} +extern "C" { + pub fn ImVector_ImDrawVert_empty(self_: *const ImVector_ImDrawVert) -> bool; +} +extern "C" { + pub fn ImVector_ImFontPtr_empty(self_: *const ImVector_ImFontPtr) -> bool; +} +extern "C" { + pub fn ImVector_ImDrawCmd_empty(self_: *const ImVector_ImDrawCmd) -> bool; +} +extern "C" { + pub fn ImVector_Pair_empty(self_: *const ImVector_Pair) -> bool; +} +extern "C" { + pub fn ImVector_ImDrawChannel_empty(self_: *const ImVector_ImDrawChannel) -> bool; +} +extern "C" { + pub fn ImVector_ImDrawIdx_empty(self_: *const ImVector_ImDrawIdx) -> bool; +} +extern "C" { + pub fn ImVector_ImVec2_empty(self_: *const ImVector_ImVec2) -> bool; +} +extern "C" { + pub fn ImVector_float_size(self_: *const ImVector_float) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImWchar_size(self_: *const ImVector_ImWchar) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontConfig_size(self_: *const ImVector_ImFontConfig) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontGlyph_size(self_: *const ImVector_ImFontGlyph) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_TextRange_size(self_: *const ImVector_TextRange) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_CustomRect_size(self_: *const ImVector_CustomRect) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec4_size(self_: *const ImVector_ImVec4) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_char_size(self_: *const ImVector_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImU32_size(self_: *const ImVector_ImU32) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImTextureID_size(self_: *const ImVector_ImTextureID) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawVert_size(self_: *const ImVector_ImDrawVert) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontPtr_size(self_: *const ImVector_ImFontPtr) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawCmd_size(self_: *const ImVector_ImDrawCmd) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_Pair_size(self_: *const ImVector_Pair) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawChannel_size( + self_: *const ImVector_ImDrawChannel, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawIdx_size(self_: *const ImVector_ImDrawIdx) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec2_size(self_: *const ImVector_ImVec2) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_float_size_in_bytes(self_: *const ImVector_float) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImWchar_size_in_bytes(self_: *const ImVector_ImWchar) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontConfig_size_in_bytes( + self_: *const ImVector_ImFontConfig, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontGlyph_size_in_bytes( + self_: *const ImVector_ImFontGlyph, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_TextRange_size_in_bytes( + self_: *const ImVector_TextRange, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_CustomRect_size_in_bytes( + self_: *const ImVector_CustomRect, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec4_size_in_bytes(self_: *const ImVector_ImVec4) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_char_size_in_bytes(self_: *const ImVector_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImU32_size_in_bytes(self_: *const ImVector_ImU32) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImTextureID_size_in_bytes( + self_: *const ImVector_ImTextureID, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawVert_size_in_bytes( + self_: *const ImVector_ImDrawVert, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontPtr_size_in_bytes( + self_: *const ImVector_ImFontPtr, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawCmd_size_in_bytes( + self_: *const ImVector_ImDrawCmd, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_Pair_size_in_bytes(self_: *const ImVector_Pair) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawChannel_size_in_bytes( + self_: *const ImVector_ImDrawChannel, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawIdx_size_in_bytes( + self_: *const ImVector_ImDrawIdx, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec2_size_in_bytes(self_: *const ImVector_ImVec2) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_float_capacity(self_: *const ImVector_float) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImWchar_capacity(self_: *const ImVector_ImWchar) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontConfig_capacity( + self_: *const ImVector_ImFontConfig, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontGlyph_capacity( + self_: *const ImVector_ImFontGlyph, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_TextRange_capacity(self_: *const ImVector_TextRange) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_CustomRect_capacity(self_: *const ImVector_CustomRect) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec4_capacity(self_: *const ImVector_ImVec4) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_char_capacity(self_: *const ImVector_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImU32_capacity(self_: *const ImVector_ImU32) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImTextureID_capacity( + self_: *const ImVector_ImTextureID, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawVert_capacity(self_: *const ImVector_ImDrawVert) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontPtr_capacity(self_: *const ImVector_ImFontPtr) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawCmd_capacity(self_: *const ImVector_ImDrawCmd) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_Pair_capacity(self_: *const ImVector_Pair) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawChannel_capacity( + self_: *const ImVector_ImDrawChannel, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawIdx_capacity(self_: *const ImVector_ImDrawIdx) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec2_capacity(self_: *const ImVector_ImVec2) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_float_clear(self_: *mut ImVector_float); +} +extern "C" { + pub fn ImVector_ImWchar_clear(self_: *mut ImVector_ImWchar); +} +extern "C" { + pub fn ImVector_ImFontConfig_clear(self_: *mut ImVector_ImFontConfig); +} +extern "C" { + pub fn ImVector_ImFontGlyph_clear(self_: *mut ImVector_ImFontGlyph); +} +extern "C" { + pub fn ImVector_TextRange_clear(self_: *mut ImVector_TextRange); +} +extern "C" { + pub fn ImVector_CustomRect_clear(self_: *mut ImVector_CustomRect); +} +extern "C" { + pub fn ImVector_ImVec4_clear(self_: *mut ImVector_ImVec4); +} +extern "C" { + pub fn ImVector_char_clear(self_: *mut ImVector_char); +} +extern "C" { + pub fn ImVector_ImU32_clear(self_: *mut ImVector_ImU32); +} +extern "C" { + pub fn ImVector_ImTextureID_clear(self_: *mut ImVector_ImTextureID); +} +extern "C" { + pub fn ImVector_ImDrawVert_clear(self_: *mut ImVector_ImDrawVert); +} +extern "C" { + pub fn ImVector_ImFontPtr_clear(self_: *mut ImVector_ImFontPtr); +} +extern "C" { + pub fn ImVector_ImDrawCmd_clear(self_: *mut ImVector_ImDrawCmd); +} +extern "C" { + pub fn ImVector_Pair_clear(self_: *mut ImVector_Pair); +} +extern "C" { + pub fn ImVector_ImDrawChannel_clear(self_: *mut ImVector_ImDrawChannel); +} +extern "C" { + pub fn ImVector_ImDrawIdx_clear(self_: *mut ImVector_ImDrawIdx); +} +extern "C" { + pub fn ImVector_ImVec2_clear(self_: *mut ImVector_ImVec2); +} +extern "C" { + pub fn ImVector_float_begin(self_: *mut ImVector_float) -> *mut f32; +} +extern "C" { + pub fn ImVector_ImWchar_begin(self_: *mut ImVector_ImWchar) -> *mut ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_begin(self_: *mut ImVector_ImFontConfig) -> *mut ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_begin(self_: *mut ImVector_ImFontGlyph) -> *mut ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_begin(self_: *mut ImVector_TextRange) -> *mut TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_begin(self_: *mut ImVector_CustomRect) -> *mut CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_begin(self_: *mut ImVector_ImVec4) -> *mut ImVec4; +} +extern "C" { + pub fn ImVector_char_begin(self_: *mut ImVector_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_begin(self_: *mut ImVector_ImU32) -> *mut ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_begin(self_: *mut ImVector_ImTextureID) -> *mut ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_begin(self_: *mut ImVector_ImDrawVert) -> *mut ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_begin(self_: *mut ImVector_ImFontPtr) -> *mut *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_begin(self_: *mut ImVector_ImDrawCmd) -> *mut ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_begin(self_: *mut ImVector_Pair) -> *mut Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_begin(self_: *mut ImVector_ImDrawChannel) -> *mut ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_begin(self_: *mut ImVector_ImDrawIdx) -> *mut ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_begin(self_: *mut ImVector_ImVec2) -> *mut ImVec2; +} +extern "C" { + pub fn ImVector_float_begin_const(self_: *const ImVector_float) -> *const f32; +} +extern "C" { + pub fn ImVector_ImWchar_begin_const(self_: *const ImVector_ImWchar) -> *const ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_begin_const( + self_: *const ImVector_ImFontConfig, + ) -> *const ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_begin_const( + self_: *const ImVector_ImFontGlyph, + ) -> *const ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_begin_const(self_: *const ImVector_TextRange) -> *const TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_begin_const(self_: *const ImVector_CustomRect) -> *const CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_begin_const(self_: *const ImVector_ImVec4) -> *const ImVec4; +} +extern "C" { + pub fn ImVector_char_begin_const(self_: *const ImVector_char) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_begin_const(self_: *const ImVector_ImU32) -> *const ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_begin_const( + self_: *const ImVector_ImTextureID, + ) -> *const ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_begin_const(self_: *const ImVector_ImDrawVert) -> *const ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_begin_const(self_: *const ImVector_ImFontPtr) -> *const *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_begin_const(self_: *const ImVector_ImDrawCmd) -> *const ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_begin_const(self_: *const ImVector_Pair) -> *const Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_begin_const( + self_: *const ImVector_ImDrawChannel, + ) -> *const ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_begin_const(self_: *const ImVector_ImDrawIdx) -> *const ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_begin_const(self_: *const ImVector_ImVec2) -> *const ImVec2; +} +extern "C" { + pub fn ImVector_float_end(self_: *mut ImVector_float) -> *mut f32; +} +extern "C" { + pub fn ImVector_ImWchar_end(self_: *mut ImVector_ImWchar) -> *mut ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_end(self_: *mut ImVector_ImFontConfig) -> *mut ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_end(self_: *mut ImVector_ImFontGlyph) -> *mut ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_end(self_: *mut ImVector_TextRange) -> *mut TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_end(self_: *mut ImVector_CustomRect) -> *mut CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_end(self_: *mut ImVector_ImVec4) -> *mut ImVec4; +} +extern "C" { + pub fn ImVector_char_end(self_: *mut ImVector_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_end(self_: *mut ImVector_ImU32) -> *mut ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_end(self_: *mut ImVector_ImTextureID) -> *mut ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_end(self_: *mut ImVector_ImDrawVert) -> *mut ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_end(self_: *mut ImVector_ImFontPtr) -> *mut *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_end(self_: *mut ImVector_ImDrawCmd) -> *mut ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_end(self_: *mut ImVector_Pair) -> *mut Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_end(self_: *mut ImVector_ImDrawChannel) -> *mut ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_end(self_: *mut ImVector_ImDrawIdx) -> *mut ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_end(self_: *mut ImVector_ImVec2) -> *mut ImVec2; +} +extern "C" { + pub fn ImVector_float_end_const(self_: *const ImVector_float) -> *const f32; +} +extern "C" { + pub fn ImVector_ImWchar_end_const(self_: *const ImVector_ImWchar) -> *const ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_end_const( + self_: *const ImVector_ImFontConfig, + ) -> *const ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_end_const(self_: *const ImVector_ImFontGlyph) + -> *const ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_end_const(self_: *const ImVector_TextRange) -> *const TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_end_const(self_: *const ImVector_CustomRect) -> *const CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_end_const(self_: *const ImVector_ImVec4) -> *const ImVec4; +} +extern "C" { + pub fn ImVector_char_end_const(self_: *const ImVector_char) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_end_const(self_: *const ImVector_ImU32) -> *const ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_end_const(self_: *const ImVector_ImTextureID) + -> *const ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_end_const(self_: *const ImVector_ImDrawVert) -> *const ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_end_const(self_: *const ImVector_ImFontPtr) -> *const *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_end_const(self_: *const ImVector_ImDrawCmd) -> *const ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_end_const(self_: *const ImVector_Pair) -> *const Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_end_const( + self_: *const ImVector_ImDrawChannel, + ) -> *const ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_end_const(self_: *const ImVector_ImDrawIdx) -> *const ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_end_const(self_: *const ImVector_ImVec2) -> *const ImVec2; +} +extern "C" { + pub fn ImVector_float_front(self_: *mut ImVector_float) -> *mut f32; +} +extern "C" { + pub fn ImVector_ImWchar_front(self_: *mut ImVector_ImWchar) -> *mut ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_front(self_: *mut ImVector_ImFontConfig) -> *mut ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_front(self_: *mut ImVector_ImFontGlyph) -> *mut ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_front(self_: *mut ImVector_TextRange) -> *mut TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_front(self_: *mut ImVector_CustomRect) -> *mut CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_front(self_: *mut ImVector_ImVec4) -> *mut ImVec4; +} +extern "C" { + pub fn ImVector_char_front(self_: *mut ImVector_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_front(self_: *mut ImVector_ImU32) -> *mut ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_front(self_: *mut ImVector_ImTextureID) -> *mut ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_front(self_: *mut ImVector_ImDrawVert) -> *mut ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_front(self_: *mut ImVector_ImFontPtr) -> *mut *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_front(self_: *mut ImVector_ImDrawCmd) -> *mut ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_front(self_: *mut ImVector_Pair) -> *mut Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_front(self_: *mut ImVector_ImDrawChannel) -> *mut ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_front(self_: *mut ImVector_ImDrawIdx) -> *mut ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_front(self_: *mut ImVector_ImVec2) -> *mut ImVec2; +} +extern "C" { + pub fn ImVector_float_front_const(self_: *const ImVector_float) -> *const f32; +} +extern "C" { + pub fn ImVector_ImWchar_front_const(self_: *const ImVector_ImWchar) -> *const ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_front_const( + self_: *const ImVector_ImFontConfig, + ) -> *const ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_front_const( + self_: *const ImVector_ImFontGlyph, + ) -> *const ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_front_const(self_: *const ImVector_TextRange) -> *const TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_front_const(self_: *const ImVector_CustomRect) -> *const CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_front_const(self_: *const ImVector_ImVec4) -> *const ImVec4; +} +extern "C" { + pub fn ImVector_char_front_const(self_: *const ImVector_char) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_front_const(self_: *const ImVector_ImU32) -> *const ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_front_const( + self_: *const ImVector_ImTextureID, + ) -> *const ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_front_const(self_: *const ImVector_ImDrawVert) -> *const ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_front_const(self_: *const ImVector_ImFontPtr) -> *const *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_front_const(self_: *const ImVector_ImDrawCmd) -> *const ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_front_const(self_: *const ImVector_Pair) -> *const Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_front_const( + self_: *const ImVector_ImDrawChannel, + ) -> *const ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_front_const(self_: *const ImVector_ImDrawIdx) -> *const ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_front_const(self_: *const ImVector_ImVec2) -> *const ImVec2; +} +extern "C" { + pub fn ImVector_float_back(self_: *mut ImVector_float) -> *mut f32; +} +extern "C" { + pub fn ImVector_ImWchar_back(self_: *mut ImVector_ImWchar) -> *mut ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_back(self_: *mut ImVector_ImFontConfig) -> *mut ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_back(self_: *mut ImVector_ImFontGlyph) -> *mut ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_back(self_: *mut ImVector_TextRange) -> *mut TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_back(self_: *mut ImVector_CustomRect) -> *mut CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_back(self_: *mut ImVector_ImVec4) -> *mut ImVec4; +} +extern "C" { + pub fn ImVector_char_back(self_: *mut ImVector_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_back(self_: *mut ImVector_ImU32) -> *mut ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_back(self_: *mut ImVector_ImTextureID) -> *mut ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_back(self_: *mut ImVector_ImDrawVert) -> *mut ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_back(self_: *mut ImVector_ImFontPtr) -> *mut *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_back(self_: *mut ImVector_ImDrawCmd) -> *mut ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_back(self_: *mut ImVector_Pair) -> *mut Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_back(self_: *mut ImVector_ImDrawChannel) -> *mut ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_back(self_: *mut ImVector_ImDrawIdx) -> *mut ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_back(self_: *mut ImVector_ImVec2) -> *mut ImVec2; +} +extern "C" { + pub fn ImVector_float_back_const(self_: *const ImVector_float) -> *const f32; +} +extern "C" { + pub fn ImVector_ImWchar_back_const(self_: *const ImVector_ImWchar) -> *const ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_back_const( + self_: *const ImVector_ImFontConfig, + ) -> *const ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_back_const( + self_: *const ImVector_ImFontGlyph, + ) -> *const ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_back_const(self_: *const ImVector_TextRange) -> *const TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_back_const(self_: *const ImVector_CustomRect) -> *const CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_back_const(self_: *const ImVector_ImVec4) -> *const ImVec4; +} +extern "C" { + pub fn ImVector_char_back_const(self_: *const ImVector_char) -> *const ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_back_const(self_: *const ImVector_ImU32) -> *const ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_back_const( + self_: *const ImVector_ImTextureID, + ) -> *const ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_back_const(self_: *const ImVector_ImDrawVert) -> *const ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_back_const(self_: *const ImVector_ImFontPtr) -> *const *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_back_const(self_: *const ImVector_ImDrawCmd) -> *const ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_back_const(self_: *const ImVector_Pair) -> *const Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_back_const( + self_: *const ImVector_ImDrawChannel, + ) -> *const ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_back_const(self_: *const ImVector_ImDrawIdx) -> *const ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_back_const(self_: *const ImVector_ImVec2) -> *const ImVec2; +} +extern "C" { + pub fn ImVector_float_swap(self_: *mut ImVector_float, rhs: ImVector_float); +} +extern "C" { + pub fn ImVector_ImWchar_swap(self_: *mut ImVector_ImWchar, rhs: ImVector_ImWchar); +} +extern "C" { + pub fn ImVector_ImFontConfig_swap( + self_: *mut ImVector_ImFontConfig, + rhs: ImVector_ImFontConfig, + ); +} +extern "C" { + pub fn ImVector_ImFontGlyph_swap(self_: *mut ImVector_ImFontGlyph, rhs: ImVector_ImFontGlyph); +} +extern "C" { + pub fn ImVector_TextRange_swap(self_: *mut ImVector_TextRange, rhs: ImVector_TextRange); +} +extern "C" { + pub fn ImVector_CustomRect_swap(self_: *mut ImVector_CustomRect, rhs: ImVector_CustomRect); +} +extern "C" { + pub fn ImVector_ImVec4_swap(self_: *mut ImVector_ImVec4, rhs: ImVector_ImVec4); +} +extern "C" { + pub fn ImVector_char_swap(self_: *mut ImVector_char, rhs: ImVector_char); +} +extern "C" { + pub fn ImVector_ImU32_swap(self_: *mut ImVector_ImU32, rhs: ImVector_ImU32); +} +extern "C" { + pub fn ImVector_ImTextureID_swap(self_: *mut ImVector_ImTextureID, rhs: ImVector_ImTextureID); +} +extern "C" { + pub fn ImVector_ImDrawVert_swap(self_: *mut ImVector_ImDrawVert, rhs: ImVector_ImDrawVert); +} +extern "C" { + pub fn ImVector_ImFontPtr_swap(self_: *mut ImVector_ImFontPtr, rhs: ImVector_ImFontPtr); +} +extern "C" { + pub fn ImVector_ImDrawCmd_swap(self_: *mut ImVector_ImDrawCmd, rhs: ImVector_ImDrawCmd); +} +extern "C" { + pub fn ImVector_Pair_swap(self_: *mut ImVector_Pair, rhs: ImVector_Pair); +} +extern "C" { + pub fn ImVector_ImDrawChannel_swap( + self_: *mut ImVector_ImDrawChannel, + rhs: ImVector_ImDrawChannel, + ); +} +extern "C" { + pub fn ImVector_ImDrawIdx_swap(self_: *mut ImVector_ImDrawIdx, rhs: ImVector_ImDrawIdx); +} +extern "C" { + pub fn ImVector_ImVec2_swap(self_: *mut ImVector_ImVec2, rhs: ImVector_ImVec2); +} +extern "C" { + pub fn ImVector_float__grow_capacity( + self_: *const ImVector_float, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImWchar__grow_capacity( + self_: *const ImVector_ImWchar, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontConfig__grow_capacity( + self_: *const ImVector_ImFontConfig, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontGlyph__grow_capacity( + self_: *const ImVector_ImFontGlyph, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_TextRange__grow_capacity( + self_: *const ImVector_TextRange, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_CustomRect__grow_capacity( + self_: *const ImVector_CustomRect, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec4__grow_capacity( + self_: *const ImVector_ImVec4, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_char__grow_capacity( + self_: *const ImVector_char, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImU32__grow_capacity( + self_: *const ImVector_ImU32, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImTextureID__grow_capacity( + self_: *const ImVector_ImTextureID, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawVert__grow_capacity( + self_: *const ImVector_ImDrawVert, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontPtr__grow_capacity( + self_: *const ImVector_ImFontPtr, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawCmd__grow_capacity( + self_: *const ImVector_ImDrawCmd, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_Pair__grow_capacity( + self_: *const ImVector_Pair, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawChannel__grow_capacity( + self_: *const ImVector_ImDrawChannel, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawIdx__grow_capacity( + self_: *const ImVector_ImDrawIdx, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec2__grow_capacity( + self_: *const ImVector_ImVec2, + sz: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_float_resize(self_: *mut ImVector_float, new_size: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_ImWchar_resize(self_: *mut ImVector_ImWchar, new_size: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_ImFontConfig_resize( + self_: *mut ImVector_ImFontConfig, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImFontGlyph_resize( + self_: *mut ImVector_ImFontGlyph, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_TextRange_resize( + self_: *mut ImVector_TextRange, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_CustomRect_resize( + self_: *mut ImVector_CustomRect, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImVec4_resize(self_: *mut ImVector_ImVec4, new_size: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_char_resize(self_: *mut ImVector_char, new_size: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_ImU32_resize(self_: *mut ImVector_ImU32, new_size: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_ImTextureID_resize( + self_: *mut ImVector_ImTextureID, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImDrawVert_resize( + self_: *mut ImVector_ImDrawVert, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImFontPtr_resize( + self_: *mut ImVector_ImFontPtr, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImDrawCmd_resize( + self_: *mut ImVector_ImDrawCmd, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_Pair_resize(self_: *mut ImVector_Pair, new_size: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_ImDrawChannel_resize( + self_: *mut ImVector_ImDrawChannel, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImDrawIdx_resize( + self_: *mut ImVector_ImDrawIdx, + new_size: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImVec2_resize(self_: *mut ImVector_ImVec2, new_size: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_float_resizeT( + self_: *mut ImVector_float, + new_size: ::std::os::raw::c_int, + v: f32, + ); +} +extern "C" { + pub fn ImVector_ImWchar_resizeT( + self_: *mut ImVector_ImWchar, + new_size: ::std::os::raw::c_int, + v: ImWchar, + ); +} +extern "C" { + pub fn ImVector_ImFontConfig_resizeT( + self_: *mut ImVector_ImFontConfig, + new_size: ::std::os::raw::c_int, + v: ImFontConfig, + ); +} +extern "C" { + pub fn ImVector_ImFontGlyph_resizeT( + self_: *mut ImVector_ImFontGlyph, + new_size: ::std::os::raw::c_int, + v: ImFontGlyph, + ); +} +extern "C" { + pub fn ImVector_TextRange_resizeT( + self_: *mut ImVector_TextRange, + new_size: ::std::os::raw::c_int, + v: TextRange, + ); +} +extern "C" { + pub fn ImVector_CustomRect_resizeT( + self_: *mut ImVector_CustomRect, + new_size: ::std::os::raw::c_int, + v: CustomRect, + ); +} +extern "C" { + pub fn ImVector_ImVec4_resizeT( + self_: *mut ImVector_ImVec4, + new_size: ::std::os::raw::c_int, + v: ImVec4, + ); +} +extern "C" { + pub fn ImVector_char_resizeT( + self_: *mut ImVector_char, + new_size: ::std::os::raw::c_int, + v: ::std::os::raw::c_char, + ); +} +extern "C" { + pub fn ImVector_ImU32_resizeT( + self_: *mut ImVector_ImU32, + new_size: ::std::os::raw::c_int, + v: ImU32, + ); +} +extern "C" { + pub fn ImVector_ImTextureID_resizeT( + self_: *mut ImVector_ImTextureID, + new_size: ::std::os::raw::c_int, + v: ImTextureID, + ); +} +extern "C" { + pub fn ImVector_ImDrawVert_resizeT( + self_: *mut ImVector_ImDrawVert, + new_size: ::std::os::raw::c_int, + v: ImDrawVert, + ); +} +extern "C" { + pub fn ImVector_ImFontPtr_resizeT( + self_: *mut ImVector_ImFontPtr, + new_size: ::std::os::raw::c_int, + v: *mut ImFont, + ); +} +extern "C" { + pub fn ImVector_ImDrawCmd_resizeT( + self_: *mut ImVector_ImDrawCmd, + new_size: ::std::os::raw::c_int, + v: ImDrawCmd, + ); +} +extern "C" { + pub fn ImVector_Pair_resizeT( + self_: *mut ImVector_Pair, + new_size: ::std::os::raw::c_int, + v: Pair, + ); +} +extern "C" { + pub fn ImVector_ImDrawChannel_resizeT( + self_: *mut ImVector_ImDrawChannel, + new_size: ::std::os::raw::c_int, + v: ImDrawChannel, + ); +} +extern "C" { + pub fn ImVector_ImDrawIdx_resizeT( + self_: *mut ImVector_ImDrawIdx, + new_size: ::std::os::raw::c_int, + v: ImDrawIdx, + ); +} +extern "C" { + pub fn ImVector_ImVec2_resizeT( + self_: *mut ImVector_ImVec2, + new_size: ::std::os::raw::c_int, + v: ImVec2, + ); +} +extern "C" { + pub fn ImVector_float_reserve(self_: *mut ImVector_float, new_capacity: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_ImWchar_reserve( + self_: *mut ImVector_ImWchar, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImFontConfig_reserve( + self_: *mut ImVector_ImFontConfig, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImFontGlyph_reserve( + self_: *mut ImVector_ImFontGlyph, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_TextRange_reserve( + self_: *mut ImVector_TextRange, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_CustomRect_reserve( + self_: *mut ImVector_CustomRect, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImVec4_reserve( + self_: *mut ImVector_ImVec4, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_char_reserve(self_: *mut ImVector_char, new_capacity: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_ImU32_reserve(self_: *mut ImVector_ImU32, new_capacity: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_ImTextureID_reserve( + self_: *mut ImVector_ImTextureID, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImDrawVert_reserve( + self_: *mut ImVector_ImDrawVert, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImFontPtr_reserve( + self_: *mut ImVector_ImFontPtr, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImDrawCmd_reserve( + self_: *mut ImVector_ImDrawCmd, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_Pair_reserve(self_: *mut ImVector_Pair, new_capacity: ::std::os::raw::c_int); +} +extern "C" { + pub fn ImVector_ImDrawChannel_reserve( + self_: *mut ImVector_ImDrawChannel, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImDrawIdx_reserve( + self_: *mut ImVector_ImDrawIdx, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_ImVec2_reserve( + self_: *mut ImVector_ImVec2, + new_capacity: ::std::os::raw::c_int, + ); +} +extern "C" { + pub fn ImVector_float_push_back(self_: *mut ImVector_float, v: f32); +} +extern "C" { + pub fn ImVector_ImWchar_push_back(self_: *mut ImVector_ImWchar, v: ImWchar); +} +extern "C" { + pub fn ImVector_ImFontConfig_push_back(self_: *mut ImVector_ImFontConfig, v: ImFontConfig); +} +extern "C" { + pub fn ImVector_ImFontGlyph_push_back(self_: *mut ImVector_ImFontGlyph, v: ImFontGlyph); +} +extern "C" { + pub fn ImVector_TextRange_push_back(self_: *mut ImVector_TextRange, v: TextRange); +} +extern "C" { + pub fn ImVector_CustomRect_push_back(self_: *mut ImVector_CustomRect, v: CustomRect); +} +extern "C" { + pub fn ImVector_ImVec4_push_back(self_: *mut ImVector_ImVec4, v: ImVec4); +} +extern "C" { + pub fn ImVector_char_push_back(self_: *mut ImVector_char, v: ::std::os::raw::c_char); +} +extern "C" { + pub fn ImVector_ImU32_push_back(self_: *mut ImVector_ImU32, v: ImU32); +} +extern "C" { + pub fn ImVector_ImTextureID_push_back(self_: *mut ImVector_ImTextureID, v: ImTextureID); +} +extern "C" { + pub fn ImVector_ImDrawVert_push_back(self_: *mut ImVector_ImDrawVert, v: ImDrawVert); +} +extern "C" { + pub fn ImVector_ImFontPtr_push_back(self_: *mut ImVector_ImFontPtr, v: *mut ImFont); +} +extern "C" { + pub fn ImVector_ImDrawCmd_push_back(self_: *mut ImVector_ImDrawCmd, v: ImDrawCmd); +} +extern "C" { + pub fn ImVector_Pair_push_back(self_: *mut ImVector_Pair, v: Pair); +} +extern "C" { + pub fn ImVector_ImDrawChannel_push_back(self_: *mut ImVector_ImDrawChannel, v: ImDrawChannel); +} +extern "C" { + pub fn ImVector_ImDrawIdx_push_back(self_: *mut ImVector_ImDrawIdx, v: ImDrawIdx); +} +extern "C" { + pub fn ImVector_ImVec2_push_back(self_: *mut ImVector_ImVec2, v: ImVec2); +} +extern "C" { + pub fn ImVector_float_pop_back(self_: *mut ImVector_float); +} +extern "C" { + pub fn ImVector_ImWchar_pop_back(self_: *mut ImVector_ImWchar); +} +extern "C" { + pub fn ImVector_ImFontConfig_pop_back(self_: *mut ImVector_ImFontConfig); +} +extern "C" { + pub fn ImVector_ImFontGlyph_pop_back(self_: *mut ImVector_ImFontGlyph); +} +extern "C" { + pub fn ImVector_TextRange_pop_back(self_: *mut ImVector_TextRange); +} +extern "C" { + pub fn ImVector_CustomRect_pop_back(self_: *mut ImVector_CustomRect); +} +extern "C" { + pub fn ImVector_ImVec4_pop_back(self_: *mut ImVector_ImVec4); +} +extern "C" { + pub fn ImVector_char_pop_back(self_: *mut ImVector_char); +} +extern "C" { + pub fn ImVector_ImU32_pop_back(self_: *mut ImVector_ImU32); +} +extern "C" { + pub fn ImVector_ImTextureID_pop_back(self_: *mut ImVector_ImTextureID); +} +extern "C" { + pub fn ImVector_ImDrawVert_pop_back(self_: *mut ImVector_ImDrawVert); +} +extern "C" { + pub fn ImVector_ImFontPtr_pop_back(self_: *mut ImVector_ImFontPtr); +} +extern "C" { + pub fn ImVector_ImDrawCmd_pop_back(self_: *mut ImVector_ImDrawCmd); +} +extern "C" { + pub fn ImVector_Pair_pop_back(self_: *mut ImVector_Pair); +} +extern "C" { + pub fn ImVector_ImDrawChannel_pop_back(self_: *mut ImVector_ImDrawChannel); +} +extern "C" { + pub fn ImVector_ImDrawIdx_pop_back(self_: *mut ImVector_ImDrawIdx); +} +extern "C" { + pub fn ImVector_ImVec2_pop_back(self_: *mut ImVector_ImVec2); +} +extern "C" { + pub fn ImVector_float_push_front(self_: *mut ImVector_float, v: f32); +} +extern "C" { + pub fn ImVector_ImWchar_push_front(self_: *mut ImVector_ImWchar, v: ImWchar); +} +extern "C" { + pub fn ImVector_ImFontConfig_push_front(self_: *mut ImVector_ImFontConfig, v: ImFontConfig); +} +extern "C" { + pub fn ImVector_ImFontGlyph_push_front(self_: *mut ImVector_ImFontGlyph, v: ImFontGlyph); +} +extern "C" { + pub fn ImVector_TextRange_push_front(self_: *mut ImVector_TextRange, v: TextRange); +} +extern "C" { + pub fn ImVector_CustomRect_push_front(self_: *mut ImVector_CustomRect, v: CustomRect); +} +extern "C" { + pub fn ImVector_ImVec4_push_front(self_: *mut ImVector_ImVec4, v: ImVec4); +} +extern "C" { + pub fn ImVector_char_push_front(self_: *mut ImVector_char, v: ::std::os::raw::c_char); +} +extern "C" { + pub fn ImVector_ImU32_push_front(self_: *mut ImVector_ImU32, v: ImU32); +} +extern "C" { + pub fn ImVector_ImTextureID_push_front(self_: *mut ImVector_ImTextureID, v: ImTextureID); +} +extern "C" { + pub fn ImVector_ImDrawVert_push_front(self_: *mut ImVector_ImDrawVert, v: ImDrawVert); +} +extern "C" { + pub fn ImVector_ImFontPtr_push_front(self_: *mut ImVector_ImFontPtr, v: *mut ImFont); +} +extern "C" { + pub fn ImVector_ImDrawCmd_push_front(self_: *mut ImVector_ImDrawCmd, v: ImDrawCmd); +} +extern "C" { + pub fn ImVector_Pair_push_front(self_: *mut ImVector_Pair, v: Pair); +} +extern "C" { + pub fn ImVector_ImDrawChannel_push_front(self_: *mut ImVector_ImDrawChannel, v: ImDrawChannel); +} +extern "C" { + pub fn ImVector_ImDrawIdx_push_front(self_: *mut ImVector_ImDrawIdx, v: ImDrawIdx); +} +extern "C" { + pub fn ImVector_ImVec2_push_front(self_: *mut ImVector_ImVec2, v: ImVec2); +} +extern "C" { + pub fn ImVector_float_erase(self_: *mut ImVector_float, it: *const f32) -> *mut f32; +} +extern "C" { + pub fn ImVector_ImWchar_erase(self_: *mut ImVector_ImWchar, it: *const ImWchar) + -> *mut ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_erase( + self_: *mut ImVector_ImFontConfig, + it: *const ImFontConfig, + ) -> *mut ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_erase( + self_: *mut ImVector_ImFontGlyph, + it: *const ImFontGlyph, + ) -> *mut ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_erase( + self_: *mut ImVector_TextRange, + it: *const TextRange, + ) -> *mut TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_erase( + self_: *mut ImVector_CustomRect, + it: *const CustomRect, + ) -> *mut CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_erase(self_: *mut ImVector_ImVec4, it: *const ImVec4) -> *mut ImVec4; +} +extern "C" { + pub fn ImVector_char_erase( + self_: *mut ImVector_char, + it: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_erase(self_: *mut ImVector_ImU32, it: *const ImU32) -> *mut ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_erase( + self_: *mut ImVector_ImTextureID, + it: *const ImTextureID, + ) -> *mut ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_erase( + self_: *mut ImVector_ImDrawVert, + it: *const ImDrawVert, + ) -> *mut ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_erase( + self_: *mut ImVector_ImFontPtr, + it: *const *mut ImFont, + ) -> *mut *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_erase( + self_: *mut ImVector_ImDrawCmd, + it: *const ImDrawCmd, + ) -> *mut ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_erase(self_: *mut ImVector_Pair, it: *const Pair) -> *mut Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_erase( + self_: *mut ImVector_ImDrawChannel, + it: *const ImDrawChannel, + ) -> *mut ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_erase( + self_: *mut ImVector_ImDrawIdx, + it: *const ImDrawIdx, + ) -> *mut ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_erase(self_: *mut ImVector_ImVec2, it: *const ImVec2) -> *mut ImVec2; +} +extern "C" { + pub fn ImVector_float_eraseTPtr( + self_: *mut ImVector_float, + it: *const f32, + it_last: *const f32, + ) -> *mut f32; +} +extern "C" { + pub fn ImVector_ImWchar_eraseTPtr( + self_: *mut ImVector_ImWchar, + it: *const ImWchar, + it_last: *const ImWchar, + ) -> *mut ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_eraseTPtr( + self_: *mut ImVector_ImFontConfig, + it: *const ImFontConfig, + it_last: *const ImFontConfig, + ) -> *mut ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_eraseTPtr( + self_: *mut ImVector_ImFontGlyph, + it: *const ImFontGlyph, + it_last: *const ImFontGlyph, + ) -> *mut ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_eraseTPtr( + self_: *mut ImVector_TextRange, + it: *const TextRange, + it_last: *const TextRange, + ) -> *mut TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_eraseTPtr( + self_: *mut ImVector_CustomRect, + it: *const CustomRect, + it_last: *const CustomRect, + ) -> *mut CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_eraseTPtr( + self_: *mut ImVector_ImVec4, + it: *const ImVec4, + it_last: *const ImVec4, + ) -> *mut ImVec4; +} +extern "C" { + pub fn ImVector_char_eraseTPtr( + self_: *mut ImVector_char, + it: *const ::std::os::raw::c_char, + it_last: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_eraseTPtr( + self_: *mut ImVector_ImU32, + it: *const ImU32, + it_last: *const ImU32, + ) -> *mut ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_eraseTPtr( + self_: *mut ImVector_ImTextureID, + it: *const ImTextureID, + it_last: *const ImTextureID, + ) -> *mut ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_eraseTPtr( + self_: *mut ImVector_ImDrawVert, + it: *const ImDrawVert, + it_last: *const ImDrawVert, + ) -> *mut ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_eraseTPtr( + self_: *mut ImVector_ImFontPtr, + it: *const *mut ImFont, + it_last: *const *mut ImFont, + ) -> *mut *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_eraseTPtr( + self_: *mut ImVector_ImDrawCmd, + it: *const ImDrawCmd, + it_last: *const ImDrawCmd, + ) -> *mut ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_eraseTPtr( + self_: *mut ImVector_Pair, + it: *const Pair, + it_last: *const Pair, + ) -> *mut Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_eraseTPtr( + self_: *mut ImVector_ImDrawChannel, + it: *const ImDrawChannel, + it_last: *const ImDrawChannel, + ) -> *mut ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_eraseTPtr( + self_: *mut ImVector_ImDrawIdx, + it: *const ImDrawIdx, + it_last: *const ImDrawIdx, + ) -> *mut ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_eraseTPtr( + self_: *mut ImVector_ImVec2, + it: *const ImVec2, + it_last: *const ImVec2, + ) -> *mut ImVec2; +} +extern "C" { + pub fn ImVector_float_erase_unsorted(self_: *mut ImVector_float, it: *const f32) -> *mut f32; +} +extern "C" { + pub fn ImVector_ImWchar_erase_unsorted( + self_: *mut ImVector_ImWchar, + it: *const ImWchar, + ) -> *mut ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_erase_unsorted( + self_: *mut ImVector_ImFontConfig, + it: *const ImFontConfig, + ) -> *mut ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_erase_unsorted( + self_: *mut ImVector_ImFontGlyph, + it: *const ImFontGlyph, + ) -> *mut ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_erase_unsorted( + self_: *mut ImVector_TextRange, + it: *const TextRange, + ) -> *mut TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_erase_unsorted( + self_: *mut ImVector_CustomRect, + it: *const CustomRect, + ) -> *mut CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_erase_unsorted( + self_: *mut ImVector_ImVec4, + it: *const ImVec4, + ) -> *mut ImVec4; +} +extern "C" { + pub fn ImVector_char_erase_unsorted( + self_: *mut ImVector_char, + it: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_erase_unsorted( + self_: *mut ImVector_ImU32, + it: *const ImU32, + ) -> *mut ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_erase_unsorted( + self_: *mut ImVector_ImTextureID, + it: *const ImTextureID, + ) -> *mut ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_erase_unsorted( + self_: *mut ImVector_ImDrawVert, + it: *const ImDrawVert, + ) -> *mut ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_erase_unsorted( + self_: *mut ImVector_ImFontPtr, + it: *const *mut ImFont, + ) -> *mut *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_erase_unsorted( + self_: *mut ImVector_ImDrawCmd, + it: *const ImDrawCmd, + ) -> *mut ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_erase_unsorted(self_: *mut ImVector_Pair, it: *const Pair) -> *mut Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_erase_unsorted( + self_: *mut ImVector_ImDrawChannel, + it: *const ImDrawChannel, + ) -> *mut ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_erase_unsorted( + self_: *mut ImVector_ImDrawIdx, + it: *const ImDrawIdx, + ) -> *mut ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_erase_unsorted( + self_: *mut ImVector_ImVec2, + it: *const ImVec2, + ) -> *mut ImVec2; +} +extern "C" { + pub fn ImVector_float_insert(self_: *mut ImVector_float, it: *const f32, v: f32) -> *mut f32; +} +extern "C" { + pub fn ImVector_ImWchar_insert( + self_: *mut ImVector_ImWchar, + it: *const ImWchar, + v: ImWchar, + ) -> *mut ImWchar; +} +extern "C" { + pub fn ImVector_ImFontConfig_insert( + self_: *mut ImVector_ImFontConfig, + it: *const ImFontConfig, + v: ImFontConfig, + ) -> *mut ImFontConfig; +} +extern "C" { + pub fn ImVector_ImFontGlyph_insert( + self_: *mut ImVector_ImFontGlyph, + it: *const ImFontGlyph, + v: ImFontGlyph, + ) -> *mut ImFontGlyph; +} +extern "C" { + pub fn ImVector_TextRange_insert( + self_: *mut ImVector_TextRange, + it: *const TextRange, + v: TextRange, + ) -> *mut TextRange; +} +extern "C" { + pub fn ImVector_CustomRect_insert( + self_: *mut ImVector_CustomRect, + it: *const CustomRect, + v: CustomRect, + ) -> *mut CustomRect; +} +extern "C" { + pub fn ImVector_ImVec4_insert( + self_: *mut ImVector_ImVec4, + it: *const ImVec4, + v: ImVec4, + ) -> *mut ImVec4; +} +extern "C" { + pub fn ImVector_char_insert( + self_: *mut ImVector_char, + it: *const ::std::os::raw::c_char, + v: ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ImVector_ImU32_insert( + self_: *mut ImVector_ImU32, + it: *const ImU32, + v: ImU32, + ) -> *mut ImU32; +} +extern "C" { + pub fn ImVector_ImTextureID_insert( + self_: *mut ImVector_ImTextureID, + it: *const ImTextureID, + v: ImTextureID, + ) -> *mut ImTextureID; +} +extern "C" { + pub fn ImVector_ImDrawVert_insert( + self_: *mut ImVector_ImDrawVert, + it: *const ImDrawVert, + v: ImDrawVert, + ) -> *mut ImDrawVert; +} +extern "C" { + pub fn ImVector_ImFontPtr_insert( + self_: *mut ImVector_ImFontPtr, + it: *const *mut ImFont, + v: *mut ImFont, + ) -> *mut *mut ImFont; +} +extern "C" { + pub fn ImVector_ImDrawCmd_insert( + self_: *mut ImVector_ImDrawCmd, + it: *const ImDrawCmd, + v: ImDrawCmd, + ) -> *mut ImDrawCmd; +} +extern "C" { + pub fn ImVector_Pair_insert(self_: *mut ImVector_Pair, it: *const Pair, v: Pair) -> *mut Pair; +} +extern "C" { + pub fn ImVector_ImDrawChannel_insert( + self_: *mut ImVector_ImDrawChannel, + it: *const ImDrawChannel, + v: ImDrawChannel, + ) -> *mut ImDrawChannel; +} +extern "C" { + pub fn ImVector_ImDrawIdx_insert( + self_: *mut ImVector_ImDrawIdx, + it: *const ImDrawIdx, + v: ImDrawIdx, + ) -> *mut ImDrawIdx; +} +extern "C" { + pub fn ImVector_ImVec2_insert( + self_: *mut ImVector_ImVec2, + it: *const ImVec2, + v: ImVec2, + ) -> *mut ImVec2; +} +extern "C" { + pub fn ImVector_float_contains(self_: *const ImVector_float, v: f32) -> bool; +} +extern "C" { + pub fn ImVector_ImWchar_contains(self_: *const ImVector_ImWchar, v: ImWchar) -> bool; +} +extern "C" { + pub fn ImVector_char_contains(self_: *const ImVector_char, v: ::std::os::raw::c_char) -> bool; +} +extern "C" { + pub fn ImVector_float_index_from_ptr( + self_: *const ImVector_float, + it: *const f32, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImWchar_index_from_ptr( + self_: *const ImVector_ImWchar, + it: *const ImWchar, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontConfig_index_from_ptr( + self_: *const ImVector_ImFontConfig, + it: *const ImFontConfig, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontGlyph_index_from_ptr( + self_: *const ImVector_ImFontGlyph, + it: *const ImFontGlyph, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_TextRange_index_from_ptr( + self_: *const ImVector_TextRange, + it: *const TextRange, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_CustomRect_index_from_ptr( + self_: *const ImVector_CustomRect, + it: *const CustomRect, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec4_index_from_ptr( + self_: *const ImVector_ImVec4, + it: *const ImVec4, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_char_index_from_ptr( + self_: *const ImVector_char, + it: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImU32_index_from_ptr( + self_: *const ImVector_ImU32, + it: *const ImU32, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImTextureID_index_from_ptr( + self_: *const ImVector_ImTextureID, + it: *const ImTextureID, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawVert_index_from_ptr( + self_: *const ImVector_ImDrawVert, + it: *const ImDrawVert, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImFontPtr_index_from_ptr( + self_: *const ImVector_ImFontPtr, + it: *const *mut ImFont, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawCmd_index_from_ptr( + self_: *const ImVector_ImDrawCmd, + it: *const ImDrawCmd, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_Pair_index_from_ptr( + self_: *const ImVector_Pair, + it: *const Pair, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawChannel_index_from_ptr( + self_: *const ImVector_ImDrawChannel, + it: *const ImDrawChannel, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImDrawIdx_index_from_ptr( + self_: *const ImVector_ImDrawIdx, + it: *const ImDrawIdx, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ImVector_ImVec2_index_from_ptr( + self_: *const ImVector_ImVec2, + it: *const ImVec2, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn igLogText(fmt: *const ::std::os::raw::c_char, ...); +} +extern "C" { + pub fn ImGuiTextBuffer_appendf( + buffer: *mut ImGuiTextBuffer, + fmt: *const ::std::os::raw::c_char, + ... + ); +} +extern "C" { + pub fn igColorConvertRGBtoHSV( + r: f32, + g: f32, + b: f32, + out_h: *mut f32, + out_s: *mut f32, + out_v: *mut f32, + ); +} +extern "C" { + pub fn igColorConvertHSVtoRGB( + h: f32, + s: f32, + v: f32, + out_r: *mut f32, + out_g: *mut f32, + out_b: *mut f32, + ); +} diff --git a/imgui-sys/src/legacy.rs b/imgui-sys/src/legacy.rs new file mode 100644 index 0000000..bee2261 --- /dev/null +++ b/imgui-sys/src/legacy.rs @@ -0,0 +1,984 @@ +#![allow(non_upper_case_globals)] + +use crate::*; +use libc::size_t; +use std::os::raw::{c_char, c_double, c_float, c_int, c_uint, c_void}; + +// Context creation and access +extern "C" { + pub fn igCreateContext(shared_font_atlas: *mut ImFontAtlas) -> *mut ImGuiContext; + pub fn igDestroyContext(ctx: *mut ImGuiContext); + pub fn igGetCurrentContext() -> *mut ImGuiContext; + pub fn igSetCurrentContext(ctx: *mut ImGuiContext); + pub fn igDebugCheckVersionAndDataLayout( + version_str: *const c_char, + sz_io: size_t, + sz_style: size_t, + sz_vec2: size_t, + sz_vec4: size_t, + sz_drawvert: size_t, + ) -> bool; +} + +// Main +extern "C" { + pub fn igGetIO() -> *mut ImGuiIO; + pub fn igGetStyle() -> *mut ImGuiStyle; + pub fn igNewFrame(); + pub fn igEndFrame(); + pub fn igRender(); + pub fn igGetDrawData() -> *mut ImDrawData; +} + +// Demo, Debug, Information +extern "C" { + pub fn igShowAboutWindow(opened: *mut bool); + pub fn igShowDemoWindow(opened: *mut bool); + pub fn igShowMetricsWindow(opened: *mut bool); + pub fn igShowStyleEditor(style: *mut ImGuiStyle); + pub fn igShowStyleSelector(label: *const c_char) -> bool; + pub fn igShowFontSelector(label: *const c_char); + pub fn igShowUserGuide(); + pub fn igGetVersion() -> *const c_char; +} + +// Styles +extern "C" { + pub fn igStyleColorsDark(dst: *mut ImGuiStyle); + pub fn igStyleColorsClassic(dst: *mut ImGuiStyle); + pub fn igStyleColorsLight(dst: *mut ImGuiStyle); +} + +// Windows +extern "C" { + pub fn igBegin(name: *const c_char, open: *mut bool, flags: ImGuiWindowFlags) -> bool; + pub fn igEnd(); + pub fn igBeginChild( + str_id: *const c_char, + size: ImVec2, + border: bool, + flags: ImGuiWindowFlags, + ) -> bool; + pub fn igBeginChildID(id: ImGuiID, size: ImVec2, border: bool, flags: ImGuiWindowFlags) + -> bool; + pub fn igEndChild(); +} + +// Windows Utilities +extern "C" { + pub fn igIsWindowAppearing() -> bool; + pub fn igIsWindowCollapsed() -> bool; + pub fn igIsWindowFocused(flags: ImGuiFocusedFlags) -> bool; + pub fn igIsWindowHovered(flags: ImGuiHoveredFlags) -> bool; + pub fn igGetWindowDrawList() -> *mut ImDrawList; + pub fn igGetWindowPos_nonUDT2() -> ImVec2; + pub fn igGetWindowSize_nonUDT2() -> ImVec2; + pub fn igGetWindowWidth() -> c_float; + pub fn igGetWindowHeight() -> c_float; + pub fn igGetContentRegionMax_nonUDT2() -> ImVec2; + pub fn igGetContentRegionAvail_nonUDT2() -> ImVec2; + pub fn igGetContentRegionAvailWidth() -> c_float; + pub fn igGetWindowContentRegionMin_nonUDT2() -> ImVec2; + pub fn igGetWindowContentRegionMax_nonUDT2() -> ImVec2; + pub fn igGetWindowContentRegionWidth() -> c_float; + + pub fn igSetNextWindowPos(pos: ImVec2, cond: ImGuiCond, pivot: ImVec2); + pub fn igSetNextWindowSize(size: ImVec2, cond: ImGuiCond); + pub fn igSetNextWindowSizeConstraints( + size_min: ImVec2, + size_max: ImVec2, + custom_callback: ImGuiSizeCallback, + custom_callback_data: *mut c_void, + ); + pub fn igSetNextWindowContentSize(size: ImVec2); + pub fn igSetNextWindowCollapsed(collapsed: bool, cond: ImGuiCond); + pub fn igSetNextWindowFocus(); + pub fn igSetNextWindowBgAlpha(alpha: c_float); + pub fn igSetWindowPosVec2(pos: ImVec2, cond: ImGuiCond); + pub fn igSetWindowSizeVec2(size: ImVec2, cond: ImGuiCond); + pub fn igSetWindowCollapsedBool(collapsed: bool, cond: ImGuiCond); + pub fn igSetWindowFocus(); + pub fn igSetWindowFontScale(scale: c_float); + pub fn igSetWindowPosStr(name: *const c_char, pos: ImVec2, cond: ImGuiCond); + pub fn igSetWindowSizeStr(name: *const c_char, size: ImVec2, cond: ImGuiCond); + pub fn igSetWindowCollapsedStr(name: *const c_char, collapsed: bool, cond: ImGuiCond); + pub fn igSetWindowFocusStr(name: *const c_char); +} + +// Windows scrolling +extern "C" { + pub fn igGetScrollX() -> c_float; + pub fn igGetScrollY() -> c_float; + pub fn igGetScrollMaxX() -> c_float; + pub fn igGetScrollMaxY() -> c_float; + pub fn igSetScrollX(scroll_x: c_float); + pub fn igSetScrollY(scroll_y: c_float); + pub fn igSetScrollHereY(center_y_ratio: c_float); + pub fn igSetScrollFromPosY(pos_y: c_float, center_y_ratio: c_float); +} + +// Parameter stacks (shared) +extern "C" { + pub fn igPushFont(font: *mut ImFont); + pub fn igPopFont(); + pub fn igPushStyleColorU32(idx: ImGuiCol, col: ImU32); + pub fn igPushStyleColor(idx: ImGuiCol, col: ImVec4); + pub fn igPopStyleColor(count: c_int); + pub fn igPushStyleVarFloat(idx: ImGuiStyleVar, val: c_float); + pub fn igPushStyleVarVec2(idx: ImGuiStyleVar, val: ImVec2); + pub fn igPopStyleVar(count: c_int); + pub fn igGetStyleColorVec4(idx: ImGuiCol) -> *const ImVec4; + pub fn igGetFont() -> *mut ImFont; + pub fn igGetFontSize() -> c_float; + pub fn igGetFontTexUvWhitePixel_nonUDT2() -> ImVec2; + pub fn igGetColorU32(idx: ImGuiCol, alpha_mul: c_float) -> ImU32; + pub fn igGetColorU32Vec(col: ImVec4) -> ImU32; + pub fn igGetColorU32U32(col: ImU32) -> ImU32; +} + +// Parameter stack (current window) +extern "C" { + pub fn igPushItemWidth(item_width: c_float); + pub fn igPopItemWidth(); + pub fn igCalcItemWidth() -> c_float; + pub fn igPushTextWrapPos(wrap_pos_x: c_float); + pub fn igPopTextWrapPos(); + pub fn igPushAllowKeyboardFocus(allow_keyboard_focus: bool); + pub fn igPopAllowKeyboardFocus(); + pub fn igPushButtonRepeat(repeat: bool); + pub fn igPopButtonRepeat(); +} + +// Cursor / Layout +extern "C" { + pub fn igSeparator(); + pub fn igSameLine(pos_x: c_float, spacing_w: c_float); + pub fn igNewLine(); + pub fn igSpacing(); + pub fn igDummy(size: ImVec2); + pub fn igIndent(indent_w: c_float); + pub fn igUnindent(indent_w: c_float); + pub fn igBeginGroup(); + pub fn igEndGroup(); + pub fn igGetCursorPos_nonUDT2() -> ImVec2; + pub fn igGetCursorPosX() -> c_float; + pub fn igGetCursorPosY() -> c_float; + pub fn igSetCursorPos(local_pos: ImVec2); + pub fn igSetCursorPosX(x: c_float); + pub fn igSetCursorPosY(y: c_float); + pub fn igGetCursorStartPos_nonUDT2() -> ImVec2; + pub fn igGetCursorScreenPos_nonUDT2() -> ImVec2; + pub fn igSetCursorScreenPos(screen_pos: ImVec2); + pub fn igAlignTextToFramePadding(); + pub fn igGetTextLineHeight() -> c_float; + pub fn igGetTextLineHeightWithSpacing() -> c_float; + pub fn igGetFrameHeight() -> c_float; + pub fn igGetFrameHeightWithSpacing() -> c_float; +} + +// ID stack/scopes +extern "C" { + pub fn igPushIDStr(str_id: *const c_char); + pub fn igPushIDRange(str_id_begin: *const c_char, str_id_end: *const c_char); + pub fn igPushIDPtr(ptr_id: *const c_void); + pub fn igPushIDInt(int_id: c_int); + pub fn igPopID(); + pub fn igGetIDStr(str_id: *const c_char) -> ImGuiID; + pub fn igGetIDStrStr(str_id_begin: *const c_char, str_id_end: *const c_char) -> ImGuiID; + pub fn igGetIDPtr(ptr_id: *const c_void) -> ImGuiID; +} + +// Widgets: Text +extern "C" { + pub fn igTextUnformatted(text: *const c_char, text_end: *const c_char); + pub fn igText(fmt: *const c_char, ...); + pub fn igTextColored(col: ImVec4, fmt: *const c_char, ...); + pub fn igTextDisabled(fmt: *const c_char, ...); + pub fn igTextWrapped(fmt: *const c_char, ...); + pub fn igLabelText(label: *const c_char, fmt: *const c_char, ...); + pub fn igBulletText(fmt: *const c_char, ...); +} + +// Widgets: Main +extern "C" { + pub fn igButton(label: *const c_char, size: ImVec2) -> bool; + pub fn igSmallButton(label: *const c_char) -> bool; + pub fn igInvisibleButton(str_id: *const c_char, size: ImVec2) -> bool; + pub fn igArrowButton(str_id: *const c_char, dir: ImGuiDir) -> bool; + pub fn igImage( + user_texture_id: ImTextureID, + size: ImVec2, + uv0: ImVec2, + uv1: ImVec2, + tint_col: ImVec4, + border_col: ImVec4, + ); + pub fn igImageButton( + user_texture_id: ImTextureID, + size: ImVec2, + uv0: ImVec2, + uv1: ImVec2, + frame_padding: c_int, + bg_col: ImVec4, + tint_col: ImVec4, + ) -> bool; + pub fn igCheckbox(label: *const c_char, v: *mut bool) -> bool; + pub fn igCheckboxFlags(label: *const c_char, flags: *mut c_uint, flags_value: c_uint) -> bool; + pub fn igRadioButtonBool(label: *const c_char, active: bool) -> bool; + pub fn igRadioButtonIntPtr(label: *const c_char, v: *mut c_int, v_button: c_int) -> bool; + pub fn igProgressBar(fraction: c_float, size_arg: ImVec2, overlay: *const c_char); + pub fn igBullet(); +} + +// Widgets: Combo Box +extern "C" { + pub fn igBeginCombo( + label: *const c_char, + preview_value: *const c_char, + flags: ImGuiComboFlags, + ) -> bool; + pub fn igEndCombo(); + pub fn igCombo( + label: *const c_char, + current_item: *mut c_int, + items: *const *const c_char, + items_count: c_int, + popup_max_height_in_items: c_int, + ) -> bool; + pub fn igComboStr( + label: *const c_char, + current_item: *mut c_int, + items_separated_by_zeros: *const c_char, + popup_max_height_in_items: c_int, + ) -> bool; + pub fn igComboFnPtr( + label: *const c_char, + current_item: *mut c_int, + items_getter: extern "C" fn( + data: *mut c_void, + idx: c_int, + out_text: *mut *const c_char, + ) -> bool, + data: *mut c_void, + items_count: c_int, + popup_max_height_in_items: c_int, + ) -> bool; +} + +// Widgets: Drags +extern "C" { + pub fn igDragFloat( + label: *const c_char, + v: *mut c_float, + v_speed: c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igDragFloat2( + label: *const c_char, + v: *mut c_float, + v_speed: c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igDragFloat3( + label: *const c_char, + v: *mut c_float, + v_speed: c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igDragFloat4( + label: *const c_char, + v: *mut c_float, + v_speed: c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igDragFloatRange2( + label: *const c_char, + v_current_min: *mut c_float, + v_current_max: *mut c_float, + v_speed: c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + format_max: *const c_char, + power: c_float, + ) -> bool; + pub fn igDragInt( + label: *const c_char, + v: *mut c_int, + v_speed: c_float, + v_min: c_int, + v_max: c_int, + format: *const c_char, + ) -> bool; + pub fn igDragInt2( + label: *const c_char, + v: *mut c_int, + v_speed: c_float, + v_min: c_int, + v_max: c_int, + format: *const c_char, + ) -> bool; + pub fn igDragInt3( + label: *const c_char, + v: *mut c_int, + v_speed: c_float, + v_min: c_int, + v_max: c_int, + format: *const c_char, + ) -> bool; + pub fn igDragInt4( + label: *const c_char, + v: *mut c_int, + v_speed: c_float, + v_min: c_int, + v_max: c_int, + format: *const c_char, + ) -> bool; + pub fn igDragIntRange2( + label: *const c_char, + v_current_min: *mut c_int, + v_current_max: *mut c_int, + v_speed: c_float, + v_min: c_int, + v_max: c_int, + format: *const c_char, + format_max: *const c_char, + ) -> bool; + pub fn igDragScalar( + label: *const c_char, + data_type: ImGuiDataType, + v: *mut c_void, + v_speed: c_float, + v_min: *const c_void, + v_max: *const c_void, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igDragScalarN( + label: *const c_char, + data_type: ImGuiDataType, + v: *mut c_void, + components: c_int, + v_speed: c_float, + v_min: *const c_void, + v_max: *const c_void, + format: *const c_char, + power: c_float, + ) -> bool; +} + +// Widgets: Sliders +extern "C" { + pub fn igSliderFloat( + label: *const c_char, + v: *mut c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igSliderFloat2( + label: *const c_char, + v: *mut c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igSliderFloat3( + label: *const c_char, + v: *mut c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igSliderFloat4( + label: *const c_char, + v: *mut c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igSliderAngle( + label: *const c_char, + v_rad: *mut c_float, + v_degrees_min: c_float, + v_degrees_max: c_float, + format: *const c_char, + ) -> bool; + pub fn igSliderInt( + label: *const c_char, + v: *mut c_int, + v_min: c_int, + v_max: c_int, + format: *const c_char, + ) -> bool; + pub fn igSliderInt2( + label: *const c_char, + v: *mut c_int, + v_min: c_int, + v_max: c_int, + format: *const c_char, + ) -> bool; + pub fn igSliderInt3( + label: *const c_char, + v: *mut c_int, + v_min: c_int, + v_max: c_int, + format: *const c_char, + ) -> bool; + pub fn igSliderInt4( + label: *const c_char, + v: *mut c_int, + v_min: c_int, + v_max: c_int, + format: *const c_char, + ) -> bool; + pub fn igSliderScalar( + label: *const c_char, + data_type: ImGuiDataType, + v: *mut c_void, + v_min: *const c_void, + v_max: *const c_void, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igSliderScalarN( + label: *const c_char, + data_type: ImGuiDataType, + v: *mut c_void, + components: c_int, + v_min: *const c_void, + v_max: *const c_void, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igVSliderFloat( + label: *const c_char, + size: ImVec2, + v: *mut c_float, + v_min: c_float, + v_max: c_float, + format: *const c_char, + power: c_float, + ) -> bool; + pub fn igVSliderInt( + label: *const c_char, + size: ImVec2, + v: *mut c_int, + v_min: c_int, + v_max: c_int, + format: *const c_char, + ) -> bool; + pub fn igVSliderScalar( + label: *const c_char, + size: ImVec2, + data_type: ImGuiDataType, + v: *mut c_void, + v_min: *const c_void, + v_max: *const c_void, + format: *const c_char, + power: c_float, + ) -> bool; +} + +// Widgets: Input with Keyboard +extern "C" { + pub fn igInputText( + label: *const c_char, + buf: *mut c_char, + buf_size: usize, + flags: ImGuiInputTextFlags, + callback: ImGuiInputTextCallback, + user_data: *mut c_void, + ) -> bool; + pub fn igInputTextMultiline( + label: *const c_char, + buf: *mut c_char, + buf_size: usize, + size: ImVec2, + flags: ImGuiInputTextFlags, + callback: ImGuiInputTextCallback, + user_data: *mut c_void, + ) -> bool; + pub fn igInputFloat( + label: *const c_char, + v: *mut c_float, + step: c_float, + step_fast: c_float, + format: *const c_char, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputFloat2( + label: *const c_char, + v: *mut c_float, + format: *const c_char, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputFloat3( + label: *const c_char, + v: *mut c_float, + format: *const c_char, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputFloat4( + label: *const c_char, + v: *mut c_float, + format: *const c_char, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputInt( + label: *const c_char, + v: *mut c_int, + step: c_int, + step_fast: c_int, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputInt2( + label: *const c_char, + v: *mut c_int, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputInt3( + label: *const c_char, + v: *mut c_int, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputInt4( + label: *const c_char, + v: *mut c_int, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputDouble( + label: *const c_char, + v: *mut c_double, + step: c_double, + step_fast: c_double, + format: *const c_char, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputScalar( + label: *const c_char, + data_type: ImGuiDataType, + v: *mut c_void, + step: *const c_void, + step_fast: *const c_void, + format: *const c_char, + extra_flags: ImGuiInputTextFlags, + ) -> bool; + pub fn igInputScalarN( + label: *const c_char, + data_type: ImGuiDataType, + v: *mut c_void, + components: c_int, + step: *const c_void, + step_fast: *const c_void, + format: *const c_char, + extra_flags: ImGuiInputTextFlags, + ) -> bool; +} + +// Widgets: Color Editor/Picker +extern "C" { + pub fn igColorEdit3( + label: *const c_char, + col: *mut c_float, + flags: ImGuiColorEditFlags, + ) -> bool; + pub fn igColorEdit4( + label: *const c_char, + col: *mut c_float, + flags: ImGuiColorEditFlags, + ) -> bool; + pub fn igColorPicker3( + label: *const c_char, + col: *mut c_float, + flags: ImGuiColorEditFlags, + ) -> bool; + pub fn igColorPicker4( + label: *const c_char, + col: *mut c_float, + flags: ImGuiColorEditFlags, + ref_col: *const c_float, + ) -> bool; + pub fn igColorButton( + desc_id: *const c_char, + col: ImVec4, + flags: ImGuiColorEditFlags, + size: ImVec2, + ) -> bool; + pub fn igSetColorEditOptions(flags: ImGuiColorEditFlags); +} + +// Widgets: Trees +extern "C" { + pub fn igTreeNodeStr(label: *const c_char) -> bool; + pub fn igTreeNodeStrStr(str_id: *const c_char, fmt: *const c_char, ...) -> bool; + pub fn igTreeNodePtr(ptr_id: *const c_void, fmt: *const c_char, ...) -> bool; + pub fn igTreeNodeExStr(label: *const c_char, flags: ImGuiTreeNodeFlags) -> bool; + pub fn igTreeNodeExStrStr( + str_id: *const c_char, + flags: ImGuiTreeNodeFlags, + fmt: *const c_char, + ... + ) -> bool; + pub fn igTreeNodeExPtr( + ptr_id: *const c_void, + flags: ImGuiTreeNodeFlags, + fmt: *const c_char, + ... + ) -> bool; + pub fn igTreePushStr(str_id: *const c_char); + pub fn igTreePushPtr(ptr_id: *const c_void); + pub fn igTreePop(); + pub fn igTreeAdvanceToLabelPos(); + pub fn igGetTreeNodeToLabelSpacing() -> c_float; + pub fn igSetNextTreeNodeOpen(opened: bool, cond: ImGuiCond); + pub fn igCollapsingHeader(label: *const c_char, flags: ImGuiTreeNodeFlags) -> bool; + pub fn igCollapsingHeaderBoolPtr( + label: *const c_char, + open: *mut bool, + flags: ImGuiTreeNodeFlags, + ) -> bool; +} + +// Widgets: Selectables +extern "C" { + pub fn igSelectable( + label: *const c_char, + selected: bool, + flags: ImGuiSelectableFlags, + size: ImVec2, + ) -> bool; + pub fn igSelectableBoolPtr( + label: *const c_char, + p_selected: *mut bool, + flags: ImGuiSelectableFlags, + size: ImVec2, + ) -> bool; +} + +// Widgets: List Boxes +extern "C" { + pub fn igListBoxStr_arr( + label: *const c_char, + current_item: *mut c_int, + items: *const *const c_char, + items_count: c_int, + height_in_items: c_int, + ) -> bool; + pub fn igListBoxFnPtr( + label: *const c_char, + current_item: *mut c_int, + items_getter: extern "C" fn( + data: *mut c_void, + idx: c_int, + out_text: *mut *const c_char, + ) -> bool, + data: *mut c_void, + items_count: c_int, + height_in_items: c_int, + ) -> bool; + pub fn igListBoxHeaderVec2(label: *const c_char, size: ImVec2) -> bool; + pub fn igListBoxHeaderInt( + label: *const c_char, + items_count: c_int, + height_in_items: c_int, + ) -> bool; + pub fn igListBoxFooter(); +} + +// Widgets: Data Plotting +extern "C" { + pub fn igPlotLines( + label: *const c_char, + values: *const c_float, + values_count: c_int, + values_offset: c_int, + overlay_text: *const c_char, + scale_min: c_float, + scale_max: c_float, + graph_size: ImVec2, + stride: c_int, + ); + pub fn igPlotLinesFnPtr( + label: *const c_char, + values_getter: extern "C" fn(data: *mut c_void, idx: c_int) -> c_float, + data: *mut c_void, + values_count: c_int, + values_offset: c_int, + overlay_text: *const c_char, + scale_min: c_float, + scale_max: c_float, + graph_size: ImVec2, + ); + pub fn igPlotHistogramFloatPtr( + label: *const c_char, + values: *const c_float, + values_count: c_int, + values_offset: c_int, + overlay_text: *const c_char, + scale_min: c_float, + scale_max: c_float, + graph_size: ImVec2, + stride: c_int, + ); + pub fn igPlotHistogramFnPtr( + label: *const c_char, + values_getter: extern "C" fn(data: *mut c_void, idx: c_int) -> c_float, + data: *mut c_void, + values_count: c_int, + values_offset: c_int, + overlay_text: *const c_char, + scale_min: c_float, + scale_max: c_float, + graph_size: ImVec2, + ); +} + +// Widgets: Value() Helpers +extern "C" { + pub fn igValueBool(prefix: *const c_char, b: bool); + pub fn igValueInt(prefix: *const c_char, v: c_int); + pub fn igValueUInt(prefix: *const c_char, v: c_uint); + pub fn igValueFloat(prefix: *const c_char, v: c_float, float_format: *const c_char); +} + +// Widgets: Menus +extern "C" { + pub fn igBeginMainMenuBar() -> bool; + pub fn igEndMainMenuBar(); + pub fn igBeginMenuBar() -> bool; + pub fn igEndMenuBar(); + pub fn igBeginMenu(label: *const c_char, enabled: bool) -> bool; + pub fn igEndMenu(); + pub fn igMenuItemBool( + label: *const c_char, + shortcut: *const c_char, + selected: bool, + enabled: bool, + ) -> bool; + pub fn igMenuItemBoolPtr( + label: *const c_char, + shortcut: *const c_char, + p_selected: *mut bool, + enabled: bool, + ) -> bool; +} + +// Tooltips +extern "C" { + pub fn igBeginTooltip(); + pub fn igEndTooltip(); + pub fn igSetTooltip(fmt: *const c_char, ...); +} + +// Popups +extern "C" { + pub fn igOpenPopup(str_id: *const c_char); + pub fn igBeginPopup(str_id: *const c_char, flags: ImGuiWindowFlags) -> bool; + pub fn igBeginPopupContextItem(str_id: *const c_char, mouse_button: c_int) -> bool; + pub fn igBeginPopupContextWindow( + str_id: *const c_char, + mouse_button: c_int, + also_over_items: bool, + ) -> bool; + pub fn igBeginPopupContextVoid(str_id: *const c_char, mouse_button: c_int) -> bool; + pub fn igBeginPopupModal(name: *const c_char, open: *mut bool, flags: ImGuiWindowFlags) + -> bool; + pub fn igEndPopup(); + pub fn igOpenPopupOnItemClick(str_id: *const c_char, mouse_button: c_int) -> bool; + pub fn igIsPopupOpen(str_id: *const c_char) -> bool; + pub fn igCloseCurrentPopup(); +} + +// Columns +extern "C" { + pub fn igColumns(count: c_int, id: *const c_char, border: bool); + pub fn igNextColumn(); + pub fn igGetColumnIndex() -> c_int; + pub fn igGetColumnWidth(column_index: c_int) -> c_float; + pub fn igSetColumnWidth(column_index: c_int, width: c_float); + pub fn igGetColumnOffset(column_index: c_int) -> c_float; + pub fn igSetColumnOffset(column_index: c_int, offset_x: c_float); + pub fn igGetColumnsCount() -> c_int; +} + +// Logging/Capture +extern "C" { + pub fn igLogToTTY(max_depth: c_int); + pub fn igLogToFile(max_depth: c_int, filename: *const c_char); + pub fn igLogToClipboard(max_depth: c_int); + pub fn igLogFinish(); + pub fn igLogButtons(); + pub fn igLogText(fmt: *const c_char, ...); +} + +// Drag and Drop +extern "C" { + /// Call when current ID is active. + /// + /// When this returns true you need to: + /// + /// 1. call [`igSetDragDropPayload`] exactly once, + /// 2. you may render the payload visual/description, + /// 3. pcall [`igEndDragDropSource`] + pub fn igBeginDragDropSource(flags: ImGuiDragDropFlags) -> bool; + /// Use 'cond' to choose to submit payload on drag start or every frame + pub fn igSetDragDropPayload( + type_: *const c_char, + data: *const c_void, + size: size_t, + cond: ImGuiCond, + ) -> bool; + pub fn igEndDragDropSource(); + pub fn igBeginDragDropTarget() -> bool; + pub fn igAcceptDragDropPayload( + type_: *const c_char, + flags: ImGuiDragDropFlags, + ) -> *const ImGuiPayload; + pub fn igEndDragDropTarget(); + pub fn igGetDragDropPayload() -> *const ImGuiPayload; +} + +// Clipping +extern "C" { + pub fn igPushClipRect( + clip_rect_min: ImVec2, + clip_rect_max: ImVec2, + intersect_with_current_clip_rect: bool, + ); + pub fn igPopClipRect(); +} + +// Focus +extern "C" { + pub fn igSetItemDefaultFocus(); + pub fn igSetKeyboardFocusHere(offset: c_int); +} + +// Utilities +extern "C" { + pub fn igIsItemHovered(flags: ImGuiHoveredFlags) -> bool; + pub fn igIsItemActive() -> bool; + pub fn igIsItemFocused() -> bool; + pub fn igIsItemClicked(mouse_button: c_int) -> bool; + pub fn igIsItemVisible() -> bool; + pub fn igIsItemEdited() -> bool; + pub fn igIsItemDeactivated() -> bool; + pub fn igIsItemDeactivatedAfterEdit() -> bool; + pub fn igIsAnyItemHovered() -> bool; + pub fn igIsAnyItemActive() -> bool; + pub fn igIsAnyItemFocused() -> bool; + pub fn igGetItemRectMin_nonUDT2() -> ImVec2; + pub fn igGetItemRectMax_nonUDT2() -> ImVec2; + pub fn igGetItemRectSize_nonUDT2() -> ImVec2; + pub fn igSetItemAllowOverlap(); + pub fn igIsRectVisible(size: ImVec2) -> bool; + pub fn igIsRectVisibleVec2(rect_min: ImVec2, rect_max: ImVec2) -> bool; + pub fn igGetTime() -> c_double; + pub fn igGetFrameCount() -> c_int; + pub fn igGetOverlayDrawList() -> *mut ImDrawList; + pub fn igGetDrawListSharedData() -> *mut ImDrawListSharedData; + pub fn igGetStyleColorName(idx: ImGuiCol) -> *const c_char; + pub fn igSetStateStorage(storage: *mut ImGuiStorage); + pub fn igGetStateStorage() -> *mut ImGuiStorage; + pub fn igCalcTextSize_nonUDT2( + text: *const c_char, + text_end: *const c_char, + hide_text_after_double_hash: bool, + wrap_width: c_float, + ) -> ImVec2; + pub fn igCalcListClipping( + items_count: c_int, + items_height: c_float, + out_items_display_start: *mut c_int, + out_items_display_end: *mut c_int, + ); + + pub fn igBeginChildFrame(id: ImGuiID, size: ImVec2, flags: ImGuiWindowFlags) -> bool; + pub fn igEndChildFrame(); + + pub fn igColorConvertU32ToFloat4_nonUDT2(color: ImU32) -> ImVec4; + pub fn igColorConvertFloat4ToU32(color: ImVec4) -> ImU32; + pub fn igColorConvertRGBtoHSV( + r: c_float, + g: c_float, + b: c_float, + out_h: *mut c_float, + out_s: *mut c_float, + out_v: *mut c_float, + ); + pub fn igColorConvertHSVtoRGB( + h: c_float, + s: c_float, + v: c_float, + out_r: *mut c_float, + out_g: *mut c_float, + out_b: *mut c_float, + ); +} + +// Inputs +extern "C" { + pub fn igGetKeyIndex(imgui_key: ImGuiKey) -> c_int; + pub fn igIsKeyDown(user_key_index: c_int) -> bool; + pub fn igIsKeyPressed(user_key_index: c_int, repeat: bool) -> bool; + pub fn igIsKeyReleased(user_key_index: c_int) -> bool; + pub fn igGetKeyPressedAmount(key_index: c_int, repeat_delay: c_float, rate: c_float) -> c_int; + pub fn igIsMouseDown(button: c_int) -> bool; + pub fn igIsAnyMouseDown() -> bool; + pub fn igIsMouseClicked(button: c_int, repeat: bool) -> bool; + pub fn igIsMouseDoubleClicked(button: c_int) -> bool; + pub fn igIsMouseReleased(button: c_int) -> bool; + pub fn igIsMouseDragging(button: c_int, lock_threshold: c_float) -> bool; + pub fn igIsMouseHoveringRect(r_min: ImVec2, r_max: ImVec2, clip: bool) -> bool; + pub fn igIsMousePosValid(mouse_pos: *const ImVec2) -> bool; + pub fn igGetMousePos_nonUDT2() -> ImVec2; + pub fn igGetMousePosOnOpeningCurrentPopup_nonUDT2() -> ImVec2; + pub fn igGetMouseDragDelta_nonUDT2(button: c_int, lock_threshold: c_float) -> ImVec2; + pub fn igResetMouseDragDelta(button: c_int); + pub fn igGetMouseCursor() -> ImGuiMouseCursor; + pub fn igSetMouseCursor(cursor: ImGuiMouseCursor); + pub fn igCaptureKeyboardFromApp(capture: bool); + pub fn igCaptureMouseFromApp(capture: bool); +} + +// Clipboard utilities +extern "C" { + pub fn igGetClipboardText() -> *const c_char; + pub fn igSetClipboardText(text: *const c_char); +} + +// Settings/.Ini Utilities +extern "C" { + pub fn igLoadIniSettingsFromDisk(ini_filename: *const c_char); + pub fn igLoadIniSettingsFromMemory(ini_data: *const c_char, ini_size: usize); + pub fn igSaveIniSettingsToDisk(ini_filename: *const c_char); + pub fn igSaveIniSettingsToMemory(out_ini_size: *const usize) -> *const c_char; +} + +// Memory Utilities +extern "C" { + pub fn igSetAllocatorFunctions( + alloc_func: Option *mut c_void>, + free_func: Option, + user_data: *mut c_void, + ); + pub fn igMemAlloc(size: usize) -> *mut c_void; + pub fn igMemFree(ptr: *mut c_void); +} diff --git a/imgui-sys/src/lib.rs b/imgui-sys/src/lib.rs index 9901f76..51c5e87 100644 --- a/imgui-sys/src/lib.rs +++ b/imgui-sys/src/lib.rs @@ -1,1127 +1,255 @@ #![allow(non_upper_case_globals)] -use libc::size_t; use std::convert::From; -use std::os::raw::{c_char, c_double, c_float, c_int, c_uint, c_ushort, c_void}; pub use self::enums::*; pub use self::flags::*; pub use self::structs::*; +mod bindings; mod enums; mod flags; +mod legacy; mod structs; +pub use bindings::{ + ImDrawCallback, ImDrawIdx, ImGuiContext, ImGuiID, ImGuiInputTextCallback, ImGuiInputTextCallbackData, + ImGuiSizeCallback, + ImTextureID, ImU32, ImVec2, ImVec2_Simple, ImVec4, ImVec4_Simple, ImWchar, + ImGuiInputTextCallbackData_DeleteChars, + ImGuiInputTextCallbackData_HasSelection, + ImGuiInputTextCallbackData_ImGuiInputTextCallbackData, + ImGuiInputTextCallbackData_InsertChars, + ImGuiInputTextCallbackData_destroy, +}; +pub use legacy::*; + #[cfg(feature = "gfx")] mod gfx_support; #[cfg(feature = "glium")] mod glium_support; -/// Vertex index -pub type ImDrawIdx = c_ushort; - -/// ImGui context (opaque) -pub enum ImGuiContext {} - -/// Unique ID used by widgets (typically hashed from a stack of string) -pub type ImGuiID = ImU32; - -/// User data to identify a texture -pub type ImTextureID = *mut c_void; - -/// 32-bit unsigned integer (typically used to store packed colors) -pub type ImU32 = c_uint; - -/// Character for keyboard input/display -pub type ImWchar = c_ushort; - -/// Draw callback for advanced use -pub type ImDrawCallback = - Option; - -/// Input text callback for advanced use -pub type ImGuiInputTextCallback = - Option c_int>; - -/// Size constraint callback for advanced use -pub type ImGuiSizeCallback = Option; - -/// A tuple of 2 floating-point values -#[repr(C)] -#[derive(Copy, Clone, Debug, Default, PartialEq)] -pub struct ImVec2 { - pub x: c_float, - pub y: c_float, -} - impl ImVec2 { + #[inline] pub fn new(x: f32, y: f32) -> ImVec2 { - ImVec2 { - x: x as c_float, - y: y as c_float, - } + ImVec2 { x, y } } + #[inline] pub fn zero() -> ImVec2 { - ImVec2 { - x: 0.0 as c_float, - y: 0.0 as c_float, - } + ImVec2 { x: 0.0, y: 0.0 } } } impl From<[f32; 2]> for ImVec2 { + #[inline] fn from(array: [f32; 2]) -> ImVec2 { ImVec2::new(array[0], array[1]) } } impl From<(f32, f32)> for ImVec2 { + #[inline] fn from((x, y): (f32, f32)) -> ImVec2 { ImVec2::new(x, y) } } impl Into<[f32; 2]> for ImVec2 { + #[inline] fn into(self) -> [f32; 2] { [self.x, self.y] } } impl Into<(f32, f32)> for ImVec2 { + #[inline] fn into(self) -> (f32, f32) { (self.x, self.y) } } -/// A tuple of 4 floating-point values -#[repr(C)] -#[derive(Copy, Clone, Debug, Default, PartialEq)] -pub struct ImVec4 { - pub x: c_float, - pub y: c_float, - pub z: c_float, - pub w: c_float, +impl ImVec2_Simple { + #[inline] + pub fn new(x: f32, y: f32) -> ImVec2_Simple { + ImVec2_Simple { x, y } + } + #[inline] + pub fn zero() -> ImVec2_Simple { + ImVec2_Simple { x: 0.0, y: 0.0 } + } +} + +impl From<[f32; 2]> for ImVec2_Simple { + #[inline] + fn from(array: [f32; 2]) -> ImVec2_Simple { + ImVec2_Simple::new(array[0], array[1]) + } +} + +impl From<(f32, f32)> for ImVec2_Simple { + #[inline] + fn from((x, y): (f32, f32)) -> ImVec2_Simple { + ImVec2_Simple::new(x, y) + } +} + +impl Into<[f32; 2]> for ImVec2_Simple { + #[inline] + fn into(self) -> [f32; 2] { + [self.x, self.y] + } +} + +impl Into<(f32, f32)> for ImVec2_Simple { + #[inline] + fn into(self) -> (f32, f32) { + (self.x, self.y) + } } impl ImVec4 { + #[inline] pub fn new(x: f32, y: f32, z: f32, w: f32) -> ImVec4 { - ImVec4 { - x: x as c_float, - y: y as c_float, - z: z as c_float, - w: w as c_float, - } + ImVec4 { x, y, z, w } } + #[inline] pub fn zero() -> ImVec4 { ImVec4 { - x: 0.0 as c_float, - y: 0.0 as c_float, - z: 0.0 as c_float, - w: 0.0 as c_float, + x: 0.0, + y: 0.0, + z: 0.0, + w: 0.0, } } } impl From<[f32; 4]> for ImVec4 { + #[inline] fn from(array: [f32; 4]) -> ImVec4 { ImVec4::new(array[0], array[1], array[2], array[3]) } } impl From<(f32, f32, f32, f32)> for ImVec4 { + #[inline] fn from((x, y, z, w): (f32, f32, f32, f32)) -> ImVec4 { ImVec4::new(x, y, z, w) } } impl Into<[f32; 4]> for ImVec4 { + #[inline] fn into(self) -> [f32; 4] { [self.x, self.y, self.z, self.w] } } impl Into<(f32, f32, f32, f32)> for ImVec4 { + #[inline] fn into(self) -> (f32, f32, f32, f32) { (self.x, self.y, self.z, self.w) } } -// Context creation and access -extern "C" { - pub fn igCreateContext(shared_font_atlas: *mut ImFontAtlas) -> *mut ImGuiContext; - pub fn igDestroyContext(ctx: *mut ImGuiContext); - pub fn igGetCurrentContext() -> *mut ImGuiContext; - pub fn igSetCurrentContext(ctx: *mut ImGuiContext); - pub fn igDebugCheckVersionAndDataLayout( - version_str: *const c_char, - sz_io: size_t, - sz_style: size_t, - sz_vec2: size_t, - sz_vec4: size_t, - sz_drawvert: size_t, - ) -> bool; +impl ImVec4_Simple { + #[inline] + pub fn new(x: f32, y: f32, z: f32, w: f32) -> ImVec4_Simple { + ImVec4_Simple { x, y, z, w } + } + #[inline] + pub fn zero() -> ImVec4_Simple { + ImVec4_Simple { + x: 0.0, + y: 0.0, + z: 0.0, + w: 0.0, + } + } } -// Main -extern "C" { - pub fn igGetIO() -> *mut ImGuiIO; - pub fn igGetStyle() -> *mut ImGuiStyle; - pub fn igNewFrame(); - pub fn igEndFrame(); - pub fn igRender(); - pub fn igGetDrawData() -> *mut ImDrawData; +impl From<[f32; 4]> for ImVec4_Simple { + #[inline] + fn from(array: [f32; 4]) -> ImVec4_Simple { + ImVec4_Simple::new(array[0], array[1], array[2], array[3]) + } } -// Demo, Debug, Information -extern "C" { - pub fn igShowAboutWindow(opened: *mut bool); - pub fn igShowDemoWindow(opened: *mut bool); - pub fn igShowMetricsWindow(opened: *mut bool); - pub fn igShowStyleEditor(style: *mut ImGuiStyle); - pub fn igShowStyleSelector(label: *const c_char) -> bool; - pub fn igShowFontSelector(label: *const c_char); - pub fn igShowUserGuide(); - pub fn igGetVersion() -> *const c_char; +impl From<(f32, f32, f32, f32)> for ImVec4_Simple { + #[inline] + fn from((x, y, z, w): (f32, f32, f32, f32)) -> ImVec4_Simple { + ImVec4_Simple::new(x, y, z, w) + } } -// Styles -extern "C" { - pub fn igStyleColorsDark(dst: *mut ImGuiStyle); - pub fn igStyleColorsClassic(dst: *mut ImGuiStyle); - pub fn igStyleColorsLight(dst: *mut ImGuiStyle); +impl Into<[f32; 4]> for ImVec4_Simple { + #[inline] + fn into(self) -> [f32; 4] { + [self.x, self.y, self.z, self.w] + } } -// Windows -extern "C" { - pub fn igBegin(name: *const c_char, open: *mut bool, flags: ImGuiWindowFlags) -> bool; - pub fn igEnd(); - pub fn igBeginChild( - str_id: *const c_char, - size: ImVec2, - border: bool, - flags: ImGuiWindowFlags, - ) -> bool; - pub fn igBeginChildID(id: ImGuiID, size: ImVec2, border: bool, flags: ImGuiWindowFlags) - -> bool; - pub fn igEndChild(); +impl Into<(f32, f32, f32, f32)> for ImVec4_Simple { + #[inline] + fn into(self) -> (f32, f32, f32, f32) { + (self.x, self.y, self.z, self.w) + } } -// Windows Utilities -extern "C" { - pub fn igIsWindowAppearing() -> bool; - pub fn igIsWindowCollapsed() -> bool; - pub fn igIsWindowFocused(flags: ImGuiFocusedFlags) -> bool; - pub fn igIsWindowHovered(flags: ImGuiHoveredFlags) -> bool; - pub fn igGetWindowDrawList() -> *mut ImDrawList; - pub fn igGetWindowPos_nonUDT2() -> ImVec2; - pub fn igGetWindowSize_nonUDT2() -> ImVec2; - pub fn igGetWindowWidth() -> c_float; - pub fn igGetWindowHeight() -> c_float; - pub fn igGetContentRegionMax_nonUDT2() -> ImVec2; - pub fn igGetContentRegionAvail_nonUDT2() -> ImVec2; - pub fn igGetContentRegionAvailWidth() -> c_float; - pub fn igGetWindowContentRegionMin_nonUDT2() -> ImVec2; - pub fn igGetWindowContentRegionMax_nonUDT2() -> ImVec2; - pub fn igGetWindowContentRegionWidth() -> c_float; +#[test] +fn test_imvec2_memory_layout() { + use std::mem; + assert_eq!(mem::size_of::(), mem::size_of::<[f32; 2]>()); + assert_eq!(mem::align_of::(), mem::align_of::<[f32; 2]>()); + let test = ImVec2::new(1.0, 2.0); + let ref_a: &ImVec2 = &test; + let ref_b: &[f32; 2] = unsafe { mem::transmute(&test) }; + assert_eq!(&ref_a.x as *const _, &ref_b[0] as *const _); + assert_eq!(&ref_a.y as *const _, &ref_b[1] as *const _); +} - pub fn igSetNextWindowPos(pos: ImVec2, cond: ImGuiCond, pivot: ImVec2); - pub fn igSetNextWindowSize(size: ImVec2, cond: ImGuiCond); - pub fn igSetNextWindowSizeConstraints( - size_min: ImVec2, - size_max: ImVec2, - custom_callback: ImGuiSizeCallback, - custom_callback_data: *mut c_void, +#[test] +fn test_imvec2_simple_memory_layout() { + use std::mem; + assert_eq!(mem::size_of::(), mem::size_of::<[f32; 2]>()); + assert_eq!( + mem::align_of::(), + mem::align_of::<[f32; 2]>() ); - pub fn igSetNextWindowContentSize(size: ImVec2); - pub fn igSetNextWindowCollapsed(collapsed: bool, cond: ImGuiCond); - pub fn igSetNextWindowFocus(); - pub fn igSetNextWindowBgAlpha(alpha: c_float); - pub fn igSetWindowPosVec2(pos: ImVec2, cond: ImGuiCond); - pub fn igSetWindowSizeVec2(size: ImVec2, cond: ImGuiCond); - pub fn igSetWindowCollapsedBool(collapsed: bool, cond: ImGuiCond); - pub fn igSetWindowFocus(); - pub fn igSetWindowFontScale(scale: c_float); - pub fn igSetWindowPosStr(name: *const c_char, pos: ImVec2, cond: ImGuiCond); - pub fn igSetWindowSizeStr(name: *const c_char, size: ImVec2, cond: ImGuiCond); - pub fn igSetWindowCollapsedStr(name: *const c_char, collapsed: bool, cond: ImGuiCond); - pub fn igSetWindowFocusStr(name: *const c_char); + let test = ImVec2_Simple::new(1.0, 2.0); + let ref_a: &ImVec2_Simple = &test; + let ref_b: &[f32; 2] = unsafe { mem::transmute(&test) }; + assert_eq!(&ref_a.x as *const _, &ref_b[0] as *const _); + assert_eq!(&ref_a.y as *const _, &ref_b[1] as *const _); } -// Windows scrolling -extern "C" { - pub fn igGetScrollX() -> c_float; - pub fn igGetScrollY() -> c_float; - pub fn igGetScrollMaxX() -> c_float; - pub fn igGetScrollMaxY() -> c_float; - pub fn igSetScrollX(scroll_x: c_float); - pub fn igSetScrollY(scroll_y: c_float); - pub fn igSetScrollHereY(center_y_ratio: c_float); - pub fn igSetScrollFromPosY(pos_y: c_float, center_y_ratio: c_float); +#[test] +fn test_imvec4_memory_layout() { + use std::mem; + assert_eq!(mem::size_of::(), mem::size_of::<[f32; 4]>()); + assert_eq!(mem::align_of::(), mem::align_of::<[f32; 4]>()); + let test = ImVec4::new(1.0, 2.0, 3.0, 4.0); + let ref_a: &ImVec4 = &test; + let ref_b: &[f32; 4] = unsafe { mem::transmute(&test) }; + assert_eq!(&ref_a.x as *const _, &ref_b[0] as *const _); + assert_eq!(&ref_a.y as *const _, &ref_b[1] as *const _); + assert_eq!(&ref_a.z as *const _, &ref_b[2] as *const _); + assert_eq!(&ref_a.w as *const _, &ref_b[3] as *const _); } -// Parameter stacks (shared) -extern "C" { - pub fn igPushFont(font: *mut ImFont); - pub fn igPopFont(); - pub fn igPushStyleColorU32(idx: ImGuiCol, col: ImU32); - pub fn igPushStyleColor(idx: ImGuiCol, col: ImVec4); - pub fn igPopStyleColor(count: c_int); - pub fn igPushStyleVarFloat(idx: ImGuiStyleVar, val: c_float); - pub fn igPushStyleVarVec2(idx: ImGuiStyleVar, val: ImVec2); - pub fn igPopStyleVar(count: c_int); - pub fn igGetStyleColorVec4(idx: ImGuiCol) -> *const ImVec4; - pub fn igGetFont() -> *mut ImFont; - pub fn igGetFontSize() -> c_float; - pub fn igGetFontTexUvWhitePixel_nonUDT2() -> ImVec2; - pub fn igGetColorU32(idx: ImGuiCol, alpha_mul: c_float) -> ImU32; - pub fn igGetColorU32Vec(col: ImVec4) -> ImU32; - pub fn igGetColorU32U32(col: ImU32) -> ImU32; -} - -// Parameter stack (current window) -extern "C" { - pub fn igPushItemWidth(item_width: c_float); - pub fn igPopItemWidth(); - pub fn igCalcItemWidth() -> c_float; - pub fn igPushTextWrapPos(wrap_pos_x: c_float); - pub fn igPopTextWrapPos(); - pub fn igPushAllowKeyboardFocus(allow_keyboard_focus: bool); - pub fn igPopAllowKeyboardFocus(); - pub fn igPushButtonRepeat(repeat: bool); - pub fn igPopButtonRepeat(); -} - -// Cursor / Layout -extern "C" { - pub fn igSeparator(); - pub fn igSameLine(pos_x: c_float, spacing_w: c_float); - pub fn igNewLine(); - pub fn igSpacing(); - pub fn igDummy(size: ImVec2); - pub fn igIndent(indent_w: c_float); - pub fn igUnindent(indent_w: c_float); - pub fn igBeginGroup(); - pub fn igEndGroup(); - pub fn igGetCursorPos_nonUDT2() -> ImVec2; - pub fn igGetCursorPosX() -> c_float; - pub fn igGetCursorPosY() -> c_float; - pub fn igSetCursorPos(local_pos: ImVec2); - pub fn igSetCursorPosX(x: c_float); - pub fn igSetCursorPosY(y: c_float); - pub fn igGetCursorStartPos_nonUDT2() -> ImVec2; - pub fn igGetCursorScreenPos_nonUDT2() -> ImVec2; - pub fn igSetCursorScreenPos(screen_pos: ImVec2); - pub fn igAlignTextToFramePadding(); - pub fn igGetTextLineHeight() -> c_float; - pub fn igGetTextLineHeightWithSpacing() -> c_float; - pub fn igGetFrameHeight() -> c_float; - pub fn igGetFrameHeightWithSpacing() -> c_float; -} - -// ID stack/scopes -extern "C" { - pub fn igPushIDStr(str_id: *const c_char); - pub fn igPushIDRange(str_id_begin: *const c_char, str_id_end: *const c_char); - pub fn igPushIDPtr(ptr_id: *const c_void); - pub fn igPushIDInt(int_id: c_int); - pub fn igPopID(); - pub fn igGetIDStr(str_id: *const c_char) -> ImGuiID; - pub fn igGetIDStrStr(str_id_begin: *const c_char, str_id_end: *const c_char) -> ImGuiID; - pub fn igGetIDPtr(ptr_id: *const c_void) -> ImGuiID; -} - -// Widgets: Text -extern "C" { - pub fn igTextUnformatted(text: *const c_char, text_end: *const c_char); - pub fn igText(fmt: *const c_char, ...); - pub fn igTextColored(col: ImVec4, fmt: *const c_char, ...); - pub fn igTextDisabled(fmt: *const c_char, ...); - pub fn igTextWrapped(fmt: *const c_char, ...); - pub fn igLabelText(label: *const c_char, fmt: *const c_char, ...); - pub fn igBulletText(fmt: *const c_char, ...); -} - -// Widgets: Main -extern "C" { - pub fn igButton(label: *const c_char, size: ImVec2) -> bool; - pub fn igSmallButton(label: *const c_char) -> bool; - pub fn igInvisibleButton(str_id: *const c_char, size: ImVec2) -> bool; - pub fn igArrowButton(str_id: *const c_char, dir: ImGuiDir) -> bool; - pub fn igImage( - user_texture_id: ImTextureID, - size: ImVec2, - uv0: ImVec2, - uv1: ImVec2, - tint_col: ImVec4, - border_col: ImVec4, +#[test] +fn test_imvec4_simple_memory_layout() { + use std::mem; + assert_eq!(mem::size_of::(), mem::size_of::<[f32; 4]>()); + assert_eq!( + mem::align_of::(), + mem::align_of::<[f32; 4]>() ); - pub fn igImageButton( - user_texture_id: ImTextureID, - size: ImVec2, - uv0: ImVec2, - uv1: ImVec2, - frame_padding: c_int, - bg_col: ImVec4, - tint_col: ImVec4, - ) -> bool; - pub fn igCheckbox(label: *const c_char, v: *mut bool) -> bool; - pub fn igCheckboxFlags(label: *const c_char, flags: *mut c_uint, flags_value: c_uint) -> bool; - pub fn igRadioButtonBool(label: *const c_char, active: bool) -> bool; - pub fn igRadioButtonIntPtr(label: *const c_char, v: *mut c_int, v_button: c_int) -> bool; - pub fn igProgressBar(fraction: c_float, size_arg: ImVec2, overlay: *const c_char); - pub fn igBullet(); -} - -// Widgets: Combo Box -extern "C" { - pub fn igBeginCombo( - label: *const c_char, - preview_value: *const c_char, - flags: ImGuiComboFlags, - ) -> bool; - pub fn igEndCombo(); - pub fn igCombo( - label: *const c_char, - current_item: *mut c_int, - items: *const *const c_char, - items_count: c_int, - popup_max_height_in_items: c_int, - ) -> bool; - pub fn igComboStr( - label: *const c_char, - current_item: *mut c_int, - items_separated_by_zeros: *const c_char, - popup_max_height_in_items: c_int, - ) -> bool; - pub fn igComboFnPtr( - label: *const c_char, - current_item: *mut c_int, - items_getter: extern "C" fn( - data: *mut c_void, - idx: c_int, - out_text: *mut *const c_char, - ) -> bool, - data: *mut c_void, - items_count: c_int, - popup_max_height_in_items: c_int, - ) -> bool; -} - -// Widgets: Drags -extern "C" { - pub fn igDragFloat( - label: *const c_char, - v: *mut c_float, - v_speed: c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igDragFloat2( - label: *const c_char, - v: *mut c_float, - v_speed: c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igDragFloat3( - label: *const c_char, - v: *mut c_float, - v_speed: c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igDragFloat4( - label: *const c_char, - v: *mut c_float, - v_speed: c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igDragFloatRange2( - label: *const c_char, - v_current_min: *mut c_float, - v_current_max: *mut c_float, - v_speed: c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - format_max: *const c_char, - power: c_float, - ) -> bool; - pub fn igDragInt( - label: *const c_char, - v: *mut c_int, - v_speed: c_float, - v_min: c_int, - v_max: c_int, - format: *const c_char, - ) -> bool; - pub fn igDragInt2( - label: *const c_char, - v: *mut c_int, - v_speed: c_float, - v_min: c_int, - v_max: c_int, - format: *const c_char, - ) -> bool; - pub fn igDragInt3( - label: *const c_char, - v: *mut c_int, - v_speed: c_float, - v_min: c_int, - v_max: c_int, - format: *const c_char, - ) -> bool; - pub fn igDragInt4( - label: *const c_char, - v: *mut c_int, - v_speed: c_float, - v_min: c_int, - v_max: c_int, - format: *const c_char, - ) -> bool; - pub fn igDragIntRange2( - label: *const c_char, - v_current_min: *mut c_int, - v_current_max: *mut c_int, - v_speed: c_float, - v_min: c_int, - v_max: c_int, - format: *const c_char, - format_max: *const c_char, - ) -> bool; - pub fn igDragScalar( - label: *const c_char, - data_type: ImGuiDataType, - v: *mut c_void, - v_speed: c_float, - v_min: *const c_void, - v_max: *const c_void, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igDragScalarN( - label: *const c_char, - data_type: ImGuiDataType, - v: *mut c_void, - components: c_int, - v_speed: c_float, - v_min: *const c_void, - v_max: *const c_void, - format: *const c_char, - power: c_float, - ) -> bool; -} - -// Widgets: Sliders -extern "C" { - pub fn igSliderFloat( - label: *const c_char, - v: *mut c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igSliderFloat2( - label: *const c_char, - v: *mut c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igSliderFloat3( - label: *const c_char, - v: *mut c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igSliderFloat4( - label: *const c_char, - v: *mut c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igSliderAngle( - label: *const c_char, - v_rad: *mut c_float, - v_degrees_min: c_float, - v_degrees_max: c_float, - format: *const c_char, - ) -> bool; - pub fn igSliderInt( - label: *const c_char, - v: *mut c_int, - v_min: c_int, - v_max: c_int, - format: *const c_char, - ) -> bool; - pub fn igSliderInt2( - label: *const c_char, - v: *mut c_int, - v_min: c_int, - v_max: c_int, - format: *const c_char, - ) -> bool; - pub fn igSliderInt3( - label: *const c_char, - v: *mut c_int, - v_min: c_int, - v_max: c_int, - format: *const c_char, - ) -> bool; - pub fn igSliderInt4( - label: *const c_char, - v: *mut c_int, - v_min: c_int, - v_max: c_int, - format: *const c_char, - ) -> bool; - pub fn igSliderScalar( - label: *const c_char, - data_type: ImGuiDataType, - v: *mut c_void, - v_min: *const c_void, - v_max: *const c_void, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igSliderScalarN( - label: *const c_char, - data_type: ImGuiDataType, - v: *mut c_void, - components: c_int, - v_min: *const c_void, - v_max: *const c_void, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igVSliderFloat( - label: *const c_char, - size: ImVec2, - v: *mut c_float, - v_min: c_float, - v_max: c_float, - format: *const c_char, - power: c_float, - ) -> bool; - pub fn igVSliderInt( - label: *const c_char, - size: ImVec2, - v: *mut c_int, - v_min: c_int, - v_max: c_int, - format: *const c_char, - ) -> bool; - pub fn igVSliderScalar( - label: *const c_char, - size: ImVec2, - data_type: ImGuiDataType, - v: *mut c_void, - v_min: *const c_void, - v_max: *const c_void, - format: *const c_char, - power: c_float, - ) -> bool; -} - -// Widgets: Input with Keyboard -extern "C" { - pub fn igInputText( - label: *const c_char, - buf: *mut c_char, - buf_size: usize, - flags: ImGuiInputTextFlags, - callback: ImGuiInputTextCallback, - user_data: *mut c_void, - ) -> bool; - pub fn igInputTextMultiline( - label: *const c_char, - buf: *mut c_char, - buf_size: usize, - size: ImVec2, - flags: ImGuiInputTextFlags, - callback: ImGuiInputTextCallback, - user_data: *mut c_void, - ) -> bool; - pub fn igInputFloat( - label: *const c_char, - v: *mut c_float, - step: c_float, - step_fast: c_float, - format: *const c_char, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputFloat2( - label: *const c_char, - v: *mut c_float, - format: *const c_char, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputFloat3( - label: *const c_char, - v: *mut c_float, - format: *const c_char, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputFloat4( - label: *const c_char, - v: *mut c_float, - format: *const c_char, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputInt( - label: *const c_char, - v: *mut c_int, - step: c_int, - step_fast: c_int, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputInt2( - label: *const c_char, - v: *mut c_int, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputInt3( - label: *const c_char, - v: *mut c_int, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputInt4( - label: *const c_char, - v: *mut c_int, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputDouble( - label: *const c_char, - v: *mut c_double, - step: c_double, - step_fast: c_double, - format: *const c_char, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputScalar( - label: *const c_char, - data_type: ImGuiDataType, - v: *mut c_void, - step: *const c_void, - step_fast: *const c_void, - format: *const c_char, - extra_flags: ImGuiInputTextFlags, - ) -> bool; - pub fn igInputScalarN( - label: *const c_char, - data_type: ImGuiDataType, - v: *mut c_void, - components: c_int, - step: *const c_void, - step_fast: *const c_void, - format: *const c_char, - extra_flags: ImGuiInputTextFlags, - ) -> bool; -} - -// Widgets: Color Editor/Picker -extern "C" { - pub fn igColorEdit3( - label: *const c_char, - col: *mut c_float, - flags: ImGuiColorEditFlags, - ) -> bool; - pub fn igColorEdit4( - label: *const c_char, - col: *mut c_float, - flags: ImGuiColorEditFlags, - ) -> bool; - pub fn igColorPicker3( - label: *const c_char, - col: *mut c_float, - flags: ImGuiColorEditFlags, - ) -> bool; - pub fn igColorPicker4( - label: *const c_char, - col: *mut c_float, - flags: ImGuiColorEditFlags, - ref_col: *const c_float, - ) -> bool; - pub fn igColorButton( - desc_id: *const c_char, - col: ImVec4, - flags: ImGuiColorEditFlags, - size: ImVec2, - ) -> bool; - pub fn igSetColorEditOptions(flags: ImGuiColorEditFlags); -} - -// Widgets: Trees -extern "C" { - pub fn igTreeNodeStr(label: *const c_char) -> bool; - pub fn igTreeNodeStrStr(str_id: *const c_char, fmt: *const c_char, ...) -> bool; - pub fn igTreeNodePtr(ptr_id: *const c_void, fmt: *const c_char, ...) -> bool; - pub fn igTreeNodeExStr(label: *const c_char, flags: ImGuiTreeNodeFlags) -> bool; - pub fn igTreeNodeExStrStr( - str_id: *const c_char, - flags: ImGuiTreeNodeFlags, - fmt: *const c_char, - ... - ) -> bool; - pub fn igTreeNodeExPtr( - ptr_id: *const c_void, - flags: ImGuiTreeNodeFlags, - fmt: *const c_char, - ... - ) -> bool; - pub fn igTreePushStr(str_id: *const c_char); - pub fn igTreePushPtr(ptr_id: *const c_void); - pub fn igTreePop(); - pub fn igTreeAdvanceToLabelPos(); - pub fn igGetTreeNodeToLabelSpacing() -> c_float; - pub fn igSetNextTreeNodeOpen(opened: bool, cond: ImGuiCond); - pub fn igCollapsingHeader(label: *const c_char, flags: ImGuiTreeNodeFlags) -> bool; - pub fn igCollapsingHeaderBoolPtr( - label: *const c_char, - open: *mut bool, - flags: ImGuiTreeNodeFlags, - ) -> bool; -} - -// Widgets: Selectables -extern "C" { - pub fn igSelectable( - label: *const c_char, - selected: bool, - flags: ImGuiSelectableFlags, - size: ImVec2, - ) -> bool; - pub fn igSelectableBoolPtr( - label: *const c_char, - p_selected: *mut bool, - flags: ImGuiSelectableFlags, - size: ImVec2, - ) -> bool; -} - -// Widgets: List Boxes -extern "C" { - pub fn igListBoxStr_arr( - label: *const c_char, - current_item: *mut c_int, - items: *const *const c_char, - items_count: c_int, - height_in_items: c_int, - ) -> bool; - pub fn igListBoxFnPtr( - label: *const c_char, - current_item: *mut c_int, - items_getter: extern "C" fn( - data: *mut c_void, - idx: c_int, - out_text: *mut *const c_char, - ) -> bool, - data: *mut c_void, - items_count: c_int, - height_in_items: c_int, - ) -> bool; - pub fn igListBoxHeaderVec2(label: *const c_char, size: ImVec2) -> bool; - pub fn igListBoxHeaderInt( - label: *const c_char, - items_count: c_int, - height_in_items: c_int, - ) -> bool; - pub fn igListBoxFooter(); -} - -// Widgets: Data Plotting -extern "C" { - pub fn igPlotLines( - label: *const c_char, - values: *const c_float, - values_count: c_int, - values_offset: c_int, - overlay_text: *const c_char, - scale_min: c_float, - scale_max: c_float, - graph_size: ImVec2, - stride: c_int, - ); - pub fn igPlotLinesFnPtr( - label: *const c_char, - values_getter: extern "C" fn(data: *mut c_void, idx: c_int) -> c_float, - data: *mut c_void, - values_count: c_int, - values_offset: c_int, - overlay_text: *const c_char, - scale_min: c_float, - scale_max: c_float, - graph_size: ImVec2, - ); - pub fn igPlotHistogramFloatPtr( - label: *const c_char, - values: *const c_float, - values_count: c_int, - values_offset: c_int, - overlay_text: *const c_char, - scale_min: c_float, - scale_max: c_float, - graph_size: ImVec2, - stride: c_int, - ); - pub fn igPlotHistogramFnPtr( - label: *const c_char, - values_getter: extern "C" fn(data: *mut c_void, idx: c_int) -> c_float, - data: *mut c_void, - values_count: c_int, - values_offset: c_int, - overlay_text: *const c_char, - scale_min: c_float, - scale_max: c_float, - graph_size: ImVec2, - ); -} - -// Widgets: Value() Helpers -extern "C" { - pub fn igValueBool(prefix: *const c_char, b: bool); - pub fn igValueInt(prefix: *const c_char, v: c_int); - pub fn igValueUInt(prefix: *const c_char, v: c_uint); - pub fn igValueFloat(prefix: *const c_char, v: c_float, float_format: *const c_char); -} - -// Widgets: Menus -extern "C" { - pub fn igBeginMainMenuBar() -> bool; - pub fn igEndMainMenuBar(); - pub fn igBeginMenuBar() -> bool; - pub fn igEndMenuBar(); - pub fn igBeginMenu(label: *const c_char, enabled: bool) -> bool; - pub fn igEndMenu(); - pub fn igMenuItemBool( - label: *const c_char, - shortcut: *const c_char, - selected: bool, - enabled: bool, - ) -> bool; - pub fn igMenuItemBoolPtr( - label: *const c_char, - shortcut: *const c_char, - p_selected: *mut bool, - enabled: bool, - ) -> bool; -} - -// Tooltips -extern "C" { - pub fn igBeginTooltip(); - pub fn igEndTooltip(); - pub fn igSetTooltip(fmt: *const c_char, ...); -} - -// Popups -extern "C" { - pub fn igOpenPopup(str_id: *const c_char); - pub fn igBeginPopup(str_id: *const c_char, flags: ImGuiWindowFlags) -> bool; - pub fn igBeginPopupContextItem(str_id: *const c_char, mouse_button: c_int) -> bool; - pub fn igBeginPopupContextWindow( - str_id: *const c_char, - mouse_button: c_int, - also_over_items: bool, - ) -> bool; - pub fn igBeginPopupContextVoid(str_id: *const c_char, mouse_button: c_int) -> bool; - pub fn igBeginPopupModal(name: *const c_char, open: *mut bool, flags: ImGuiWindowFlags) - -> bool; - pub fn igEndPopup(); - pub fn igOpenPopupOnItemClick(str_id: *const c_char, mouse_button: c_int) -> bool; - pub fn igIsPopupOpen(str_id: *const c_char) -> bool; - pub fn igCloseCurrentPopup(); -} - -// Columns -extern "C" { - pub fn igColumns(count: c_int, id: *const c_char, border: bool); - pub fn igNextColumn(); - pub fn igGetColumnIndex() -> c_int; - pub fn igGetColumnWidth(column_index: c_int) -> c_float; - pub fn igSetColumnWidth(column_index: c_int, width: c_float); - pub fn igGetColumnOffset(column_index: c_int) -> c_float; - pub fn igSetColumnOffset(column_index: c_int, offset_x: c_float); - pub fn igGetColumnsCount() -> c_int; -} - -// Logging/Capture -extern "C" { - pub fn igLogToTTY(max_depth: c_int); - pub fn igLogToFile(max_depth: c_int, filename: *const c_char); - pub fn igLogToClipboard(max_depth: c_int); - pub fn igLogFinish(); - pub fn igLogButtons(); - pub fn igLogText(fmt: *const c_char, ...); -} - -// Drag and Drop -extern "C" { - /// Call when current ID is active. - /// - /// When this returns true you need to: - /// - /// 1. call [`igSetDragDropPayload`] exactly once, - /// 2. you may render the payload visual/description, - /// 3. pcall [`igEndDragDropSource`] - pub fn igBeginDragDropSource(flags: ImGuiDragDropFlags) -> bool; - /// Use 'cond' to choose to submit payload on drag start or every frame - pub fn igSetDragDropPayload( - type_: *const c_char, - data: *const c_void, - size: size_t, - cond: ImGuiCond, - ) -> bool; - pub fn igEndDragDropSource(); - pub fn igBeginDragDropTarget() -> bool; - pub fn igAcceptDragDropPayload( - type_: *const c_char, - flags: ImGuiDragDropFlags, - ) -> *const ImGuiPayload; - pub fn igEndDragDropTarget(); - pub fn igGetDragDropPayload() -> *const ImGuiPayload; -} - -// Clipping -extern "C" { - pub fn igPushClipRect( - clip_rect_min: ImVec2, - clip_rect_max: ImVec2, - intersect_with_current_clip_rect: bool, - ); - pub fn igPopClipRect(); -} - -// Focus -extern "C" { - pub fn igSetItemDefaultFocus(); - pub fn igSetKeyboardFocusHere(offset: c_int); -} - -// Utilities -extern "C" { - pub fn igIsItemHovered(flags: ImGuiHoveredFlags) -> bool; - pub fn igIsItemActive() -> bool; - pub fn igIsItemFocused() -> bool; - pub fn igIsItemClicked(mouse_button: c_int) -> bool; - pub fn igIsItemVisible() -> bool; - pub fn igIsItemEdited() -> bool; - pub fn igIsItemDeactivated() -> bool; - pub fn igIsItemDeactivatedAfterEdit() -> bool; - pub fn igIsAnyItemHovered() -> bool; - pub fn igIsAnyItemActive() -> bool; - pub fn igIsAnyItemFocused() -> bool; - pub fn igGetItemRectMin_nonUDT2() -> ImVec2; - pub fn igGetItemRectMax_nonUDT2() -> ImVec2; - pub fn igGetItemRectSize_nonUDT2() -> ImVec2; - pub fn igSetItemAllowOverlap(); - pub fn igIsRectVisible(size: ImVec2) -> bool; - pub fn igIsRectVisibleVec2(rect_min: ImVec2, rect_max: ImVec2) -> bool; - pub fn igGetTime() -> c_double; - pub fn igGetFrameCount() -> c_int; - pub fn igGetOverlayDrawList() -> *mut ImDrawList; - pub fn igGetDrawListSharedData() -> *mut ImDrawListSharedData; - pub fn igGetStyleColorName(idx: ImGuiCol) -> *const c_char; - pub fn igSetStateStorage(storage: *mut ImGuiStorage); - pub fn igGetStateStorage() -> *mut ImGuiStorage; - pub fn igCalcTextSize_nonUDT2( - text: *const c_char, - text_end: *const c_char, - hide_text_after_double_hash: bool, - wrap_width: c_float, - ) -> ImVec2; - pub fn igCalcListClipping( - items_count: c_int, - items_height: c_float, - out_items_display_start: *mut c_int, - out_items_display_end: *mut c_int, - ); - - pub fn igBeginChildFrame(id: ImGuiID, size: ImVec2, flags: ImGuiWindowFlags) -> bool; - pub fn igEndChildFrame(); - - pub fn igColorConvertU32ToFloat4_nonUDT2(color: ImU32) -> ImVec4; - pub fn igColorConvertFloat4ToU32(color: ImVec4) -> ImU32; - pub fn igColorConvertRGBtoHSV( - r: c_float, - g: c_float, - b: c_float, - out_h: *mut c_float, - out_s: *mut c_float, - out_v: *mut c_float, - ); - pub fn igColorConvertHSVtoRGB( - h: c_float, - s: c_float, - v: c_float, - out_r: *mut c_float, - out_g: *mut c_float, - out_b: *mut c_float, - ); -} - -// Inputs -extern "C" { - pub fn igGetKeyIndex(imgui_key: ImGuiKey) -> c_int; - pub fn igIsKeyDown(user_key_index: c_int) -> bool; - pub fn igIsKeyPressed(user_key_index: c_int, repeat: bool) -> bool; - pub fn igIsKeyReleased(user_key_index: c_int) -> bool; - pub fn igGetKeyPressedAmount(key_index: c_int, repeat_delay: c_float, rate: c_float) -> c_int; - pub fn igIsMouseDown(button: c_int) -> bool; - pub fn igIsAnyMouseDown() -> bool; - pub fn igIsMouseClicked(button: c_int, repeat: bool) -> bool; - pub fn igIsMouseDoubleClicked(button: c_int) -> bool; - pub fn igIsMouseReleased(button: c_int) -> bool; - pub fn igIsMouseDragging(button: c_int, lock_threshold: c_float) -> bool; - pub fn igIsMouseHoveringRect(r_min: ImVec2, r_max: ImVec2, clip: bool) -> bool; - pub fn igIsMousePosValid(mouse_pos: *const ImVec2) -> bool; - pub fn igGetMousePos_nonUDT2() -> ImVec2; - pub fn igGetMousePosOnOpeningCurrentPopup_nonUDT2() -> ImVec2; - pub fn igGetMouseDragDelta_nonUDT2(button: c_int, lock_threshold: c_float) -> ImVec2; - pub fn igResetMouseDragDelta(button: c_int); - pub fn igGetMouseCursor() -> ImGuiMouseCursor; - pub fn igSetMouseCursor(cursor: ImGuiMouseCursor); - pub fn igCaptureKeyboardFromApp(capture: bool); - pub fn igCaptureMouseFromApp(capture: bool); -} - -// Clipboard utilities -extern "C" { - pub fn igGetClipboardText() -> *const c_char; - pub fn igSetClipboardText(text: *const c_char); -} - -// Settings/.Ini Utilities -extern "C" { - pub fn igLoadIniSettingsFromDisk(ini_filename: *const c_char); - pub fn igLoadIniSettingsFromMemory(ini_data: *const c_char, ini_size: usize); - pub fn igSaveIniSettingsToDisk(ini_filename: *const c_char); - pub fn igSaveIniSettingsToMemory(out_ini_size: *const usize) -> *const c_char; -} - -// Memory Utilities -extern "C" { - pub fn igSetAllocatorFunctions( - alloc_func: Option *mut c_void>, - free_func: Option, - user_data: *mut c_void, - ); - pub fn igMemAlloc(size: usize) -> *mut c_void; - pub fn igMemFree(ptr: *mut c_void); + let test = ImVec4_Simple::new(1.0, 2.0, 3.0, 4.0); + let ref_a: &ImVec4_Simple = &test; + let ref_b: &[f32; 4] = unsafe { mem::transmute(&test) }; + assert_eq!(&ref_a.x as *const _, &ref_b[0] as *const _); + assert_eq!(&ref_a.y as *const _, &ref_b[1] as *const _); + assert_eq!(&ref_a.z as *const _, &ref_b[2] as *const _); + assert_eq!(&ref_a.w as *const _, &ref_b[3] as *const _); } diff --git a/imgui-sys/src/structs.rs b/imgui-sys/src/structs.rs index d430d9c..ca529a2 100644 --- a/imgui-sys/src/structs.rs +++ b/imgui-sys/src/structs.rs @@ -191,24 +191,6 @@ pub struct ImFontGlyph { pub v1: c_float, } -/// Shared state of input text callback -#[repr(C)] -pub struct ImGuiInputTextCallbackData { - pub event_flag: ImGuiInputTextFlags, - pub flags: ImGuiInputTextFlags, - pub user_data: *mut c_void, - - pub event_char: ImWchar, - pub event_key: ImGuiKey, - pub buf: *mut c_char, - pub buf_text_len: c_int, - pub buf_size: c_int, - pub buf_dirty: bool, - pub cursor_pos: c_int, - pub selection_start: c_int, - pub selection_end: c_int, -} - /// Main configuration and I/O between your application and ImGui #[repr(C)] pub struct ImGuiIO { @@ -563,22 +545,6 @@ extern "C" { pub fn ImGuiStorage_BuildSortByKey(this: *mut ImGuiStorage); } -// ImGuiInputTextCallbackData -extern "C" { - pub fn ImGuiInputTextCallbackData_DeleteChars( - this: *mut ImGuiInputTextCallbackData, - pos: c_int, - bytes_count: c_int, - ); - pub fn ImGuiInputTextCallbackData_InsertChars( - this: *mut ImGuiInputTextCallbackData, - pos: c_int, - text: *const c_char, - text_end: *const c_char, - ); - pub fn ImGuiInputTextCallbackData_HasSelection(this: *mut ImGuiInputTextCallbackData) -> bool; -} - // ImGuiPayload extern "C" { pub fn ImGuiPayload_Clear(this: *mut ImGuiPayload); diff --git a/imgui-sys/third-party/cimgui b/imgui-sys/third-party/cimgui index 67f3b09..2b03f43 160000 --- a/imgui-sys/third-party/cimgui +++ b/imgui-sys/third-party/cimgui @@ -1 +1 @@ -Subproject commit 67f3b097a5090dd074be959fb9c794bd75096a1c +Subproject commit 2b03f434d4afd5cae9d352035edc1fbfd1ac3c2d diff --git a/src/input.rs b/src/input.rs index 97b0a24..278d0c9 100644 --- a/src/input.rs +++ b/src/input.rs @@ -135,9 +135,9 @@ macro_rules! impl_step_params { extern "C" fn resize_callback(data: *mut sys::ImGuiInputTextCallbackData) -> c_int { unsafe { - if (*data).event_flag == ImGuiInputTextFlags::CallbackResize { - if let Some(buffer) = ((*data).user_data as *mut ImString).as_mut() { - let requested_size = (*data).buf_size as usize; + if (*data).EventFlag == ImGuiInputTextFlags::CallbackResize.bits() { + if let Some(buffer) = ((*data).UserData as *mut ImString).as_mut() { + let requested_size = (*data).BufSize as usize; if requested_size > buffer.capacity_with_nul() { // Refresh the buffer's length to take into account changes made by dear imgui. buffer.refresh_len(); @@ -145,8 +145,8 @@ extern "C" fn resize_callback(data: *mut sys::ImGuiInputTextCallbackData) -> c_i // After we're done we'll call refresh_len, so this won't be visible to the user. buffer.0.set_len(buffer.0.len() + 1); buffer.reserve(requested_size - buffer.0.len()); - (*data).buf = buffer.as_mut_ptr(); - (*data).buf_dirty = true; + (*data).Buf = buffer.as_mut_ptr(); + (*data).BufDirty = true; } } }