form_win(3X)
π form_win(3X) β or, how to make and break form window + subwindow associations π
okay bestie, gather round, because this one is from the form_win(3X) manual and it's genuinely so useful π
β¨ NAME β¨
form_win β make and break form window and subwindow associations πͺπ¦
πΈ SYNOPSIS πΈ
#include <form.h>
int set_form_win(FORM *form, WINDOW *win);
WINDOW *form_win(const FORM *form);
int set_form_sub(FORM *form, WINDOW *sub);
WINDOW *form_sub(const FORM *form);
int scale_form(const FORM *form, int *rows, int *columns);
like. look at her. five whole functions. she's serving π
π DESCRIPTION π
so every form has an associated pair of curses windows, and they are NOT the same job okay:
- the form window displays any title and border associated with the window πΌοΈ
- the form subwindow displays the items of the form that are currently available for selection π―
the first four functions get and set those windows, periodt.
and here's the thing β you do not have to set either window. literally not required. by default, the driver code just uses stdscr for both π (main character energy from stdscr, honestly).
in the set_ functions:
- a window argument of
NULLis treated as though it werestdscr - a form argument of
NULLis treated as a request to change the system default form window or subwindow π
and scale_form returns the minimum size required for the subwindow of form. it's giving "how much room do I actually need" β¨
π₯ RETURN VALUE π₯
routines that return pointers return NULL on error, no cap. routines that return an integer return one of these error codes:
E_OKβ the routine succeeded π₯³E_SYSTEM_ERRORβ system error occurred (seeerrno(3)) πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument πE_POSTEDβ the form has already been posted πE_NOT_CONNECTEDβ no items are connected to the form π«₯
π§ PORTABILITY π§
these routines emulate the System V forms library, iykyk. they were not supported on Version 7 or BSD versions, so if you're on one of those, bestieβ¦ it's not happening π
π AUTHORS π
Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. legends, honestly π
π SEE ALSO π
curses(3X)curs_variables(3X)form(3X)
and that's the whole page, babe π this came to you from ncurses 6.6, dated 2024-12-28 β go forth and associate those windows, you absolute icon πβ¨
π¦ 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 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2006,2010 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms