menu_mark(3X)
β¨ menu_mark(3X) β¨
okay bestie, pull up a chair because we're talking about the menu library's literal Library calls today and honestly? it's giving underrated icon behavior π
π NAME π
set_menu_mark, menu_mark β get and set the menu mark string, no cap β¨
πΈ SYNOPSIS πΈ
#include <menu.h>
int set_menu_mark(MENU *menu, const char *mark);
const char *menu_mark(const MENU *menu);
π DESCRIPTION π
so here's the vibe: back in the day, older terminals didn't have highlighting or color capability π and like, how is anyone supposed to see which menu item is selected?? so the menu library marks selected items in a menu with a prefix string. that's it. that's the whole girlboss strategy. π«Ά
the function set_menu_mark sets the mark string for the given menu. and listen β calling set_menu_mark with a null menu item will abolish the mark string entirely. gone. bye. π¦
β οΈ note that changing the length of the mark string for a menu while the menu is posted is likely to produce unhelpful behavior. not me warning you about undefined-ish chaos π just don't do it bestie.
the default string is "-" (a dash). iconic, minimal, classic. calling set_menu_mark with a non-NULL menu argument will change this default. β¨
the function menu_mark returns the menu's mark string (or NULL if there is none). simple as that, fr fr. π
π RETURN VALUE π
the function menu_mark returns a pointer (which may be NULL). it does not set errno. π§
the function set_menu_mark may return the following error codes:
E_OKβ the routine succeeded. slay! πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. πE_SYSTEM_ERRORβ system error occurred (seeerrno(3)). π
π¦ PORTABILITY π¦
these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions. so like, if you're on ancient BSD... it's giving nothing, sorry babe π
π AUTHORS π
Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. legends, honestly. β¨
π SEE ALSO π
curses(3X)menu(3X)
and that's the whole page bestie, mwah π this was the ncurses 6.6 era of these docs, dated 2024-12-28, so go forth and mark your menus with main character energy πΈβ¨
π¦ where this page comes from
- alpine 3.24: ncurses-doc 6.6_p20260516-r0 Β· X11
- arch rolling: ncurses 6.6-2 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- Copyright 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2010,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms