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 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: impl Into<NcFlag>) -> Self
pub fn with_flags(flags: impl Into<NcFlag>) -> Self
New NcOptions, with flags.
sourcepub fn with_all_options(
loglevel: impl Into<NcLogLevel>,
margin_t: u32,
margin_r: u32,
margin_b: u32,
margin_l: u32,
flags: impl Into<NcFlag>
) -> Self
pub fn with_all_options(
loglevel: impl Into<NcLogLevel>,
margin_t: u32,
margin_r: u32,
margin_b: u32,
margin_l: u32,
flags: impl Into<NcFlag>
) -> Self
New NcOptions, with all the options.
Arguments
-
loglevel
Progressively higher log levels result in more logging to stderr. By default, nothing is printed to stderr once fullscreen service begins.
-
margin_t, margin_r, margin_b, margin_l
Desirable margins (top, right, bottom, left).
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. Absolute coordinates are relative to the rendering area ((0, 0) is always the origin of the rendering area).
-
flags
General flags; This is expressed as a bitfield so that future options can be added without reshaping the struct. Undefined bits must be set to 0.
Trait Implementations
sourceimpl Debug for notcurses_options
impl Debug for notcurses_options
sourceimpl Default for notcurses_options
impl Default for notcurses_options
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