ncdirect_getc() #919

This commit is contained in:
nick black 2020-08-26 22:12:28 -04:00 committed by Nick Black
parent 2ef2435953
commit fa07df297b
2 changed files with 16 additions and 0 deletions

View File

@ -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;

View File

@ -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){