hook(3FORM)
β¨ hook(3FORM) β¨
okay bestie, welcome to hook(3FORM) β the page about hooks, and no, not the kind that get you a boyfie, the kind that fire off automatically while form_driver is doing its little thing π
πΈ NAME πΈ
form_hook β set hooks for automatic invocation by applications. literally the "hey bestie, when X happens, run this" API π
π¦ SYNOPSIS π¦
#include <form.h>
int set_field_init(FORM *form, Form_Hook func);
Form_Hook field_init(const FORM *form);
int set_field_term(FORM *form, Form_Hook func);
Form_Hook field_term(const FORM *form);
int set_form_init(FORM *form, Form_Hook func);
Form_Hook form_init(const FORM *form);
int set_form_term(FORM *form, Form_Hook func);
Form_Hook form_term(const FORM *form);
π DESCRIPTION π
So like. These functions make it possible to set hook functions to be called at various points in the automatic processing of input event codes by form_driver. it's giving "automate the vibe" β¨
π«Ά set_field_init
sets a hook to be called at form-post time and each time the selected field changes (after the change). it's post-change gossip fr fr π
π field_init
returns the current field init hook, if any (NULL if there is no such hook). no hook? no problem, you just get NULL π₯²
π set_field_term
sets a hook to be called at form-unpost time and each time the selected field changes (before the change). pre-change era, we love a heads-up π
π§ field_term
returns the current field term hook, if any (NULL if there is no such hook).
π set_form_init
sets a hook to be called at form-post time and just after a page change once it is posted. page change? she's already on it π¦
β form_init
returns the current form init hook, if any (NULL if there is no such hook).
πΈ set_form_term
sets a hook to be called at form-unpost time and just before a page change once it is posted.
π form_term
returns the current form term hook, if any (NULL if there is no such hook).
π₯ RETURN VALUE π₯
Routines that return pointers return NULL on error. the rest of them hand you back one of these:
E_OKβ the routine succeeded. slay, it ate, no notes πE_SYSTEM_ERRORβ System error occurred (seeerrno(3)). not me crying in system call π
π PORTABILITY π
These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. so if you're time-travelling to old BSD, sorry bestie, this one's not there π
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. legends fr fr π«Ά
π« SEE ALSO π«
ncurses(3NCURSES), form(3FORM)
okay that's the whole page, you're so welcome π this was ncurses 6.6, dated 2024-12-28, and hook(3FORM) is officially signed, sealed, and slayed. periodt β¨ππ¦
π¦ 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-2007,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