menu_post(3X)
β¨ menu_post β bestie edition β¨
okay so this is a page from the ncurses library calls section, and it's literally all about putting a menu on the screen and taking it back off again. two functions, one glow-up, let's go π
πΈ NAME πΈ
post_menu, unpost_menu β write or erase menus from associated subwindows. that's it, that's the whole job, no notes π«Ά
π SYNOPSIS π
#include <menu.h>
int post_menu(MENU *menu);
int unpost_menu(MENU *menu);
π DESCRIPTION π
so post_menu displays a menu to its associated subwindow. it's giving "put it where it belongs" energy.
and bestie, listen β just calling post_menu does not mean the subwindow is physically on your screen yet. to actually trigger physical display of the subwindow you gotta use refresh(3X) or some equivalent curses routine. (the implicit doupdate that gets triggered by a curses input request will do it too, so sometimes it just happens for you, lowkey iconic.) πͺ
also super important: post_menu resets the selection status of all items. every single one. brand new slate. no carrying over your old faves.
and unpost_menu? it erases menu from its associated subwindow. clean exit, we love to see it. π
β RETURN VALUE β
these routines return one of the following, and ngl the vibes vary:
E_OKβ the routine succeeded. slay. ate. no crumbs. πE_SYSTEM_ERRORβ a system error occurred (seeerrno(3)). not her fault, blame the system πE_BAD_ARGUMENTβ the routine detected an incorrect or out-of-range argument. you handed it something cursed bestie πE_POSTEDβ the menu has already been posted. girl it's already up there, what more do you want πE_BAD_STATEβ the routine was called from an initialization or termination function. wrong place, wrong time, we don't do that here π«E_NO_ROOMβ the menu is too large for its window. you should consider usingset_menu_formatto solve the problem. it doesn't fit, it's not a vibe, resize the situation πE_NOT_POSTEDβ the menu has not been posted. you can't unpost what was never posted, babe β¨E_NOT_CONNECTEDβ no items are connected to the menu. empty menu, empty heart π¦
πΊ PORTABILITY πΊ
these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions. so if you're time-traveling backwards, no menu posting for you, sorry π°οΈ
π AUTHORS π
Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. absolute legends, we stan π«Ά
π SEE ALSO π
curses(3X)menu(3X)
and that's the whole page bestie, tysm for reading, go post a menu responsibly β¨
this has been ncurses 6.6, dated 2024-03-16, signing off from menu_post(3X) β mwah π
π¦ 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-2016,2017 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms