1menu_userptr(3X) menu_userptr(3X)
2
3
4
6 menu_userptr - associate application data with a menu item
7
9 #include <menu.h>
10 int set_menu_userptr(MENU *menu, void *userptr);
11 void *menu_userptr(const MENU *menu);
12
14 Every menu and every menu item has a field that can be used to hold
15 application-specific data (that is, the menu-driver code leaves it
16 alone). These functions get and set the menu user pointer field.
17
19 menu_userptr returns a pointer (which may be NULL). It does not set
20 errno.
21
22 set_menu_userptr returns E_OK (success).
23
25 curses(3X), menu(3X).
26
28 The header file <menu.h> automatically includes the header file
29 <curses.h>.
30
32 These routines emulate the System V menu library. They were not sup‐
33 ported on Version 7 or BSD versions.
34
35 The user pointer is a void pointer. We chose not to leave it as a char
36 pointer for SVr4 compatibility.
37
39 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
40 Raymond.
41
42
43
44 menu_userptr(3X)