mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 09:39:03 -04: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;
|
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){
|
int prep_special_keys(ncinputlayer* nc){
|
||||||
static const struct {
|
static const struct {
|
||||||
const char* tinfo;
|
const char* tinfo;
|
||||||
|
@ -2137,6 +2137,10 @@ int notcurses_inputready_fd(notcurses* n){
|
|||||||
return fileno(n->input.ttyinfp);
|
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,
|
uint32_t* ncplane_rgba(const ncplane* nc, ncblitter_e blit,
|
||||||
int begy, int begx, int leny, int lenx){
|
int begy, int begx, int leny, int lenx){
|
||||||
if(begy < 0 || begx < 0){
|
if(begy < 0 || begx < 0){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user