From 24c37293e453627886cbe4031c4ec6a909d4a8b9 Mon Sep 17 00:00:00 2001 From: Malik Olivier Boussejra Date: Sun, 29 Apr 2018 20:15:46 +0900 Subject: [PATCH] imgui-sys: Fix binding to igIsWindowFocused This commit adds the `ImGuiFocusedFlags' input flag that was missing. --- imgui-sys/src/lib.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/imgui-sys/src/lib.rs b/imgui-sys/src/lib.rs index 4654565..4e7571e 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;