From adc14477783ebe45e25e0b2b83b1a742eecb46ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?joseLu=C3=ADs?= Date: Sun, 27 Jun 2021 15:06:28 +0200 Subject: [PATCH] [rust] add `ncplane_scrolling_p` & `NcPlane.scrolling` --- rust/src/bindings.rs | 1 + rust/src/plane/methods.rs | 5 +++++ rust/src/plane/mod.rs | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/rust/src/bindings.rs b/rust/src/bindings.rs index dffa4793e..3b911f64a 100644 --- a/rust/src/bindings.rs +++ b/rust/src/bindings.rs @@ -463,6 +463,7 @@ pub use ffi::{ ncplane_resizecb, ncplane_rotate_ccw, ncplane_rotate_cw, + ncplane_scrolling_p, ncplane_set_base, ncplane_set_base_cell, ncplane_set_bg_alpha, diff --git a/rust/src/plane/methods.rs b/rust/src/plane/methods.rs index ed2fdbc77..c9a481779 100644 --- a/rust/src/plane/methods.rs +++ b/rust/src/plane/methods.rs @@ -1660,6 +1660,11 @@ impl NcPlane { unsafe { crate::ncplane_y(self) as NcOffset } } + /// Returns `true` if this `NcPlane` has scrolling enabled, or `false` otherwise. + pub fn scrolling_p(&self) -> bool { + unsafe { crate::ncplane_scrolling_p(self) } + } + /// Sets the scrolling behaviour of the plane, and /// returns true if scrolling was previously enabled, of false, if disabled. /// diff --git a/rust/src/plane/mod.rs b/rust/src/plane/mod.rs index 512ea8410..01e4ab00c 100644 --- a/rust/src/plane/mod.rs +++ b/rust/src/plane/mod.rs @@ -1,6 +1,6 @@ //! `NcPlane` -// functions already exported by bindgen : 116 +// functions already exported by bindgen : 117 // ------------------------------------------- // (X) wont: 10 // (D) depr: 4 @@ -86,6 +86,7 @@ //W ncplane_rgba //W ncplane_rotate_ccw //W ncplane_rotate_cw +//W ncplane_scrolling_p //W ncplane_set_base //W ncplane_set_base_cell //W# ncplane_set_bchannel