menu_items(3X)
β¨ NAME β¨
okay so this is menu_items(3X), a Library calls page, and it is literally the social secretary for menus and items β making and breaking connections between items and menus. bestie, we are covering set_menu_items, menu_items, and item_count. π
π«Ά
π SYNOPSIS π
#include <menu.h>
int set_menu_items(MENU *menu, ITEM **items);
ITEM **menu_items(const MENU *menu);
int item_count(const MENU *menu);
π¦ DESCRIPTION π¦
okay so picture this: set_menu_items changes the item pointer array of the given menu. and bestie, the array must be terminated by a NULL β no cap, that is mandatory. β¨
menu_items returns the item array of the given menu. iconic. π
item_count returns the count of items in menu. yup, that is the whole vibe. πΈ
π RETURN VALUE π
menu_items returns a pointer (which may be NULL). it does not set errno. periodt. π
item_count returns ERR (the general curses error return value) if its menu parameter is NULL. π
set_menu_items returns one of the following codes on error:
E_OKβ the routine succeeded. slay. πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. rude. πE_NOT_CONNECTEDβ no items are connected to the menu. it's giving empty group chat. πE_POSTEDβ the menu is already posted. too late, bestie. πE_SYSTEM_ERRORβ system error occurred (seeerrno(3)). screaming. π₯
π§ PORTABILITY π§
these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions. π
the SVr4 menu library documentation specifies the item_count error value as -1 (which is the value of ERR). noted, bestie. π«Ά
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. absolute icons. π
π SEE ALSO π
curses(3X), menu(3X) β go read those next, bestie. iykyk. π
mwah π β this menu_items(3X) page comes from ncurses 6.5, dated 2024-12-28. bye bestie! π
π¦ 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-2012,2015 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