diff --git a/src/poc/sgr-full.c b/src/poc/sgr-full.c new file mode 100644 index 000000000..e6ca40a9a --- /dev/null +++ b/src/poc/sgr-full.c @@ -0,0 +1,34 @@ +#include +#include +#include + +int main(void){ + struct notcurses* nc = notcurses_init(NULL, NULL); + if(nc == NULL){ + return EXIT_FAILURE; + } + int dimy, dimx; + struct ncplane* n = notcurses_stddim_yx(nc, &dimy, &dimx); + ncplane_set_attr(n, NCSTYLE_NONE); + ncplane_putstr_yx(n, 0, 0, "a ═"); + ncplane_set_attr(n, NCSTYLE_ITALIC); + ncplane_putstr_yx(n, 1, 0, "a ═"); + ncplane_set_attr(n, NCSTYLE_BOLD); + ncplane_putstr_yx(n, 2, 0, "a ═"); + ncplane_set_attr(n, NCSTYLE_REVERSE); + ncplane_putstr_yx(n, 3, 0, "a ═"); + ncplane_set_attr(n, NCSTYLE_UNDERLINE); + ncplane_putstr_yx(n, 4, 0, "a ═"); + if(notcurses_render(nc)){ + goto err; + } + sleep(5); + if(notcurses_stop(nc)){ + return EXIT_FAILURE; + } + return EXIT_SUCCESS; + +err: + notcurses_stop(nc); + return EXIT_FAILURE; +}