menu_userptr(3X)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– NAME πŸ’–

okay so this is the menu_userptr page from the 3X manual’s Library calls section. set_menu_userptr, menu_userptr β€” associate application data with a menu item. That’s the whole vibe: you got app-specific data, and these lil functions hold onto it for your menu. iconic. πŸ’…

✨ SYNOPSIS ✨

#include <menu.h>

int set_menu_userptr(MENU *menu, void *userptr);
void *menu_userptr(const MENU *menu);

πŸ¦‹ DESCRIPTION πŸ¦‹

So real talk, bestie: every MENU and every menu item has a field that can hold application-specific data β€” and the menu-driver code literally leaves that field alone. not it touching your stuff. These functions get and set the menu user pointer field. Periodt. ✨

πŸ’… RETURN VALUE πŸ’…

menu_userptr returns a pointer, which may be NULL. It does not set errno.

set_menu_userptr returns E_OK (success). slay.

🌈 PORTABILITY 🌈

These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions.

The user pointer is a void pointer. We chose not to leave it as a char pointer for SVr4 compatibility.

πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond.

πŸŽ€ SEE ALSO πŸŽ€

curses(3X), menu(3X)


okay bye bestie! This page is from ncurses 6.5, dated 2024-12-28, and it’s the menu_userptr(3X) page β€” periodt. πŸ’œ

πŸ“¦ where this page comes from