This file is indexed.

/usr/include/xview/openmenu.h is in xviewg-dev 3.2p1.4-28.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
/*	@(#)openmenu.h 20.61 93/06/28		*/
/*
 *	(c) Copyright 1989 Sun Microsystems, Inc. Sun design patents 
 *	pending in the U.S. and foreign countries. See LEGAL_NOTICE 
 *	file for terms of the license.
 */

#ifndef xview_walkmenu_DEFINED
#define xview_walkmenu_DEFINED

/*
 ***********************************************************************
 *			Include Files
 ***********************************************************************
 */

#include <xview/generic.h>
#include <xview/pkg.h>
#include <xview/attrol.h>
#include <xview/window.h>


/*
 ***********************************************************************
 *			Definitions and Macros
 ***********************************************************************
 */

/*
 * PUBLIC #defines 
 */

#define	MENU				&xv_command_menu_pkg
#define MENU_COMMAND_MENU		&xv_command_menu_pkg
#define MENU_CHOICE_MENU		&xv_choice_menu_pkg
#define MENU_TOGGLE_MENU		&xv_toggle_menu_pkg
#define MENUITEM 			&xv_menu_item_pkg

#define MENUITEM_SPACE			MENUITEM, \
					MENU_STRING, "", \
					MENU_FEEDBACK, FALSE

#define MENU_BUT  			ACTION_MENU
#define	MENU_NULL			((Menu)0)
#define	MENU_ITEM_NULL			((Menu_item)0)
#define MENU_NO_ITEM			MENU_ITEM_NULL
#define MENU_NO_VALUE			0

#define MENU_DEFAULT_NOTIFY_PROC 	menu_return_value

/*
 * PRIVATE #defines 
 */

#define	MENU_ATTR(type, ordinal)	ATTR(ATTR_PKG_MENU, type, ordinal)
#define MENU_ATTR_LIST(ltype, type, ordinal) \
	MENU_ATTR(ATTR_LIST_INLINE((ltype), (type)), (ordinal))

/*
 * Fake types -- This should be resolved someday 
 */
#define ATTR_MENU			ATTR_OPAQUE
#define ATTR_IMAGE			ATTR_OPAQUE
#define ATTR_MENU_ITEM			ATTR_OPAQUE
#define ATTR_MENU_ITEM_PAIR		ATTR_INT_PAIR
/* Alpha compatibility, mbuck@debian.org */
#if defined(__alpha)
#define ATTR_STRING_VALUE_PAIR		ATTR_OPAQUE_PAIR
#define ATTR_IMAGE_VALUE_PAIR		ATTR_OPAQUE_PAIR
#define ATTR_STRING_MENU_PAIR		ATTR_OPAQUE_PAIR
#define ATTR_IMAGE_MENU_PAIR		ATTR_OPAQUE_PAIR
#define ATTR_STRING_FUNCTION_PAIR	ATTR_OPAQUE_PAIR
#define ATTR_IMAGE_FUNCTION_PAIR	ATTR_OPAQUE_PAIR
#define ATTR_INT_MENU_ITEM_PAIR		ATTR_OPAQUE_PAIR
#else
#define ATTR_STRING_VALUE_PAIR		ATTR_INT_PAIR
#define ATTR_IMAGE_VALUE_PAIR		ATTR_INT_PAIR
#define ATTR_STRING_MENU_PAIR		ATTR_INT_PAIR
#define ATTR_IMAGE_MENU_PAIR		ATTR_INT_PAIR
#define ATTR_STRING_FUNCTION_PAIR	ATTR_INT_PAIR
#define ATTR_IMAGE_FUNCTION_PAIR	ATTR_INT_PAIR
#define ATTR_INT_MENU_ITEM_PAIR		ATTR_INT_PAIR
#endif

/* Reserved for future use */
#define	MENU_ATTR_UNUSED_FIRST		 0
#define	MENU_ATTR_UNUSED_LAST		31

#define MENU_BORDER  			2
#define MENU_PKG 			menu_pkg

/*
 * PUBLIC #defines
 * For SunView 1 compatibility. 
 */
#define menu_destroy(menu_public)	xv_destroy(menu_public)

/*
 ***********************************************************************
 *		Typedefs, Enumerations, and Structures
 ***********************************************************************
 */

typedef	Xv_opaque 		Menu;
typedef	Xv_opaque 		Menu_item;

typedef enum {
	MENU_ACTION_IMAGE	= MENU_ATTR(ATTR_IMAGE_FUNCTION_PAIR,	  1),
	MENU_ACTION_ITEM	= MENU_ATTR(ATTR_STRING_FUNCTION_PAIR,	  3),
	MENU_APPEND_ITEM	= MENU_ATTR(ATTR_MENU_ITEM,		  9),
	MENU_CLASS   		= MENU_ATTR(ATTR_ENUM, 			 12),
	MENU_COLOR		= MENU_ATTR(ATTR_INT,			 15),
	MENU_COL_MAJOR		= MENU_ATTR(ATTR_BOOLEAN, 		 18),
	MENU_DEFAULT		= MENU_ATTR(ATTR_INT,			 21),
	MENU_DEFAULT_ITEM	= MENU_ATTR(ATTR_MENU_ITEM,		 24),
	MENU_DESCEND_FIRST	= MENU_ATTR(ATTR_BOOLEAN, 		 27), 
/*NYI*/	MENU_DISABLE_ITEM	= MENU_ATTR(ATTR_ENUM,			 30),
	MENU_DONE_PROC		= MENU_ATTR(ATTR_FUNCTION_PTR,	31),
	MENU_FEEDBACK		= MENU_ATTR(ATTR_BOOLEAN,		 33), 
/*--G*/	MENU_FIRST_EVENT	= MENU_ATTR(ATTR_NO_VALUE,		 36), 
/* Alpha compatibility, mbuck@debian.org */
#if defined(__alpha)
	MENU_GEN_PIN_WINDOW	= MENU_ATTR(ATTR_OPAQUE_PAIR, 		 39),
#else
	MENU_GEN_PIN_WINDOW	= MENU_ATTR(ATTR_INT_PAIR, 		 39),
#endif
	MENU_GEN_PROC		= MENU_ATTR(ATTR_FUNCTION_PTR,		 42), 
	MENU_GEN_PROC_IMAGE	= MENU_ATTR(ATTR_IMAGE_FUNCTION_PAIR,	 45), 
	MENU_GEN_PROC_ITEM	= MENU_ATTR(ATTR_STRING_FUNCTION_PAIR,	 48), 
	MENU_GEN_PULLRIGHT	= MENU_ATTR(ATTR_FUNCTION_PTR,		 51), 
	MENU_GEN_PULLRIGHT_IMAGE= MENU_ATTR(ATTR_IMAGE_FUNCTION_PAIR,	 54), 
	MENU_GEN_PULLRIGHT_ITEM	= MENU_ATTR(ATTR_STRING_FUNCTION_PAIR,	 57), 
	MENU_IMAGE		= MENU_ATTR(ATTR_IMAGE,			 60),
	MENU_IMAGES		= MENU_ATTR_LIST(ATTR_NULL, ATTR_IMAGE,	 63),
	MENU_IMAGE_ITEM		= MENU_ATTR(ATTR_IMAGE_VALUE_PAIR,	 66),
	MENU_INACTIVE		= MENU_ATTR(ATTR_BOOLEAN,		 69), 
	MENU_INSERT		= MENU_ATTR(ATTR_INT_MENU_ITEM_PAIR,	 81),
	MENU_INSERT_ITEM	= MENU_ATTR(ATTR_MENU_ITEM_PAIR,	 84),
	MENU_INVERT		= MENU_ATTR(ATTR_BOOLEAN,		 87), 
	MENU_ITEM		= MENU_ATTR_LIST(ATTR_RECURSIVE, ATTR_AV, 90),
/*--G*/	MENU_LAST_EVENT		= MENU_ATTR(ATTR_NO_VALUE,		 99), 
	/*
	 * MENU_MENU is a fake attribute returned by MENU_TYPE 
	 */
	MENU_MENU		= MENU_ATTR(ATTR_NO_VALUE,		102), 
	MENU_NCOLS		= MENU_ATTR(ATTR_INT,			105),
/*--G*/	MENU_NITEMS		= MENU_ATTR(ATTR_NO_VALUE,		108), 
	MENU_NOTIFY_PROC	= MENU_ATTR(ATTR_FUNCTION_PTR,		  6),
	MENU_NOTIFY_STATUS	= MENU_ATTR(ATTR_INT,		111),
	/*
	 * The origin for MENU_NTH_ITEM is 1 
	 */
	MENU_NTH_ITEM		= MENU_ATTR(ATTR_INT,			114), 
	MENU_NROWS		= MENU_ATTR(ATTR_INT,			117),
	MENU_PARENT		= MENU_ATTR(ATTR_OPAQUE,		119),
	MENU_PIN		= MENU_ATTR(ATTR_BOOLEAN, 		120),
	MENU_PIN_PROC		= MENU_ATTR(ATTR_FUNCTION_PTR, 		123),
	MENU_PIN_WINDOW		= MENU_ATTR(ATTR_OPAQUE, 		126),
	MENU_PULLRIGHT		= MENU_ATTR(ATTR_MENU,			129),
	MENU_PULLRIGHT_IMAGE	= MENU_ATTR(ATTR_IMAGE_MENU_PAIR,	135),
	MENU_PULLRIGHT_ITEM	= MENU_ATTR(ATTR_STRING_MENU_PAIR,	138),
	MENU_RELEASE		= MENU_ATTR(ATTR_NO_VALUE,		141), 
	MENU_RELEASE_IMAGE	= MENU_ATTR(ATTR_NO_VALUE,		144), 
	MENU_REMOVE		= MENU_ATTR(ATTR_INT,			147),
	MENU_REMOVE_ITEM	= MENU_ATTR(ATTR_MENU_ITEM,		150),
	MENU_REPLACE		= MENU_ATTR(ATTR_INT_MENU_ITEM_PAIR,	153),
	MENU_REPLACE_ITEM	= MENU_ATTR(ATTR_MENU_ITEM_PAIR,	156),
	MENU_SELECTED		= MENU_ATTR(ATTR_INT,			159),
	MENU_SELECTED_ITEM	= MENU_ATTR(ATTR_MENU_ITEM,		162),
	MENU_STRING		= MENU_ATTR(ATTR_STRING,		165),
	MENU_STRINGS		= MENU_ATTR_LIST(ATTR_NULL, ATTR_STRING,168),
	MENU_STRING_ITEM	= MENU_ATTR(ATTR_STRING_VALUE_PAIR,	171),
	MENU_TITLE		= MENU_ATTR(ATTR_NO_VALUE, 		174),
	MENU_TITLE_IMAGE	= MENU_ATTR(ATTR_IMAGE,			177),
	MENU_TITLE_ITEM		= MENU_ATTR(ATTR_STRING,		180),
/*--G*/	MENU_TYPE		= MENU_ATTR(ATTR_NO_VALUE,		183), 
	MENU_VALID_RESULT	= MENU_ATTR(ATTR_INT,			186),
	MENU_VALUE		= MENU_ATTR(ATTR_OPAQUE,		189), 
        /* ACC_XVIEW */
	MENU_ACTION_ACCELERATOR = MENU_ATTR(ATTR_OPAQUE_TRIPLE,		240),
	MENU_STRING_AND_ACCELERATOR = MENU_ATTR(ATTR_OPAQUE_PAIR,	242),
	MENU_ACCELERATOR 	= MENU_ATTR(ATTR_STRING,                244),
	MENU_STRINGS_AND_ACCELERATORS = 
			MENU_ATTR_LIST(ATTR_NULL, ATTR_OPAQUE_PAIR,	246),
        /* ACC_XVIEW */

	/*
	 * Private Attributes 
	 */
	MENU_BUSY_PROC		= MENU_ATTR(ATTR_FUNCTION_PTR,		195),
	MENU_BUTTON		= MENU_ATTR(ATTR_INT, 			198), 
	MENU_CURSOR		= MENU_ATTR(ATTR_OPAQUE,		201),
	MENU_ENABLE_RECT	= MENU_ATTR(ATTR_INT, 			207),
	MENU_FD			= MENU_ATTR(ATTR_INT, 			210), 
        /* ACC_XVIEW */
	MENU_FRAME_ADD		= MENU_ATTR(ATTR_OPAQUE,		248), 
	MENU_FRAME_DELETE	= MENU_ATTR(ATTR_OPAQUE,		249), 
	MENU_ACC_KEY		= MENU_ATTR(ATTR_STRING,		250),
	MENU_ACC_QUAL		= MENU_ATTR(ATTR_STRING,		251),
        /* ACC_XVIEW */
	MENU_HORIZONTAL_LINE	= MENU_ATTR(ATTR_INT,			213),
	MENU_IE			= MENU_ATTR(ATTR_INT, 			216), 
	MENU_LINE_AFTER_ITEM	= MENU_ATTR(ATTR_INT,			219),
	MENU_POS		= MENU_ATTR(ATTR_INT_PAIR, 		222), 
	MENU_POSITION_RECT	= MENU_ATTR(ATTR_INT,			225),
	MENU_PULLDOWN		= MENU_ATTR(ATTR_INT, 			228),
	MENU_SHADOW_MENU	= MENU_ATTR(ATTR_OPAQUE,		230),
	MENU_SHADOW_GC		= MENU_ATTR(ATTR_OPAQUE,		231),
	MENU_WINDOW_MENU	= MENU_ATTR(ATTR_OPAQUE,		233),
	MENU_VERTICAL_LINE	= MENU_ATTR(ATTR_INT,			234),
	/*
	 * For SunView 1 Compatibility 
	 */
	MENU_ACTION		= MENU_NOTIFY_PROC,
	MENU_ACTION_PROC	= MENU_NOTIFY_PROC,
	MENU_CLIENT_DATA    	= MENU_ATTR(ATTR_OPAQUE,         	15),
	MENU_PULLRIGHT_DELTA    = MENU_ATTR(ATTR_INT,           	132)

	/*********************************
	 * Internationalization Attributes
	 *********************************/
#ifdef OW_I18N
                                                                            ,
	MENU_ACTION_ITEM_WCS    = MENU_ATTR(ATTR_STRING_FUNCTION_PAIR,    4),
	MENU_GEN_PIN_WINDOW_WCS = MENU_ATTR(ATTR_INT_PAIR,               40),
	MENU_GEN_PROC_ITEM_WCS  = MENU_ATTR(ATTR_STRING_FUNCTION_PAIR,   49),
	MENU_GEN_PULLRIGHT_ITEM_WCS     = MENU_ATTR(ATTR_STRING_FUNCTION_PAIR,
		58),
	MENU_PULLRIGHT_ITEM_WCS = MENU_ATTR(ATTR_STRING_MENU_PAIR,      139),
	MENU_STRING_WCS         = MENU_ATTR(ATTR_WSTRING,                166),
	MENU_STRINGS_WCS        = MENU_ATTR_LIST(ATTR_NULL, ATTR_WSTRING,169),
	MENU_STRING_ITEM_WCS    = MENU_ATTR(ATTR_STRING_VALUE_PAIR,     172),
	MENU_TITLE_ITEM_WCS     = MENU_ATTR(ATTR_WSTRING,                181),
        /* ACC_XVIEW */
	MENU_ACTION_ACCELERATOR_WCS = MENU_ATTR(ATTR_OPAQUE_TRIPLE,	247),
	MENU_STRING_AND_ACCELERATOR_WCS = MENU_ATTR(ATTR_OPAQUE_PAIR,	243),
	MENU_ACCELERATOR_WCS 	= MENU_ATTR(ATTR_STRING,                245),
	MENU_STRINGS_AND_ACCELERATORS_WCS = 
			MENU_ATTR_LIST(ATTR_NULL, ATTR_OPAQUE_PAIR,	241)
        /* ACC_XVIEW */
#endif /* OW_I18N */

} Menu_attribute;

typedef enum {
	MENU_COMMAND, 
	MENU_CHOICE, 
	MENU_TOGGLE
} Menu_class;

typedef enum {
	MENU_PROVIDE_FEEDBACK, 			/* not default, selected     */
	MENU_REMOVE_FEEDBACK,			/* not default, not selected */
	MENU_SELECTED_DEFAULT_FEEDBACK,		/* default, selected         */
	MENU_DEFAULT_FEEDBACK,			/* default, not selected     */
	MENU_BUSY_FEEDBACK				/* 50% gray */
} Menu_feedback;

/*
 * New generate names intended to be less confusing 
 */
typedef enum {
	MENU_DISPLAY, 
	MENU_DISPLAY_DONE, 
	MENU_NOTIFY, 
	MENU_NOTIFY_DONE
} Menu_generate;

typedef struct {
	Xv_generic_struct	parent_data;
	Xv_opaque		private_data;
} Xv_menu;

typedef struct {
	Xv_generic_struct	parent_data;
	Xv_opaque		private_data;
} Xv_menu_item;

/*
 ***********************************************************************	
 *				Globals
 ***********************************************************************
 */

/*
 * PUBLIC variables 
 */

extern Xv_pkg		xv_command_menu_pkg;
extern Xv_pkg		xv_choice_menu_pkg;
extern Xv_pkg		xv_toggle_menu_pkg;
extern Xv_pkg		xv_menu_item_pkg;

/*
 * PUBLIC variables 
 * for SunView 1 compatibility
 */

extern struct pixrect 	menu_gray50_pr;

/*
 * PUBLIC functions 
 */
EXTERN_FUNCTION (Xv_opaque menu_return_value, (Menu menu, Menu_item item));
EXTERN_FUNCTION (Xv_opaque menu_return_item, (Menu menu, Menu_item item));
EXTERN_FUNCTION (void menu_show, (Menu menu, Xv_Window win, Event *event, DOTDOTDOT));

/*
 * PRIVATE functions 
 */
EXTERN_FUNCTION (void menu_return_default, (Menu menu, int depth, Event *event));
EXTERN_FUNCTION (void menu_select_default, (Menu menu));

/* 
 * PUBLIC functions 
 * for SunView 1 compatibility 
 */
 
EXTERN_FUNCTION (Menu menu_create, (Attr_attribute attr1, DOTDOTDOT));
EXTERN_FUNCTION (Menu_item menu_create_item, (Attr_attribute attr1, DOTDOTDOT));
EXTERN_FUNCTION (Menu_item 	menu_find, (Menu menu, DOTDOTDOT));
EXTERN_FUNCTION (Xv_opaque 	menu_get, (Menu menu, Xv_opaque attr, Xv_opaque v1));
EXTERN_FUNCTION (Xv_opaque 	menu_set, (Menu menu, DOTDOTDOT));
EXTERN_FUNCTION (void 		menu_destroy_with_proc, (Menu menu, void (*proc)()));

#endif /* xview_walkmenu_DEFINED */