curs_opaque(3X)
π curs_opaque β the one where ncurses stops being nosy and locks its WINDOW's diary
okay bestie, this is curs_opaque(3X) from the library-calls girlies, and it's literally the "respect my privacy" era of ncurses. no cap.
β¨ 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 here's the tea: ncurses hands you a whole bunch of functions that just report stuff about a WINDOW structure. why? because it can be made "opaque" if your application defines the NCURSES_OPAQUE preprocessor symbol. β¨
and what does opaque even mean here? it means the members of struct data types are not directly accessible β like, you can't just reach in with . or -> operators, bestie, that door is locked. instead you gotta query and/or set them via library functions. the glow-up of opacity includes greater abstraction and improved management of concurrent accesses to data structures, keeping object states coherent. it's giving boundaries, and honestly? we love that for her. π
is_clearedβ returns the value set byclearok(3X).is_idcokβ returns the value set byidcok(3X).is_idlokβ returns the value set byidlok(3X).is_immedokβ returns the value set byimmedok(3X).is_keypadβ returns the value set bykeypad(3X).is_leaveokβ returns the value set byleaveok(3X).is_nodelayβ returns the value set bynodelay(3X).is_notimeoutβ returns the value set bynotimeout(3X).is_padβ returnsTRUEif the window is a pad; that is, it was created bynewpad(3X).is_scrollokβ returns the value set byscrollok(3X).is_subwinβ returnsTRUEif the window is a subwindow, that is, it was created bysubwin(3X)orderwin(3X).is_syncokβ returns the value set bysyncok(3X).wgetdelayβ returns the delay timeout set bywtimeout(3X).wgetparentβ returns the parentWINDOWpointer for subwindows, orNULLfor windows having no parent. (orphan window energy π)wgetscrregβ stores the top and bottom rows for the scrolling margin set bywsetscrreg(3X)in the corresponding arguments, returningERRupon failure andOKupon successful completion.
β RETURN VALUE β
These functions return TRUE or FALSE except as noted. yes ma'am, that's the whole thing, short and iconic. π
π NOTES π
ncurses provides both a C function and a preprocessor macro for each function documented in this page. two for the price of one, we ate. π
π¦ EXTENSIONS π¦
These functions originated with ncurses. homegrown, main character behavior, no notes. π
π PORTABILITY π
Applications employing ncurses extensions should condition their use on the visibility of the NCURSES_VERSION preprocessor macro. do your vibe check first, bestie. π
NetBSD curses since 10.1 (2024) supports wgetscr_reg. It also implements getscr_reg, operating on stdscr. π
π₯ SEE ALSO π₯
curses(3X), curs_inopts(3X), curs_outopts(3X), curs_threads(3X), curs_window(3X)
and that's the whole page, periodt. π this was ncurses 6.6, dated 2025-02-15, signing off from your favorite manual-page girlie β stay opaque, stay unbothered, and always query through the library like a queen. πβ¨π«Ά
π¦ where this page comes from
- alpine 3.24: ncurses-doc 6.6_p20260516-r0 Β· X11
- arch rolling: ncurses 6.6-2 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- 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