Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../proc/self/root/usr/include
File: menu.h
/****************************************************************************
[0] Fix | Delete
* Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
[1] Fix | Delete
* *
[2] Fix | Delete
* Permission is hereby granted, free of charge, to any person obtaining a *
[3] Fix | Delete
* copy of this software and associated documentation files (the *
[4] Fix | Delete
* "Software"), to deal in the Software without restriction, including *
[5] Fix | Delete
* without limitation the rights to use, copy, modify, merge, publish, *
[6] Fix | Delete
* distribute, distribute with modifications, sublicense, and/or sell *
[7] Fix | Delete
* copies of the Software, and to permit persons to whom the Software is *
[8] Fix | Delete
* furnished to do so, subject to the following conditions: *
[9] Fix | Delete
* *
[10] Fix | Delete
* The above copyright notice and this permission notice shall be included *
[11] Fix | Delete
* in all copies or substantial portions of the Software. *
[12] Fix | Delete
* *
[13] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
[14] Fix | Delete
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
[15] Fix | Delete
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
[16] Fix | Delete
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
[17] Fix | Delete
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
[18] Fix | Delete
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
[19] Fix | Delete
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
[20] Fix | Delete
* *
[21] Fix | Delete
* Except as contained in this notice, the name(s) of the above copyright *
[22] Fix | Delete
* holders shall not be used in advertising or otherwise to promote the *
[23] Fix | Delete
* sale, use or other dealings in this Software without prior written *
[24] Fix | Delete
* authorization. *
[25] Fix | Delete
****************************************************************************/
[26] Fix | Delete
[27] Fix | Delete
/****************************************************************************
[28] Fix | Delete
* Author: Juergen Pfeifer, 1995,1997 *
[29] Fix | Delete
****************************************************************************/
[30] Fix | Delete
[31] Fix | Delete
/* $Id: menu.h,v 1.23 2017/02/11 16:54:04 tom Exp $ */
[32] Fix | Delete
[33] Fix | Delete
#ifndef ETI_MENU
[34] Fix | Delete
#define ETI_MENU
[35] Fix | Delete
[36] Fix | Delete
#ifdef AMIGA
[37] Fix | Delete
#define TEXT TEXT_ncurses
[38] Fix | Delete
#endif
[39] Fix | Delete
[40] Fix | Delete
#include <curses.h>
[41] Fix | Delete
#include <eti.h>
[42] Fix | Delete
[43] Fix | Delete
#ifdef __cplusplus
[44] Fix | Delete
extern "C" {
[45] Fix | Delete
#endif
[46] Fix | Delete
[47] Fix | Delete
typedef int Menu_Options;
[48] Fix | Delete
typedef int Item_Options;
[49] Fix | Delete
[50] Fix | Delete
/* Menu options: */
[51] Fix | Delete
#define O_ONEVALUE (0x01)
[52] Fix | Delete
#define O_SHOWDESC (0x02)
[53] Fix | Delete
#define O_ROWMAJOR (0x04)
[54] Fix | Delete
#define O_IGNORECASE (0x08)
[55] Fix | Delete
#define O_SHOWMATCH (0x10)
[56] Fix | Delete
#define O_NONCYCLIC (0x20)
[57] Fix | Delete
#define O_MOUSE_MENU (0x40)
[58] Fix | Delete
[59] Fix | Delete
/* Item options: */
[60] Fix | Delete
#define O_SELECTABLE (0x01)
[61] Fix | Delete
[62] Fix | Delete
#if !NCURSES_OPAQUE_MENU
[63] Fix | Delete
typedef struct
[64] Fix | Delete
{
[65] Fix | Delete
const char* str;
[66] Fix | Delete
unsigned short length;
[67] Fix | Delete
} TEXT;
[68] Fix | Delete
#endif /* !NCURSES_OPAQUE_MENU */
[69] Fix | Delete
[70] Fix | Delete
struct tagMENU;
[71] Fix | Delete
[72] Fix | Delete
typedef struct tagITEM
[73] Fix | Delete
#if !NCURSES_OPAQUE_MENU
[74] Fix | Delete
{
[75] Fix | Delete
TEXT name; /* name of menu item */
[76] Fix | Delete
TEXT description; /* description of item, optional in display */
[77] Fix | Delete
struct tagMENU *imenu; /* Pointer to parent menu */
[78] Fix | Delete
void *userptr; /* Pointer to user defined per item data */
[79] Fix | Delete
Item_Options opt; /* Item options */
[80] Fix | Delete
short index; /* Item number if connected to a menu */
[81] Fix | Delete
short y; /* y and x location of item in menu */
[82] Fix | Delete
short x;
[83] Fix | Delete
bool value; /* Selection value */
[84] Fix | Delete
[85] Fix | Delete
struct tagITEM *left; /* neighbor items */
[86] Fix | Delete
struct tagITEM *right;
[87] Fix | Delete
struct tagITEM *up;
[88] Fix | Delete
struct tagITEM *down;
[89] Fix | Delete
[90] Fix | Delete
}
[91] Fix | Delete
#endif /* !NCURSES_OPAQUE_MENU */
[92] Fix | Delete
ITEM;
[93] Fix | Delete
[94] Fix | Delete
typedef void (*Menu_Hook)(struct tagMENU *);
[95] Fix | Delete
[96] Fix | Delete
typedef struct tagMENU
[97] Fix | Delete
#if 1 /* not yet: !NCURSES_OPAQUE_MENU */
[98] Fix | Delete
{
[99] Fix | Delete
short height; /* Nr. of chars high */
[100] Fix | Delete
short width; /* Nr. of chars wide */
[101] Fix | Delete
short rows; /* Nr. of items high */
[102] Fix | Delete
short cols; /* Nr. of items wide */
[103] Fix | Delete
short frows; /* Nr. of formatted items high */
[104] Fix | Delete
short fcols; /* Nr. of formatted items wide */
[105] Fix | Delete
short arows; /* Nr. of items high (actual) */
[106] Fix | Delete
short namelen; /* Max. name length */
[107] Fix | Delete
short desclen; /* Max. description length */
[108] Fix | Delete
short marklen; /* Length of mark, if any */
[109] Fix | Delete
short itemlen; /* Length of one item */
[110] Fix | Delete
short spc_desc; /* Spacing for descriptor */
[111] Fix | Delete
short spc_cols; /* Spacing for columns */
[112] Fix | Delete
short spc_rows; /* Spacing for rows */
[113] Fix | Delete
char *pattern; /* Buffer to store match chars */
[114] Fix | Delete
short pindex; /* Index into pattern buffer */
[115] Fix | Delete
WINDOW *win; /* Window containing menu */
[116] Fix | Delete
WINDOW *sub; /* Subwindow for menu display */
[117] Fix | Delete
WINDOW *userwin; /* User's window */
[118] Fix | Delete
WINDOW *usersub; /* User's subwindow */
[119] Fix | Delete
ITEM **items; /* array of items */
[120] Fix | Delete
short nitems; /* Nr. of items in menu */
[121] Fix | Delete
ITEM *curitem; /* Current item */
[122] Fix | Delete
short toprow; /* Top row of menu */
[123] Fix | Delete
chtype fore; /* Selection attribute */
[124] Fix | Delete
chtype back; /* Nonselection attribute */
[125] Fix | Delete
chtype grey; /* Inactive attribute */
[126] Fix | Delete
unsigned char pad; /* Pad character */
[127] Fix | Delete
[128] Fix | Delete
Menu_Hook menuinit; /* User hooks */
[129] Fix | Delete
Menu_Hook menuterm;
[130] Fix | Delete
Menu_Hook iteminit;
[131] Fix | Delete
Menu_Hook itemterm;
[132] Fix | Delete
[133] Fix | Delete
void *userptr; /* Pointer to menus user data */
[134] Fix | Delete
char *mark; /* Pointer to marker string */
[135] Fix | Delete
[136] Fix | Delete
Menu_Options opt; /* Menu options */
[137] Fix | Delete
unsigned short status; /* Internal state of menu */
[138] Fix | Delete
}
[139] Fix | Delete
#endif /* !NCURSES_OPAQUE_MENU */
[140] Fix | Delete
MENU;
[141] Fix | Delete
[142] Fix | Delete
[143] Fix | Delete
/* Define keys */
[144] Fix | Delete
[145] Fix | Delete
#define REQ_LEFT_ITEM (KEY_MAX + 1)
[146] Fix | Delete
#define REQ_RIGHT_ITEM (KEY_MAX + 2)
[147] Fix | Delete
#define REQ_UP_ITEM (KEY_MAX + 3)
[148] Fix | Delete
#define REQ_DOWN_ITEM (KEY_MAX + 4)
[149] Fix | Delete
#define REQ_SCR_ULINE (KEY_MAX + 5)
[150] Fix | Delete
#define REQ_SCR_DLINE (KEY_MAX + 6)
[151] Fix | Delete
#define REQ_SCR_DPAGE (KEY_MAX + 7)
[152] Fix | Delete
#define REQ_SCR_UPAGE (KEY_MAX + 8)
[153] Fix | Delete
#define REQ_FIRST_ITEM (KEY_MAX + 9)
[154] Fix | Delete
#define REQ_LAST_ITEM (KEY_MAX + 10)
[155] Fix | Delete
#define REQ_NEXT_ITEM (KEY_MAX + 11)
[156] Fix | Delete
#define REQ_PREV_ITEM (KEY_MAX + 12)
[157] Fix | Delete
#define REQ_TOGGLE_ITEM (KEY_MAX + 13)
[158] Fix | Delete
#define REQ_CLEAR_PATTERN (KEY_MAX + 14)
[159] Fix | Delete
#define REQ_BACK_PATTERN (KEY_MAX + 15)
[160] Fix | Delete
#define REQ_NEXT_MATCH (KEY_MAX + 16)
[161] Fix | Delete
#define REQ_PREV_MATCH (KEY_MAX + 17)
[162] Fix | Delete
[163] Fix | Delete
#define MIN_MENU_COMMAND (KEY_MAX + 1)
[164] Fix | Delete
#define MAX_MENU_COMMAND (KEY_MAX + 17)
[165] Fix | Delete
[166] Fix | Delete
/*
[167] Fix | Delete
* Some AT&T code expects MAX_COMMAND to be out-of-band not
[168] Fix | Delete
* just for menu commands but for forms ones as well.
[169] Fix | Delete
*/
[170] Fix | Delete
#if defined(MAX_COMMAND)
[171] Fix | Delete
# if (MAX_MENU_COMMAND > MAX_COMMAND)
[172] Fix | Delete
# error Something is wrong -- MAX_MENU_COMMAND is greater than MAX_COMMAND
[173] Fix | Delete
# elif (MAX_COMMAND != (KEY_MAX + 128))
[174] Fix | Delete
# error Something is wrong -- MAX_COMMAND is already inconsistently defined.
[175] Fix | Delete
# endif
[176] Fix | Delete
#else
[177] Fix | Delete
# define MAX_COMMAND (KEY_MAX + 128)
[178] Fix | Delete
#endif
[179] Fix | Delete
[180] Fix | Delete
[181] Fix | Delete
/* --------- prototypes for libmenu functions ----------------------------- */
[182] Fix | Delete
[183] Fix | Delete
extern NCURSES_EXPORT(ITEM **) menu_items (const MENU *);
[184] Fix | Delete
extern NCURSES_EXPORT(ITEM *) current_item (const MENU *);
[185] Fix | Delete
extern NCURSES_EXPORT(ITEM *) new_item (const char *,const char *);
[186] Fix | Delete
[187] Fix | Delete
extern NCURSES_EXPORT(MENU *) new_menu (ITEM **);
[188] Fix | Delete
[189] Fix | Delete
extern NCURSES_EXPORT(Item_Options) item_opts (const ITEM *);
[190] Fix | Delete
extern NCURSES_EXPORT(Menu_Options) menu_opts (const MENU *);
[191] Fix | Delete
[192] Fix | Delete
extern NCURSES_EXPORT(Menu_Hook) item_init (const MENU *);
[193] Fix | Delete
extern NCURSES_EXPORT(Menu_Hook) item_term (const MENU *);
[194] Fix | Delete
extern NCURSES_EXPORT(Menu_Hook) menu_init (const MENU *);
[195] Fix | Delete
extern NCURSES_EXPORT(Menu_Hook) menu_term (const MENU *);
[196] Fix | Delete
[197] Fix | Delete
extern NCURSES_EXPORT(WINDOW *) menu_sub (const MENU *);
[198] Fix | Delete
extern NCURSES_EXPORT(WINDOW *) menu_win (const MENU *);
[199] Fix | Delete
[200] Fix | Delete
extern NCURSES_EXPORT(const char *) item_description (const ITEM *);
[201] Fix | Delete
extern NCURSES_EXPORT(const char *) item_name (const ITEM *);
[202] Fix | Delete
extern NCURSES_EXPORT(const char *) menu_mark (const MENU *);
[203] Fix | Delete
extern NCURSES_EXPORT(const char *) menu_request_name (int);
[204] Fix | Delete
[205] Fix | Delete
extern NCURSES_EXPORT(char *) menu_pattern (const MENU *);
[206] Fix | Delete
[207] Fix | Delete
extern NCURSES_EXPORT(void *) menu_userptr (const MENU *);
[208] Fix | Delete
extern NCURSES_EXPORT(void *) item_userptr (const ITEM *);
[209] Fix | Delete
[210] Fix | Delete
extern NCURSES_EXPORT(chtype) menu_back (const MENU *);
[211] Fix | Delete
extern NCURSES_EXPORT(chtype) menu_fore (const MENU *);
[212] Fix | Delete
extern NCURSES_EXPORT(chtype) menu_grey (const MENU *);
[213] Fix | Delete
[214] Fix | Delete
extern NCURSES_EXPORT(int) free_item (ITEM *);
[215] Fix | Delete
extern NCURSES_EXPORT(int) free_menu (MENU *);
[216] Fix | Delete
extern NCURSES_EXPORT(int) item_count (const MENU *);
[217] Fix | Delete
extern NCURSES_EXPORT(int) item_index (const ITEM *);
[218] Fix | Delete
extern NCURSES_EXPORT(int) item_opts_off (ITEM *,Item_Options);
[219] Fix | Delete
extern NCURSES_EXPORT(int) item_opts_on (ITEM *,Item_Options);
[220] Fix | Delete
extern NCURSES_EXPORT(int) menu_driver (MENU *,int);
[221] Fix | Delete
extern NCURSES_EXPORT(int) menu_opts_off (MENU *,Menu_Options);
[222] Fix | Delete
extern NCURSES_EXPORT(int) menu_opts_on (MENU *,Menu_Options);
[223] Fix | Delete
extern NCURSES_EXPORT(int) menu_pad (const MENU *);
[224] Fix | Delete
extern NCURSES_EXPORT(int) pos_menu_cursor (const MENU *);
[225] Fix | Delete
extern NCURSES_EXPORT(int) post_menu (MENU *);
[226] Fix | Delete
extern NCURSES_EXPORT(int) scale_menu (const MENU *,int *,int *);
[227] Fix | Delete
extern NCURSES_EXPORT(int) set_current_item (MENU *menu,ITEM *item);
[228] Fix | Delete
extern NCURSES_EXPORT(int) set_item_init (MENU *, Menu_Hook);
[229] Fix | Delete
extern NCURSES_EXPORT(int) set_item_opts (ITEM *,Item_Options);
[230] Fix | Delete
extern NCURSES_EXPORT(int) set_item_term (MENU *, Menu_Hook);
[231] Fix | Delete
extern NCURSES_EXPORT(int) set_item_userptr (ITEM *, void *);
[232] Fix | Delete
extern NCURSES_EXPORT(int) set_item_value (ITEM *,bool);
[233] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_back (MENU *,chtype);
[234] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_fore (MENU *,chtype);
[235] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_format (MENU *,int,int);
[236] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_grey (MENU *,chtype);
[237] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_init (MENU *, Menu_Hook);
[238] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_items (MENU *,ITEM **);
[239] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_mark (MENU *, const char *);
[240] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_opts (MENU *,Menu_Options);
[241] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_pad (MENU *,int);
[242] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_pattern (MENU *,const char *);
[243] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_sub (MENU *,WINDOW *);
[244] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_term (MENU *, Menu_Hook);
[245] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_userptr (MENU *,void *);
[246] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_win (MENU *,WINDOW *);
[247] Fix | Delete
extern NCURSES_EXPORT(int) set_top_row (MENU *,int);
[248] Fix | Delete
extern NCURSES_EXPORT(int) top_row (const MENU *);
[249] Fix | Delete
extern NCURSES_EXPORT(int) unpost_menu (MENU *);
[250] Fix | Delete
extern NCURSES_EXPORT(int) menu_request_by_name (const char *);
[251] Fix | Delete
extern NCURSES_EXPORT(int) set_menu_spacing (MENU *,int,int,int);
[252] Fix | Delete
extern NCURSES_EXPORT(int) menu_spacing (const MENU *,int *,int *,int *);
[253] Fix | Delete
[254] Fix | Delete
[255] Fix | Delete
extern NCURSES_EXPORT(bool) item_value (const ITEM *);
[256] Fix | Delete
extern NCURSES_EXPORT(bool) item_visible (const ITEM *);
[257] Fix | Delete
[258] Fix | Delete
extern NCURSES_EXPORT(void) menu_format (const MENU *,int *,int *);
[259] Fix | Delete
[260] Fix | Delete
#if NCURSES_SP_FUNCS
[261] Fix | Delete
extern NCURSES_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **);
[262] Fix | Delete
#endif
[263] Fix | Delete
[264] Fix | Delete
#ifdef __cplusplus
[265] Fix | Delete
}
[266] Fix | Delete
#endif
[267] Fix | Delete
[268] Fix | Delete
#endif /* ETI_MENU */
[269] Fix | Delete
[270] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function