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