Notcurses 3.0.13
a blingful library for TUIs and character graphics
Loading...
Searching...
No Matches
direct.h
Go to the documentation of this file.
1#ifndef NOTCURSES_DIRECT
2#define NOTCURSES_DIRECT
3
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#ifdef NOTCURSES_FFI
11#define static API
12#endif
13
14#ifndef __MINGW32__
15#define API __attribute__((visibility("default")))
16#else
17#define API __declspec(dllexport)
18#endif
19#define ALLOC __attribute__((malloc)) __attribute__((warn_unused_result))
20
21// ncdirect_init() will call setlocale() to inspect the current locale. If
22// that locale is "C" or "POSIX", it will call setlocale(LC_ALL, "") to set
23// the locale according to the LANG environment variable. Ideally, this will
24// result in UTF8 being enabled, even if the client app didn't call
25// setlocale() itself. Unless you're certain that you're invoking setlocale()
26// prior to notcurses_init(), you should not set this bit. Even if you are
27// invoking setlocale(), this behavior shouldn't be an issue unless you're
28// doing something weird (setting a locale not based on LANG).
29#define NCDIRECT_OPTION_INHIBIT_SETLOCALE 0x0001ull
30
31// *Don't* place the terminal into cbreak mode (see tcgetattr(3)). By default,
32// echo and input's line buffering are turned off.
33#define NCDIRECT_OPTION_INHIBIT_CBREAK 0x0002ull
34
35// Input may be freely dropped. This ought be provided when the program does not
36// intend to handle input. Otherwise, input can accumulate in internal buffers,
37// eventually preventing Notcurses from processing terminal messages.
38#define NCDIRECT_OPTION_DRAIN_INPUT 0x0004ull
39
40// We typically install a signal handler for SIG{INT, SEGV, ABRT, QUIT} that
41// restores the screen, and then calls the old signal handler. Set to inhibit
42// registration of these signal handlers. Chosen to match fullscreen mode.
43#define NCDIRECT_OPTION_NO_QUIT_SIGHANDLERS 0x0008ull
44
45// Enable logging (to stderr) at the NCLOGLEVEL_WARNING level.
46#define NCDIRECT_OPTION_VERBOSE 0x0010ull
47
48// Enable logging (to stderr) at the NCLOGLEVEL_TRACE level. This will enable
49// all diagnostics, a superset of NCDIRECT_OPTION_VERBOSE (which this implies).
50#define NCDIRECT_OPTION_VERY_VERBOSE 0x0020ull
51
52// Initialize a direct-mode Notcurses context on the connected terminal at 'fp'.
53// 'fp' must be a tty. You'll usually want stdout. Direct mode supports a
54// limited subset of Notcurses routines which directly affect 'fp', and neither
55// supports nor requires notcurses_render(). This can be used to add color and
56// styling to text in the standard output paradigm. 'flags' is a bitmask over
57// NCDIRECT_OPTION_*.
58// Returns NULL on error, including any failure initializing terminfo.
59API ALLOC struct ncdirect* ncdirect_init(const char* termtype, FILE* fp, uint64_t flags);
60
61// The same as ncdirect_init(), but without any multimedia functionality,
62// allowing for a svelter binary. Link with notcurses-core if this is used.
63API ALLOC struct ncdirect* ncdirect_core_init(const char* termtype, FILE* fp, uint64_t flags);
64
65// Read a (heap-allocated) newline-delimited chunk of text, after printing the
66// prompt. The newline itself, if present, is included. Returns NULL on error.
67__attribute__ ((nonnull (1)))
68API ALLOC char* ncdirect_readline(struct ncdirect* nc, const char* prompt);
69
70// Direct mode. This API can be used to colorize and stylize output generated
71// outside of notcurses, without ever calling notcurses_render(). These should
72// not be intermixed with standard Notcurses rendering.
73API int ncdirect_set_fg_rgb(struct ncdirect* nc, unsigned rgb)
74 __attribute__ ((nonnull (1)));
75API int ncdirect_set_bg_rgb(struct ncdirect* nc, unsigned rgb)
76 __attribute__ ((nonnull (1)));
77
78API int ncdirect_set_fg_palindex(struct ncdirect* nc, int pidx)
79 __attribute__ ((nonnull (1)));
80API int ncdirect_set_bg_palindex(struct ncdirect* nc, int pidx)
81 __attribute__ ((nonnull (1)));
82
83// Returns the number of simultaneous colors claimed to be supported, or 1 if
84// there is no color support. Note that several terminal emulators advertise
85// more colors than they actually support, downsampling internally.
86API unsigned ncdirect_palette_size(const struct ncdirect* nc)
87 __attribute__ ((nonnull (1)));
88
89// Output the string |utf8| according to the channels |channels|. Note that
90// ncdirect_putstr() does not explicitly flush output buffers, so it will not
91// necessarily be immediately visible. Returns EOF on error.
92API int ncdirect_putstr(struct ncdirect* nc, uint64_t channels, const char* utf8)
93 __attribute__ ((nonnull (1, 3)));
94
95// Output a single EGC (this might be several characters) from |utf8|,
96// according to the channels |channels|. On success, the number of columns
97// thought to have been used is returned, and if |sbytes| is not NULL,
98// the number of bytes consumed will be written there.
99API int ncdirect_putegc(struct ncdirect* nc, uint64_t channels,
100 const char* utf8, int* sbytes)
101 __attribute__ ((nonnull (1, 3)));
102
103// Formatted printing (plus alignment relative to the terminal). Returns the
104// number of columns printed on success.
106 const char* fmt, ...)
107 __attribute__ ((nonnull (1, 4))) __attribute__ ((format (printf, 4, 5)));
108
109// Force a flush. Returns 0 on success, -1 on failure.
110API int ncdirect_flush(const struct ncdirect* nc)
111 __attribute__ ((nonnull (1)));
112
113static inline int
114ncdirect_set_bg_rgb8(struct ncdirect* nc, unsigned r, unsigned g, unsigned b){
115 if(r > 255 || g > 255 || b > 255){
116 return -1;
117 }
118 return ncdirect_set_bg_rgb(nc, (r << 16u) + (g << 8u) + b);
119}
120
121static inline int
122ncdirect_set_fg_rgb8(struct ncdirect* nc, unsigned r, unsigned g, unsigned b){
123 if(r > 255 || g > 255 || b > 255){
124 return -1;
125 }
126 return ncdirect_set_fg_rgb(nc, (r << 16u) + (g << 8u) + b);
127}
128
130 __attribute__ ((nonnull (1)));
132 __attribute__ ((nonnull (1)));
133
134// Get the current number of columns/rows.
135API unsigned ncdirect_dim_x(struct ncdirect* nc) __attribute__ ((nonnull (1)));
136API unsigned ncdirect_dim_y(struct ncdirect* nc) __attribute__ ((nonnull (1)));
137
138// Returns a 16-bit bitmask of supported curses-style attributes
139// (NCSTYLE_UNDERLINE, NCSTYLE_BOLD, etc.) The attribute is only
140// indicated as supported if the terminal can support it together with color.
141// For more information, see the "ncv" capability in terminfo(5).
142API uint16_t ncdirect_supported_styles(const struct ncdirect* nc)
143 __attribute__ ((nonnull (1)));
144
145// ncplane_styles_*() analogues
146API int ncdirect_set_styles(struct ncdirect* n, unsigned stylebits)
147 __attribute__ ((nonnull (1)));
148API int ncdirect_on_styles(struct ncdirect* n, unsigned stylebits)
149 __attribute__ ((nonnull (1)));
150API int ncdirect_off_styles(struct ncdirect* n, unsigned stylebits)
151 __attribute__ ((nonnull (1)));
152API uint16_t ncdirect_styles(const struct ncdirect* n)
153 __attribute__ ((nonnull (1)));
154
155// Move the cursor in direct mode. -1 to retain current location on that axis.
156API int ncdirect_cursor_move_yx(struct ncdirect* n, int y, int x)
157 __attribute__ ((nonnull (1)));
158API int ncdirect_cursor_enable(struct ncdirect* nc)
159 __attribute__ ((nonnull (1)));
161 __attribute__ ((nonnull (1)));
162API int ncdirect_cursor_up(struct ncdirect* nc, int num)
163 __attribute__ ((nonnull (1)));
164API int ncdirect_cursor_left(struct ncdirect* nc, int num)
165 __attribute__ ((nonnull (1)));
166API int ncdirect_cursor_right(struct ncdirect* nc, int num)
167 __attribute__ ((nonnull (1)));
168API int ncdirect_cursor_down(struct ncdirect* nc, int num)
169 __attribute__ ((nonnull (1)));
170
171// Get the cursor position, when supported. This requires writing to the
172// terminal, and then reading from it. If the terminal doesn't reply, or
173// doesn't reply in a way we understand, the results might be deleterious.
174API int ncdirect_cursor_yx(struct ncdirect* n, unsigned* y, unsigned* x)
175 __attribute__ ((nonnull (1)));
176
177// Push or pop the cursor location to the terminal's stack. The depth of this
178// stack, and indeed its existence, is terminal-dependent.
180 __attribute__ ((nonnull (1)));
181
183 __attribute__ ((nonnull (1)));
184
185// Clear the screen.
186API int ncdirect_clear(struct ncdirect* nc)
187 __attribute__ ((nonnull (1)));
188
190 __attribute__ ((nonnull (1)));
191
192// Draw horizontal/vertical lines using the specified channels, interpolating
193// between them as we go. The EGC may not use more than one column. For a
194// horizontal line, |len| cannot exceed the screen width minus the cursor's
195// offset. For a vertical line, it may be as long as you'd like; the screen
196// will scroll as necessary. All lines start at the current cursor position.
197API int ncdirect_hline_interp(struct ncdirect* n, const char* egc,
198 unsigned len, uint64_t h1, uint64_t h2)
199 __attribute__ ((nonnull (1, 2)));
200
201API int ncdirect_vline_interp(struct ncdirect* n, const char* egc,
202 unsigned len, uint64_t h1, uint64_t h2)
203 __attribute__ ((nonnull (1, 2)));
204
205// Draw a box with its upper-left corner at the current cursor position, having
206// dimensions |ylen|x|xlen|. See ncplane_box() for more information. The
207// minimum box size is 2x2, and it cannot be drawn off-screen. |wchars| is an
208// array of 6 wide characters: UL, UR, LL, LR, HL, VL.
209API int ncdirect_box(struct ncdirect* n, uint64_t ul, uint64_t ur,
210 uint64_t ll, uint64_t lr, const wchar_t* wchars,
211 unsigned ylen, unsigned xlen, unsigned ctlword)
212 __attribute__ ((nonnull (1, 6)));
213
214__attribute__ ((nonnull (1))) static inline int
215ncdirect_light_box(struct ncdirect* n, uint64_t ul, uint64_t ur,
216 uint64_t ll, uint64_t lr,
217 unsigned ylen, unsigned xlen, unsigned ctlword){
219}
220
221__attribute__ ((nonnull (1))) static inline int
222ncdirect_heavy_box(struct ncdirect* n, uint64_t ul, uint64_t ur,
223 uint64_t ll, uint64_t lr,
224 unsigned ylen, unsigned xlen, unsigned ctlword){
226}
227
228__attribute__ ((nonnull (1))) static inline int
229ncdirect_ascii_box(struct ncdirect* n, uint64_t ul, uint64_t ur,
230 uint64_t ll, uint64_t lr,
231 unsigned ylen, unsigned xlen, unsigned ctlword){
233}
234
235// ncdirect_box() with the rounded box-drawing characters
236API int ncdirect_rounded_box(struct ncdirect* n, uint64_t ul, uint64_t ur,
237 uint64_t ll, uint64_t lr,
238 unsigned ylen, unsigned xlen, unsigned ctlword)
239 __attribute__ ((nonnull (1)));
240
241// ncdirect_box() with the double box-drawing characters
242API int ncdirect_double_box(struct ncdirect* n, uint64_t ul, uint64_t ur,
243 uint64_t ll, uint64_t lr,
244 unsigned ylen, unsigned xlen, unsigned ctlword)
245 __attribute__ ((nonnull (1)));
246
247// Provide a NULL 'ts' to block at length, a 'ts' of 0 for non-blocking
248// operation, and otherwise an absolute deadline in terms of CLOCK_MONOTONIC.
249// Returns a single Unicode code point, a synthesized special key constant,
250// or (uint32_t)-1 on error. Returns 0 on a timeout. If an event is processed,
251// the return value is the 'id' field from that event. 'ni' may be NULL.
252API uint32_t ncdirect_get(struct ncdirect* n, const struct timespec* absdl,
253 ncinput* ni)
254 __attribute__ ((nonnull (1)));
255
256// Get a file descriptor suitable for input event poll()ing. When this
257// descriptor becomes available, you can call ncdirect_get_nblock(),
258// and input ought be ready. This file descriptor is *not* necessarily
259// the file descriptor associated with stdin (but it might be!).
261 __attribute__ ((nonnull (1)));
262
263// 'ni' may be NULL if the caller is uninterested in event details. If no event
264// is ready, returns 0.
265static inline uint32_t
266ncdirect_get_nblock(struct ncdirect* n, ncinput* ni){
267 struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 };
268 return ncdirect_get(n, &ts, ni);
269}
270
271// 'ni' may be NULL if the caller is uninterested in event details. Blocks
272// until an event is processed or a signal is received.
273static inline uint32_t
274ncdirect_get_blocking(struct ncdirect* n, ncinput* ni){
275 return ncdirect_get(n, NULL, ni);
276}
277
278// Release 'nc' and any associated resources. 0 on success, non-0 on failure.
279API int ncdirect_stop(struct ncdirect* nc);
280
281typedef struct ncplane ncdirectv;
282typedef struct ncvisual ncdirectf;
283
284// Display an image using the specified blitter and scaling. The image may
285// be arbitrarily many rows -- the output will scroll -- but will only occupy
286// the column of the cursor, and those to the right. The render/raster process
287// can be split by using ncdirect_render_frame() and ncdirect_raster_frame().
288API int ncdirect_render_image(struct ncdirect* n, const char* filename,
289 ncalign_e align, ncblitter_e blitter,
290 ncscale_e scale)
291 __attribute__ ((nonnull (1, 2)));
292
293// Render an image using the specified blitter and scaling, but do not write
294// the result. The image may be arbitrarily many rows -- the output will scroll
295// -- but will only occupy the column of the cursor, and those to the right.
296// To actually write (and free) this, invoke ncdirect_raster_frame(). 'maxx'
297// and 'maxy' (cell geometry, *not* pixel), if greater than 0, are used for
298// scaling; the terminal's geometry is otherwise used.
299API ALLOC ncdirectv* ncdirect_render_frame(struct ncdirect* n, const char* filename,
300 ncblitter_e blitter, ncscale_e scale,
301 int maxy, int maxx)
302 __attribute__ ((nonnull (1, 2)));
303
304// Takes the result of ncdirect_render_frame() and writes it to the output,
305// freeing it on all paths.
307 __attribute__ ((nonnull (1, 2)));
308
309// Load media from disk, but do not yet render it (presumably because you want
310// to get its geometry via ncdirectf_geom(), or to use the same file with
311// ncdirect_render_loaded_frame() multiple times). You must destroy the result
312// with ncdirectf_free();
313API ALLOC ncdirectf* ncdirectf_from_file(struct ncdirect* n, const char* filename)
314 __attribute__ ((nonnull (1, 2)));
315
316// Free a ncdirectf returned from ncdirectf_from_file().
317API void ncdirectf_free(ncdirectf* frame);
318
319// Same as ncdirect_render_frame(), except 'frame' must already have been
320// loaded. A loaded frame may be rendered in different ways before it is
321// destroyed.
323 const struct ncvisual_options* vopts)
324 __attribute__ ((nonnull (1, 2)));
325
326// Having loaded the frame 'frame', get the geometry of a potential render.
328 const struct ncvisual_options* vopts, ncvgeom* geom)
329 __attribute__ ((nonnull (1, 2)));
330
331// Load successive frames from a file, invoking 'streamer' on each.
332API int ncdirect_stream(struct ncdirect* n, const char* filename, ncstreamcb streamer,
333 struct ncvisual_options* vopts, void* curry)
334 __attribute__ ((nonnull (1, 2)));
335
336// Capabilites
337
339 __attribute__ ((nonnull (1)));
340
341// Can we directly specify RGB values per cell, or only use palettes?
342static inline bool
343ncdirect_cantruecolor(const struct ncdirect* n){
344 return ncdirect_capabilities(n)->rgb;
345}
346
347// Can we set the "hardware" palette? Requires the "ccc" terminfo capability.
348static inline bool
349ncdirect_canchangecolor(const struct ncdirect* n){
350 return nccapability_canchangecolor(ncdirect_capabilities(n));
351}
352
353// Can we fade? Fading requires either the "rgb" or "ccc" terminfo capability.
354static inline bool
355ncdirect_canfade(const struct ncdirect* n){
356 return ncdirect_canchangecolor(n) || ncdirect_cantruecolor(n);
357}
358
359// Can we load images? This requires being built against FFmpeg/OIIO.
360static inline bool
361ncdirect_canopen_images(const struct ncdirect* n __attribute__ ((unused))){
363}
364
365// Can we load videos? This requires being built against FFmpeg.
366static inline bool
367ncdirect_canopen_videos(const struct ncdirect* n __attribute__ ((unused))){
369}
370
371// Is our encoding UTF-8? Requires LANG being set to a UTF8 locale.
372API bool ncdirect_canutf8(const struct ncdirect* n)
373 __attribute__ ((nonnull (1)));
374
375// Can we blit pixel-accurate bitmaps?
377 __attribute__ ((nonnull (1)));
378
379// Can we reliably use Unicode halfblocks?
380static inline bool
381ncdirect_canhalfblock(const struct ncdirect* nc){
382 return ncdirect_canutf8(nc);
383}
384
385// Can we reliably use Unicode quadrants?
386static inline bool
387ncdirect_canquadrant(const struct ncdirect* nc){
389}
390
391// Can we reliably use Unicode 13 sextants?
392static inline bool
393ncdirect_cansextant(const struct ncdirect* nc){
395}
396
397// Can we reliably use Unicode 16 octants?
398static inline bool
399ncdirect_canoctant(const struct ncdirect* nc){
401}
402
403// Can we reliably use Unicode Braille?
404static inline bool
405ncdirect_canbraille(const struct ncdirect* nc){
407}
408
409// Is there support for acquiring the cursor's current position? Requires the
410// u7 terminfo capability, and that we are connected to an actual terminal.
411API bool ncdirect_canget_cursor(const struct ncdirect* nc)
412 __attribute__ ((nonnull (1)));
413
414#undef API
415#undef ALLOC
416
417#ifdef __cplusplus
418}
419#endif
420
421#endif
char * ncdirect_readline(ncdirect *n, const char *prompt)
Definition direct.c:982
API int ncdirect_cursor_push(struct ncdirect *n) __attribute__((nonnull(1)))
Definition direct.c:395
API int API int API int uint64_t uint64_t uint64_t uint64_t lr
Definition direct.h:216
API int ncdirect_rounded_box(struct ncdirect *n, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr, unsigned ylen, unsigned xlen, unsigned ctlword) __attribute__((nonnull(1)))
Definition direct.c:1506
API int API ALLOC ncdirectv API int ncdirect_raster_frame(struct ncdirect *n, ncdirectv *ncdv, ncalign_e align) __attribute__((nonnull(1
API unsigned ncdirect_palette_size(const struct ncdirect *nc) __attribute__((nonnull(1)))
API int ncdirect_off_styles(struct ncdirect *n, unsigned stylebits) __attribute__((nonnull(1)))
Definition direct.c:1186
API ALLOC struct ncdirect * ncdirect_core_init(const char *termtype, FILE *fp, uint64_t flags)
Definition direct.c:868
#define ALLOC
Definition direct.h:19
API ALLOC ncdirectv API int API int ncdirect_stream(struct ncdirect *n, const char *filename, ncstreamcb streamer, struct ncvisual_options *vopts, void *curry) __attribute__((nonnull(1
API ALLOC ncdirectv API int API int ALLOC API char * ncdirect_detected_terminal(const struct ncdirect *n) __attribute__((nonnull(1)))
API ALLOC ncdirectv * ncdirectf_render(struct ncdirect *n, ncdirectf *frame, const struct ncvisual_options *vopts) __attribute__((nonnull(1
API int API int ncdirect_putegc(struct ncdirect *nc, uint64_t channels, const char *utf8, int *sbytes) __attribute__((nonnull(1
API ALLOC ncdirectv API int ncdirectf_geom(struct ncdirect *n, ncdirectf *frame, const struct ncvisual_options *vopts, ncvgeom *geom) __attribute__((nonnull(1
API unsigned ncdirect_dim_y(struct ncdirect *nc) __attribute__((nonnull(1)))
Definition direct.c:161
API int API ALLOC ncdirectv * ncdirect_render_frame(struct ncdirect *n, const char *filename, ncblitter_e blitter, ncscale_e scale, int maxy, int maxx) __attribute__((nonnull(1
API int ncdirect_check_pixel_support(const struct ncdirect *n) __attribute__((nonnull(1)))
API int ncdirect_set_fg_default(struct ncdirect *nc) __attribute__((nonnull(1)))
Definition direct.c:1226
API const nccapabilities * ncdirect_capabilities(const struct ncdirect *n) __attribute__((nonnull(1)))
API int ncdirect_cursor_enable(struct ncdirect *nc) __attribute__((nonnull(1)))
Definition direct.c:174
API int ncdirect_set_styles(struct ncdirect *n, unsigned stylebits) __attribute__((nonnull(1)))
Definition direct.c:1203
const char * prompt
Definition direct.h:68
API int API int ncdirect_vline_interp(struct ncdirect *n, const char *egc, unsigned len, uint64_t h1, uint64_t h2) __attribute__((nonnull(1
API int ncdirect_stop(struct ncdirect *nc)
Definition direct.c:954
API uint16_t ncdirect_styles(const struct ncdirect *n) __attribute__((nonnull(1)))
API int ncdirect_cursor_move_yx(struct ncdirect *n, int y, int x) __attribute__((nonnull(1)))
Definition direct.c:216
API int API int API int uint64_t uint64_t uint64_t uint64_t unsigned unsigned unsigned ctlword
Definition direct.h:217
API int ncdirect_putstr(struct ncdirect *nc, uint64_t channels, const char *utf8) __attribute__((nonnull(1
API bool ncdirect_canget_cursor(const struct ncdirect *nc) __attribute__((nonnull(1)))
API int API int API int uint64_t uint64_t uint64_t ll
Definition direct.h:216
API int ncdirect_on_styles(struct ncdirect *n, unsigned stylebits) __attribute__((nonnull(1)))
Definition direct.c:1162
API int ncdirect_cursor_down(struct ncdirect *nc, int num) __attribute__((nonnull(1)))
Definition direct.c:117
API int API int API int ncdirect_printf_aligned(struct ncdirect *n, int y, ncalign_e align, const char *fmt,...) __attribute__((nonnull(1
API uint32_t ncdirect_get(struct ncdirect *n, const struct timespec *absdl, ncinput *ni) __attribute__((nonnull(1)))
Definition in.c:2773
API bool ncdirect_canutf8(const struct ncdirect *n) __attribute__((nonnull(1)))
API int ncdirect_set_bg_default(struct ncdirect *nc) __attribute__((nonnull(1)))
Definition direct.c:1249
__attribute__((nonnull(1))) API ALLOC char *ncdirect_readline(struct ncdirect *nc
Definition notcurses.h:1699
API int ncdirect_set_fg_palindex(struct ncdirect *nc, int pidx) __attribute__((nonnull(1)))
Definition direct.c:781
API int ncdirect_cursor_yx(struct ncdirect *n, unsigned *y, unsigned *x) __attribute__((nonnull(1)))
Definition direct.c:375
API int API ALLOC ncdirectv API int API ALLOC ncdirectf API void ncdirectf_free(ncdirectf *frame)
Definition direct.c:1597
API uint16_t ncdirect_supported_styles(const struct ncdirect *nc) __attribute__((nonnull(1)))
API int ncdirect_inputready_fd(struct ncdirect *n) __attribute__((nonnull(1)))
Definition notcurses.c:3095
API int ncdirect_hline_interp(struct ncdirect *n, const char *egc, unsigned len, uint64_t h1, uint64_t h2) __attribute__((nonnull(1
API ALLOC struct ncdirect * ncdirect_init(const char *termtype, FILE *fp, uint64_t flags)
API int ncdirect_clear(struct ncdirect *nc) __attribute__((nonnull(1)))
Definition direct.c:140
API int ncdirect_set_bg_rgb(struct ncdirect *nc, unsigned rgb) __attribute__((nonnull(1)))
Definition render.c:1667
API int API int API int uint64_t uint64_t uint64_t uint64_t unsigned unsigned xlen
Definition direct.h:217
API int API int API int ncdirect_box(struct ncdirect *n, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr, const wchar_t *wchars, unsigned ylen, unsigned xlen, unsigned ctlword) __attribute__((nonnull(1
API int API ALLOC ncdirectv API int API ALLOC ncdirectf * ncdirectf_from_file(struct ncdirect *n, const char *filename) __attribute__((nonnull(1
API int ncdirect_cursor_right(struct ncdirect *nc, int num) __attribute__((nonnull(1)))
Definition direct.c:98
API int API int API int uint64_t uint64_t uint64_t uint64_t unsigned ylen
Definition direct.h:217
#define API
Definition direct.h:15
API int ncdirect_set_bg_palindex(struct ncdirect *nc, int pidx) __attribute__((nonnull(1)))
Definition direct.c:792
API int ncdirect_cursor_pop(struct ncdirect *n) __attribute__((nonnull(1)))
Definition direct.c:403
API int ncdirect_set_fg_rgb(struct ncdirect *nc, unsigned rgb) __attribute__((nonnull(1)))
Definition render.c:1697
API unsigned ncdirect_dim_x(struct ncdirect *nc) __attribute__((nonnull(1)))
Definition direct.c:148
API int ncdirect_cursor_up(struct ncdirect *nc, int num) __attribute__((nonnull(1)))
Definition direct.c:68
API int ncdirect_render_image(struct ncdirect *n, const char *filename, ncalign_e align, ncblitter_e blitter, ncscale_e scale) __attribute__((nonnull(1
API int ncdirect_cursor_left(struct ncdirect *nc, int num) __attribute__((nonnull(1)))
Definition direct.c:83
API int API int API int uint64_t ul
Definition direct.h:215
API int ncdirect_double_box(struct ncdirect *n, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr, unsigned ylen, unsigned xlen, unsigned ctlword) __attribute__((nonnull(1)))
Definition direct.c:1512
API int API int API int uint64_t uint64_t ur
Definition direct.h:215
API int ncdirect_flush(const struct ncdirect *nc) __attribute__((nonnull(1)))
API int ncdirect_cursor_disable(struct ncdirect *nc) __attribute__((nonnull(1)))
Definition direct.c:182
const char * egc
Definition egcpool.h:173
const char * fmt
Definition fbuf.h:220
int r
Definition fbuf.h:226
#define NCBOXLIGHTW
Definition ncseqs.h:9
#define NCBOXASCIIW
Definition ncseqs.h:13
#define NCBOXHEAVYW
Definition ncseqs.h:10
ncscale_e
Definition notcurses.h:96
int y
Definition notcurses.h:1905
const struct ncplane_options struct ncvisual struct ncvisual_options * vopts
Definition notcurses.h:3484
ncalign_e
Definition notcurses.h:80
ncblitter_e
Definition notcurses.h:65
vopts n
Definition notcurses.h:3502
int int x
Definition notcurses.h:1905
int(* ncstreamcb)(struct ncvisual *, struct ncvisual_options *, const struct timespec *, void *)
Definition notcurses.h:3533
API int API int const nccell unsigned len
Definition notcurses.h:2588
uint64_t channels
Definition internal.h:254
uint64_t flags
Definition internal.h:256
return NULL
Definition termdesc.h:229
bool notcurses_canopen_images(const notcurses *nc __attribute__((unused)))
Definition visual.c:1357
bool notcurses_canopen_videos(const notcurses *nc __attribute__((unused)))
Definition visual.c:1364