]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_userptr.3x
ncurses 4.1
[ncurses.git] / man / menu_userptr.3x
1 '\" t
2 .TH menu_userptr 3X ""
3 .SH NAME
4 \fBmenu_userptr\fR - associate application data with a menu item
5 .SH SYNOPSIS
6 \fB#include <menu.h>\fR
7 .br
8 int set_menu_userptr(MENU *menu, const void *userptr);
9 .br
10 const void *menu_userptr(const MENU *menu);
11 .br
12 .SH DESCRIPTION
13 Every menu and every menu item has a field that can be used to hold
14 application-specific data (that is, the menu-driver code leaves it alone).
15 These functions get and set the menu user pointer field.
16 .SH RETURN VALUE
17 Except for \fBmenu_userptr\fR (which returns \fBNULL\fR on error), each
18 function returns one of the following:
19 .TP 5
20 \fBE_OK\fR
21 The routine succeeded.
22 .TP 5
23 \fBE_SYSTEM_ERROR\fR
24 System error occurred (see \fBerrno\fR).
25 .SH SEE ALSO
26 \fBcurses\fR(3X), \fBmenu\fR(3X).
27 .SH NOTES
28 The header file \fB<menu.h>\fR automatically includes the header file
29 \fB<curses.h>\fR.
30 .SH PORTABILITY
31 These routines emulate the System V menu library.  They were not supported on
32 Version 7 or BSD versions.
33
34 The user pointer should be a void pointer.  We leave it as a char pointer for
35 SVr4 compatibility.
36 .SH AUTHORS
37 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
38 S. Raymond.
39 .\"#
40 .\"# The following sets edit modes for GNU EMACS
41 .\"# Local Variables:
42 .\"# mode:nroff
43 .\"# fill-column:79
44 .\"# End: