page(3FORM)
β¨ page(3FORM) β form_page β¨
okay bestie, gather round, because today we're talking about form_page β the whole set and get form page number situation π this is a library call from the curses forms world and she is lowkey iconic.
π NAME π
form_page β set and get form page number π¦
π SYNOPSIS π
#include <form.h>
int set_current_field(FORM *form, FIELD *field);
FIELD *current_field(const FORM *form);
int unfocus_current_field(FORM *form);
int set_form_page(FORM *form, int n);
int form_page(const FORM *form);
int field_index(const FIELD *field);
πΈ DESCRIPTION πΈ
okay so first up, set_current_field sets the current field of the given form, and current_field hands you back the current field of the given form. classic get/set duo, no notes π
then there's unfocus_current_field β she removes the focus from the current field of the form. and in that state? inquiries via current_field shall return a NULL pointer. so like, nobody's home, the field is unbothered, the vibes are empty π
set_form_page sets the form's page number β literally goes to page n of the form. main character behavior, turning the page πβ¨
form_page returns the form's current page number. that's it, that's the function, she's simple and she serves π«Ά
and field_index returns the index of the field in the field array of the form it is connected to. > but bestie, heads up: it returns ERR if the argument is the null pointer or if the field is not connected π no field, no index, periodt.
β RETURN VALUE β
except for form_page, every one of these routines returns one of the following:
E_OKβ the routine succeeded. slay βE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. the argument was giving... wrong πE_BAD_STATEβ routine was called from an initialization or termination function. wrong time, wrong place, read the room πE_INVALID_FIELDβ contents of a field are not valid. not valid, not cute, not on my watch βE_REQUEST_DENIEDβ the form driver could not process the request. she said no πE_SYSTEM_ERRORβ system error occurred (seeerrno(3)). the system is going through something π
π PORTABILITY π
these routines emulate the System V forms library. they were not supported on Version 7 or BSD versions. so if you're time-traveling backwards, don't expect her there π°οΈ
also! unfocus_current_field is an ncurses extension β she's special, she's extra, she's ours π
π AUTHORS π
Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. absolute legends, we stan π«Ά
π₯ SEE ALSO π₯
ncurses(3NCURSES)form(3FORM)
and that's the whole page, bestie!! go forth and page-turn responsibly πΈ
this has been ncurses 6.6, dated 2024-12-28, signing off with a little page(3FORM) energy β¨ππ¦π
π¦ 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 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2010,2016 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms