mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-06 03:20:26 +00:00
ncdirect_getc() #919
This commit is contained in:
parent
2ef2435953
commit
fa07df297b
@ -382,6 +382,18 @@ char32_t notcurses_getc(notcurses* nc, const struct timespec *ts,
|
||||
return r;
|
||||
}
|
||||
|
||||
char32_t ncdirect_getc(ncdirect* nc, const struct timespec *ts,
|
||||
sigset_t* sigmask, ncinput* ni){
|
||||
char32_t r = ncinputlayer_prestamp(&nc->input, ts, sigmask, ni, 0, 0);
|
||||
if(r != (char32_t)-1){
|
||||
uint64_t stamp = nc->input.input_events++; // need increment even if !ni
|
||||
if(ni){
|
||||
ni->seqnum = stamp;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
int prep_special_keys(ncinputlayer* nc){
|
||||
static const struct {
|
||||
const char* tinfo;
|
||||
|
@ -2137,6 +2137,10 @@ int notcurses_inputready_fd(notcurses* n){
|
||||
return fileno(n->input.ttyinfp);
|
||||
}
|
||||
|
||||
int ncdirect_inputready_fd(ncdirect* n){
|
||||
return fileno(n->input.ttyinfp);
|
||||
}
|
||||
|
||||
uint32_t* ncplane_rgba(const ncplane* nc, ncblitter_e blit,
|
||||
int begy, int begx, int leny, int lenx){
|
||||
if(begy < 0 || begx < 0){
|
||||
|
Loading…
Reference in New Issue
Block a user