mitem_opts(3X)
π mitem_opts(3X) β like, the menu item options page, bestie
okay so this is a library call page from the menu crew β the header literally says mitem_opts(3X) up top and "Library calls" is the section, so now you know where you are. it's all about setting and getting the option bits on a menu ITEM. stay with me, it's actually so chill.
β¨ 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, that's the whole cast of characters π
πΈ DESCRIPTION πΈ
okay so first up: set_item_opts sets all the given item's option bits. and bestie, menu option bits can be logically "or"-ed together β so you can stack 'em up iykyk π
then there's item_opts_on, which turns on the given option bits and leaves everything else alone. it's giving minimal interference, we love that β¨
item_opts_off is the opposite vibe β it turns off the given option bits and leaves the others alone. no collateral damage, periodt π«Ά
and item_opts just hands you back the item's current option bits. a little peek behind the curtain π
so here's the tea: there is only one defined option bit mask, and it's O_SELECTABLE. when this is on, the item may be selected during menu processing. and it defaults to on, so like, it's already slaying for you out of the box. no cap. π
π RETURN VALUE π
except for item_opts (she's special, she just returns the bits), each routine returns one of the following:
E_OKβ the routine succeeded. slay. βE_SYSTEM_ERRORβ a system error occurred (seeerrno(3)). yeah that's the π one, go check your errno.
π¦ PORTABILITY π¦
these routines emulate the System V menu library, fr fr. heads up though: they were not supported on Version 7 or BSD versions. so if you're time-travelling to those, it's a no from them π
π AUTHORS π
Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. absolute icons, both of them. π
π SEE ALSO π
curses(3X)menu(3X)
okay that's the whole page, you ate that π go forth and set your option bits, bestie.
β xoxo, ncurses 6.5, dated 2025-01-18 π§β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2018-2024,2025 Thomas E. Dickey
- Copyright 1998-2010,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