mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
add notcurses_stddim_yx_const()
This commit is contained in:
parent
fe7eededa8
commit
0b825c619e
1
NEWS.md
1
NEWS.md
@ -9,6 +9,7 @@ rearrangements of Notcurses.
|
||||
* Add `ncinput_equal_p()` for comparison of `ncinput` structure data.
|
||||
* `ncmenu_offer_input()` now recognizes the shortcuts for registered
|
||||
sections, and will unroll the appropriate section when given input.
|
||||
* Added `notcurses_stddim_yx_const()` (`notcurses_stddim_yx()` `const` form).
|
||||
|
||||
* 2.0.0 (2020-10-12) "Stankonia"
|
||||
* **API STABILITY!** The API expressed in 2.0.0 will be maintained throughout
|
||||
|
8
USAGE.md
8
USAGE.md
@ -207,6 +207,14 @@ notcurses_stddim_yx(struct notcurses* nc, int* restrict y, int* restrict x){
|
||||
ncplane_dim_yx(s, y, x); // accepts NULL
|
||||
return s;
|
||||
}
|
||||
|
||||
static inline const struct ncplane*
|
||||
notcurses_stddim_yx_const(const struct notcurses* nc, int* restrict y, int* restrict x){
|
||||
const struct ncplane* s = notcurses_stdplane_const(nc); // can't fail
|
||||
ncplane_dim_yx(s, y, x); // accepts NULL
|
||||
return s;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
A reference to the standard plane *is* persistent across a screen resize, as are
|
||||
|
@ -16,6 +16,8 @@ notcurses_stdplane - acquire the standard ncplane
|
||||
|
||||
**static inline struct ncplane* notcurses_stddim_yx(struct notcurses* nc, int* restrict y, int* restrict x);**
|
||||
|
||||
**static inline const struct ncplane* notcurses_stddim_yx_const(const struct notcurses* nc, int* restrict y, int* restrict x);**
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
**notcurses_stdplane** returns a handle to the standard ncplane for the context
|
||||
|
@ -991,6 +991,13 @@ notcurses_stddim_yx(struct notcurses* nc, int* RESTRICT y, int* RESTRICT x){
|
||||
return s;
|
||||
}
|
||||
|
||||
static inline const struct ncplane*
|
||||
notcurses_stddim_yx_const(const struct notcurses* nc, int* RESTRICT y, int* RESTRICT x){
|
||||
const struct ncplane* s = notcurses_stdplane_const(nc); // can't fail
|
||||
ncplane_dim_yx(s, y, x); // accepts NULL
|
||||
return s;
|
||||
}
|
||||
|
||||
static inline int
|
||||
ncplane_dim_y(const struct ncplane* n){
|
||||
int dimy;
|
||||
|
Loading…
x
Reference in New Issue
Block a user