menu_userptr(3X)
π 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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2018-2023,2024 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