mitem_value(3X)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ¦‹ mitem_value(3X) β€” Library calls, but make it cute πŸ¦‹

okay so bestie, we are literally in mitem_value(3X) territory, and it’s giving β€œmenu item values but make it a group chat.” Come get your set_item_value and item_value tea πŸ’…


πŸ’– NAME πŸ’–

set_item_value, item_value β€” set and get menu item values. Slay, that’s the whole vibe: one sets, one gets, no cap.

🌸 SYNOPSIS 🌸

#include <menu.h>

int set_item_value(ITEM *item, bool value);
bool item_value(const ITEM *item);

✨ DESCRIPTION ✨

okay so here’s the situation, bestie. If you turn off the menu option O_ONEVALUE (e.g., with set_menu_opts or menu_opts_off; see menu_opts(3X)), the menu becomes multi-valued; that is, more than one item may simultaneously be selected. iconic behavior, honestly.

In a multi-valued menu (the page writes multi_valued in that spot, iykyk), you can use set_item_value to select the given menu item β€” second argument TRUE β€” or deselect it β€” second argument FALSE. periodt.

πŸŽ€ RETURN VALUE πŸŽ€

The function set_item_value returns one of the following, and we are listing every single one because we don’t skip details in this house:

  • E_OK β€” the routine succeeded. yes bestie, we love a success story ✨
  • E_SYSTEM_ERROR β€” system error occurred (see errno(3)). go check errno(3), fr fr.
  • E_REQUEST_DENIED β€” the menu driver could not process the request. the menu driver said β€œnot today,” lowkey πŸ’€

πŸ¦‹ PORTABILITY πŸ¦‹

These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. so if you’re on Version 7 or BSD, this is a no from the universe, ngl 🚨

πŸ‘‘ AUTHORS πŸ‘‘

Shoutout to Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. main character energy from both of them, honestly 🫢

🌈 SEE ALSO 🌈

go check curses(3X) and menu(3X) β€” the lore continues, bestie πŸ’œ


signed, sealed, sparkled by ncurses 6.5 on 2024-03-16 for mitem_value(3X) πŸ’–

πŸ“¦ where this page comes from