mitem_opts(3X)

πŸ’– mitem_opts β€” the manual page, but make it cute πŸ’–

okay bestie, welcome to mitem_opts(3X) from the library calls girlies ✨ this one is all about menu item options β€” setting them, getting them, turning them on, turning them off. lowkey iconic behaviour tbh.


🌸 NAME 🌸

set_item_opts, item_opts_on, item_opts_off, item_opts β€” set and get menu item options πŸŽ€


✨ SYNOPSIS ✨

#include <menu.h>

int set_item_opts(ITEM *item, Item_Options opts);
Item_Options item_opts(const ITEM *item);

int item_opts_on(ITEM *item, Item_Options opts);
int item_opts_off(ITEM *item, Item_Options opts);

like, four functions, one header, zero drama πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so. here's the tea β˜•

  • set_item_opts β€” this one sets all the given item's option bits. and yes, menu option bits may be logically "or"-ed together, so you can stack 'em. it's giving toggles, but make it official.
  • item_opts_on β€” turns on the given option bits, and leaves all the others alone. it's not nosy, it minds its business 🫢
  • item_opts_off β€” turns off the given option bits, and leaves all the others alone. same energy, opposite direction.
  • item_opts β€” just returns the item's current option bits. no notes, no changes, pure information ✨

now for the main character of this whole page: there is only one defined option bit mask, and it's O_SELECTABLE πŸ‘‘

when O_SELECTABLE is on, the item may be selected during menu processing. and here's the thing β€” this option defaults to on. so bestie, it's already slaying unless you personally go turn it off πŸ’€


πŸ’œ RETURN VALUE πŸ’œ

except for item_opts, each routine returns one of the following:

  • E_OK β€” the routine succeeded. ate, no crumbs πŸ”₯
  • E_SYSTEM_ERROR β€” system error occurred (see errno(3)). not the vibe, go check your errno 😭
fyi item_opts doesn't play this game β€” it hands you back the option bits themselves instead of a status code. don't @ me, that's just how it is.

🌈 PORTABILITY 🌈

these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions. so like, respect the heritage, iykyk πŸ’«


πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. legends, fr fr 🫑


πŸŽ€ SEE ALSO πŸŽ€

  • curses(3X)
  • menu(3X)

and that's the whole page, bestie πŸ“ this was ncurses 6.6, dated 2025-01-18, and it lives at mitem_opts(3X). go forth and set your options with main character energy πŸ’…βœ¨

πŸ“¦ where this page comes from