diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index df147e8..9456cf1 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -10,6 +10,8 @@ `sys::igIsWindowFocused(ImGuiFocusedFlags::RootWindow)`. - Obsolete `sys::igIsRootWindowOrAnyChildFocused()` in favor of using `sys::igIsWindowFocused(ImGuiFocusedFlags::RootAndChildWindows)`. + - Obsolete `sys::igIsRootWindowOrAnyChildHovered()` in favor of using + `sys::igIsWindowHovered(ImGuiHoveredFlags::RootAndChildWindows)`. ## [0.0.18] - 2017-12-23 diff --git a/imgui-sys/src/lib.rs b/imgui-sys/src/lib.rs index 42a4b18..030dc01 100644 --- a/imgui-sys/src/lib.rs +++ b/imgui-sys/src/lib.rs @@ -329,12 +329,16 @@ bitflags!( /// Flags for hover checks #[repr(C)] pub struct ImGuiHoveredFlags: c_int { - const AllowWhenBlockedByPopup = 1; - const AllowWhenBlockedByActiveItem = 1 << 2; - const AllowWhenOverlapped = 1 << 3; + const ChildWindows = 1 << 0; + const RootWindow = 1 << 1; + const AllowWhenBlockedByPopup = 1 << 2; + const AllowWhenBlockedByActiveItem = 1 << 4; + const AllowWhenOverlapped = 1 << 5; const RectOnly = ImGuiHoveredFlags::AllowWhenBlockedByPopup.bits | ImGuiHoveredFlags::AllowWhenBlockedByActiveItem.bits | ImGuiHoveredFlags::AllowWhenOverlapped.bits; + const RootAndChildWindows = ImGuiFocusedFlags::RootWindow.bits + | ImGuiFocusedFlags::ChildWindows.bits; } ); @@ -1619,7 +1623,6 @@ extern "C" { pub fn igSetItemAllowOverlap(); pub fn igIsWindowFocused(flags: ImGuiFocusedFlags) -> bool; pub fn igIsWindowHovered(flags: ImGuiHoveredFlags) -> bool; - pub fn igIsRootWindowOrAnyChildHovered(flags: ImGuiHoveredFlags) -> bool; pub fn igIsAnyWindowHovered() -> bool; pub fn igIsRectVisible(item_size: ImVec2) -> bool; pub fn igIsRectVisible2(rect_min: *const ImVec2, rect_max: *const ImVec2) -> bool; @@ -1679,6 +1682,11 @@ pub unsafe fn igIsRootWindowFocused() -> bool { pub unsafe fn igIsRootWindowOrAnyChildFocused() -> bool { igIsWindowFocused(ImGuiFocusedFlags::RootAndChildWindows) } +#[allow(non_snake_case)] +#[deprecated(since = "0.0.19", note = "please use igIsWindowFocused(ImGuiFocusedFlags::RootAndChildWindows) instead")] +pub unsafe fn igIsRootWindowOrAnyChildHovered(_flags: ImGuiHoveredFlags) -> bool { + igIsWindowHovered(ImGuiHoveredFlags::RootAndChildWindows) +} // Inputs extern "C" {