X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=menu%2Fmenu.h;h=03c3cbc8da54718749232d92e3fc7f5cde685c4f;hb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1;hp=b63c7406f6111d937c8eca21d9d6366627c4c269;hpb=3a9b6a3bf0269231bef7de74757a910dedd04e0c;p=ncurses.git diff --git a/menu/menu.h b/menu/menu.h index b63c7406..03c3cbc8 100644 --- a/menu/menu.h +++ b/menu/menu.h @@ -1,24 +1,34 @@ -/*-----------------------------------------------------------------------------+ -| The ncurses menu library is Copyright (C) 1995-1997 | -| by Juergen Pfeifer | -| All Rights Reserved. | -| | -| Permission to use, copy, modify, and distribute this software and its | -| documentation for any purpose and without fee is hereby granted, provided | -| that the above copyright notice appear in all copies and that both that | -| copyright notice and this permission notice appear in supporting | -| documentation, and that the name of the above listed copyright holder(s) not | -| be used in advertising or publicity pertaining to distribution of the | -| software without specific, written prior permission. | -| | -| THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO | -| THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- | -| NESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR | -| ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RE- | -| SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, | -| NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH | -| THE USE OR PERFORMANCE OF THIS SOFTWARE. | -+-----------------------------------------------------------------------------*/ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ #ifndef ETI_MENU #define ETI_MENU @@ -46,7 +56,7 @@ typedef int Item_Options; typedef struct { - char* str; + const char* str; unsigned short length; } TEXT; @@ -55,7 +65,7 @@ typedef struct tagITEM TEXT name; /* name of menu item */ TEXT description; /* description of item, optional in display */ struct tagMENU *imenu; /* Pointer to parent menu */ - const void *userptr; /* Pointer to user defined per item data */ + void *userptr; /* Pointer to user defined per item data */ Item_Options opt; /* Item options */ short index; /* Item number if connected to a menu */ short y; /* y and x location of item in menu */ @@ -107,7 +117,7 @@ typedef struct tagMENU Menu_Hook iteminit; Menu_Hook itemterm; - const void *userptr; /* Pointer to menus user data */ + void *userptr; /* Pointer to menus user data */ char *mark; /* Pointer to marker string */ Menu_Options opt; /* Menu options */ @@ -178,10 +188,10 @@ extern const char *item_description(const ITEM *), *menu_mark(const MENU *), *menu_request_name(int); -extern char *menu_pattern(const MENU *); +extern char *menu_pattern(const MENU *); -extern const void *menu_userptr(const MENU *), - *item_userptr(const ITEM *); +extern void *menu_userptr(const MENU *), + *item_userptr(const ITEM *); extern chtype menu_back(const MENU *), menu_fore(const MENU *), @@ -204,7 +214,7 @@ extern int free_item(ITEM *), set_item_init(MENU *,void(*)(MENU *)), set_item_opts(ITEM *,Item_Options), set_item_term(MENU *,void(*)(MENU *)), - set_item_userptr(ITEM *, const void *), + set_item_userptr(ITEM *, void *), set_item_value(ITEM *,bool), set_menu_back(MENU *,chtype), set_menu_fore(MENU *,chtype), @@ -218,7 +228,7 @@ extern int free_item(ITEM *), set_menu_pattern(MENU *,const char *), set_menu_sub(MENU *,WINDOW *), set_menu_term(MENU *,void(*)(MENU *)), - set_menu_userptr(MENU *,const void *), + set_menu_userptr(MENU *,void *), set_menu_win(MENU *,WINDOW *), set_top_row(MENU *,int), top_row(const MENU *),