opaque(3NCURSES)
π¦ opaque β obtaiiiin curses window properties π (3NCURSES)
okay so bestie, this is the opaque(3NCURSES) page from the ncurses manual, and it's literally the page that lets you peek inside a WINDOW without, like, touching its guts directly. we love a boundaries queen π
β¨ NAME β¨
is_cleared, is_idlok, is_idcok, is_immedok, is_keypad, is_leaveok, is_nodelay, is_notimeout, is_pad, is_scrollok, is_subwin, is_syncok, wgetdelay, wgetparent, wgetscrreg β obtain curses window properties π«Ά
β¨ SYNOPSIS β¨
#include <curses.h>
bool is_cleared(const WINDOW *win);
bool is_idcok(const WINDOW *win);
bool is_idlok(const WINDOW *win);
bool is_immedok(const WINDOW *win);
bool is_keypad(const WINDOW *win);
bool is_leaveok(const WINDOW *win);
bool is_nodelay(const WINDOW *win);
bool is_notimeout(const WINDOW *win);
bool is_pad(const WINDOW *win);
bool is_scrollok(const WINDOW *win);
bool is_subwin(const WINDOW *win);
bool is_syncok(const WINDOW *win);
WINDOW * wgetparent(const WINDOW *win);
int wgetdelay(const WINDOW *win);
int wgetscrreg(const WINDOW *win, int *top, int *bottom);
β¨ DESCRIPTION β¨
so ncurses gives you a whole lil squad of functions that just report back on the properties of a WINDOW structure. why does that matter? because it lets a WINDOW stay βopaqueβ if your application defines the NCURSES_OPAQUE preprocessor symbol. π
and what does opaque even mean here, bestie? it means the members of the struct data types are not directly accessible β no sneaking in through the β.β or β->β operators, nope, not today π
ββοΈ β and instead you must query and/or set them via library functions. the perks of being opaque are, like, greater abstraction and improved management of concurrent accesses to data structures, which keeps your object states coherent. it's giving β¨responsible architectureβ¨
is_cleared returns the value set by clearok(3NCURSES).
is_idcok returns the value set by idcok(3NCURSES).
is_idlok returns the value set by idlok(3NCURSES).
is_immedok returns the value set by immedok(3NCURSES).
is_keypad returns the value set by keypad(3NCURSES).
is_leaveok returns the value set by leaveok(3NCURSES).
is_nodelay returns the value set by nodelay(3NCURSES).
is_notimeout returns the value set by notimeout(3NCURSES).
is_pad returns TRUE if the window is a pad β that is, it was created by newpad(3NCURSES). ποΈ
is_scrollok returns the value set by scrollok(3NCURSES).
is_subwin returns TRUE if the window is a subwindow, that is, it was created by subwin(3NCURSES) or derwin(3NCURSES). π±
is_syncok returns the value set by syncok(3NCURSES).
wgetdelay returns the delay timeout set by wtimeout(3NCURSES). β³
wgetparent returns the parent WINDOW pointer for subwindows, or NULL for windows having no parent. π’ (orphan era)
wgetscrreg stores the top and bottom rows for the scrolling margin set by wsetscrreg(3NCURSES) in the corresponding arguments, returning ERR upon failure and OK upon successful completion. π
β¨ RETURN VALUE β¨
these functions return TRUE or FALSE except as noted. π
β¨ NOTES β¨
ncurses provides both a C function and a preprocessor macro for each function documented on this page. two for one, we love a bundle deal π
β¨ EXTENSIONS β¨
these functions originated with ncurses. homegrown icon behavior π
β¨ PORTABILITY β¨
if your app is out here using ncurses extensions, bestie, you should condition their use on the visibility of the NCURSES_VERSION preprocessor macro. fr fr, check before you wreck π«Ά
NetBSD curses since 10.1 (2024) supports wgetscr_reg. It also implements getscr_reg, operating on stdscr. π
β¨ SEE ALSO β¨
ncurses(3NCURSES), inopts(3NCURSES), outopts(3NCURSES), threads(3NCURSES), window(3NCURSES)
okay that's the whole page, no cap π and before you go β this lil masterpiece is from ncurses 6.6, dated 2025-02-15, and it lives under the name opaque(3NCURSES). go query your windows responsibly, queen ππΈ
π¦ where this page comes from
- ubuntu resolute: ncurses-doc 6.6+20251231-1 Β· MIT/X11
- ubuntu stonking: ncurses-doc 6.6+20260608-2 Β· MIT/X11
- Copyright 2020-2024,2025 Thomas E. Dickey
- Copyright 2007-2014,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms