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 by clearok(3X).
  • is_idcok β€” returns the value set by idcok(3X).
  • is_idlok β€” returns the value set by idlok(3X).
  • is_immedok β€” returns the value set by immedok(3X).
  • is_keypad β€” returns the value set by keypad(3X).
  • is_leaveok β€” returns the value set by leaveok(3X).
  • is_nodelay β€” returns the value set by nodelay(3X).
  • is_notimeout β€” returns the value set by notimeout(3X).
  • is_pad β€” returns TRUE if the window is a pad; that is, it was created by newpad(3X).
  • is_scrollok β€” returns the value set by scrollok(3X).
  • is_subwin β€” returns TRUE if the window is a subwindow, that is, it was created by subwin(3X) or derwin(3X).
  • is_syncok β€” returns the value set by syncok(3X).
  • wgetdelay β€” returns the delay timeout set by wtimeout(3X).
  • wgetparent β€” returns the parent WINDOW pointer for subwindows, or NULL for windows having no parent. (orphan window energy 😭)
  • wgetscrreg β€” stores the top and bottom rows for the scrolling margin set by wsetscrreg(3X) in the corresponding arguments, returning ERR upon failure and OK upon 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