#[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
§constructors
impl notcurses_options
§constructors
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
§methods
impl notcurses_options
§methods
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.