Notcurses 3.0.13
a blingful library for TUIs and character graphics
Loading...
Searching...
No Matches
linux.h
Go to the documentation of this file.
1#ifndef NOTCURSES_LINUX
2#define NOTCURSES_LINUX
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stddef.h>
9#include <stdbool.h>
10
11struct tinfo;
12
13// is this a linux virtual console?
14bool is_linux_console(int fd);
15
16// attempt to reprogram the console font, if necessary, to include all the
17// quadrant glyphs (which include the halfblocks). *|halfblocks| will be true
18// if the halfblocks are available, whether they required a reprogramming or
19// not. *|quadrants| will be true if the quadrants are available, whether that
20// required a reprogramming or not.
21// note that reprogramming the font drops any existing graphics from the
22// framebuffer. if ti has mapped the framebuffer, it will be copied and
23// unmapped before we reprogram. after reprogramming, it is remapped, and
24// the old contents are copied in, then freed. there will be an unavoidable
25// flicker while this happens.
26int reprogram_console_font(struct tinfo* ti, unsigned no_font_changes,
27 bool* halfblocks, bool* quadrants);
28
29// if is_linux_console() returned true, call this to determine whether it is
30// a drawable framebuffer console. do not call if not a verified console!
31bool is_linux_framebuffer(struct tinfo* ti);
32
33// call only on an fd where is_linux_framebuffer() returned true. gets the
34// pixel geometry for the visual area.
35int get_linux_fb_pixelgeom(struct tinfo* ti, unsigned* ypix, unsigned *xpix);
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif
bool is_linux_console(int fd)
bool is_linux_framebuffer(struct tinfo *ti)
int reprogram_console_font(struct tinfo *ti, unsigned no_font_changes, bool *halfblocks, bool *quadrants)
int get_linux_fb_pixelgeom(struct tinfo *ti, unsigned *ypix, unsigned *xpix)
Definition linux.c:813