]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_new.3x
9053fdd5579d8fc1d6d40dab23a1cb6454ec903f
[ncurses.git] / man / menu_new.3x
1 '\" t
2 .TH menu_new 3X ""
3 .SH NAME
4 \fBmenu_new\fR - create and destroy menus
5 .SH SYNOPSIS
6 \fB#include <menu.h>\fR
7 .br
8 MENU *new_menu(ITEM **items);
9 .br
10 int free_menu(MENU *menu);
11 .br
12 .SH DESCRIPTION
13 The function \fBnew_menu\fR creates a new menu connected to a specified item
14 pointer array (which must be \fBNULL\fR-terminated).
15
16 The function \fBfree_menu\fR disconnects \fImenu\fR from its item array
17 and frees the storage allocated for the menu.
18 .SH RETURN VALUE
19 The function \fBnew_menu\fR returns \fBNULL\fR on error.
20
21 The function \fBfree_menu\fR returns one of the following:
22 .TP 5
23 \fBE_OK\fR
24 The routine succeeded.
25 .TP 5
26 \fBE_SYSTEM_ERROR\fR
27 System error occurred (see \fBerrno\fR).
28 .TP 5
29 \fBE_BAD_ARGUMENT\fR
30 Routine detected an incorrect or out-of-range argument.
31 .TP 5
32 \fBE_POSTED\fR
33 The menu has already been posted.
34 .SH SEE ALSO
35 \fBcurses\fR(3X), \fBmenu\fR(3X).
36 .SH NOTES
37 The header file \fB<menu.h>\fR automatically includes the header file
38 \fB<curses.h>\fR.
39 .SH PORTABILITY
40 These routines emulate the System V menu library.  They were not supported on
41 Version 7 or BSD versions.
42 .SH AUTHORS
43 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
44 S. Raymond.
45 .\"#
46 .\"# The following sets edit modes for GNU EMACS
47 .\"# Local Variables:
48 .\"# mode:nroff
49 .\"# fill-column:79
50 .\"# End: