From 85e9375e0b1759c664f2e309bdf1fc27cacced18 Mon Sep 17 00:00:00 2001 From: Joonas Javanainen Date: Mon, 14 May 2018 09:15:10 +0300 Subject: [PATCH] Remove things that were deprecated in 0.0.18 --- CHANGELOG.markdown | 1 + imgui-sys/src/lib.rs | 33 --------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 57e6e32..617c653 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -55,6 +55,7 @@ and `sys::ImDrawList_AddConvexPolyFilled`. - Remove `ImGuiWindowFlags::ShowBorders` window flag. Borders are now fully set up in the ImGuiStyle structure. +- Various imgui-sys things that were deprecated in imgui/cimgui 1.52 ## [0.0.18] - 2017-12-23 diff --git a/imgui-sys/src/lib.rs b/imgui-sys/src/lib.rs index 8173361..93c1c56 100644 --- a/imgui-sys/src/lib.rs +++ b/imgui-sys/src/lib.rs @@ -1069,14 +1069,6 @@ extern "C" { pub fn igGetStateStorage() -> *mut ImGuiStorage; } -#[allow(non_snake_case)] -#[deprecated(since = "0.0.18", note = "please use igSetNextWindowPos instead")] -pub unsafe fn igSetNextWindowPosCenter(cond: ImGuiCond) { - let io = igGetIO(); - let pos = ImVec2::new((*io).display_size.x * 0.5, (*io).display_size.y * 0.5); - let pivot = ImVec2::new(0.5, 0.5); - igSetNextWindowPos(pos, cond, pivot); -} /// Set next window content's width. /// /// Original non-deprecated version preserved last Y value set by @@ -1146,10 +1138,6 @@ extern "C" { pub fn igGetFrameHeightWithSpacing() -> c_float; } -#[allow(non_snake_case)] -#[deprecated(since = "0.0.18", note = "please use igAlignTextToFramePadding instead")] -pub unsafe fn igAlignFirstTextHeightToWidgets() { igAlignTextToFramePadding(); } - #[allow(non_snake_case)] #[deprecated(since = "0.0.19", note = "please use igGetFrameHeightWithSpacing instead")] pub unsafe fn igGetItemsLineHeightWithSpacing() -> c_float { @@ -1876,18 +1864,6 @@ extern "C" { pub fn igCaptureMouseFromApp(capture: bool); } -#[allow(non_snake_case)] -#[deprecated(since = "0.0.18", note = "please use igIsItemHovered instead")] -pub unsafe fn igIsItemRectHovered() -> bool { igIsItemHovered(ImGuiHoveredFlags::RectOnly) } -#[allow(non_snake_case)] -#[deprecated(since = "0.0.18", note = "please use igIsWindowHovered instead")] -pub unsafe fn igIsWindowRectHovered() -> bool { - igIsWindowHovered( - ImGuiHoveredFlags::AllowWhenBlockedByPopup | ImGuiHoveredFlags::AllowWhenBlockedByActiveItem, - ) -} - - // Helpers functions to access functions pointers in ImGui::GetIO() extern "C" { pub fn igMemAlloc(sz: usize) -> *mut c_void; @@ -2443,15 +2419,6 @@ extern "C" { ); } -#[allow(non_snake_case)] -#[deprecated(since = "0.0.18", note = "please use ImFont_ClearOutputData instead")] -pub unsafe fn ImFont_Clear(font: *mut ImFont) { ImFont_ClearOutputData(font); } -#[allow(non_snake_case)] -#[deprecated(since = "0.0.18", note = "please use ImFont_GetFallbackChar instead")] -pub unsafe fn ImFont_GetFallbackXAdvance(font: *const ImFont) -> c_float { - ImFont_GetFallbackAdvanceX(font) -} - // ImFont::Glyph extern "C" { pub fn ImFont_Glyphs_size(font: *const ImFont) -> c_int;