![]() |
Notcurses 3.0.16
a blingful library for TUIs and character graphics
|
#include "version.h"
#include "builddef.h"
#include "compat/compat.h"
#include "notcurses/ncport.h"
#include "notcurses/notcurses.h"
#include "notcurses/direct.h"
#include <term.h>
#include <time.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <signal.h>
#include <wctype.h>
#include <pthread.h>
#include <stdbool.h>
#include <inttypes.h>
#include <unictype.h>
#include <langinfo.h>
#include "lib/termdesc.h"
#include "lib/egcpool.h"
#include "lib/sprite.h"
#include "lib/fbuf.h"
#include "lib/gpm.h"
#include "blitset.h"
Go to the source code of this file.
Data Structures | |
struct | ncplane |
struct | rasterstate |
struct | nctablet |
struct | ncreel |
struct | ncfdplane |
struct | ncsubproc |
struct | ncreader |
struct | ncprogbar |
struct | nctab |
struct | ncsharedstats |
struct | ncdirect |
struct | crender |
struct | ncpile |
struct | notcurses |
struct | blitterargs |
struct | blitset |
struct | topolyfill |
struct | ncvisual_implementation |
Macros | |
#define | API __attribute__((visibility("default"))) |
#define | ALLOC __attribute__((malloc)) __attribute__((warn_unused_result)) |
#define | __STDC_FORMAT_MACROS |
#define | NC_BLITTERSTACK_MASK NC_NOBACKGROUND_MASK |
#define | SET_X10_MOUSE_PROT "9" |
#define | SET_X11_MOUSE_PROT "1000" |
#define | SET_HILITE_MOUSE_PROT "1001" |
#define | SET_BTN_EVENT_MOUSE "1002" |
#define | SET_ALL_EVENT_MOUSE "1003" |
#define | SET_FOCUS_EVENT_MOUSE "1004" |
#define | SET_UTF8_MOUSE_PROT "1005" |
#define | SET_SGR_MOUSE_PROT "1006" |
#define | SET_ALTERNATE_SCROLL "1007" |
#define | SET_TTYOUTPUT_SCROLL "1010" |
#define | SET_KEYPRESS_SCROLL "1011" |
#define | SET_URXVT_MOUSE_PROT "1015" |
#define | SET_PIXEL_MOUSE_PROT "1016" |
#define | SET_ENABLE_ALTSCREEN "1046" |
#define | SET_ALTERNATE_SCREEN "1047" |
#define | SET_SAVE_CURSOR "1048" |
#define | SET_SMCUP "1049" |
#define | DECSET(p) "\x1b[?" p "h" |
#define | DECRST(p) "\x1b[?" p "l" |
Typedefs | |
typedef struct ncplane | ncplane |
typedef struct rasterstate | rasterstate |
typedef struct nctablet | nctablet |
typedef struct ncreel | ncreel |
typedef struct ncfdplane | ncfdplane |
typedef struct ncsubproc | ncsubproc |
typedef struct ncreader | ncreader |
typedef struct ncprogbar | ncprogbar |
typedef struct nctab | nctab |
typedef struct ncsharedstats | ncsharedstats |
typedef struct ncdirect | ncdirect |
typedef struct ncpile | ncpile |
typedef struct notcurses | notcurses |
typedef struct blitterargs | blitterargs |
typedef struct ncvisual_implementation | ncvisual_implementation |
Functions | |
void | reset_stats (ncstats *stats) |
void | summarize_stats (notcurses *nc) |
void | update_raster_stats (const struct timespec *time1, const struct timespec *time0, ncstats *stats) |
void | update_render_stats (const struct timespec *time1, const struct timespec *time0, ncstats *stats) |
void | update_raster_bytes (ncstats *stats, int bytes) |
void | update_write_stats (const struct timespec *time1, const struct timespec *time0, ncstats *stats, int bytes) |
void | sigwinch_handler (int signo) |
void | init_lang (void) |
int | reset_term_attributes (const tinfo *ti, fbuf *f) |
int | reset_term_palette (const tinfo *ti, fbuf *f, unsigned touchedpalette) |
void | warn_terminfo (const notcurses *nc, const tinfo *ti) |
int | resize_callbacks_children (ncplane *n) |
int | ncvisual_init (int loglevel) |
int | clear_and_home (notcurses *nc, tinfo *ti, fbuf *f) |
int | sprite_wipe (const notcurses *nc, sprixel *s, int y, int x) |
void | sprixel_free (sprixel *s) |
void | sprixel_hide (sprixel *s) |
sprixel * | sprixel_alloc (ncplane *n, int dimy, int dimx) |
sprixel * | sprixel_recycle (ncplane *n) |
int | sprite_clear_all (const tinfo *t, fbuf *f) |
void | sprixel_invalidate (sprixel *s, int y, int x) |
void | sprixel_movefrom (sprixel *s, int y, int x) |
void | sprixel_debug (const sprixel *s, FILE *out) |
void | sixelmap_free (struct sixelmap *s) |
int | ncplane_resize_internal (ncplane *n, int keepy, int keepx, unsigned keepleny, unsigned keeplenx, int yoff, int xoff, unsigned ylen, unsigned xlen) |
int | update_term_dimensions (unsigned *rows, unsigned *cols, tinfo *tcache, int margin_b, unsigned *cgeo_changed, unsigned *pgeo_changed) __attribute__((nonnull(3 |
ALLOC void * | bgra_to_rgba (const void *data, int rows, int *rowstride, int cols, int alpha) |
ALLOC void * | rgb_loose_to_rgba (const void *data, int rows, int *rowstride, int cols, int alpha) |
ALLOC void * | rgb_packed_to_rgba (const void *data, int rows, int *rowstride, int cols, int alpha) |
int | ncvisual_bounding_box (const struct ncvisual *ncv, int *leny, int *lenx, int *offy, int *offx) |
ncplane * | ncplane_new_internal (notcurses *nc, ncplane *n, const ncplane_options *nopts) |
void | free_plane (ncplane *p) |
ALLOC char * | ncplane_vprintf_prep (const char *format, va_list ap) |
int | ncvisual_blit_internal (const struct ncvisual *ncv, int rows, int cols, ncplane *n, const struct blitset *bset, const blitterargs *bargs) |
int | set_fd_nonblocking (int fd, unsigned state, unsigned *oldstate) |
int | mouse_setup (tinfo *ti, unsigned eventmask) |
void | scroll_down (ncplane *n) |
int | get_tty_fd (FILE *ttyfp) |
bool | check_gradient_args (uint64_t ul, uint64_t ur, uint64_t bl, uint64_t br) |
void | ncvisual_printbanner (fbuf *f) |
int | ncdirect_set_fg_rgb_f (ncdirect *nc, unsigned rgb, fbuf *f) |
int | ncdirect_set_bg_rgb_f (ncdirect *nc, unsigned rgb, fbuf *f) |
int | term_fg_rgb8 (const tinfo *ti, fbuf *f, unsigned r, unsigned g, unsigned b) |
const struct blitset * | lookup_blitset (const tinfo *tcache, ncblitter_e setid, bool may_degrade) |
int | ncvisual_geom_inner (const tinfo *ti, const struct ncvisual *n, const struct ncvisual_options *vopts, ncvgeom *geom, const struct blitset **bset, unsigned *disppxy, unsigned *disppxx, unsigned *outy, unsigned *outx, int *placey, int *placex) |
int | putenv_term (const char *termname) __attribute__((nonnull(1))) |
int | set_loglevel_from_env (ncloglevel_e *loglevel) __attribute__((nonnull(1))) |
void | ncmetric_use_utf8 (void) |
Variables | |
API ncvisual_implementation * | visual_implementation |
#define __STDC_FORMAT_MACROS |
Definition at line 39 of file internal.h.
#define ALLOC __attribute__((malloc)) __attribute__((warn_unused_result)) |
Definition at line 20 of file internal.h.
#define API __attribute__((visibility("default"))) |
Definition at line 16 of file internal.h.
#define DECRST | ( | p | ) | "\x1b[?" p "l" |
Definition at line 1195 of file internal.h.
#define DECSET | ( | p | ) | "\x1b[?" p "h" |
Definition at line 1194 of file internal.h.
#define NC_BLITTERSTACK_MASK NC_NOBACKGROUND_MASK |
Definition at line 57 of file internal.h.
#define SET_ALL_EVENT_MOUSE "1003" |
Definition at line 1180 of file internal.h.
#define SET_ALTERNATE_SCREEN "1047" |
Definition at line 1190 of file internal.h.
#define SET_ALTERNATE_SCROLL "1007" |
Definition at line 1184 of file internal.h.
#define SET_BTN_EVENT_MOUSE "1002" |
Definition at line 1179 of file internal.h.
#define SET_ENABLE_ALTSCREEN "1046" |
Definition at line 1189 of file internal.h.
#define SET_FOCUS_EVENT_MOUSE "1004" |
Definition at line 1181 of file internal.h.
#define SET_HILITE_MOUSE_PROT "1001" |
Definition at line 1178 of file internal.h.
#define SET_KEYPRESS_SCROLL "1011" |
Definition at line 1186 of file internal.h.
#define SET_PIXEL_MOUSE_PROT "1016" |
Definition at line 1188 of file internal.h.
#define SET_SAVE_CURSOR "1048" |
Definition at line 1191 of file internal.h.
#define SET_SGR_MOUSE_PROT "1006" |
Definition at line 1183 of file internal.h.
#define SET_SMCUP "1049" |
Definition at line 1192 of file internal.h.
#define SET_TTYOUTPUT_SCROLL "1010" |
Definition at line 1185 of file internal.h.
#define SET_URXVT_MOUSE_PROT "1015" |
Definition at line 1187 of file internal.h.
#define SET_UTF8_MOUSE_PROT "1005" |
Definition at line 1182 of file internal.h.
#define SET_X10_MOUSE_PROT "9" |
Definition at line 1175 of file internal.h.
#define SET_X11_MOUSE_PROT "1000" |
Definition at line 1177 of file internal.h.
typedef struct blitterargs blitterargs |
typedef struct ncsharedstats ncsharedstats |
typedef struct ncvisual_implementation ncvisual_implementation |
typedef struct rasterstate rasterstate |
ALLOC void * bgra_to_rgba | ( | const void * | data, |
int | rows, | ||
int * | rowstride, | ||
int | cols, | ||
int | alpha | ||
) |
Definition at line 508 of file visual.c.
bool check_gradient_args | ( | uint64_t | ul, |
uint64_t | ur, | ||
uint64_t | bl, | ||
uint64_t | br | ||
) |
Definition at line 1399 of file render.c.
void free_plane | ( | ncplane * | p | ) |
Definition at line 467 of file notcurses.c.
int get_tty_fd | ( | FILE * | ttyfp | ) |
Definition at line 455 of file fd.c.
void init_lang | ( | void | ) |
Definition at line 1097 of file notcurses.c.
const struct blitset * lookup_blitset | ( | const tinfo * | tcache, |
ncblitter_e | setid, | ||
bool | may_degrade | ||
) |
Definition at line 1297 of file blit.c.
int mouse_setup | ( | tinfo * | ti, |
unsigned | eventmask | ||
) |
Definition at line 3 of file mice.c.
Definition at line 1652 of file render.c.
Definition at line 1682 of file render.c.
void ncmetric_use_utf8 | ( | void | ) |
ncplane * ncplane_new_internal | ( | notcurses * | nc, |
ncplane * | n, | ||
const ncplane_options * | nopts | ||
) |
Definition at line 560 of file notcurses.c.
int ncplane_resize_internal | ( | ncplane * | n, |
int | keepy, | ||
int | keepx, | ||
unsigned | keepleny, | ||
unsigned | keeplenx, | ||
int | yoff, | ||
int | xoff, | ||
unsigned | ylen, | ||
unsigned | xlen | ||
) |
Definition at line 857 of file notcurses.c.
ALLOC char * ncplane_vprintf_prep | ( | const char * | format, |
va_list | ap | ||
) |
Definition at line 2093 of file notcurses.c.
int ncvisual_blit_internal | ( | const struct ncvisual * | ncv, |
int | rows, | ||
int | cols, | ||
ncplane * | n, | ||
const struct blitset * | bset, | ||
const blitterargs * | bargs | ||
) |
int ncvisual_bounding_box | ( | const struct ncvisual * | ncv, |
int * | leny, | ||
int * | lenx, | ||
int * | offy, | ||
int * | offx | ||
) |
int ncvisual_geom_inner | ( | const tinfo * | ti, |
const struct ncvisual * | n, | ||
const struct ncvisual_options * | vopts, | ||
ncvgeom * | geom, | ||
const struct blitset ** | bset, | ||
unsigned * | disppxy, | ||
unsigned * | disppxx, | ||
unsigned * | outy, | ||
unsigned * | outx, | ||
int * | placey, | ||
int * | placex | ||
) |
int ncvisual_init | ( | int | loglevel | ) |
void ncvisual_printbanner | ( | fbuf * | f | ) |
Definition at line 30 of file visual.c.
int putenv_term | ( | const char * | termname | ) |
Definition at line 1655 of file termdesc.c.
void reset_stats | ( | ncstats * | stats | ) |
Definition at line 74 of file stats.c.
Definition at line 60 of file notcurses.c.
Definition at line 78 of file notcurses.c.
int resize_callbacks_children | ( | ncplane * | n | ) |
Definition at line 804 of file notcurses.c.
ALLOC void * rgb_loose_to_rgba | ( | const void * | data, |
int | rows, | ||
int * | rowstride, | ||
int | cols, | ||
int | alpha | ||
) |
Definition at line 461 of file visual.c.
ALLOC void * rgb_packed_to_rgba | ( | const void * | data, |
int | rows, | ||
int * | rowstride, | ||
int | cols, | ||
int | alpha | ||
) |
Definition at line 486 of file visual.c.
void scroll_down | ( | ncplane * | n | ) |
Definition at line 1761 of file notcurses.c.
int set_fd_nonblocking | ( | int | fd, |
unsigned | state, | ||
unsigned * | oldstate | ||
) |
int set_loglevel_from_env | ( | ncloglevel_e * | loglevel | ) |
void sigwinch_handler | ( | int | signo | ) |
Definition at line 31 of file in.c.
void sixelmap_free | ( | struct sixelmap * | s | ) |
Definition at line 170 of file sprite.c.
Definition at line 117 of file sprite.c.
void sprixel_debug | ( | const sprixel * | s, |
FILE * | out | ||
) |
void sprixel_free | ( | sprixel * | s | ) |
Definition at line 38 of file sprite.c.
void sprixel_hide | ( | sprixel * | s | ) |
Definition at line 83 of file sprite.c.
void sprixel_invalidate | ( | sprixel * | s, |
int | y, | ||
int | x | ||
) |
void sprixel_movefrom | ( | sprixel * | s, |
int | y, | ||
int | x | ||
) |
Definition at line 68 of file sprite.c.
Definition at line 51 of file sprite.c.
void summarize_stats | ( | notcurses * | nc | ) |
Definition at line 166 of file stats.c.
Definition at line 743 of file render.c.
void update_raster_bytes | ( | ncstats * | stats, |
int | bytes | ||
) |
Definition at line 27 of file stats.c.
void update_raster_stats | ( | const struct timespec * | time1, |
const struct timespec * | time0, | ||
ncstats * | stats | ||
) |
Definition at line 58 of file stats.c.
void update_render_stats | ( | const struct timespec * | time1, |
const struct timespec * | time0, | ||
ncstats * | stats | ||
) |
Definition at line 40 of file stats.c.
int update_term_dimensions | ( | unsigned * | rows, |
unsigned * | cols, | ||
tinfo * | tcache, | ||
int | margin_b, | ||
unsigned * | cgeo_changed, | ||
unsigned * | pgeo_changed | ||
) |
void update_write_stats | ( | const struct timespec * | time1, |
const struct timespec * | time0, | ||
ncstats * | stats, | ||
int | bytes | ||
) |
Definition at line 5 of file stats.c.
|
extern |