ncdirect_getc() #919

pull/966/head
nick black 4 years ago committed by Nick Black
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…
Cancel
Save