mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
c++ wrapper for direct-mode streaming #1515
This commit is contained in:
parent
529972d16b
commit
d2394f9c63
@ -164,6 +164,11 @@ namespace ncpp
|
||||
return ncdirect_raster_frame (direct, faken, static_cast<ncalign_e>(align));
|
||||
}
|
||||
|
||||
int streamfile (const char* filename, ncstreamcb streamer, struct ncvisual_options* vopts, void* curry) const NOEXCEPT_MAYBE
|
||||
{
|
||||
return error_guard (ncdirect_stream(direct, filename, streamer, vopts, curry), -1);
|
||||
}
|
||||
|
||||
bool putstr (uint64_t channels, const char* utf8) const NOEXCEPT_MAYBE
|
||||
{
|
||||
return error_guard (ncdirect_putstr (direct, channels, utf8), -1);
|
||||
|
@ -408,7 +408,7 @@ ncdirect_dump_plane(ncdirect* n, const ncplane* np, int xoff){
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
fprintf(stderr, "rasterizing %dx%d+%d\n", dimy, dimx, xoff);
|
||||
//fprintf(stderr, "rasterizing %dx%d+%d\n", dimy, dimx, xoff);
|
||||
// save the existing style and colors
|
||||
const bool fgdefault = ncdirect_fg_default_p(n);
|
||||
const bool bgdefault = ncdirect_bg_default_p(n);
|
||||
@ -1143,7 +1143,7 @@ int ncdirect_stream(ncdirect* n, const char* filename, ncstreamcb streamer,
|
||||
}
|
||||
ncdirect_raster_frame(n, v, (vopts->flags & NCVISUAL_OPTION_HORALIGNED) ? vopts->x : 0);
|
||||
streamer(ncv, vopts, NULL, curry);
|
||||
}while(ncvisual_decode(ncv));
|
||||
}while(ncvisual_decode(ncv) == 0);
|
||||
ncvisual_destroy(ncv);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user