menu_cursor(3X)
β¨ menu_cursor(3X) β Library calls, bestie β¨
Okay so you found your way into the menu_cursor(3X) page and I'm so proud of you π this is the one that tells you how to put the cursor back where it belongs. Let's go, no cap.
πΈ NAME πΈ
pos_menu_cursor β position a menu's cursor π―
π SYNOPSIS π
#include <menu.h>
int pos_menu_cursor(const MENU *menu);
π DESCRIPTION π
So pos_menu_cursor restores the cursor right back to the current position that's associated with the menu's selected item. Iconic behaviour, honestly. π«Ά
And like, why would you even want that? Because it's genuinely useful after some curses routines have been called to do screen-painting in response to a menu select. You painted all over the screen, the cursor got lost in the sauce, and now you're dragging it home. Main character move. β¨
π RETURN VALUE π
This routine hands you back one of the following, and you will check it:
E_OKβ the routine succeeded. Slay. πE_SYSTEM_ERRORβ a system error occurred (go peek aterrno(3)). πE_BAD_ARGUMENTβ the routine detected an incorrect or out-of-range argument. Not the vibe. πE_NOT_POSTEDβ the menu has not been posted. Girl, you gotta post it first. π
π PORTABILITY π
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. That's just the lore, 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 2024-03-16 β mwah, take care of that cursor of yours ππ§
π¦ 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