mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
docs: update for ncplane_translate_abs()
This commit is contained in:
parent
3498956370
commit
afe724ee1d
11
README.md
11
README.md
@ -574,11 +574,6 @@ int notcurses_mouse_enable(struct notcurses* n);
|
|||||||
|
|
||||||
// Disable mouse events. Any events in the input queue can still be delivered.
|
// Disable mouse events. Any events in the input queue can still be delivered.
|
||||||
int notcurses_mouse_disable(struct notcurses* n);
|
int notcurses_mouse_disable(struct notcurses* n);
|
||||||
|
|
||||||
// Was the provided mouse event 'ni' within the bounds of the ncplane 'n'? Note
|
|
||||||
// that this doesn't necessarily mean the event affected 'n'; there could be a
|
|
||||||
// plane above it, this plane could be transparent, etc.
|
|
||||||
bool ncplane_mouseevent_p(const struct ncplane* n, const struct ncinput *ni);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
"Button-event tracking mode" implies the ability to detect mouse button
|
"Button-event tracking mode" implies the ability to detect mouse button
|
||||||
@ -710,6 +705,12 @@ ncplane_dim_x(const struct ncplane* n){
|
|||||||
// and 'x' may be NULL.
|
// and 'x' may be NULL.
|
||||||
void ncplane_translate(const struct ncplane* src, const struct ncplane* dst,
|
void ncplane_translate(const struct ncplane* src, const struct ncplane* dst,
|
||||||
int* restrict y, int* restrict x);
|
int* restrict y, int* restrict x);
|
||||||
|
|
||||||
|
// Fed absolute 'y'/'x' coordinates, determine whether that coordinate is
|
||||||
|
// within the ncplane 'n'. If not, return false. If so, return true. Either
|
||||||
|
// way, translate the absolute coordinates relative to 'n'. If the point is not
|
||||||
|
// within 'n', these coordinates will not be within the dimensions of the plane.
|
||||||
|
bool ncplane_translate_abs(const struct ncplane* n, int* restrict y, int* restrict x);
|
||||||
```
|
```
|
||||||
|
|
||||||
If a given cell's glyph is zero, or its foreground channel is fully transparent,
|
If a given cell's glyph is zero, or its foreground channel is fully transparent,
|
||||||
|
@ -37,8 +37,6 @@ typedef struct ncinput {
|
|||||||
|
|
||||||
**int notcurses_mouse_disable(struct notcurses* n);**
|
**int notcurses_mouse_disable(struct notcurses* n);**
|
||||||
|
|
||||||
**bool ncplane_mouseevent_p(const struct ncplane* n, const struct ncinput *ni);**
|
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
notcurses supports input from keyboards and mice, and any device that looks
|
notcurses supports input from keyboards and mice, and any device that looks
|
||||||
|
@ -60,6 +60,8 @@ notcurses_ncplane - operations on notcurses planes
|
|||||||
|
|
||||||
**void ncplane_translate(const struct ncplane* src, const struct ncplane* dst, int* restrict y, int* restrict x);**
|
**void ncplane_translate(const struct ncplane* src, const struct ncplane* dst, int* restrict y, int* restrict x);**
|
||||||
|
|
||||||
|
**bool ncplane_translate_abs(const struct ncplane* n, int* restrict y, int* restrict x);**
|
||||||
|
|
||||||
**uint64_t ncplane_channels(struct ncplane* n);**
|
**uint64_t ncplane_channels(struct ncplane* n);**
|
||||||
|
|
||||||
**uint32_t ncplane_attr(struct ncplane* n);**
|
**uint32_t ncplane_attr(struct ncplane* n);**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user