diff --git a/imgui-sys/src/lib.rs b/imgui-sys/src/lib.rs index 46545656c..4e7571e09 100644 --- a/imgui-sys/src/lib.rs +++ b/imgui-sys/src/lib.rs @@ -314,6 +314,17 @@ bitflags!( } ); +bitflags!( + /// Flags for window focus check + #[repr(C)] + pub struct ImGuiFocusedFlags: c_int { + const ChildWindows = 1 << 0; + const RootWindow = 1 << 1; + const RootAndChildWindows = + ImGuiFocusedFlags::RootWindow.bits | ImGuiFocusedFlags::ChildWindows.bits; + } +); + bitflags!( /// Flags for hover checks #[repr(C)] @@ -1606,7 +1617,7 @@ extern "C" { pub fn igGetItemRectMax(out: *mut ImVec2); pub fn igGetItemRectSize(out: *mut ImVec2); pub fn igSetItemAllowOverlap(); - pub fn igIsWindowFocused() -> bool; + pub fn igIsWindowFocused(flags: ImGuiFocusedFlags) -> bool; pub fn igIsWindowHovered(flags: ImGuiHoveredFlags) -> bool; pub fn igIsRootWindowFocused() -> bool; pub fn igIsRootWindowOrAnyChildFocused() -> bool;