Type Definition libnotcurses_sys::NcOptions [−][src]
pub type NcOptions = notcurses_options;Expand description
Options struct for Nc
Implementations
New NcOptions, with margins.
New NcOptions, with flags.
pub const fn with_all_options(
loglevel: NcLogLevel,
margin_t: NcDim,
margin_r: NcDim,
margin_b: NcDim,
margin_l: NcDim,
flags: u64
) -> Self
pub const fn with_all_options(
loglevel: NcLogLevel,
margin_t: NcDim,
margin_r: NcDim,
margin_b: NcDim,
margin_l: NcDim,
flags: u64
) -> 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.
Input may be freely dropped.
This ought be provided when the program does not intend to handle input. Otherwise, input can accumulate in internal buffers, eventually preventing Notcurses from processing terminal messages.
Do not call setlocale()
notcurses_init() will call setlocale() to inspect the current locale. If that locale is “C” or “POSIX”, it will call setlocale(LC_ALL, “”) to set the locale according to the LANG environment variable. Ideally, this will result in UTF8 being enabled, even if the client app didn’t call setlocale() itself. Unless you’re certain that you’re invoking setlocale() 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).
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.
Do not try to clear any preexisting bitmaps.
Note that they might still get cleared even if this is set, and they might not get cleared even if this is not set.
Do not modify the font.
Notcurses might attempt to change the font slightly, to support certain 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.
Do not handle SIG{ING, SEGV, ABRT, QUIT}.
A signal handler will usually be installed for SIGABRT, SIGBUS,
SIGFPE, SIGILL, SIGINT, SIGQUIT, SIGSEGV and SIGTERM,
cleaning up the terminal on such exceptions.
With this flag, the handler will not be installed.
Do not handle SIGWINCH.
A signal handler will usually be installed for SIGWINCH, resulting in NCKEY_RESIZE events being generated on input. With this flag, the handler will not be installed.
Initialize the standard plane’s virtual cursor to match the physical cursor at context creation time.
Together with
NcOptions::NO_ALTERNATE_SCREEN
and a scrolling standard plane,
this facilitates easy scrolling-style programs in rendered mode.
Do not print banners.
Notcurses typically prints version info in notcurses_init() and performance info in notcurses_stop(). This inhibits that output.
