1menu_item_new(3CURSES)     Curses Library Functions     menu_item_new(3CURSES)
2
3
4

NAME

6       menu_item_new, new_item, free_item - create and destroy menus items
7

SYNOPSIS

9       cc [ flag... ] file... -lmenu  -lcurses  [ library... ]
10       #include <menu.h>
11
12       ITEM *new_item(char *name, char *desc);
13
14
15       int free_item(ITEM *item);
16
17

DESCRIPTION

19       new_item()  creates a new item from name and description, and returns a
20       pointer to the new item.
21
22
23       free_item() frees the storage allocated  for  item.  Once  an  item  is
24       freed, the user can no longer connect it to a menu.
25

RETURN VALUES

27       new_item() returns NULL on error.
28
29
30       free_item() returns one of the following:
31
32       E_OK               The routine returned successfully.
33
34
35       E_SYSTEM_ERROR     System error.
36
37
38       E_BAD_ARGUMENT     An incorrect argument was passed to the routine.
39
40
41       E_CONNECTED        One  or  more items are already connected to another
42                          menu.
43
44

ATTRIBUTES

46       See attributes(5) for descriptions of the following attributes:
47
48
49
50
51       ┌─────────────────────────────┬─────────────────────────────┐
52       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
53       ├─────────────────────────────┼─────────────────────────────┤
54       │MT-Level                     │Unsafe                       │
55       └─────────────────────────────┴─────────────────────────────┘
56

SEE ALSO

58       curses(3CURSES), menus(3CURSES), attributes(5)
59

NOTES

61       The header <menu.h> automatically  includes  the  headers  <eti.h>  and
62       <curses.h>.
63
64
65
66SunOS 5.11                        31 Dec 1996           menu_item_new(3CURSES)
Impressum