* lib/Parrot/Pmc2c/MethodEmitter.pm:
[parrot.git] / languages / jako / Curses.jako
blob42088525fe5ac074cb0b8cec2aa3c8cfa0050cf8
2 # Curses.jako
4 # A Jako module for interfacing with the curses library.
6 # Copyright (C) 2003-2005, The Perl Foundation.
7 # This program is free software. Its use is subject to the same
8 # license as Parrot.
10 # $Id$
13 module Curses
14   :fnlib = "libcurses"
17   #
18   # From curs_addch(3X):
19   #
20   #   int addch(const chtype ch);
21   #   int waddch(WINDOW * win, const chtype ch);
22   #   int mvaddch(int y, int x, const chtype ch);
23   #   int mvwaddch(WINDOW * win, int y, int x, const chtype ch);
24   #   int echochar(const chtype ch);
25   #   int wechochar(WINDOW * win, const chtype ch);
26   #
29   #
30   # From curs_addchstr(3X):
31   #
32   #   int addchstr(const chtype * chstr);
33   #   int addchnstr(const chtype * chstr, int n);
34   #   int waddchstr(WINDOW * win, const chtype * chstr);
35   #   int waddchnstr(WINDOW * win, const chtype * chstr, int n);
36   #   int mvaddchstr(int y, int x, const chtype * chstr);
37   #   int mvaddchnstr(int y, int x, const chtype * chstr, int n);
38   #   int mvwaddchstr(WINDOW * win, int y, int x, const chtype * chstr);
39   #   int  mvwaddchnstr(WINDOW  * win,  int y, int x, const chtype * chstr,
40   #     int n);
41   #
44   #
45   # From curs_addstr(3X):
46   #
47   #   int addstr(const char * str);
48   #   int addnstr(const char * str, int n);
49   #   int waddstr(WINDOW * win, const char * str);
50   #   int waddnstr(WINDOW * win, const char * str, int n);
51   #   int mvaddstr(int y, int x, const char * str);
52   #   int mvaddnstr(int y, int x, const char * str, int n);
53   #   int mvwaddstr(WINDOW * win, int y, int x, const char * str);
54   #   int mvwaddnstr(WINDOW * win, int y, int x, const char * str, int n);
55   #
57   sub int addstr     :fn (str s);
58 # sub int addnstr    :fn (str s, int n);
59 # sub int waddstr    :fn (int win, str s);
60 # sub int waddnstr   :fn (int win, str s, int n);
61 # sub int mvaddstr   :fn (int y, int x, str s);
62 # sub int mvaddnstr  :fn (int y, int x, str s, int n);
63 # sub int mvwaddstr  :fn (int win, int y, int x, str s);
64 # sub int mvwaddnstr :fn (int win, int y, int x, str s, int n);
67   #
68   # From curs_addwstr(3X):
69   #
70   #   int addwstr(const wchar_t * wstr);
71   #   int addnwstr(const wchar_t * wstr, int n);
72   #   int waddwstr(WINDOW * win, const wchar_t * wstr);
73   #   int waddnwstr(WINDOW * win, const wchar_t * wstr, int n);
74   #   int mvaddwstr(int y, int x, const wchar_t * wstr);
75   #   int mvaddnwstr(int y, int x, const wchar_t * wstr, int n);
76   #   int mvwaddwstr(WINDOW * win, int y, int x, const wchar_t * wstr);
77   #   int mvwaddnwstr(WINDOW * win, int y, int x, const wchar_t * wstr,
78   #     int n);
79   #
82   #
83   # From curs_attr(3X):
84   #
85   #   int attroff(int attrs);
86   #   int wattroff(WINDOW * win, int attrs);
87   #   int attron(int attrs);
88   #   int wattron(WINDOW * win, int attrs);
89   #   int attrset(int attrs);
90   #   int wattrset(WINDOW * win, int attrs);
91   #   int color_set(short color_pair_number, void * opts);
92   #   int wcolor_set(WINDOW * win, short color_pair_number,
93   #     void * opts);
94   #   int standend(void);
95   #   int wstandend(WINDOW * win);
96   #   int standout(void);
97   #   int wstandout(WINDOW * win);
98   #   int attr_get(attr_t * attrs, short * pair, void * opts);
99   #   int wattr_get(WINDOW * win, attr_t * attrs, short * pair,
100   #     void * opts);
101   #   int attr_off(attr_t attrs, void * opts);
102   #   int wattr_off(WINDOW * win, attr_t attrs, void * opts);
103   #   int attr_on(attr_t attrs, void * opts);
104   #   int wattr_on(WINDOW * win, attr_t attrs, void * opts);
105   #   int attr_set(attr_t attrs, short pair, void * opts);
106   #   int wattr_set(WINDOW * win, attr_t attrs, short pair, void * opts);
107   #   int chgat(int n, attr_t attr, short color,
108   #     const void * opts)
109   #   int wchgat(WINDOW * win, int n, attr_t attr,
110   #     short color, const void * opts)
111   #   int mvchgat(int y, int x, int n, attr_t attr,
112   #     short color, const void * opts)
113   #   int mvwchgat(WINDOW * win, int y, int x, int n,
114   #     attr_t attr, short color, const void * opts)
115   #
118   #
119   # From curs_bkgd(3X):
120   #
121   #   void bkgdset(chtype ch);
122   #   void wbkgdset(WINDOW * win, chtype ch);
123   #   int bkgd(chtype ch);
124   #   int wbkgd(WINDOW * win, chtype ch);
125   #   chtype getbkgd(WINDOW * win);
126   #
129   #
130   # From curs_border(3X):
131   #
132   #   int border(chtype ls, chtype rs, chtype ts, chtype bs,
133   #     chtype tl, chtype tr, chtype bl, chtype br);
134   #   int wborder(WINDOW * win, chtype ls, chtype rs,
135   #     chtype ts, chtype bs, chtype tl, chtype tr,
136   #     chtype bl, chtype br);
137   #   int box(WINDOW * win, chtype verch, chtype horch);
138   #   int hline(chtype ch, int n);
139   #   int whline(WINDOW * win, chtype ch, int n);
140   #   int vline(chtype ch, int n);
141   #   int wvline(WINDOW * win, chtype ch, int n);
142   #   mvhline(int y, int x, chtype ch, int n);
143   #   mvwhline(WINDOW * win, int y, int x, chtype ch, int n);
144   #   int mvvline(int y, int x, chtype ch, int n);
145   #   int mvwvline(WINDOW * win, int y, int x, chtype ch, int n);
146   #
148   sub int box      :fn (int screen, int v, int h);
149   sub int hline    :fn (int ch, int n);
152   #
153   # From curs_border_set(3X):
154   #
155   #   int border_set(
156   #     const cchar_t * ls, const cchar_t * rs,
157   #     const cchar_t * ts, const cchar_t * bs,
158   #     const cchar_t * tl, const cchar_t * tr,
159   #     const cchar_t * bl, const cchar_t * br );
160   #   int wborder_set(
161   #     WINDOW * win,
162   #     const cchar_t * ls, const cchar_t * rs,
163   #     const cchar_t * ts, const cchar_t * bs,
164   #     const cchar_t * tl, const cchar_t * tr,
165   #     const cchar_t * bl, const cchar_t * br);
166   #   int box_set(
167   #     WINDOW * win,
168   #     const cchar_t * verch,
169   #     const cchar_t * horch);
170   #   int hline_set(
171   #     const cchar_t * wch, int n);
172   #   int whline_set(
173   #     WINDOW * win,
174   #     const cchar_t * wch, int n);
175   #   int mvhline_set(
176   #     int y, int x,
177   #     const cchar_t * wch, int n);
178   #   int mvwhline_set(
179   #     WINDOW * win,
180   #     int y, int x,
181   #     const cchar_t * wch, int n);
182   #   int vline_set(
183   #     const cchar_t * wch, int n);
184   #   int wvline_set(
185   #     WINDOW * win,
186   #     const cchar_t * wch, int n);
187   #   int mvvline_set(
188   #     int y, int x,
189   #     const cchar_t * wch, int n);
190   #   int mvwvline_set(
191   #     WINDOW * win,
192   #     int y, int x,
193   #     const cchar_t * wch, int n);
194   #
197   #
198   # From curs_clear(3X):
199   #
200   #   int erase(void);
201   #   int werase(WINDOW * win);
202   #   int clear(void);
203   #   int wclear(WINDOW * win);
204   #   int clrtobot(void);
205   #   int wclrtobot(WINDOW * win);
206   #   int clrtoeol(void);
207   #   int wclrtoeol(WINDOW * win);
208   #
211   #
212   # From curs_get_wch(3X):
213   #
214   #   int get_wch(wint_t * wch);
215   #   int wget_wch(WINDOW * win, wint_t * wch);
216   #   int mvget_wch(int y, int x, wint_t * wch);
217   #   int mvwget_wch(WINDOW * win, int y, int x, wint_t * wch);
218   #   int unget_wch(const wchar_t wch);
219   #
222   #
223   # From curs_getch(3X): [[ ncurses ]]
224   #
225   #   int getch(void);
226   #   int wgetch(WINDOW * win);
227   #   int mvgetch(int y, int x);
228   #   int mvwgetch(WINDOW * win, int y, int x);
229   #   int ungetch(int ch);
230   #   int has_key(int ch);
231   #
233   sub int getch    :fn ();
234 # sub int wgetch   :fn (int win);
235 # sub int mvgetch  :fn (int y, int x);
236 # sub int mvwgetch :fn (int win, int y, int x);
237 # sub int ungetch  :fn (int ch);
238 # sub int has_key  :fn (int ch);
241   #
242   # From curs_in_wch(3X):
243   #
244   #   int in_wch(cchar_t * wcval);
245   #   int mvin_wch(int y, int x, cchar_t * wcval);
246   #   int mvwin_wch(WINDOW * win, int y, int x, cchar_t * wcval);
247   #   int win_wch(WINDOW * win, cchar_t * wcval);
248   #
251   #
252   # From curs_in_wchstr(3X):
253   #
254   #   int in_wchstr(cchar_t * wchstr);
255   #   int in_wchnstr(cchar_t * wchstr, int n);
256   #   int win_wchstr(WINDOW * win, cchar_t * wchstr);
257   #   int win_wchnstr(WINDOW * win, cchar_t * wchstr, int n);
258   #   int mvin_wchstr(int y, int x, cchar_t * wchstr);
259   #   int mvin_wchnstr(int y, int x, cchar_t * wchstr, int n);
260   #   int mvwin_wchstr(WINDOW * win, int y, int x, cchar_t * wchstr);
261   #   int mvwin_wchnstr(WINDOW * win, int y, int x, cchar_t * wchstr, int n);
262   #
265   #
266   # From curs_inch(3X):
267   #
268   #   chtype inch(void);
269   #   chtype winch(WINDOW * win);
270   #   chtype mvinch(int y, int x);
271   #   chtype mvwinch(WINDOW * win, int y, int x);
272   #
275   #
276   # From curs_initscr(3X):
277   #
278   #   WINDOW * initscr(void);
279   #   int endwin(void);
280   #   bool isendwin(void);
281   #   SCREEN * newterm(char * type, FILE * outfd, FILE * infd);
282   #   SCREEN * set_term(SCREEN * new);
283   #   void delscreen(SCREEN * sp);
284   #
286   sub int initscr   :fn ();
287   sub int endwin    :fn ();
288 # sub int isendwin  :fn ();
289 # sub int newterm   :fn (str type, int outfd, int infd);
290 # sub int set_term  :fn (int new);
291 # sub     delscreen :fn (int sp);
294   #
295   # From curs_kernel(3X):
296   #
297   #   int def_prog_mode(void);
298   #   int defshell_mode(void);
299   #   int reset_prog_mode(void);
300   #   int reset_shell_mode(void);
301   #   int resetty(void);
302   #   int savetty(void);
303   #   void getsyx(int y, int x);
304   #   void setsyx(int y, int x);
305   #   int ripoffline(int line, int (*init)(WINDOW *, int));
306   #   int curs_set(int visibility);
307   #   int napms(int ms);
308   #
310 # sub int def_prog_mode    :fn ();
311 # sub int def_shell_mode   :fn ();
312 # sub int reset_prog_mode  :fn ();
313 # sub int reset_shell_mode :fn ();
314 # sub int resetty          :fn ();
315 # sub int savetty          :fn ();
316 # sub     getsyx           :fn (int y, int x);
317 # sub     setsyx           :fn (int y, int x);
318 # sub int ripoffline       :fn (int line, ...);
319   sub int curs_set         :fn (int visibility);
320 # sub int napms            :fn (int ms);
323   #
324   # From curs_move(3X):
325   #
326   #   int move(int y, int x);
327   #   int wmove(WINDOW *win, int y, int x);
328   #
330   sub int move  :fn (int y, int x);
331 # sub int wmove :fn (int win, int y, int x);
334   #
335   # From curs_outopts(3X):
336   #
337   #   int clearok(WINDOW * win, bool bf);
338   #   int idlok(WINDOW * win, bool bf);
339   #   void idcok(WINDOW * win, bool bf);
340   #   void immedok(WINDOW * win, bool bf);
341   #   int leaveok(WINDOW * win, bool bf);
342   #   int setscrreg(int top, int bot);
343   #   int wsetscrreg(WINDOW * win, int top, int bot);
344   #   int scrollok(WINDOW * win, bool bf);
345   #   int nl(void);
346   #   int nonl(void);
347   #
350   #
351   # From curs_printw(3X):
352   #
353   #   int printw(const char * fmt, ...);
354   #   int wprintw(WINDOW * win, const char * fmt, ...);
355   #   int mvprintw(int y, int x, const char * fmt, ...);
356   #   int mvwprintw(WINDOW * win, int y, int x, const char * fmt, ...);
357   #   int vwprintw(WINDOW * win, const char * fmt, va_list varglist);
358   #   int vw_printw(WINDOW * win, const char * fmt, va_list varglist);
359   #
362   #
363   # From curs_refresh(3X):
364   #
365   #   int refresh(void);
366   #   int wrefresh(WINDOW * win);
367   #   int wnoutrefresh(WINDOW * win);
368   #   int doupdate(void);
369   #   int redrawwin(WINDOW * win);
370   #   int wredrawln(WINDOW * win, int beg_line, int num_lines);
372   sub int refresh      :fn ();
373 # sub int wrefresh     :fn (int win);
374 # sub int wnoutrefresh :fn (int win);
375 # sub int doupdate     :fn ();
376 # sub int redrawwin    :fn (int win);
377 # sub int wredrawln    :fn (int win, int beg_line, int num_lines);
380   #
381   # From curs_scroll(3X):
382   #
383   #   int scroll(WINDOW * win);
384   #   int scrl(int n);
385   #   int wscrl(WINDOW * win, int n);
386   # 
389   #
390   # From curs_termcap(3X):
391   #
392   #   extern char     PC;
393   #   extern char *   UP;
394   #   extern char *   BC;
395   #   extern unsigned ospeed;
396   #
397   #   int tgetent(char * bp, const char * name);
398   #   int tgetflag(char * id);
399   #   int tgetnum(char * id);
400   #   char * tgetstr(char * id, char ** area);
401   #   char * tgoto(const char *cap, int col, int row);
402   #   int tputs(const char * str, int affcnt, int (*putc)(int));
403   #
406   #
407   # From curs_window(3X):
408   #
409   #   WINDOW * newwin(int nlines, int ncols, int begin_y,
410   #     int begin_x);
411   #   int delwin(WINDOW * win);
412   #   int mvwin(WINDOW * win, int y, int x);
413   #   WINDOW * subwin(WINDOW * orig, int nlines, int ncols,
414   #     int begin_y, int begin_x);
415   #   WINDOW * derwin(WINDOW * orig, int nlines, int ncols,
416   #     int begin_y, int begin_x);
417   #   int mvderwin(WINDOW * win, int par_y, int par_x);
418   #   WINDOW * dupwin(WINDOW * win);
419   #   void wsyncup(WINDOW * win);
420   #   int syncok(WINDOW * win, bool bf);
421   #   void wcursyncup(WINDOW * win);
422   #   void wsyncdown(WINDOW * win);
423   #
434 #####################################################################
438   #
439   # From curs_addchstr(3X):
440   #
444   #
445   # From curs_overlay(3X):
446   #
449   #
450   # From curs_color(3X):
451   #
454   #
455   # From curs_inopts(3X):
456   #
460   #
461   # From curs_inchstr(3X):
462   #
465   #
466   # From curs_instr(3X):
467   #
470   #
471   # From curs_inwstr(3X):
472   #
475   #
476   # From curs_touch(3X):
477   #
480   #
481   # From curs_ins_wstr(3X):
482   #
485   #
486   # From curs_ins_wch(3X):
487   #
490   #
491   # From curs_insch(3X):
492   #
495   #
496   # From curs_print(3X): [[ ncurses ]]
497   #
500   #
501   # From curs_scanw(3X):
502   #
505   #
506   # From curs_pad(3X):
507   #
512   #
513   # From curs_bkgrnd(3X):
514   #
517   #
518   # From curs_getcchar(3X):
519   #
522   #
523   # From curs_mouse(3X): [[ ncurses ]]
524   #
527   #
528   # From curs_get_wstr(3X):
529   #
532   #
533   # From curs_getstr(3X):
534   #
537   #
538   # From curs_beep(3X):
539   #
542   #
543   # From curs_add_wch(3X):
544   #
547   #
548   # From curs_add_wchstr(3X):
549   #
552   #
553   # From curs_termattrs(3X):
554   #
557   #
558   # From curs_terminfo(3X):
559   #
562   #
563   # From curs_util(3X):
564   #
567   #
568   # From curs_delch(3X):
569   #
571   #
572   # From curs_deleteln(3X):
573   #
576   #
577   # From curs_insstr(3X):
578   #
581   #
582   # From define_key(3X):
583   #
586   #
587   # From key_defined(3X): [[ ncurses ]]
588   #
591   #
592   # From curs_getyx(3X):
593   #
596   #
597   # From curs_scr_dump(3X):
598   #
601   #
602   # From curs_trace(3X): [[ ncurses ]]
603   #
606   #
607   # From default_colors(3X): [[ ncurses ]]
608   #
611   #
612   # From curs_extend(3X): [[ ncurses ]]
613   #
616   #
617   # From keybound(3X): [[ ncurses ]]
618   #
621   #
622   # From keyok(3X): [[ ncurses ]]
623   #
626   #
627   # From resizeterm(3X): [[ ncurses ]]
628   #
631   #
632   # From curs_slk(3X): [[ ncurses ]]
633   #
636   #
637   # From wresize(3X): [[ ncurses ]] 
638   #