This file is indexed.

/usr/share/vala-0.14/vapi/curses.vapi is in valac-0.14 0.14.2-2ubuntu2.

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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
/* curses.vala
 *
 * Copyright (c) 2007 Ed Schouten <ed@fxq.nl>
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

[CCode (lower_case_cprefix = "", cheader_filename = "curses.h")]
namespace Curses {
	public const int COLORS;
	public const int COLOR_PAIRS;

	public enum Color {
		BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE
	}

	public enum Acs {
		ULCORNER, LLCORNER, URCORNER, LRCORNER, LTEE, RTEE,
		BTEE, TTEE, HLINE, VLINE, PLUS, S1, S9, DIAMOND,
		CKBOARD, DEGREE, PLMINUS, BULLET, LARROW, RARROW,
		DARROW, UARROW, BOARD, LANTERN, BLOCK, S3, S7, LEQUAL,
		GEQUAL, PI, NEQUAL, STERLING, BSSB, SSBB, BBSS, SBBS,
		SBSS, SSSB, SSBS, BSSS, BSBS, SBSB, SSSS
	}

	public Window stdscr;
	public Window curscr;
	public Window newscr;

	public const int LINES;
	public const int COLS;
	public const int TABSIZE;

	public const int ESCDELAY;

	[Compact]
	[CCode (copy_function = "dupwin", free_function = "delwin", cname = "WINDOW", cprefix = "")]
	public class Window {
		public int box(ulong verch, ulong horch);
		public int clearok(bool bf);
		public int copywin(Window dstwin, int sminrow, int smincol, int dminrow, int dmincol, int dmaxrow, int dmaxcol, int overlay);
		public Window derwin(int nlines, int ncols, int begin_y, int begin_x);
		[CCode (cname = "dupwin")]
		public Window copy();
		public ulong getbkgd();
		public static Window getwin(GLib.FileStream filep);
		public void idcok(bool bf);
		public int idlok(bool bf);
		public void immedok(bool bf);
		public int intrflush(bool bf);
		public bool is_linetouched(int line);
		public bool is_wintouched();
		public int keypad(bool bf);
		public int leaveok(bool bf);
		public int meta(bool bf);
		public int mvderwin(int par_y, int par_x);
		[CCode (cname = "mvwaddch")]
		public int mvaddch(int y, int x, ulong ch);
		[CCode (cname = "mvwaddchnstr")]
		public int mvaddchnstr(int y, int x, [CCode (array_length = false)] ulong[] chstr, int n);
		[CCode (cname = "mvwaddchstr")]
		public int mvaddchstr(int y, int x, [CCode (array_length = false)] ulong[] chstr);
		[CCode (cname = "mvwaddnstr")]
		public int mvaddnstr(int y, int x, string str, int n);
		[CCode (cname = "mvwaddstr")]
		public int mvaddstr(int y, int x, string str);
		[CCode (cname = "mvwchgat")]
		public int mvchgat(int y, int x, int n, ulong attr, short color);
		[CCode (cname = "mvwdelch")]
		public int mvdelch(int y, int x);
		[CCode (cname = "mvwgetch")]
		public int mvgetch(int y, int x);
		[CCode (cname = "mvwgetnstr")]
		public int mvgetnstr(int y, int x, string str, int n);
		[CCode (cname = "mvwgetstr")]
		public int mvgetstr(int y, int x, string str);
		[CCode (cname = "mvwhline")]
		public int mvhline(int y, int x, ulong ch, int n);
		public int mvwin(int y, int x);
		[CCode (cname = "mvwinch")]
		public ulong mvinch(int y, int x);
		[CCode (cname = "mvwinchnstr")]
		public int mvinchnstr(int y, int x, [CCode (array_length = false)] ulong[] chstr, int n);
		[CCode (cname = "mvwinchstr")]
		public int mvinchstr(int y, int x, [CCode (array_length = false)] ulong[] chstr);
		[CCode (cname = "mvwinnstr")]
		public int mvinnstr(int y, int x, string str, int n);
		[CCode (cname = "mvwinsch")]
		public int mvinsch(int y, int x, ulong ch);
		[CCode (cname = "mvwinsnstr")]
		public int mvinsnstr(int y, int x, string str, int n);
		[CCode (cname = "mvwinsstr")]
		public int mvinsstr(int y, int x, string str);
		[CCode (cname = "mvwinstr")]
		public int mvinstr(int y, int x, string str);
		[CCode (cname = "mvwprintw")]
		[PrintfLike]
		public int mvprintw(int y, int x, string str, ...);
		[CCode (cname = "mvwscanw")]
		[PrintfLike]
		public int mvscanw(int y, int x, string str, ...);
		[CCode (cname = "mvwvline")]
		public int mvvline(int y, int x, ulong ch, int n);
		[CCode (cname = "newwin")]
		public Window(int nlines, int ncols, int begin_y, int begin_x);
		public int nodelay(bool bf);
		public int notimeout(bool bf);
		public int overlay(Window win);
		public int overwrite(Window win);
		public int putwin(GLib.FileStream filep);
		public int redrawwin();
		public int scroll();
		public int scrollok(bool bf);
		public Window subpad(int nlines, int ncols, int begin_y, int begin_x);
		public Window subwin(int nlines, int ncols, int begin_y, int begin_x);
		public int syncok(bool bf);
		public int touchline(int start, int count);
		public int touchwin();
		public int untouchwin();
		[CCode (cname = "waddch")]
		public int addch(ulong ch);
		public int waddchnstr([CCode (array_length = false)] ulong[] chstr, int n);
		public int waddchstr([CCode (array_length = false)] ulong[] chstr);
		public int waddnstr(string str, int n);
		[CCode (cname = "waddstr")]
		public int addstr(string str);
		[CCode (cname = "wattron")]
		public int attron(ulong attrs);
		[CCode (cname = "wattroff")]
		public int attroff(ulong attrs);
		[CCode (cname = "wattrset")]
		public int attrset(ulong attrs);
		[CCode (cname = "wattr_get")]
		public int attr_get(ref ulong attrs, ref ulong pair);
		[CCode (cname = "wattr_on")]
		public int attr_on(ulong attrs);
		[CCode (cname = "wattr_off")]
		public int attr_off(ulong attrs);
		[CCode (cname = "wattr_set")]
		public int attr_set(ulong attrs, short pair);
		[CCode (cname = "wbkgd")]
		public int bkgd(ulong ch);
		[CCode (cname = "wbkgdset")]
		public void bkgdset(ulong ch);
		[CCode (cname = "wborder")]
		public int border(ulong ls, ulong rs, ulong ts, ulong bs, ulong tl, ulong tr, ulong bl, ulong br);
		[CCode (cname = "wchgat")]
		public int chgat(int n, ulong attr, short color);
		[CCode (cname = "wclear")]
		public int clear();
		[CCode (cname = "wclrtobot")]
		public int clrtobot();
		[CCode (cname = "wclrtoeol")]
		public int clrtoeol();
		[CCode (cname = "wcolor_set")]
		public int color_set(short color_pair_number);
		[CCode (cname = "wcursyncup")]
		public void cursyncup();
		[CCode (cname = "wdelch")]
		public int delch();
		[CCode (cname = "wdeleteln")]
		public int deleteln();
		[CCode (cname = "wechochar")]
		public int echochar(ulong ch);
		[CCode (cname = "werase")]
		public int erase();
		[CCode (cname = "wgetch")]
		public int getch();
		[CCode (cname = "wgetnstr")]
		public int getnstr(string str, int n);
		[CCode (cname = "wgetstr")]
		public int getstr(string str);
		[CCode (cname = "whline")]
		public int hline(ulong ch, int n);
		[CCode (cname = "winch")]
		public ulong inch();
		[CCode (cname = "winchnstr")]
		public int inchnstr([CCode (array_length = false)] ulong[] chstr, int n);
		[CCode (cname = "winchstr")]
		public int inchstr([CCode (array_length = false)] ulong[] chstr);
		[CCode (cname = "winnstr")]
		public int innstr(string str, int n);
		[CCode (cname = "winsch")]
		public int insch(ulong ch);
		[CCode (cname = "winsdelln")]
		public int insdelln(int n);
		[CCode (cname = "winsertln")]
		public int insertln();
		[CCode (cname = "winsnstr")]
		public int insnstr(string str, int n);
		[CCode (cname = "winsstr")]
		public int insstr(string str);
		[CCode (cname = "winstr")]
		public int instr(string str);
		[CCode (cname = "wmove")]
		public int move(int y, int x);
		[CCode (cname = "wresize")]
		public int resize(int h, int w);
		[CCode (cname = "wnoutrefresh")]
		public int noutrefresh();
		[CCode (cname = "wprintw")]
		[PrintfLike]
		public int printw(string str, ...);
		[CCode (cname = "wredrawln")]
		public int redrawln(int beg_line, int num_lines);
		[CCode (cname = "wrefresh")]
		public int refresh();
		[CCode (cname = "wscanw")]
		[PrintfLike]
		public int scanw(string str, ...);
		[CCode (cname = "wscrl")]
		public int scrl(int n);
		[CCode (cname = "wsetscrreg")]
		public int setscrreg(int top, int bot);
		[CCode (cname = "wstandout")]
		public int standout();
		[CCode (cname = "wstandend")]
		public int standend();
		[CCode (cname = "wsyncdown")]
		public void syncdown();
		[CCode (cname = "wsyncup")]
		public void syncup();
		[CCode (cname = "wtimeout")]
		public void timeout(int delay);
		[CCode (cname = "wtouchln")]
		public int touchln(int y, int n, int changed);
		[CCode (cname = "wvline")]
		public int vline(ulong ch, int n);
	}

	[Compact]
	[CCode (copy_function = "dupwin", free_function = "delwin", cname = "WINDOW", cprefix = "")]
	public class Pad : Window {
		[CCode (cname = "newpad")]
		public Pad(int nlines, int ncols);
		[CCode (cname = "pechochar")]
		public int echochar(ulong ch);
		[CCode (cname = "pnoutrefresh")]
		public int noutrefresh(int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol);
		[CCode (cname = "prefresh")]
		public int refresh(int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol);
	}

	[Compact]
	[CCode (free_function = "delscreen", cname = "SCREEN", cprefix = "")]
	public class Screen {
		[CCode (cname = "newterm")]
		public Screen(string str, GLib.FileStream outfd, GLib.FileStream infd);
		public unowned Screen set_term();
	}

	public int addch(ulong ch);
	public int addchnstr([CCode (array_length = false)] ulong[] chstr, int n);
	public int addchstr([CCode (array_length = false)] ulong[] chstr);
	public int addnstr(string str, int n);
	public int addstr(string str);
	public int attroff(ulong attr);
	public int attron(ulong attr);
	public int attrset(ulong attr);
	public int attr_get(ref ulong attrs, ref short pair);
	public int attr_off(ulong attrs);
	public int attr_on(ulong attrs);
	public int attr_set(ulong attrs, short pair);
	public int baudrate();
	public int beep();
	public int bkgd(ulong ch);
	public void bkgdset(ulong ch);
	public int border(ulong ls, ulong rs, ulong ts, ulong bs, ulong tl, ulong tr, ulong bl, ulong br);
	public bool can_change_color();
	public int cbreak();
	public int chgat(int n, ulong attr, short color);
	public int clear();
	public int clrtobot();
	public int clrtoeol();
	public int color_content(short color, ref short r, ref short g, ref short b);
	public int color_set(short color_pair_number);
	public int COLOR_PAIR(int n);
	public int curs_set(int visibility);
	public int def_prog_mode();
	public int def_shell_mode();
	public int delay_output(int ms);
	public int delch();
	public int deleteln();
	public int doupdate();
	public int echo();
	public int echochar(ulong ch);
	public int erase();
	public int endwin();
	public char erasechar();
	public void filter();
	public int flash();
	public int flushinp();
	public int getch();
	public int getnstr(string str, int n);
	public int getstr(string str);
	public int halfdelay(int tenths);
	public bool has_colors();
	public bool has_ic();
	public bool has_il();
	public int hline(ulong ch, int n);
	public ulong inch();
	public int inchnstr([CCode (array_length = false)] ulong[] chstr, int n);
	public int inchstr([CCode (array_length = false)] ulong[] chstr);
	public unowned Window initscr();
	public int init_color(short color, short r, short g, short b);
	public int init_pair(short pair, Color f, Color b);
	public int innstr(string str, int n);
	public int insch(ulong ch);
	public int insdelln(int n);
	public int insertln();
	public int insnstr(string str, int n);
	public int insstr(string str);
	public int instr(string str);
	public bool isendwin();
	public string keyname(int c);
	public char killchar();
	public string ulongname();
	public int move(int y, int x);
	public int mvaddch(int y, int x, ulong ch);
	public int mvaddchnstr(int y, int x, [CCode (array_length = false)] ulong[] chstr, int n);
	public int mvaddchstr(int y, int x, [CCode (array_length = false)] ulong[] chstr);
	public int mvaddnstr(int y, int x, string str, int n);
	public int mvaddstr(int y, int x, string str);
	public int mvchgat(int y, int x, int n, ulong attr, short color);
	public int mvcur(int oldrow, int oldcol, int newrow, int newcol);
	public int mvdelch(int y, int x);
	public int mvgetch(int y, int x);
	public int mvgetnstr(int y, int x, string str, int n);
	public int mvgetstr(int y, int x, string str);
	public int mvhline(int y, int x, ulong ch, int n);
	public ulong mvinch(int y, int x);
	public int mvinchnstr(int y, int x, [CCode (array_length = false)] ulong[] chstr, int n);
	public int mvinchstr(int y, int x, [CCode (array_length = false)] ulong[] chstr);
	public int mvinnstr(int y, int x, string str, int n);
	public int mvinsch(int y, int x, ulong ch);
	public int mvinsnstr(int y, int x, string str, int n);
	public int mvinsstr(int y, int x, string str);
	public int mvinstr(int y, int x, string str);
	[PrintfLike]
	public int mvprintw(int y, int x, string str, ...);
	[PrintfLike]
	public int mvscanw(int y, int x, string str, ...);
	public int mvvline(int y, int x, ulong ch, int n);
	public int napms(int ms);
	public int nl();
	public int nocbreak();
	public int noecho();
	public int nonl();
	public void noqiflush();
	public int noraw();
	public int pair_content(short pair, ref Color f, ref Color b);
	public int PAIR_NUMBER(int attrs);
	[PrintfLike]
	public int printw(string str, ...);
	public void qiflush();
	public int raw();
	public int refresh();
	public int resetty();
	public int reset_prog_mode();
	public int reset_shell_mode();
	public delegate int RipofflineInitFunc(Window win, int n);
	public int ripoffline(int line, RipofflineInitFunc init);
	public int savetty();
	[PrintfLike]
	public int scanw(string str, ...);
	public int scr_dump(string str);
	public int scr_init(string str);
	public int scrl(int n);
	public int scr_restore(string str);
	public int scr_set(string str);
	public int setscrreg(int top, int bot);
	public int slk_attroff(ulong attrs);
	public int slk_attr_off(ulong attrs);
	public int slk_attron(ulong attrs);
	public int slk_attr_on(ulong attrs);
	public int slk_attrset(ulong attrs);
	public ulong slk_attr();
	public int slk_attr_set(ulong attrs, short pair);
	public int slk_clear();
	public int slk_color(short color_pair_number);
	public int slk_init(int fmt);
	public string slk_label(int labnum);
	public int slk_noutrefresh();
	public int slk_refresh();
	public int slk_restore();
	public int slk_set(int labnum, string label, int fmt);
	public int slk_touch();
	public int standout();
	public int standend();
	public int start_color();
	public ulong termattrs();
	public string termname();
	public void timeout(int delay);
	public int typeahead(int fd);
	public int ungetch(int ch);
	public void use_env(bool bf);
	public int vidattr(ulong attrs);
	public delegate int VidputsPutcFunc(char ch);
	public int vidputs(ulong attrs, VidputsPutcFunc putc);
	public int vline(ulong ch, int n);
	/* no vwprintw, vw_printw, vwscanw, vw_scanw - va_list */

	[CCode (cprefix = "A_")]
	public enum Attribute {
		NORMAL, ATTRIBUTES, CHARTEXT, COLOR, STANDOUT,
		UNDERLINE, REVERSE, BLINK, DIM, BOLD, ALTCHARSET, INVIS,
		PROTECT, HORIZONTAL, LEFT, LOW, RIGHT, TOP, VERTICAL
	}

	public enum Key {
		CODE_YES, MIN, BREAK, SRESET, RESET, DOWN, UP, LEFT,
		RIGHT, HOME, BACKSPACE, F0, /* XXX F(n), */ DL, IL, DC,
		IC, EIC, CLEAR, EOS, EOL, SF, SR, NPAGE, PPAGE, STAB,
		CTAB, CATAB, ENTER, PRINT, LL, A1, A3, B2, C1, C3, BTAB,
		BEG, CANCEL, CLOSE, COMMAND, COPY, CREATE, END, EXIT,
		FIND, HELP, MARK, MESSAGE, MOVE, NEXT, OPEN, OPTIONS,
		PREVIOUS, REDO, REFERENCE, REFRESH, REPLACE, RESTART,
		RESUME, SAVE, SBEG, SCANCEL, SCOMMAND, SCOPY, SCREATE,
		SDC, SDL, SELECT, SEND, SEOL, SEXIT, SFIND, SHELP,
		SHOME, SIC, SLEFT, SMESSAGE, SMOVE, SNEXT, SOPTIONS,
		SPREVIOUS, SPRINT, SREDO, SREPLACE, SRIGHT, SRSUME,
		SSAVE, SSUSPEND, SUNDO, SUSPEND, UNDO, MOUSE, RESIZE,
		EVENT, MAX
	}
	
	/* TODO: mouse + wide char support */
	[CCode (cname="MEVENT")]
	public struct MouseEvent {
		short id;
		int x;
		int y;
		int z;
		long bstate;
	}

	[CCode (cprefix="")]
	public enum MouseMask {
		ALL_MOUSE_EVENTS,
		REPORT_MOUSE_POSITION
	}

	public enum Button {
		SHIFT,
		CTRL,
		ALT,
	}

	public enum Button1 {
		PRESSED,
		RELEASED,
		CLICKED,
		DOUBLE_CLICKED,
		TRIPLE_CLICKED
	}

	public enum Button2 {
		PRESSED,
		RELEASED,
		CLICKED,
		DOUBLE_CLICKED,
		TRIPLE_CLICKED
	}

	public enum Button3 {
		PRESSED,
		RELEASED,
		CLICKED,
		DOUBLE_CLICKED,
		TRIPLE_CLICKED
	}

	public enum Button4 {
		PRESSED,
		RELEASED,
		CLICKED,
		DOUBLE_CLICKED,
		TRIPLE_CLICKED
	}

	public enum Button5 {
		PRESSED,
		RELEASED,
		CLICKED,
		DOUBLE_CLICKED,
		TRIPLE_CLICKED
	}

	public bool getmouse(out MouseEvent me);
	public int mouseinterval(int erval);
	public int mousemask(MouseMask @new, out MouseMask old);
}