[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'touchcell' functions?
From: |
Thomas Dickey |
Subject: |
Re: 'touchcell' functions? |
Date: |
Tue, 27 Jun 2023 03:50:53 -0400 |
On Mon, Jun 26, 2023 at 02:11:28PM -0400, Bill Gray wrote:
> int touchline(WINDOW *win, int start, int count);
> bool is_linetouched(WINDOW *win, int line);
>
> enable one to 'touch' an (entire) line and to determine if (some or all
> of) a given line has been touched. There are situations involving partially
> overlapping windows where one might want to 'touch' a range of cells within
> a line or determine if (some or all of) a range of cells within a line had
> been touched, rather than touching or checking the entire line.
>
> I'm thinking along the lines of functions such as
>
> int touchcells( WINDOW *win, int line, int column, int n_cols, int changed);
> bool is_celltouched( const WINDOW *win, int line, int column);
>
> and possibly
>
> bool are_cellstouched( const WINDOW *win, int line, int column, int n_cols);
>
> Am I correct in thinking that these functions don't exist, in ncurses or
> elsewhere? (PDCurses and PDCursesMod provide some of this information, but
> only by examining internal WINDOW struct data.)
correct - not in NetBSD curses, either (which inherits some little-used
functions from around 1990 in 4.4BSD).
It could be done in ncurses and other implementations using the first/last
character change on a given line, but I don't recall any expressed need
for this (ymmv).
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
signature.asc
Description: PGP signature