blob: 04b00ad7677229c4ed463b5f1576ecda34bc9d8c [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301'\" t
2.\"***************************************************************************
Steve Kondikae271bc2015-11-15 02:50:53 +01003.\" Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *
12.\" *
13.\" The above copyright notice and this permission notice shall be included *
14.\" in all copies or substantial portions of the Software. *
15.\" *
16.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
Steve Kondikae271bc2015-11-15 02:50:53 +010030.\" $Id: menu_items.3x,v 1.10 2012/11/03 23:03:59 tom Exp $
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031.TH menu_items 3X ""
32.SH NAME
Steve Kondikae271bc2015-11-15 02:50:53 +010033\fBmenu_items\fR \- make and break connections between items and menus
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053034.SH SYNOPSIS
35\fB#include <menu.h>\fR
36.br
37int set_menu_items(MENU *menu, ITEM **items);
38.br
39ITEM **menu_items(const MENU *menu);
40.br
41int item_count(const MENU *menu);
42.br
43.SH DESCRIPTION
44The function \fBset_menu_items\fR changes the item pointer array of the given
45\fImenu\fR. The array must be terminated by a \fBNULL\fR.
46.PP
47The function \fBmenu_items\fR returns the item array of the given menu.
48.PP
49The function \fBitem_count\fR returns the count of items in \fImenu\fR.
Steve Kondikae271bc2015-11-15 02:50:53 +010050.SH RETURN VALUE
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053051The function \fBmenu_items\fR returns a pointer (which may be \fBNULL\fR).
52It does not set errno.
53.PP
54The function \fBitem_count\fR returns \fBERR\fR (the general \fBcurses\fR error
55return value) if its \fImenu\fP parameter is \fBNULL\fP.
56.PP
57The function \fBset_menu_items\fR returns one of the following codes on error:
58.TP 5
59.B E_OK
60The routine succeeded.
61.TP 5
62.B E_BAD_ARGUMENT
63Routine detected an incorrect or out-of-range argument.
64.TP 5
65.B E_NOT_CONNECTED
66No items are connected to the menu.
67.TP 5
68.B E_POSTED
69The menu is already posted.
70.TP 5
71.B E_SYSTEM_ERROR
72System error occurred (see \fBerrno\fR).
73.
74.SH SEE ALSO
75\fBcurses\fR(3X), \fBmenu\fR(3X).
76.SH NOTES
77The header file \fB<menu.h>\fR automatically includes the header file
78\fB<curses.h>\fR.
79.SH PORTABILITY
80These routines emulate the System V menu library. They were not supported on
81Version 7 or BSD versions.
82.PP
83The SVr4 menu library documentation specifies the \fBitem_count\fR error value
Steve Kondikae271bc2015-11-15 02:50:53 +010084as \-1 (which is the value of \fBERR\fR).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053085.SH AUTHORS
86Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
87S. Raymond.