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
sourceimpl 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
sourceimpl 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
sourceimpl Debug for notcurses_options
impl Debug for notcurses_options
sourceimpl Default for notcurses_options
impl Default for notcurses_options
sourceimpl From<&mut notcurses_options> for NcOptionsBuilder
impl From<&mut notcurses_options> for NcOptionsBuilder
sourceimpl From<¬curses_options> for NcOptionsBuilder
impl From<¬curses_options> for NcOptionsBuilder
sourceimpl From<notcurses_options> for NcOptionsBuilder
impl From<notcurses_options> for NcOptionsBuilder
sourcefn from(options: NcOptions) -> NcOptionsBuilder
fn from(options: NcOptions) -> NcOptionsBuilder
Converts to this type from the input type.
sourceimpl Hash for notcurses_options
impl Hash for notcurses_options
sourceimpl Ord for notcurses_options
impl Ord for notcurses_options
sourceimpl PartialEq<notcurses_options> for notcurses_options
impl PartialEq<notcurses_options> for notcurses_options
sourcefn eq(&self, other: ¬curses_options) -> bool
fn eq(&self, other: ¬curses_options) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: ¬curses_options) -> bool
fn ne(&self, other: ¬curses_options) -> bool
This method tests for !=.
sourceimpl PartialOrd<notcurses_options> for notcurses_options
impl PartialOrd<notcurses_options> for notcurses_options
sourcefn partial_cmp(&self, other: ¬curses_options) -> Option<Ordering>
fn partial_cmp(&self, other: ¬curses_options) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Eq for notcurses_options
impl StructuralEq for notcurses_options
impl StructuralPartialEq for notcurses_options
Auto Trait Implementations
impl RefUnwindSafe for notcurses_options
impl !Send for notcurses_options
impl !Sync for notcurses_options
impl Unpin for notcurses_options
impl UnwindSafe for notcurses_options
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more