Notcurses 3.0.13
a blingful library for TUIs and character graphics
Loading...
Searching...
No Matches
in.h File Reference
#include <stdio.h>
Include dependency graph for in.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  initial_responses
 

Enumerations

enum  queried_terminals_e {
  TERMINAL_UNKNOWN , TERMINAL_LINUX , TERMINAL_LINUXDRM , TERMINAL_XTERM ,
  TERMINAL_VTE , TERMINAL_KITTY , TERMINAL_FOOT , TERMINAL_MLTERM ,
  TERMINAL_TMUX , TERMINAL_GNUSCREEN , TERMINAL_WEZTERM , TERMINAL_ALACRITTY ,
  TERMINAL_CONTOUR , TERMINAL_ITERM , TERMINAL_TERMINOLOGY , TERMINAL_APPLE ,
  TERMINAL_RXVT , TERMINAL_MSTERMINAL , TERMINAL_MINTTY , TERMINAL_KONSOLE
}
 

Functions

int init_inputlayer (struct tinfo *ti, FILE *infp, int lmargin, int tmargin, int rmargin, int bmargin, struct ncsharedstats *stats, unsigned drain, int linesigs_enabled) __attribute__((nonnull(1
 
int int stop_inputlayer (struct tinfo *ti)
 
int inputready_fd (const struct inputctx *ictx) __attribute__((nonnull(1)))
 
int ncinput_shovel (struct inputctx *ictx, const void *buf, int len) __attribute__((nonnull(1
 
struct initial_responsesinputlayer_get_responses (struct inputctx *ictx) __attribute__((nonnull(1)))
 
int get_cursor_location (struct inputctx *ictx, const char *u7, unsigned *y, unsigned *x) __attribute__((nonnull(1
 

Enumeration Type Documentation

◆ queried_terminals_e

Enumerator
TERMINAL_UNKNOWN 
TERMINAL_LINUX 
TERMINAL_LINUXDRM 
TERMINAL_XTERM 
TERMINAL_VTE 
TERMINAL_KITTY 
TERMINAL_FOOT 
TERMINAL_MLTERM 
TERMINAL_TMUX 
TERMINAL_GNUSCREEN 
TERMINAL_WEZTERM 
TERMINAL_ALACRITTY 
TERMINAL_CONTOUR 
TERMINAL_ITERM 
TERMINAL_TERMINOLOGY 
TERMINAL_APPLE 
TERMINAL_RXVT 
TERMINAL_MSTERMINAL 
TERMINAL_MINTTY 
TERMINAL_KONSOLE 

Definition at line 31 of file in.h.

31 {
32 TERMINAL_UNKNOWN, // no useful information from queries; use termname
33 // the very limited linux VGA/serial console, or possibly the (deprecated,
34 // pixel-drawable, RGBA8888) linux framebuffer console. *not* fbterm.
35 TERMINAL_LINUX, // ioctl()s
36 // the linux KMS/DRM console, *not* kmscon, but DRM direct dumb buffers
37 TERMINAL_LINUXDRM, // ioctl()s
38 TERMINAL_XTERM, // XTVERSION == 'XTerm(ver)'
39 TERMINAL_VTE, // TDA: "~VTE"
40 TERMINAL_KITTY, // XTGETTCAP['TN'] == 'xterm-kitty'
41 TERMINAL_FOOT, // TDA: "\EP!|464f4f54\E\\"
42 TERMINAL_MLTERM, // XTGETTCAP['TN'] == 'mlterm'
43 TERMINAL_TMUX, // XTVERSION == "tmux ver"
44 TERMINAL_GNUSCREEN, // SDA: "83;ver;0c"
45 TERMINAL_WEZTERM, // XTVERSION == 'WezTerm *'
46 TERMINAL_ALACRITTY, // can't be detected; match TERM+SDA
47 TERMINAL_CONTOUR, // XTVERSION == 'contour ver'
48 TERMINAL_ITERM, // XTVERSION == 'iTerm2 [ver]'
49 TERMINAL_TERMINOLOGY, // TDA: "~~TY"
50 TERMINAL_APPLE, // Terminal.App, determined by TERM_PROGRAM + macOS
51 TERMINAL_RXVT, // rxvt/urxvt, determined by TERM + UNIX
52 TERMINAL_MSTERMINAL, // Microsoft Windows Terminal
53 TERMINAL_MINTTY, // XTVERSION == 'mintty ver' MinTTY (Cygwin, MSYS2)
54 TERMINAL_KONSOLE, // TDA: "~KDE" (7e4b4445)
queried_terminals_e
Definition in.h:31
@ TERMINAL_XTERM
Definition in.h:38
@ TERMINAL_LINUX
Definition in.h:35
@ TERMINAL_CONTOUR
Definition in.h:47
@ TERMINAL_APPLE
Definition in.h:50
@ TERMINAL_UNKNOWN
Definition in.h:32
@ TERMINAL_ALACRITTY
Definition in.h:46
@ TERMINAL_GNUSCREEN
Definition in.h:44
@ TERMINAL_TERMINOLOGY
Definition in.h:49
@ TERMINAL_LINUXDRM
Definition in.h:37
@ TERMINAL_MSTERMINAL
Definition in.h:52
@ TERMINAL_RXVT
Definition in.h:51
@ TERMINAL_KONSOLE
Definition in.h:54
@ TERMINAL_MLTERM
Definition in.h:42
@ TERMINAL_KITTY
Definition in.h:40
@ TERMINAL_MINTTY
Definition in.h:53
@ TERMINAL_ITERM
Definition in.h:48
@ TERMINAL_WEZTERM
Definition in.h:45
@ TERMINAL_VTE
Definition in.h:39
@ TERMINAL_FOOT
Definition in.h:41
@ TERMINAL_TMUX
Definition in.h:43

Function Documentation

◆ get_cursor_location()

int get_cursor_location ( struct inputctx ictx,
const char *  u7,
unsigned *  y,
unsigned *  x 
)

◆ init_inputlayer()

int init_inputlayer ( struct tinfo ti,
FILE *  infp,
int  lmargin,
int  tmargin,
int  rmargin,
int  bmargin,
struct ncsharedstats stats,
unsigned  drain,
int  linesigs_enabled 
)

◆ inputlayer_get_responses()

struct initial_responses * inputlayer_get_responses ( struct inputctx ictx)

Definition at line 2896 of file in.c.

2896 {
2897 struct initial_responses* iresp;
2898 pthread_mutex_lock(&ictx->ilock);
2899 while(ictx->initdata || !ictx->initdata_complete){
2900 pthread_cond_wait(&ictx->icond, &ictx->ilock);
2901 }
2902 iresp = ictx->initdata_complete;
2903 ictx->initdata_complete = NULL;
2904 pthread_mutex_unlock(&ictx->ilock);
2905 if(ictx->failed){
2906 logpanic("aborting after automaton construction failure");
2907 free(iresp);
2908 return NULL;
2909 }
2910 return iresp;
2911}
free(duplicated)
#define logpanic(fmt,...)
Definition logging.h:22
bool failed
Definition in.c:112
pthread_mutex_t ilock
Definition in.c:87
pthread_cond_t icond
Definition in.c:88
struct initial_responses * initdata_complete
Definition in.c:110
struct initial_responses * initdata
Definition in.c:109
return NULL
Definition termdesc.h:229
Here is the call graph for this function:

◆ inputready_fd()

int inputready_fd ( const struct inputctx ictx)

◆ ncinput_shovel()

int ncinput_shovel ( struct inputctx ictx,
const void *  buf,
int  len 
)

◆ stop_inputlayer()

int int stop_inputlayer ( struct tinfo ti)

Definition at line 2644 of file in.c.

2644 {
2645 int ret = 0;
2646 if(ti){
2647 // FIXME cancellation on shutdown does not yet work on windows #2192
2648#ifndef __MINGW32__
2649 if(ti->ictx){
2650 loginfo("tearing down input thread");
2651 ret |= cancel_and_join("input", ti->ictx->tid, NULL);
2653 free_inputctx(ti->ictx);
2654 ti->ictx = NULL;
2655 }
2656#endif
2657 }
2658 return ret;
2659}
int set_fd_nonblocking(int fd, unsigned state, unsigned *oldstate)
#define loginfo(fmt,...)
Definition logging.h:42
int stdinfd
Definition in.c:58
pthread_t tid
Definition in.c:92
unsigned stdio_blocking_save
Definition termdesc.h:182
struct inputctx * ictx
Definition termdesc.h:181
Here is the call graph for this function:
Here is the caller graph for this function: