[rust] add ncplane_scrolling_p & NcPlane.scrolling

This commit is contained in:
joseLuís 2021-06-27 15:06:28 +02:00
parent 865dd0b251
commit adc1447778
3 changed files with 8 additions and 1 deletions

View File

@ -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,

View File

@ -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.
///

View File

@ -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