0
  +   %ˆl–Ým_J*n-jm@?pLÜhJbÑ¿Í„^u¿_†I|¥�+ÁÌ .c    %/****************************************************************************
 * Copyright 2020 Thomas E. Dickey                                          *
 * Copyright 1998-2016,2017 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                                    *
 ****************************************************************************/

/* $Id: menu.h,v 1.26 2020/12/12 00:38:02 tom Exp $ */

#ifndef ETI_MENU
#define ETI_MENU

#ifdef AMIGA
#define TEXT TEXT_ncurses
#endif

#include <curses.h>
#include <eti.h>

#ifdef __cplusplus
extern "C"
{
#endif

#if defined(BUILDING_MENU)
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
#else
# define MENU_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
#endif

#define MENU_WRAPPED_VAR(type,name) extern MENU_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)

#define MENU_EXPORT(type) MENU_IMPEXP type NCURSES_API
#define MENU_EXPORT_VAR(type) MENU_IMPEXP type

  typedef int Menu_Options;
  typedef int Item_Options;

/* Menu options: */
#define O_ONEVALUE      (0x01)
#define O_SHOWDESC      (0x02)
#define O_ROWMAJOR      (0x04)
#define O_IGNORECASE    (0x08)
#define O_SHOWMATCH     (0x10)
#define O_NONCYCLIC     (0x20)
#define O_MOUSE_MENU    (0x40)

/* Item options: */
#define O_SELECTABLE    (0x01)

#if !NCURSES_OPAQUE_MENU
  typedef struct
    {
      const char *str;
      unsigned short length;
    }
  TEXT;
#endif				/* !NCURSES_OPAQUE_MENU */

  struct tagMENU;

  typedef struct tagITEM
#if !NCURSES_OPAQUE_MENU
    {
      TEXT name;		/* name of menu item                         */
      TEXT description;		/* description of item, optional in display  */
      struct tagMENU *imenu;	/* Pointer to parent menu                    */
      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    