|
|
|
@ -3,13 +3,17 @@
|
|
|
|
|
#include <notcurses/notcurses.h>
|
|
|
|
|
|
|
|
|
|
int main(void){
|
|
|
|
|
struct notcurses* nc = notcurses_init(NULL, NULL);
|
|
|
|
|
struct notcurses_options nopts = {
|
|
|
|
|
.flags = NCOPTION_NO_ALTERNATE_SCREEN,
|
|
|
|
|
};
|
|
|
|
|
struct notcurses* nc = notcurses_init(&nopts, NULL);
|
|
|
|
|
if(nc == NULL){
|
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
|
}
|
|
|
|
|
int dimy, dimx;
|
|
|
|
|
struct ncplane* n = notcurses_stddim_yx(nc, &dimy, &dimx);
|
|
|
|
|
int y = 0;
|
|
|
|
|
// FIXME do full permutations?
|
|
|
|
|
ncplane_set_styles(n, NCSTYLE_NONE);
|
|
|
|
|
ncplane_putstr_yx(n, y++, 0, "a ═ none");
|
|
|
|
|
ncplane_set_styles(n, NCSTYLE_ITALIC);
|
|
|
|
@ -23,7 +27,7 @@ int main(void){
|
|
|
|
|
ncplane_set_styles(n, NCSTYLE_BLINK);
|
|
|
|
|
ncplane_putstr_yx(n, y++, 0, "a ═ blink");
|
|
|
|
|
ncplane_set_styles(n, NCSTYLE_STRUCK);
|
|
|
|
|
ncplane_putstr_yx(n, y++, 0, "a ═ strikethrough");
|
|
|
|
|
ncplane_putstr_yx(n, y++, 0, "a ═ struck");
|
|
|
|
|
ncplane_set_styles(n, NCSTYLE_ITALIC | NCSTYLE_BOLD);
|
|
|
|
|
ncplane_putstr_yx(n, y++, 0, "a ═ italic bold");
|
|
|
|
|
ncplane_set_styles(n, NCSTYLE_ITALIC | NCSTYLE_REVERSE);
|
|
|
|
@ -48,11 +52,14 @@ int main(void){
|
|
|
|
|
ncplane_putstr_yx(n, y++, 0, "a ═ bold underline");
|
|
|
|
|
ncplane_set_styles(n, NCSTYLE_BOLD | NCSTYLE_BLINK);
|
|
|
|
|
ncplane_putstr_yx(n, y++, 0, "a ═ bold blink");
|
|
|
|
|
ncplane_putstr_yx(n, y++, 0, "sleeping for 15s...");
|
|
|
|
|
ncplane_set_styles(n, NCSTYLE_BOLD | NCSTYLE_REVERSE | NCSTYLE_UNDERLINE |
|
|
|
|
|
NCSTYLE_BLINK | NCSTYLE_ITALIC | NCSTYLE_STRUCK);
|
|
|
|
|
ncplane_putstr_yx(n, y++, 0, "a ═ whoomp! there it is");
|
|
|
|
|
|
|
|
|
|
ncplane_set_styles(n, NCSTYLE_NONE);
|
|
|
|
|
if(notcurses_render(nc)){
|
|
|
|
|
goto err;
|
|
|
|
|
}
|
|
|
|
|
sleep(15);
|
|
|
|
|
if(notcurses_stop(nc)){
|
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
|
}
|
|
|
|
|