mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
rust: rename bindgen module to ffi
This commit is contained in:
parent
8091e5c7e0
commit
01f7434a9a
@ -1,13 +1,13 @@
|
||||
//! A selection of the [bindgen] bindings intended to be used directly.
|
||||
//! A selection of the [ffi] bindings intended to be used directly.
|
||||
//!
|
||||
//! The full list of bindings is under the [bindgen] submodule
|
||||
//! The full list of bindings is under the [ffi] submodule.
|
||||
//!
|
||||
//! This module publicly re-exports bindgen generated functions and constants
|
||||
//! for their direct usage.
|
||||
//! The current module publicly re-exports bindgen generated structs, functions,
|
||||
//! and constants, for their direct usage.
|
||||
|
||||
// [clippy & bindgen](https://github.com/rust-lang/rust-bindgen/issues/1470)
|
||||
#[allow(clippy::all)]
|
||||
pub mod bindgen {
|
||||
pub mod ffi {
|
||||
//! Automatically generated Rust FFI bindings, for reference.
|
||||
//!
|
||||
//! All of the notcurses API functions are reexported to the public API
|
||||
@ -19,7 +19,7 @@ pub mod bindgen {
|
||||
// Miscellaneous ---------------------------------------------------------------
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// structs
|
||||
__va_list_tag,
|
||||
|
||||
@ -58,7 +58,7 @@ pub use bindgen::{
|
||||
// CELL_WIDEASIAN_MASK,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
cell_duplicate,
|
||||
cell_extended_gcluster,
|
||||
@ -109,7 +109,7 @@ pub use bindgen::{
|
||||
// ncbox -----------------------------------------------------------------------
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// constants
|
||||
NCBOXCORNER_MASK,
|
||||
NCBOXCORNER_SHIFT,
|
||||
@ -135,7 +135,7 @@ pub use bindgen::{
|
||||
// NCDIRECT_OPTION_INHIBIT_SETLOCALE,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncdirect_bg_default,
|
||||
ncdirect_bg_palindex,
|
||||
@ -185,7 +185,7 @@ pub use bindgen::{
|
||||
// ncfadectx,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncfadectx_free,
|
||||
ncfadectx_iterations,
|
||||
@ -226,7 +226,7 @@ pub use bindgen::{
|
||||
// ncfdplane_options,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncfdplane_create,
|
||||
ncfdplane_destroy,
|
||||
@ -248,7 +248,7 @@ pub use bindgen::{
|
||||
// NCMENU_OPTION_HIDING,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncmenu_create,
|
||||
ncmenu_destroy,
|
||||
@ -278,7 +278,7 @@ pub use bindgen::{
|
||||
// IPREFIXSTRLEN,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::ncmetric;
|
||||
pub use ffi::ncmetric;
|
||||
|
||||
// ncmultiselector -------------------------------------------------------------
|
||||
//
|
||||
@ -290,7 +290,7 @@ pub use bindgen::ncmetric;
|
||||
// ncmultiselector_options,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncmultiselector_create,
|
||||
ncmultiselector_destroy,
|
||||
@ -302,7 +302,7 @@ pub use bindgen::{
|
||||
// ncpile ----------------------------------------------------------------------
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncpile_bottom,
|
||||
ncpile_create,
|
||||
@ -323,7 +323,7 @@ pub use bindgen::{
|
||||
// NCPLANE_OPTION_HORALIGNED,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncplane_above,
|
||||
ncplane_at_cursor,
|
||||
@ -442,7 +442,7 @@ pub use bindgen::{
|
||||
// NCPLOT_OPTION_VERTICALI,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncdplot_add_sample,
|
||||
ncdplot_create,
|
||||
@ -474,7 +474,7 @@ pub use bindgen::{
|
||||
// NCREADER_OPTION_VERSCROLL,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncreader_clear,
|
||||
ncreader_contents,
|
||||
@ -502,7 +502,7 @@ pub use bindgen::{
|
||||
// NCREEL_OPTION_INFINITESCROLL,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncreel_add,
|
||||
ncreel_create,
|
||||
@ -539,7 +539,7 @@ pub use bindgen::{
|
||||
// ncselector_options,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncselector_additem,
|
||||
ncselector_create,
|
||||
@ -585,7 +585,7 @@ pub use bindgen::{
|
||||
// nctablet,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
nctablet_plane,
|
||||
nctablet_userptr,
|
||||
@ -604,7 +604,7 @@ pub use bindgen::{
|
||||
// NCVISUAL_OPTION_NODEGRADE,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
ncvisual_at_yx,
|
||||
ncvisual_decode,
|
||||
@ -643,7 +643,7 @@ pub use bindgen::{
|
||||
// NCOPTION_VERIFY_SIXEL,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
notcurses_at_yx,
|
||||
notcurses_bottom,
|
||||
@ -694,7 +694,7 @@ pub use bindgen::{
|
||||
// palette256,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// functions
|
||||
palette256_free,
|
||||
palette256_new,
|
||||
@ -706,10 +706,10 @@ pub use bindgen::{
|
||||
|
||||
// sig -------------------------------------------------------------------------
|
||||
|
||||
pub(crate) use bindgen::sigset_t;
|
||||
pub(crate) use ffi::sigset_t;
|
||||
|
||||
#[doc(inline)]
|
||||
pub use bindgen::{
|
||||
pub use ffi::{
|
||||
// structs
|
||||
//sigaction,
|
||||
|
||||
|
@ -164,33 +164,33 @@ pub use reimplemented::*;
|
||||
/// - RGB is used if neither default terminal colors nor palette indexing are in
|
||||
/// play, and fully supports all transparency options.
|
||||
///
|
||||
pub type NcCell = crate::bindings::bindgen::cell;
|
||||
pub type NcCell = crate::bindings::ffi::cell;
|
||||
|
||||
/// [`NcAlphaBits`] bits indicating
|
||||
/// [`NcCell`]'s foreground or background color will be a composite between
|
||||
/// its color and the `NcCell`s' corresponding colors underneath it
|
||||
pub const NCCELL_ALPHA_BLEND: u32 = crate::bindings::bindgen::CELL_ALPHA_BLEND;
|
||||
pub const NCCELL_ALPHA_BLEND: u32 = crate::bindings::ffi::CELL_ALPHA_BLEND;
|
||||
|
||||
/// [`NcAlphaBits`] bits indicating
|
||||
/// [`NcCell`]'s foreground color will be high-contrast (relative to the
|
||||
/// computed background). Background cannot be highcontrast
|
||||
pub const NCCELL_ALPHA_HIGHCONTRAST: u32 = crate::bindings::bindgen::CELL_ALPHA_HIGHCONTRAST;
|
||||
pub const NCCELL_ALPHA_HIGHCONTRAST: u32 = crate::bindings::ffi::CELL_ALPHA_HIGHCONTRAST;
|
||||
|
||||
/// [`NcAlphaBits`] bits indicating
|
||||
/// [`NcCell`]'s foreground or background color is used unchanged
|
||||
pub const NCCELL_ALPHA_OPAQUE: u32 = crate::bindings::bindgen::CELL_ALPHA_OPAQUE;
|
||||
pub const NCCELL_ALPHA_OPAQUE: u32 = crate::bindings::ffi::CELL_ALPHA_OPAQUE;
|
||||
|
||||
/// [`NcAlphaBits`] bits indicating
|
||||
/// [`NcCell`]'s foreground or background color is derived entirely from the
|
||||
/// `NcCell`s underneath it
|
||||
pub const NCCELL_ALPHA_TRANSPARENT: u32 = crate::bindings::bindgen::CELL_ALPHA_TRANSPARENT;
|
||||
pub const NCCELL_ALPHA_TRANSPARENT: u32 = crate::bindings::ffi::CELL_ALPHA_TRANSPARENT;
|
||||
|
||||
/// If this bit is set, we are *not* using the default background color
|
||||
///
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
///
|
||||
/// NOTE: This can also be used against a single [`NcChannel`]
|
||||
pub const NCCELL_BGDEFAULT_MASK: u32 = crate::bindings::bindgen::CELL_BGDEFAULT_MASK;
|
||||
pub const NCCELL_BGDEFAULT_MASK: u32 = crate::bindings::ffi::CELL_BGDEFAULT_MASK;
|
||||
|
||||
/// Extract these bits to get the background alpha mask
|
||||
/// ([`NcAlphaBits`])
|
||||
@ -198,7 +198,7 @@ pub const NCCELL_BGDEFAULT_MASK: u32 = crate::bindings::bindgen::CELL_BGDEFAULT_
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
///
|
||||
/// NOTE: This can also be used against a single [`NcChannel`]
|
||||
pub const NCCELL_BG_ALPHA_MASK: u32 = crate::bindings::bindgen::CELL_BG_ALPHA_MASK;
|
||||
pub const NCCELL_BG_ALPHA_MASK: u32 = crate::bindings::ffi::CELL_BG_ALPHA_MASK;
|
||||
|
||||
/// If this bit *and* [`NCCELL_BGDEFAULT_MASK`] are set, we're using a
|
||||
/// palette-indexed background color
|
||||
@ -206,21 +206,21 @@ pub const NCCELL_BG_ALPHA_MASK: u32 = crate::bindings::bindgen::CELL_BG_ALPHA_MA
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
///
|
||||
/// NOTE: This can also be used against a single [`NcChannel`]
|
||||
pub const NCCELL_BG_PALETTE: u32 = crate::bindings::bindgen::CELL_BG_PALETTE;
|
||||
pub const NCCELL_BG_PALETTE: u32 = crate::bindings::ffi::CELL_BG_PALETTE;
|
||||
|
||||
/// Extract these bits to get the background [`NcRgb`][crate::NcRgb] value
|
||||
///
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
///
|
||||
/// NOTE: This can also be used against a single [`NcChannel`]
|
||||
pub const NCCELL_BG_RGB_MASK: u32 = crate::bindings::bindgen::CELL_BG_RGB_MASK;
|
||||
pub const NCCELL_BG_RGB_MASK: u32 = crate::bindings::ffi::CELL_BG_RGB_MASK;
|
||||
|
||||
/// If this bit is set, we are *not* using the default foreground color
|
||||
///
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
///
|
||||
/// NOTE: When working with a single [`NcChannel`] use [`NCCELL_BGDEFAULT_MASK`];
|
||||
pub const NCCELL_FGDEFAULT_MASK: u64 = crate::bindings::bindgen::CELL_FGDEFAULT_MASK;
|
||||
pub const NCCELL_FGDEFAULT_MASK: u64 = crate::bindings::ffi::CELL_FGDEFAULT_MASK;
|
||||
|
||||
/// Extract these bits to get the foreground alpha mask
|
||||
/// ([`NcAlphaBits`])
|
||||
@ -228,7 +228,7 @@ pub const NCCELL_FGDEFAULT_MASK: u64 = crate::bindings::bindgen::CELL_FGDEFAULT_
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
///
|
||||
/// NOTE: When working with a single [`NcChannel`] use [`NCCELL_BG_ALPHA_MASK`];
|
||||
pub const NCCELL_FG_ALPHA_MASK: u64 = crate::bindings::bindgen::CELL_FG_ALPHA_MASK;
|
||||
pub const NCCELL_FG_ALPHA_MASK: u64 = crate::bindings::ffi::CELL_FG_ALPHA_MASK;
|
||||
|
||||
/// If this bit *and* [`NCCELL_FGDEFAULT_MASK`] are set, we're using a
|
||||
/// palette-indexed background color
|
||||
@ -236,19 +236,19 @@ pub const NCCELL_FG_ALPHA_MASK: u64 = crate::bindings::bindgen::CELL_FG_ALPHA_MA
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
///
|
||||
/// NOTE: When working with a single [`NcChannel`] use [`NCCELL_BG_PALETTE`];
|
||||
pub const NCCELL_FG_PALETTE: u64 = crate::bindings::bindgen::CELL_FG_PALETTE;
|
||||
pub const NCCELL_FG_PALETTE: u64 = crate::bindings::ffi::CELL_FG_PALETTE;
|
||||
|
||||
/// Extract these bits to get the foreground [`NcRgb`][crate::NcRgb] value
|
||||
///
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
///
|
||||
/// NOTE: When working with a single [`NcChannel`] use [`NCCELL_BG_RGB_MASK`];
|
||||
pub const NCCELL_FG_RGB_MASK: u64 = crate::bindings::bindgen::CELL_FG_RGB_MASK;
|
||||
pub const NCCELL_FG_RGB_MASK: u64 = crate::bindings::ffi::CELL_FG_RGB_MASK;
|
||||
|
||||
/// Indicates the glyph is entirely foreground
|
||||
///
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
pub const NCCELL_NOBACKGROUND_MASK: u64 = crate::bindings::bindgen::CELL_NOBACKGROUND_MASK;
|
||||
pub const NCCELL_NOBACKGROUND_MASK: u64 = crate::bindings::ffi::CELL_NOBACKGROUND_MASK;
|
||||
|
||||
/// If this bit is set, the cell is part of a multicolumn glyph.
|
||||
///
|
||||
@ -256,7 +256,7 @@ pub const NCCELL_NOBACKGROUND_MASK: u64 = crate::bindings::bindgen::CELL_NOBACKG
|
||||
/// by checking whether ->gcluster is zero.
|
||||
///
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
pub const NCCELL_WIDEASIAN_MASK: u64 = crate::bindings::bindgen::CELL_WIDEASIAN_MASK as u64;
|
||||
pub const NCCELL_WIDEASIAN_MASK: u64 = crate::bindings::ffi::CELL_WIDEASIAN_MASK as u64;
|
||||
|
||||
// NcEgc
|
||||
//
|
||||
@ -356,37 +356,37 @@ pub type NcEgcBackstop = u8;
|
||||
pub type NcStyleMask = u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_BLINK: u16 = crate::bindings::bindgen::NCSTYLE_BLINK as u16;
|
||||
pub const NCSTYLE_BLINK: u16 = crate::bindings::ffi::NCSTYLE_BLINK as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_BOLD: u16 = crate::bindings::bindgen::NCSTYLE_BOLD as u16;
|
||||
pub const NCSTYLE_BOLD: u16 = crate::bindings::ffi::NCSTYLE_BOLD as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_DIM: u16 = crate::bindings::bindgen::NCSTYLE_DIM as u16;
|
||||
pub const NCSTYLE_DIM: u16 = crate::bindings::ffi::NCSTYLE_DIM as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_INVIS: u16 = crate::bindings::bindgen::NCSTYLE_INVIS as u16;
|
||||
pub const NCSTYLE_INVIS: u16 = crate::bindings::ffi::NCSTYLE_INVIS as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_ITALIC: u16 = crate::bindings::bindgen::NCSTYLE_ITALIC as u16;
|
||||
pub const NCSTYLE_ITALIC: u16 = crate::bindings::ffi::NCSTYLE_ITALIC as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_MASK: u16 = crate::bindings::bindgen::NCSTYLE_MASK as u16;
|
||||
pub const NCSTYLE_MASK: u16 = crate::bindings::ffi::NCSTYLE_MASK as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_NONE: u16 = crate::bindings::bindgen::NCSTYLE_NONE as u16;
|
||||
pub const NCSTYLE_NONE: u16 = crate::bindings::ffi::NCSTYLE_NONE as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_PROTECT: u16 = crate::bindings::bindgen::NCSTYLE_PROTECT as u16;
|
||||
pub const NCSTYLE_PROTECT: u16 = crate::bindings::ffi::NCSTYLE_PROTECT as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_REVERSE: u16 = crate::bindings::bindgen::NCSTYLE_REVERSE as u16;
|
||||
pub const NCSTYLE_REVERSE: u16 = crate::bindings::ffi::NCSTYLE_REVERSE as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_STANDOUT: u16 = crate::bindings::bindgen::NCSTYLE_STANDOUT as u16;
|
||||
pub const NCSTYLE_STANDOUT: u16 = crate::bindings::ffi::NCSTYLE_STANDOUT as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_STRUCK: u16 = crate::bindings::bindgen::NCSTYLE_STRUCK as u16;
|
||||
pub const NCSTYLE_STRUCK: u16 = crate::bindings::ffi::NCSTYLE_STRUCK as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_UNDERLINE: u16 = crate::bindings::bindgen::NCSTYLE_UNDERLINE as u16;
|
||||
pub const NCSTYLE_UNDERLINE: u16 = crate::bindings::ffi::NCSTYLE_UNDERLINE as u16;
|
||||
|
@ -91,7 +91,7 @@ pub use reimplemented::*;
|
||||
pub type NcChannel = u32;
|
||||
|
||||
/// Extract these bits to get a channel's alpha value
|
||||
pub const NCCHANNEL_ALPHA_MASK: u32 = crate::bindings::bindgen::CHANNEL_ALPHA_MASK;
|
||||
pub const NCCHANNEL_ALPHA_MASK: u32 = crate::bindings::ffi::CHANNEL_ALPHA_MASK;
|
||||
|
||||
// NcAlphaBits
|
||||
//
|
||||
@ -226,7 +226,7 @@ pub type NcRgb = u32;
|
||||
pub type NcColor = u8;
|
||||
|
||||
/// Context for a palette fade operation
|
||||
pub type NcFadeCtx = crate::bindings::bindgen::ncfadectx;
|
||||
pub type NcFadeCtx = crate::bindings::ffi::ncfadectx;
|
||||
|
||||
/// the [NcEgc][crate::NcEgc] which form the various levels of a given geometry.
|
||||
///
|
||||
@ -238,4 +238,4 @@ pub type NcFadeCtx = crate::bindings::bindgen::ncfadectx;
|
||||
///
|
||||
/// `type in C: blitset (struct)`
|
||||
///
|
||||
pub type NcBlitSet = crate::bindings::bindgen::blitset;
|
||||
pub type NcBlitSet = crate::bindings::ffi::blitset;
|
||||
|
@ -50,7 +50,7 @@ mod test;
|
||||
mod methods;
|
||||
|
||||
/// Minimal notcurses instances for styling text
|
||||
pub type NcDirect = crate::bindings::bindgen::ncdirect;
|
||||
pub type NcDirect = crate::bindings::ffi::ncdirect;
|
||||
|
||||
/// Flags (options) for [`NcDirect`]
|
||||
pub type NcDirectFlags = u64;
|
||||
@ -59,7 +59,7 @@ pub type NcDirectFlags = u64;
|
||||
/// (disabling echo and line buffering)
|
||||
///
|
||||
pub const NCDIRECT_OPTION_INHIBIT_CBREAK: NcDirectFlags =
|
||||
crate::bindings::bindgen::NCDIRECT_OPTION_INHIBIT_CBREAK as NcDirectFlags;
|
||||
crate::bindings::ffi::NCDIRECT_OPTION_INHIBIT_CBREAK as NcDirectFlags;
|
||||
|
||||
/// Flag that avoids calling setlocale(LC_ALL, NULL)
|
||||
///
|
||||
@ -71,4 +71,4 @@ pub const NCDIRECT_OPTION_INHIBIT_CBREAK: NcDirectFlags =
|
||||
/// itself, usually as one of the first lines.
|
||||
///
|
||||
pub const NCDIRECT_OPTION_INHIBIT_SETLOCALE: NcDirectFlags =
|
||||
crate::bindings::bindgen::NCDIRECT_OPTION_INHIBIT_SETLOCALE as NcDirectFlags;
|
||||
crate::bindings::ffi::NCDIRECT_OPTION_INHIBIT_SETLOCALE as NcDirectFlags;
|
||||
|
@ -10,7 +10,7 @@ use std::io::{Error, ErrorKind, Read, Seek, SeekFrom};
|
||||
use libc::{c_long, c_void, fclose, feof, fread, fseek, ftell, SEEK_CUR, SEEK_END, SEEK_SET};
|
||||
|
||||
/// See [NcFile]. Notcurses functions expects this type of `*FILE` (a struct)
|
||||
pub type FILE_NC = crate::bindgen::_IO_FILE;
|
||||
pub type FILE_NC = crate::ffi::_IO_FILE;
|
||||
|
||||
/// See [NcFile]. The [`libc`] crate expects this type of `*FILE` (an opaque enum)
|
||||
pub type FILE_LIBC = libc::FILE;
|
||||
|
@ -13,7 +13,7 @@
|
||||
/// including synthesized events and mouse events.
|
||||
///
|
||||
/// To exit, generate EOF (usually Ctrl+‘d’).
|
||||
pub type NcInput = crate::bindings::bindgen::ncinput;
|
||||
pub type NcInput = crate::bindings::ffi::ncinput;
|
||||
|
||||
/// Compares two ncinput structs for data equality by doing a field-by-field
|
||||
/// comparison for equality (excepting seqnum).
|
||||
|
@ -9,27 +9,27 @@
|
||||
//
|
||||
// to set up a printf()-style maximum field width,
|
||||
// you should use [IB]PREFIXFMT (see below).
|
||||
pub const NCMETRIC_PREFIXCOLUMNS: u32 = crate::bindings::bindgen::PREFIXCOLUMNS;
|
||||
pub const NCMETRIC_PREFIXCOLUMNS: u32 = crate::bindings::ffi::PREFIXCOLUMNS;
|
||||
|
||||
// The maximum number of columns used by a mult == 1000 (standard)
|
||||
// ncmetric() call.
|
||||
pub const NCMETRIC_BPREFIXCOLUMNS: u32 = crate::bindings::bindgen::BPREFIXCOLUMNS;
|
||||
pub const NCMETRIC_BPREFIXCOLUMNS: u32 = crate::bindings::ffi::BPREFIXCOLUMNS;
|
||||
|
||||
// IPREFIXCOLUMNS is the maximum number of columns used by a mult == 1024
|
||||
// (digital information) ncmetric().
|
||||
pub const NCMETRIC_IPREFIXCOLUMNS: u32 = crate::bindings::bindgen::IPREFIXCOLUMNS;
|
||||
pub const NCMETRIC_IPREFIXCOLUMNS: u32 = crate::bindings::ffi::IPREFIXCOLUMNS;
|
||||
|
||||
//
|
||||
// Does not include a '\0' (xxx.xxU)
|
||||
pub const NCMETRIC_PREFIXSTRLEN: u32 = crate::bindings::bindgen::PREFIXSTRLEN;
|
||||
pub const NCMETRIC_PREFIXSTRLEN: u32 = crate::bindings::ffi::PREFIXSTRLEN;
|
||||
|
||||
// The maximum number of columns used by a mult == 1024 call making use of
|
||||
// the 'i' suffix.
|
||||
// Does not include a '\0' (xxxx.xxUi), i == prefix
|
||||
pub const NCMETRIC_BPREFIXSTRLEN: u32 = crate::bindings::bindgen::BPREFIXSTRLEN;
|
||||
pub const NCMETRIC_BPREFIXSTRLEN: u32 = crate::bindings::ffi::BPREFIXSTRLEN;
|
||||
|
||||
// Does not include a '\0' (xxxx.xxU)
|
||||
pub const NCMETRIC_IPREFIXSTRLEN: u32 = crate::bindings::bindgen::IPREFIXSTRLEN;
|
||||
pub const NCMETRIC_IPREFIXSTRLEN: u32 = crate::bindings::ffi::IPREFIXSTRLEN;
|
||||
|
||||
// TODO:?
|
||||
// WCHAR_MAX_UTF8BYTES
|
||||
|
@ -110,11 +110,6 @@ impl Notcurses {
|
||||
|
||||
/// # `Notcurses` methods
|
||||
impl Notcurses {
|
||||
// reference, ... I need an NcPlane from this...
|
||||
// pub fn stdplane_mut2(&mut self) -> *mut NcPlane {
|
||||
// unsafe { notcurses_stdplane(self) }
|
||||
// }
|
||||
|
||||
/// Returns a mutable reference to the standard [NcPlane] for this terminal.
|
||||
///
|
||||
/// The standard plane always exists, and its origin is always at the
|
||||
|
@ -68,10 +68,10 @@ pub use reimplemented::*;
|
||||
/// Notcurses builds atop the terminfo abstraction layer to
|
||||
/// provide reasonably portable vivid character displays.
|
||||
///
|
||||
pub type Notcurses = crate::bindings::bindgen::notcurses;
|
||||
pub type Notcurses = crate::bindings::ffi::notcurses;
|
||||
|
||||
/// Options struct for [`Notcurses`]
|
||||
pub type NotcursesOptions = crate::bindings::bindgen::notcurses_options;
|
||||
pub type NotcursesOptions = crate::bindings::ffi::notcurses_options;
|
||||
|
||||
/// Do not call setlocale()
|
||||
///
|
||||
@ -83,15 +83,14 @@ pub type NotcursesOptions = crate::bindings::bindgen::notcurses_options;
|
||||
/// prior to notcurses_init(), you should not set this bit. Even if you are
|
||||
/// invoking setlocale(), this behavior shouldn't be an issue unless you're
|
||||
/// doing something weird (setting a locale not based on LANG).
|
||||
pub const NCOPTION_INHIBIT_SETLOCALE: u64 =
|
||||
crate::bindings::bindgen::NCOPTION_INHIBIT_SETLOCALE as u64;
|
||||
pub const NCOPTION_INHIBIT_SETLOCALE: u64 = crate::bindings::ffi::NCOPTION_INHIBIT_SETLOCALE as u64;
|
||||
|
||||
/// Do not enter alternate mode.
|
||||
///
|
||||
/// If smcup/rmcup capabilities are indicated, Notcurses defaults to making use
|
||||
/// of the "alternate screen". This flag inhibits use of smcup/rmcup.
|
||||
pub const NCOPTION_NO_ALTERNATE_SCREEN: u64 =
|
||||
crate::bindings::bindgen::NCOPTION_NO_ALTERNATE_SCREEN as u64;
|
||||
crate::bindings::ffi::NCOPTION_NO_ALTERNATE_SCREEN as u64;
|
||||
|
||||
/// Do not modify the font.
|
||||
///
|
||||
@ -99,7 +98,7 @@ pub const NCOPTION_NO_ALTERNATE_SCREEN: u64 =
|
||||
/// glyphs (especially on the Linux console). If this is set, no such
|
||||
/// modifications will be made. Note that font changes will not affect anything
|
||||
/// but the virtual console/terminal in which Notcurses is running.
|
||||
pub const NCOPTION_NO_FONT_CHANGES: u64 = crate::bindings::bindgen::NCOPTION_NO_FONT_CHANGES as u64;
|
||||
pub const NCOPTION_NO_FONT_CHANGES: u64 = crate::bindings::ffi::NCOPTION_NO_FONT_CHANGES as u64;
|
||||
|
||||
/// Do not handle SIG{ING, SEGV, ABRT, QUIT}
|
||||
///
|
||||
@ -107,21 +106,20 @@ pub const NCOPTION_NO_FONT_CHANGES: u64 = crate::bindings::bindgen::NCOPTION_NO_
|
||||
/// restores the screen, and then calls the old signal handler. Set to inhibit
|
||||
/// registration of these signal handlers.
|
||||
pub const NCOPTION_NO_QUIT_SIGHANDLERS: u64 =
|
||||
crate::bindings::bindgen::NCOPTION_NO_QUIT_SIGHANDLERS as u64;
|
||||
crate::bindings::ffi::NCOPTION_NO_QUIT_SIGHANDLERS as u64;
|
||||
|
||||
/// Do not handle SIGWINCH
|
||||
///
|
||||
/// We typically install a signal handler for SIGWINCH that generates a resize
|
||||
/// event in the notcurses_getc() queue. Set to inhibit this handler
|
||||
pub const NCOPTION_NO_WINCH_SIGHANDLER: u64 =
|
||||
crate::bindings::bindgen::NCOPTION_NO_WINCH_SIGHANDLER as u64;
|
||||
crate::bindings::ffi::NCOPTION_NO_WINCH_SIGHANDLER as u64;
|
||||
|
||||
/// Do not print banners
|
||||
///
|
||||
/// Notcurses typically prints version info in notcurses_init() and performance
|
||||
/// info in notcurses_stop(). This inhibits that output.
|
||||
pub const NCOPTION_SUPPRESS_BANNERS: u64 =
|
||||
crate::bindings::bindgen::NCOPTION_SUPPRESS_BANNERS as u64;
|
||||
pub const NCOPTION_SUPPRESS_BANNERS: u64 = crate::bindings::ffi::NCOPTION_SUPPRESS_BANNERS as u64;
|
||||
|
||||
/// Test for Sixel support
|
||||
///
|
||||
@ -129,7 +127,7 @@ pub const NCOPTION_SUPPRESS_BANNERS: u64 =
|
||||
/// inline reply from the terminal. Since this can interact poorly with actual
|
||||
/// user input, it's not done unless Sixel will actually be used. Set this flag
|
||||
/// to unconditionally test for Sixel support in notcurses_init().
|
||||
pub const NCOPTION_VERIFY_SIXEL: u64 = crate::bindings::bindgen::NCOPTION_VERIFY_SIXEL as u64;
|
||||
pub const NCOPTION_VERIFY_SIXEL: u64 = crate::bindings::ffi::NCOPTION_VERIFY_SIXEL as u64;
|
||||
|
||||
// NcLogLevel ------------------------------------------------------------------
|
||||
|
||||
@ -141,33 +139,31 @@ pub const NCOPTION_VERIFY_SIXEL: u64 = crate::bindings::bindgen::NCOPTION_VERIFY
|
||||
/// `NCOPTION_SUPPRESS_BANNERS`.
|
||||
/// Note that if stderr is connected to the same terminal on which we're
|
||||
/// rendering, any kind of logging will disrupt the output.
|
||||
pub type NcLogLevel = crate::bindings::bindgen::ncloglevel_e;
|
||||
pub type NcLogLevel = crate::bindings::ffi::ncloglevel_e;
|
||||
|
||||
/// this is honestly a bit much
|
||||
pub const NCLOGLEVEL_DEBUG: NcLogLevel = crate::bindings::bindgen::ncloglevel_e_NCLOGLEVEL_DEBUG;
|
||||
pub const NCLOGLEVEL_DEBUG: NcLogLevel = crate::bindings::ffi::ncloglevel_e_NCLOGLEVEL_DEBUG;
|
||||
|
||||
/// we can't keep doin' this, but we can do other things
|
||||
pub const NCLOGLEVEL_ERROR: NcLogLevel = crate::bindings::bindgen::ncloglevel_e_NCLOGLEVEL_ERROR;
|
||||
pub const NCLOGLEVEL_ERROR: NcLogLevel = crate::bindings::ffi::ncloglevel_e_NCLOGLEVEL_ERROR;
|
||||
|
||||
/// we're hanging around, but we've had a horrible fault
|
||||
pub const NCLOGLEVEL_FATAL: NcLogLevel = crate::bindings::bindgen::ncloglevel_e_NCLOGLEVEL_FATAL;
|
||||
pub const NCLOGLEVEL_FATAL: NcLogLevel = crate::bindings::ffi::ncloglevel_e_NCLOGLEVEL_FATAL;
|
||||
|
||||
/// "detailed information
|
||||
pub const NCLOGLEVEL_INFO: NcLogLevel = crate::bindings::bindgen::ncloglevel_e_NCLOGLEVEL_INFO;
|
||||
pub const NCLOGLEVEL_INFO: NcLogLevel = crate::bindings::ffi::ncloglevel_e_NCLOGLEVEL_INFO;
|
||||
|
||||
/// print diagnostics immediately related to crashing
|
||||
pub const NCLOGLEVEL_PANIC: NcLogLevel = crate::bindings::bindgen::ncloglevel_e_NCLOGLEVEL_PANIC;
|
||||
pub const NCLOGLEVEL_PANIC: NcLogLevel = crate::bindings::ffi::ncloglevel_e_NCLOGLEVEL_PANIC;
|
||||
|
||||
/// default. print nothing once fullscreen service begins
|
||||
pub const NCLOGLEVEL_SILENT: NcLogLevel = crate::bindings::bindgen::ncloglevel_e_NCLOGLEVEL_SILENT;
|
||||
pub const NCLOGLEVEL_SILENT: NcLogLevel = crate::bindings::ffi::ncloglevel_e_NCLOGLEVEL_SILENT;
|
||||
|
||||
/// there's probably a better way to do what you want
|
||||
pub const NCLOGLEVEL_TRACE: NcLogLevel = crate::bindings::bindgen::ncloglevel_e_NCLOGLEVEL_TRACE;
|
||||
pub const NCLOGLEVEL_TRACE: NcLogLevel = crate::bindings::ffi::ncloglevel_e_NCLOGLEVEL_TRACE;
|
||||
|
||||
/// "detailed information
|
||||
pub const NCLOGLEVEL_VERBOSE: NcLogLevel =
|
||||
crate::bindings::bindgen::ncloglevel_e_NCLOGLEVEL_VERBOSE;
|
||||
pub const NCLOGLEVEL_VERBOSE: NcLogLevel = crate::bindings::ffi::ncloglevel_e_NCLOGLEVEL_VERBOSE;
|
||||
|
||||
/// you probably don't want what's happening to happen
|
||||
pub const NCLOGLEVEL_WARNING: NcLogLevel =
|
||||
crate::bindings::bindgen::ncloglevel_e_NCLOGLEVEL_WARNING;
|
||||
pub const NCLOGLEVEL_WARNING: NcLogLevel = crate::bindings::ffi::ncloglevel_e_NCLOGLEVEL_WARNING;
|
||||
|
@ -35,7 +35,7 @@ pub use reimplemented::*;
|
||||
///
|
||||
/// `type in C: ncpalette256 (struct)`
|
||||
///
|
||||
pub type NcPalette = crate::bindings::bindgen::palette256;
|
||||
pub type NcPalette = crate::bindings::ffi::palette256;
|
||||
|
||||
/// 8-bit value used for indexing into a [`NcPalette`]
|
||||
///
|
||||
|
@ -209,40 +209,39 @@ pub use reimplemented::*;
|
||||
/// pile's z-axis. When ncplane_reparent_family() is used, all planes bound to
|
||||
/// the reparented plane are moved along with it. Their relative z-order is maintained.
|
||||
///
|
||||
pub type NcPlane = crate::bindings::bindgen::ncplane;
|
||||
pub type NcPlane = crate::bindings::ffi::ncplane;
|
||||
|
||||
/// Options struct for [`NcPlane`]
|
||||
pub type NcPlaneOptions = crate::bindings::bindgen::ncplane_options;
|
||||
pub type NcPlaneOptions = crate::bindings::ffi::ncplane_options;
|
||||
|
||||
/// Horizontal alignment relative to the parent plane. Set alignment in 'x'.
|
||||
pub const NCPLANE_OPTION_HORALIGNED: u64 =
|
||||
crate::bindings::bindgen::NCPLANE_OPTION_HORALIGNED as u64;
|
||||
pub const NCPLANE_OPTION_HORALIGNED: u64 = crate::bindings::ffi::NCPLANE_OPTION_HORALIGNED as u64;
|
||||
|
||||
/// I/O wrapper to dump file descriptor to [`NcPlane`]
|
||||
///
|
||||
/// `type in C: ncfdplane (struct)`
|
||||
pub type NcFdPlane = crate::bindings::bindgen::ncfdplane;
|
||||
pub type NcFdPlane = crate::bindings::ffi::ncfdplane;
|
||||
|
||||
/// Options struct for [`NcFdPlane`]
|
||||
///
|
||||
/// `type in C: ncplane_options (struct)`
|
||||
pub type NcFdPlaneOptions = crate::bindings::bindgen::ncfdplane_options;
|
||||
pub type NcFdPlaneOptions = crate::bindings::ffi::ncfdplane_options;
|
||||
|
||||
/// Alignment within a plane or terminal.
|
||||
/// Left/right-justified, or centered.
|
||||
pub type NcAlign = crate::bindings::bindgen::ncalign_e;
|
||||
pub type NcAlign = crate::bindings::ffi::ncalign_e;
|
||||
|
||||
/// Left alignment within an [`NcPlane`] or terminal.
|
||||
pub const NCALIGN_LEFT: NcAlign = crate::bindings::bindgen::ncalign_e_NCALIGN_LEFT;
|
||||
pub const NCALIGN_LEFT: NcAlign = crate::bindings::ffi::ncalign_e_NCALIGN_LEFT;
|
||||
|
||||
/// Right alignment within an [`NcPlane`] or terminal.
|
||||
pub const NCALIGN_RIGHT: NcAlign = crate::bindings::bindgen::ncalign_e_NCALIGN_RIGHT;
|
||||
pub const NCALIGN_RIGHT: NcAlign = crate::bindings::ffi::ncalign_e_NCALIGN_RIGHT;
|
||||
|
||||
/// Center alignment within an [`NcPlane`] or terminal.
|
||||
pub const NCALIGN_CENTER: NcAlign = crate::bindings::bindgen::ncalign_e_NCALIGN_CENTER;
|
||||
pub const NCALIGN_CENTER: NcAlign = crate::bindings::ffi::ncalign_e_NCALIGN_CENTER;
|
||||
|
||||
/// Do not align an [`NcPlane`] or terminal.
|
||||
pub const NCALIGN_UNALIGNED: NcAlign = crate::bindings::bindgen::ncalign_e_NCALIGN_UNALIGNED;
|
||||
pub const NCALIGN_UNALIGNED: NcAlign = crate::bindings::ffi::ncalign_e_NCALIGN_UNALIGNED;
|
||||
|
||||
/// Blitter Mode (`NCBLIT_*`)
|
||||
///
|
||||
@ -261,40 +260,40 @@ pub const NCALIGN_UNALIGNED: NcAlign = crate::bindings::bindgen::ncalign_e_NCALI
|
||||
/// - [`NCBLIT_DEFAULT`]
|
||||
/// - [`NCBLIT_SIXEL`]
|
||||
///
|
||||
pub type NcBlitter = crate::bindings::bindgen::ncblitter_e;
|
||||
pub type NcBlitter = crate::bindings::ffi::ncblitter_e;
|
||||
|
||||
/// [`NcBlitter`] mode using: space, compatible with ASCII
|
||||
pub const NCBLIT_1x1: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT_1x1;
|
||||
pub const NCBLIT_1x1: NcBlitter = crate::bindings::ffi::ncblitter_e_NCBLIT_1x1;
|
||||
|
||||
/// [`NcBlitter`] mode using: halves + 1x1 (space)
|
||||
/// ▄▀
|
||||
pub const NCBLIT_2x1: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT_2x1;
|
||||
pub const NCBLIT_2x1: NcBlitter = crate::bindings::ffi::ncblitter_e_NCBLIT_2x1;
|
||||
|
||||
/// [`NcBlitter`] mode using: quadrants + 2x1
|
||||
/// ▗▐ ▖▀▟▌▙
|
||||
pub const NCBLIT_2x2: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT_2x2;
|
||||
pub const NCBLIT_2x2: NcBlitter = crate::bindings::ffi::ncblitter_e_NCBLIT_2x2;
|
||||
|
||||
/// [`NcBlitter`] mode using: sextants
|
||||
/// 🬀🬁🬂🬃🬄🬅🬆🬇🬈🬉🬊🬋🬌🬍🬎🬏🬐🬑🬒🬓🬔🬕🬖🬗🬘🬙🬚🬛🬜🬝🬞🬟🬠🬡🬢🬣🬤🬥🬦🬧🬨🬩🬪🬫🬬🬭🬮🬯🬰🬱🬲🬳🬴🬵🬶🬷🬸🬹🬺🬻
|
||||
pub const NCBLIT_3x2: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT_3x2;
|
||||
pub const NCBLIT_3x2: NcBlitter = crate::bindings::ffi::ncblitter_e_NCBLIT_3x2;
|
||||
|
||||
/// [`NcBlitter`] mode using: four vertical levels
|
||||
/// █▆▄▂
|
||||
pub const NCBLIT_4x1: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT_4x1;
|
||||
pub const NCBLIT_4x1: NcBlitter = crate::bindings::ffi::ncblitter_e_NCBLIT_4x1;
|
||||
|
||||
/// [`NcBlitter`] mode using: eight vertical levels
|
||||
/// █▇▆▅▄▃▂▁
|
||||
pub const NCBLIT_8x1: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT_8x1;
|
||||
pub const NCBLIT_8x1: NcBlitter = crate::bindings::ffi::ncblitter_e_NCBLIT_8x1;
|
||||
|
||||
/// [`NcBlitter`] mode using: 4 rows, 2 cols (braille)
|
||||
/// ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿
|
||||
pub const NCBLIT_BRAILLE: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT_BRAILLE;
|
||||
pub const NCBLIT_BRAILLE: NcBlitter = crate::bindings::ffi::ncblitter_e_NCBLIT_BRAILLE;
|
||||
|
||||
/// [`NcBlitter`] mode where the blitter is automatically chosen
|
||||
pub const NCBLIT_DEFAULT: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT_DEFAULT;
|
||||
pub const NCBLIT_DEFAULT: NcBlitter = crate::bindings::ffi::ncblitter_e_NCBLIT_DEFAULT;
|
||||
|
||||
/// [`NcBlitter`] mode (not yet implemented)
|
||||
pub const NCBLIT_SIXEL: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT_SIXEL;
|
||||
pub const NCBLIT_SIXEL: NcBlitter = crate::bindings::ffi::ncblitter_e_NCBLIT_SIXEL;
|
||||
|
||||
/// How to scale an [`NcVisual`] during rendering
|
||||
///
|
||||
@ -304,21 +303,21 @@ pub const NCBLIT_SIXEL: NcBlitter = crate::bindings::bindgen::ncblitter_e_NCBLIT
|
||||
/// - NCSCALE_STRETCH stretches and scales the image in an
|
||||
/// attempt to fill the entirety of the plane.
|
||||
///
|
||||
pub type NcScale = crate::bindings::bindgen::ncscale_e;
|
||||
pub type NcScale = crate::bindings::ffi::ncscale_e;
|
||||
/// Maintain original size
|
||||
pub const NCSCALE_NONE: NcScale = crate::bindings::bindgen::ncscale_e_NCSCALE_NONE;
|
||||
pub const NCSCALE_NONE: NcScale = crate::bindings::ffi::ncscale_e_NCSCALE_NONE;
|
||||
/// Maintain aspect ratio
|
||||
pub const NCSCALE_SCALE: NcScale = crate::bindings::bindgen::ncscale_e_NCSCALE_SCALE;
|
||||
pub const NCSCALE_SCALE: NcScale = crate::bindings::ffi::ncscale_e_NCSCALE_SCALE;
|
||||
/// Throw away aspect ratio
|
||||
pub const NCSCALE_STRETCH: NcScale = crate::bindings::bindgen::ncscale_e_NCSCALE_STRETCH;
|
||||
pub const NCSCALE_STRETCH: NcScale = crate::bindings::ffi::ncscale_e_NCSCALE_STRETCH;
|
||||
|
||||
/// A visual bit of multimedia opened with LibAV|OIIO
|
||||
pub type NcVisual = crate::bindings::bindgen::ncvisual;
|
||||
pub type NcVisual = crate::bindings::ffi::ncvisual;
|
||||
/// Options struct for [`NcVisual`]
|
||||
pub type NcVisualOptions = crate::bindings::bindgen::ncvisual_options;
|
||||
pub type NcVisualOptions = crate::bindings::ffi::ncvisual_options;
|
||||
|
||||
/// Use [`NCCELL_ALPHA_BLEND`] with visual
|
||||
pub const NCVISUAL_OPTION_BLEND: u32 = crate::bindings::bindgen::NCVISUAL_OPTION_BLEND;
|
||||
pub const NCVISUAL_OPTION_BLEND: u32 = crate::bindings::ffi::NCVISUAL_OPTION_BLEND;
|
||||
|
||||
/// Fail rather than degrade
|
||||
pub const NCVISUAL_OPTION_NODEGRADE: u32 = crate::bindings::bindgen::NCVISUAL_OPTION_NODEGRADE;
|
||||
pub const NCVISUAL_OPTION_NODEGRADE: u32 = crate::bindings::ffi::NCVISUAL_OPTION_NODEGRADE;
|
||||
|
@ -4,10 +4,10 @@ use core::{ffi::c_void, ptr::null_mut};
|
||||
use libc::free;
|
||||
|
||||
use crate::{
|
||||
bindgen::__va_list_tag, cell_load, cell_release, cells_double_box, cells_rounded_box,
|
||||
channels_bchannel, channels_bg_alpha, channels_bg_default_p, channels_bg_rgb, channels_bg_rgb8,
|
||||
channels_fchannel, channels_fg_alpha, channels_fg_default_p, channels_fg_rgb, channels_fg_rgb8,
|
||||
cstring, ncplane_at_cursor, ncplane_at_yx, ncplane_box, ncplane_channels,
|
||||
cell_load, cell_release, cells_double_box, cells_rounded_box, channels_bchannel,
|
||||
channels_bg_alpha, channels_bg_default_p, channels_bg_rgb, channels_bg_rgb8, channels_fchannel,
|
||||
channels_fg_alpha, channels_fg_default_p, channels_fg_rgb, channels_fg_rgb8, cstring,
|
||||
ffi::__va_list_tag, ncplane_at_cursor, ncplane_at_yx, ncplane_box, ncplane_channels,
|
||||
ncplane_cursor_move_yx, ncplane_cursor_yx, ncplane_dim_yx, ncplane_gradient,
|
||||
ncplane_hline_interp, ncplane_putc_yx, ncplane_putegc_yx, ncplane_putnstr_yx,
|
||||
ncplane_putstr_yx, ncplane_resize, ncplane_styles, ncplane_vline_interp, ncplane_vprintf_yx,
|
||||
|
@ -3,7 +3,7 @@
|
||||
use crate::Notcurses;
|
||||
|
||||
/// notcurses runtime statistics
|
||||
pub type NcStats = crate::bindings::bindgen::ncstats;
|
||||
pub type NcStats = crate::bindings::ffi::ncstats;
|
||||
|
||||
/// # `NcStats` Methods.
|
||||
impl NcStats {
|
||||
|
@ -3,4 +3,4 @@
|
||||
///
|
||||
// only used for now with [`notcurses_getc_nblock`], which can't use
|
||||
// libc::timespec
|
||||
pub type NcTime = crate::bindings::bindgen::timespec;
|
||||
pub type NcTime = crate::bindings::ffi::timespec;
|
||||
|
@ -32,19 +32,19 @@ mod methods;
|
||||
/// `ncmenu_destroy` removes a menu bar, and frees all associated resources.
|
||||
///
|
||||
/// `type in C: ncmenu (struct)`
|
||||
pub type NcMenu = crate::bindings::bindgen::ncmenu;
|
||||
pub type NcMenu = crate::bindings::ffi::ncmenu;
|
||||
|
||||
/// Options struct for [`NcMenu`]
|
||||
pub type NcMenuOptions = crate::bindings::bindgen::ncmenu_options;
|
||||
pub type NcMenuOptions = crate::bindings::ffi::ncmenu_options;
|
||||
|
||||
/// Item for [`NcMenu`]
|
||||
pub type NcMenuItem = crate::bindings::bindgen::ncmenu_item;
|
||||
pub type NcMenuItem = crate::bindings::ffi::ncmenu_item;
|
||||
|
||||
/// Section for [`NcMenu`]
|
||||
pub type NcMenuSection = crate::bindings::bindgen::ncmenu_section;
|
||||
pub type NcMenuSection = crate::bindings::ffi::ncmenu_section;
|
||||
|
||||
/// Bottom row (as opposed to top row)
|
||||
pub const NCMENU_OPTION_BOTTOM: u32 = crate::bindings::bindgen::NCMENU_OPTION_BOTTOM;
|
||||
pub const NCMENU_OPTION_BOTTOM: u32 = crate::bindings::ffi::NCMENU_OPTION_BOTTOM;
|
||||
|
||||
/// Hide the menu when not unrolled
|
||||
pub const NCMENU_OPTION_HIDING: u32 = crate::bindings::bindgen::NCMENU_OPTION_HIDING;
|
||||
pub const NCMENU_OPTION_HIDING: u32 = crate::bindings::ffi::NCMENU_OPTION_HIDING;
|
||||
|
@ -1,10 +1,10 @@
|
||||
//! `NcMultiSelector` widget.
|
||||
|
||||
/// high-level widget for selecting items from a set
|
||||
pub type NcMultiSelector = crate::bindings::bindgen::ncmultiselector;
|
||||
pub type NcMultiSelector = crate::bindings::ffi::ncmultiselector;
|
||||
|
||||
/// an item for [`NcMultiSelector`]
|
||||
pub type NcMultiSelectorItem = crate::bindings::bindgen::ncmselector_item;
|
||||
pub type NcMultiSelectorItem = crate::bindings::ffi::ncmselector_item;
|
||||
|
||||
/// Options structure for [`NcMultiSelector`]
|
||||
pub type NcMultiSelectorOptions = crate::bindings::bindgen::ncmultiselector_options;
|
||||
pub type NcMultiSelectorOptions = crate::bindings::ffi::ncmultiselector_options;
|
||||
|
@ -2,26 +2,26 @@
|
||||
|
||||
/// A histogram, bound to an [`NcPlane`][crate::NcPlane]
|
||||
/// (uses non-negative `f64`s)
|
||||
pub type NcPlotF64 = crate::bindings::bindgen::ncdplot;
|
||||
pub type NcPlotF64 = crate::bindings::ffi::ncdplot;
|
||||
|
||||
/// A histogram, bound to an [`NcPlane`][crate::NcPlane] (uses `u64`s)
|
||||
pub type NcPlotU64 = crate::bindings::bindgen::ncuplot;
|
||||
pub type NcPlotU64 = crate::bindings::ffi::ncuplot;
|
||||
|
||||
/// Options struct for
|
||||
/// [`NcPlotF64`] or [`NcPlotU64`]
|
||||
pub type NcPlotOptions = crate::bindings::bindgen::ncplot_options;
|
||||
pub type NcPlotOptions = crate::bindings::ffi::ncplot_options;
|
||||
|
||||
/// Use domain detection only for max
|
||||
pub const NCPLOT_OPTION_DETECTMAXONLY: u32 = crate::bindings::bindgen::NCPLOT_OPTION_DETECTMAXONLY;
|
||||
pub const NCPLOT_OPTION_DETECTMAXONLY: u32 = crate::bindings::ffi::NCPLOT_OPTION_DETECTMAXONLY;
|
||||
|
||||
/// Exponential dependent axis
|
||||
pub const NCPLOT_OPTION_EXPONENTIALD: u32 = crate::bindings::bindgen::NCPLOT_OPTION_EXPONENTIALD;
|
||||
pub const NCPLOT_OPTION_EXPONENTIALD: u32 = crate::bindings::ffi::NCPLOT_OPTION_EXPONENTIALD;
|
||||
|
||||
/// Show labels for dependent axis
|
||||
pub const NCPLOT_OPTION_LABELTICKSD: u32 = crate::bindings::bindgen::NCPLOT_OPTION_LABELTICKSD;
|
||||
pub const NCPLOT_OPTION_LABELTICKSD: u32 = crate::bindings::ffi::NCPLOT_OPTION_LABELTICKSD;
|
||||
|
||||
/// Use domain detection only for max
|
||||
pub const NCPLOT_OPTION_NODEGRADE: u32 = crate::bindings::bindgen::NCPLOT_OPTION_NODEGRADE;
|
||||
pub const NCPLOT_OPTION_NODEGRADE: u32 = crate::bindings::ffi::NCPLOT_OPTION_NODEGRADE;
|
||||
|
||||
/// Independent axis is vertical
|
||||
pub const NCPLOT_OPTION_VERTICALI: u32 = crate::bindings::bindgen::NCPLOT_OPTION_VERTICALI;
|
||||
pub const NCPLOT_OPTION_VERTICALI: u32 = crate::bindings::ffi::NCPLOT_OPTION_VERTICALI;
|
||||
|
@ -26,23 +26,23 @@ mod methods;
|
||||
///
|
||||
/// `type in C: ncreader (struct)`
|
||||
///
|
||||
pub type NcReader = crate::bindings::bindgen::ncreader;
|
||||
pub type NcReader = crate::bindings::ffi::ncreader;
|
||||
|
||||
/// Options struct for [`NcReader`]
|
||||
///
|
||||
/// `type in C: ncreader_options (struct)`
|
||||
///
|
||||
pub type NcReaderOptions = crate::bindings::bindgen::ncreader_options;
|
||||
pub type NcReaderOptions = crate::bindings::ffi::ncreader_options;
|
||||
|
||||
/// Make the terminal cursor visible across the lifetime of the ncreader, and
|
||||
/// have the ncreader manage the cursor's placement.
|
||||
pub const NCREADER_OPTION_CURSOR: u32 = crate::bindings::bindgen::NCREADER_OPTION_CURSOR;
|
||||
pub const NCREADER_OPTION_CURSOR: u32 = crate::bindings::ffi::NCREADER_OPTION_CURSOR;
|
||||
|
||||
/// Enable horizontal scrolling. Virtual lines can then grow arbitrarily long.
|
||||
pub const NCREADER_OPTION_HORSCROLL: u32 = crate::bindings::bindgen::NCREADER_OPTION_HORSCROLL;
|
||||
pub const NCREADER_OPTION_HORSCROLL: u32 = crate::bindings::ffi::NCREADER_OPTION_HORSCROLL;
|
||||
|
||||
/// Disable all editing shortcuts. By default, emacs-style keys are available.
|
||||
pub const NCREADER_OPTION_NOCMDKEYS: u32 = crate::bindings::bindgen::NCREADER_OPTION_NOCMDKEYS;
|
||||
pub const NCREADER_OPTION_NOCMDKEYS: u32 = crate::bindings::ffi::NCREADER_OPTION_NOCMDKEYS;
|
||||
|
||||
/// Enable vertical scrolling. You can then use arbitrarily many virtual lines.
|
||||
pub const NCREADER_OPTION_VERSCROLL: u32 = crate::bindings::bindgen::NCREADER_OPTION_VERSCROLL;
|
||||
pub const NCREADER_OPTION_VERSCROLL: u32 = crate::bindings::ffi::NCREADER_OPTION_VERSCROLL;
|
||||
|
@ -13,20 +13,19 @@
|
||||
///
|
||||
/// If there is space left over, other tablets are included in the display.
|
||||
/// Tablets can come and go at any time, and can grow or shrink at any time.
|
||||
pub type NcReel = crate::bindings::bindgen::ncreel;
|
||||
pub type NcReel = crate::bindings::ffi::ncreel;
|
||||
|
||||
/// Options struct for [`NcReel`]
|
||||
pub type NcReelOptions = crate::bindings::bindgen::ncreel_options;
|
||||
pub type NcReelOptions = crate::bindings::ffi::ncreel_options;
|
||||
|
||||
/// Visual tablet for [`NcReel`]
|
||||
pub type NcTablet = crate::bindings::bindgen::nctablet;
|
||||
pub type NcTablet = crate::bindings::ffi::nctablet;
|
||||
|
||||
/// is navigation circular (does moving down from the last tablet move to the
|
||||
/// first, and vice versa)? only meaningful when infinitescroll is true. if
|
||||
/// infinitescroll is false, this must be false.
|
||||
pub const NCREEL_OPTION_CIRCULAR: u32 = crate::bindings::bindgen::NCREEL_OPTION_CIRCULAR;
|
||||
pub const NCREEL_OPTION_CIRCULAR: u32 = crate::bindings::ffi::NCREEL_OPTION_CIRCULAR;
|
||||
/// is scrolling infinite (can one move down or up forever, or is an end
|
||||
/// reached?). if true, 'circular' specifies how to handle the special case of
|
||||
/// an incompletely-filled reel.
|
||||
pub const NCREEL_OPTION_INFINITESCROLL: u32 =
|
||||
crate::bindings::bindgen::NCREEL_OPTION_INFINITESCROLL;
|
||||
pub const NCREEL_OPTION_INFINITESCROLL: u32 = crate::bindings::ffi::NCREEL_OPTION_INFINITESCROLL;
|
||||
|
@ -1,10 +1,10 @@
|
||||
//! `NcSelector` widget.
|
||||
|
||||
/// high-level widget for selecting one item from a set
|
||||
pub type NcSelector = crate::bindings::bindgen::ncselector;
|
||||
pub type NcSelector = crate::bindings::ffi::ncselector;
|
||||
|
||||
/// an item for [`NcSelector`]
|
||||
pub type NcSelectorItem = crate::bindings::bindgen::ncselector_item;
|
||||
pub type NcSelectorItem = crate::bindings::ffi::ncselector_item;
|
||||
|
||||
/// Options structur for [`NcSelector`]
|
||||
pub type NcSelectorOptions = crate::bindings::bindgen::ncselector_options;
|
||||
pub type NcSelectorOptions = crate::bindings::ffi::ncselector_options;
|
||||
|
Loading…
Reference in New Issue
Block a user