ncdirect_dim_y()/x()

pull/319/head
nick black 4 years ago
parent 8ac16b734f
commit 5cd3a4c41d
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -354,6 +354,8 @@ int ncdirect_bg_rgb8(struct ncdirect* nc, unsigned r, unsigned g, unsigned b);
int ncdirect_fg_rgb8(struct ncdirect* nc, unsigned r, unsigned g, unsigned b);
int ncdirect_fg(struct ncdirect* nc, unsigned rgb);
int ncdirect_bg(struct ncdirect* nc, unsigned rgb);
int ncdirect_dim_x(const struct ncdirect* nc);
int ncdirect_dim_y(const struct ncdirect* nc);
```
### Alignment
@ -2169,9 +2171,6 @@ struct ncselector;
struct ncselector* ncselector_create(struct ncplane* n, int y, int x,
const selector_options* opts);
struct ncselector* ncselector_aligned(struct ncplane* n, int y, ncalign_e align,
const selector_options* opts);
int ncselector_additem(struct ncselector* n, const struct selector_item* item);
int ncselector_delitem(struct ncselector* n, const char* item);

@ -20,6 +20,9 @@ notcurses_directmode - minimal notcurses instances for styling text
**int ncdirect_bg(struct ncdirect* nc, unsigned rgb);**
**int ncdirect_dim_x(const struct ncdirect* nc);**
**int ncdirect_dim_y(const struct ncdirect* nc);**
**int ncdirect_stop(struct ncdirect* nc);**
# DESCRIPTION
@ -38,6 +41,10 @@ display capabilities, and/or display errors. notcurses natively targets
24bpp/8bpc RGB color, and it is thus desirable to use a terminal with the
**rgb** capability (e.g. xterm's **xterm-direct**).
**ncdirect_dim_x** returns the current number of columns, and **ncdirect_dim_y**
the current number of rows.
# RETURN VALUES
**notcurses_directmode** returns **NULL** on failure. Otherwise, the return

@ -40,8 +40,6 @@ typedef struct selector_options {
**struct ncselector* ncselector_create(struct ncplane* n, int y, int x, const selector_options* opts);**
**struct ncselector* ncselector_aligned(struct ncplane* n, int y, ncalign_e align, const selector_options* opts);**
**int ncselector_additem(struct ncselector* n, const struct selector_item* item);**
**int ncselector_delitem(struct ncselector* n, const char* item);**

@ -195,6 +195,10 @@ API struct notcurses* notcurses_init(const notcurses_options* opts, FILE* fp);
// including any failure initializing terminfo.
API struct ncdirect* notcurses_directmode(const char* termtype, FILE* fp);
// Get the current number of columns/rows.
API int ncdirect_dim_x(const struct ncdirect* nc);
API int ncdirect_dim_y(const struct ncdirect* nc);
// Destroy a notcurses context.
API int notcurses_stop(struct notcurses* nc);
@ -2183,9 +2187,6 @@ struct ncselector;
API struct ncselector* ncselector_create(struct ncplane* n, int y, int x,
const selector_options* opts);
API struct ncselector* ncselector_aligned(struct ncplane* n, int y, ncalign_e align,
const selector_options* opts);
API int ncselector_additem(struct ncselector* n, const struct selector_item* item);
API int ncselector_delitem(struct ncselector* n, const char* item);

Loading…
Cancel
Save