menu_hook(3X)
πΈ menu_hook(3X) β Library calls πΈ
okay bestie, welcome to the menu_hook(3X) page β it's giving automatic hook invocation energy, and honestly? iconic. π
β¨ NAME β¨
menu_hook β set hooks for automatic invocation by applications π
π¦ SYNOPSIS π¦
#include <menu.h>
int set_item_init(MENU *menu, Menu_Hook func);
Menu_Hook item_init(const MENU *menu);
int set_item_term(MENU *menu, Menu_Hook func);
Menu_Hook item_term(const MENU *menu);
int set_menu_init(MENU *menu, Menu_Hook func);
Menu_Hook menu_init(const MENU *menu);
int set_menu_term(MENU *menu, Menu_Hook func);
Menu_Hook menu_term(const MENU *menu);
π DESCRIPTION π
okay so these functions let you set hook functions that get called at various points while menu_driver is automatically processing input event codes. no cap, that's the whole vibe. β¨
set_item_initsets a hook to be called at menu-post time and each time the selected item changes (after the change).item_initreturns the current item init hook, if any (NULLif there is no such hook). π«Άset_item_termsets a hook to be called at menu-unpost time and each time the selected item changes (before the change).item_termreturns the current item term hook, if any (NULLif there is no such hook). π¦set_menu_initsets a hook to be called at menu-post time and just after the top row on the menu changes once it is posted.menu_initreturns the current menu init hook, if any (NULLif there is no such hook). πset_menu_termsets a hook to be called at menu-unpost time and just before the top row on the menu changes once it is posted.menu_termreturns the current menu term hook, if any (NULLif there is no such hook). β
π₯ RETURN VALUE π₯
Routines that return pointers return NULL on error. The other routines return one of these, bestie:
E_OKβ the routine succeeded. slay. βE_SYSTEM_ERRORβ a system error occurred (seeerrno(3)). π
π§ PORTABILITY π§
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. lowkey important, so don't forget it. π
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. π
πΈ SEE ALSO πΈ
curses(3X), menu(3X) π
and that's the tea, bestie: this is from ncurses 6.5, dated 2024-12-28, and it's the menu_hook(3X) manual page. bye! π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2007,2010 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms