2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>menu_userptr</STRONG> - associate application data with a menu item
9 <STRONG>#include</STRONG> <STRONG><menu.h></STRONG>
10 int set_menu_userptr(MENU *menu, void *userptr);
11 void *menu_userptr(const MENU *menu);
15 <H2>DESCRIPTION</H2><PRE>
16 Every menu and every menu item has a field that can be
17 used to hold application-specific data (that is, the menu-
18 driver code leaves it alone). These functions get and set
19 the menu user pointer field.
23 <H2>RETURN VALUE</H2><PRE>
24 Except for <STRONG>menu_userptr</STRONG> (which returns <STRONG>NULL</STRONG> on error),
25 each function returns one of the following:
27 <STRONG>E_OK</STRONG> The routine succeeded.
29 <STRONG>E_SYSTEM_ERROR</STRONG>
30 System error occurred (see <STRONG>errno</STRONG>).
34 <H2>SEE ALSO</H2><PRE>
35 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="menu.3x.html">menu(3X)</A></STRONG>.
40 The header file <STRONG><menu.h></STRONG> automatically includes the header
41 file <STRONG><curses.h></STRONG>.
45 <H2>PORTABILITY</H2><PRE>
46 These routines emulate the System V menu library. They
47 were not supported on Version 7 or BSD versions.
49 The user pointer should be a void pointer. We leave it as
50 a char pointer for SVr4 compatibility.
55 Juergen Pfeifer. Manual pages and adaptation for new
56 curses by Eric S. Raymond.