Struct libnotcurses_sys::c_api::ffi::notcurses_options
source · #[repr(C)]pub struct notcurses_options {
pub termtype: *const c_char,
pub loglevel: ncloglevel_e,
pub margin_t: c_uint,
pub margin_r: c_uint,
pub margin_b: c_uint,
pub margin_l: c_uint,
pub flags: u64,
}Expand description
Configuration for notcurses_init().
Fields§
§termtype: *const c_charThe name of the terminfo database entry describing this terminal. If NULL, the environment variable TERM is used. Failure to open the terminal definition will result in failure to initialize notcurses.
loglevel: ncloglevel_eProgressively higher log levels result in more logging to stderr. By default, nothing is printed to stderr once fullscreen service begins.
margin_t: c_uintDesirable margins. If all are 0 (default), we will render to the entirety of the screen. If the screen is too small, we do what we can–this is strictly best-effort. Absolute coordinates are relative to the rendering area ((0, 0) is always the origin of the rendering area).
margin_r: c_uintDesirable margins. If all are 0 (default), we will render to the entirety of the screen. If the screen is too small, we do what we can–this is strictly best-effort. Absolute coordinates are relative to the rendering area ((0, 0) is always the origin of the rendering area).
margin_b: c_uintDesirable margins. If all are 0 (default), we will render to the entirety of the screen. If the screen is too small, we do what we can–this is strictly best-effort. Absolute coordinates are relative to the rendering area ((0, 0) is always the origin of the rendering area).
margin_l: c_uintDesirable margins. If all are 0 (default), we will render to the entirety of the screen. If the screen is too small, we do what we can–this is strictly best-effort. Absolute coordinates are relative to the rendering area ((0, 0) is always the origin of the rendering area).
flags: u64General flags; see NCOPTION_*. This is expressed as a bitfield so that future options can be added without reshaping the struct. Undefined bits must be set to 0.
Implementations§
source§impl notcurses_options
impl notcurses_options
sourcepub fn builder() -> NcOptionsBuilder
pub fn builder() -> NcOptionsBuilder
Returns a default Nc options builder.
sourcepub fn to_builder(&self) -> NcOptionsBuilder
pub fn to_builder(&self) -> NcOptionsBuilder
Returns a builder object from the current Nc options.
sourcepub fn with_margins(top: u32, right: u32, bottom: u32, left: u32) -> Self
pub fn with_margins(top: u32, right: u32, bottom: u32, left: u32) -> Self
New NcOptions, with margins.
sourcepub fn with_flags(flags: NcFlag) -> Self
pub fn with_flags(flags: NcFlag) -> Self
New NcOptions, with flags.
sourcepub fn with_all_options(
loglevel: NcLogLevel,
trbl_margins: Option<(u32, u32, u32, u32)>,
flags: NcFlag
) -> NcOptions
pub fn with_all_options( loglevel: NcLogLevel, trbl_margins: Option<(u32, u32, u32, u32)>, flags: NcFlag ) -> NcOptions
New NcOptions, with flags
source§impl notcurses_options
impl notcurses_options
sourcepub fn log_level(&self) -> NcLogLevel
pub fn log_level(&self) -> NcLogLevel
Returns the log level.
sourcepub fn is_drain_input(&self) -> bool
pub fn is_drain_input(&self) -> bool
Returns true if it has the DrainInput flag set.
sourcepub fn is_inhibit_set_locale(&self) -> bool
pub fn is_inhibit_set_locale(&self) -> bool
Returns true if it has the InhibitSetLocale flag set.
sourcepub fn is_no_alternate_screen(&self) -> bool
pub fn is_no_alternate_screen(&self) -> bool
Returns true if it has the NoAlternateScreen flag set.
sourcepub fn is_no_clear_bitmaps(&self) -> bool
pub fn is_no_clear_bitmaps(&self) -> bool
Returns true if it has the NoClearBitmaps flag set.
sourcepub fn is_no_font_changes(&self) -> bool
pub fn is_no_font_changes(&self) -> bool
Returns true if it has the NoFontChanges flag set.
sourcepub fn is_no_quit_sig_handlers(&self) -> bool
pub fn is_no_quit_sig_handlers(&self) -> bool
Returns true if it has the NoQuitSigHandlers flag set.
sourcepub fn is_no_winch_sig_handler(&self) -> bool
pub fn is_no_winch_sig_handler(&self) -> bool
Returns true if it has the NoWinchSigHandler flag set.
sourcepub fn is_preserve_cursor(&self) -> bool
pub fn is_preserve_cursor(&self) -> bool
Returns true if it has the PreserveCursor flag set.
sourcepub fn is_scrolling(&self) -> bool
pub fn is_scrolling(&self) -> bool
Returns true if it has the Scrolling flag set.
sourcepub fn is_cli_mode(&self) -> bool
pub fn is_cli_mode(&self) -> bool
Returns true if it has the CliMode flag set.
Returns true if it has the SuppressBanners flag set.
Trait Implementations§
source§impl Debug for notcurses_options
impl Debug for notcurses_options
source§impl Default for notcurses_options
impl Default for notcurses_options
source§impl From<&mut notcurses_options> for NcOptionsBuilder
impl From<&mut notcurses_options> for NcOptionsBuilder
source§impl From<¬curses_options> for NcOptionsBuilder
impl From<¬curses_options> for NcOptionsBuilder
source§impl From<notcurses_options> for NcOptionsBuilder
impl From<notcurses_options> for NcOptionsBuilder
source§fn from(options: NcOptions) -> NcOptionsBuilder
fn from(options: NcOptions) -> NcOptionsBuilder
source§impl Hash for notcurses_options
impl Hash for notcurses_options
source§impl Ord for notcurses_options
impl Ord for notcurses_options
source§fn cmp(&self, other: ¬curses_options) -> Ordering
fn cmp(&self, other: ¬curses_options) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<notcurses_options> for notcurses_options
impl PartialEq<notcurses_options> for notcurses_options
source§fn eq(&self, other: ¬curses_options) -> bool
fn eq(&self, other: ¬curses_options) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd<notcurses_options> for notcurses_options
impl PartialOrd<notcurses_options> for notcurses_options
source§fn partial_cmp(&self, other: ¬curses_options) -> Option<Ordering>
fn partial_cmp(&self, other: ¬curses_options) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more