Don't warn about unused internal methods which are meant to be visible on DBus
[vala-gnome.git] / vapi / readline.vapi
blob58e9fddbd75351a897ee4c0731c9ae46c2c61581
1 /* readline.vapi
2  *
3  * Copyright (C) 2009  Jukka-Pekka Iivonen <jp0409@jippii.fi>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18  *
19  */
21 [CCode (lower_case_cprefix = "", cheader_filename = "stdio.h,readline/readline.h")]
22 namespace Readline {
23         [CCode (cname = "free", cheader_filename = "stdlib.h")]
24         private void _free (void* p);
26         [CCode (cname = "rl_command_func_t", has_target = false)]
27         public delegate int      CommandFunc (int a, int b);
28         [CCode (cname = "rl_completion_func_t", has_target = false, array_length = false, array_null_terminated = true)]
29         public delegate string[]? CompletionFunc (string str, int a, int b);
30         [CCode (cname = "rl_compentry_func_t", has_target = false)]
31         public delegate string?  CompentryFunc (string str, int a);
32         [CCode (cname = "rl_quote_func_t", has_target = false)]
33         public delegate string   QuoteFunc (string str, int a, string b);
34         [CCode (cname = "rl_dequote_func_t", has_target = false)]
35         public delegate string   DequoteFunc (string str, int a);
36         [CCode (cname = "rl_compignore_func_t", has_target = false)]
37         public delegate int      CompignoreFunc (string[] strs);
38         [CCode (cname = "rl_compdisp_func_t", has_target = false)]
39         public delegate void     CompdispFunc (string[] s, int a, int b);
40         [CCode (cname = "rl_hook_func_t", has_target = false)]
41         public delegate int      HookFunc ();
42         [CCode (cname = "rl_getc_func_t", has_target = false)]
43         public delegate int      GetcFunc (GLib.FileStream s);
44         [CCode (cname = "rl_linebuf_func_t", has_target = false)]
45         public delegate int      LinebufFunc (string s, int a);
46         [CCode (cname = "rl_intfunc_t", has_target = false)]
47         public delegate int      IntFunc (int a);
48         [CCode (cname = "rl_icpfunc_t", has_target = false)]
49         public delegate int      IcpFunc (string s);
50         [CCode (cname = "rl_icppfunc_t", has_target = false)]
51         public delegate int      IcppFunc (string[] s);
52         [CCode (cname = "rl_voidfunc_t", has_target = false)]
53         public delegate void     VoidFunc ();
54         [CCode (cname = "rl_vintfunc_t", has_target = false)]
55         public delegate void     VintFunc (int a);
56         [CCode (cname = "rl_vcpfunc_t", has_target = false)]
57         public delegate void     VcpFunc (string? s);
58         [CCode (cname = "rl_vcppfunc_t", has_target = false)]
59         public delegate void     VcppFunc (string[] s);
60         [CCode (cname = "rl_cpvfunc_t", has_target = false)]
61         public delegate unowned string?   CpvFunc ();
62         [CCode (cname = "rl_cpifunc_t", has_target = false)]
63         public delegate unowned string?   CpiFunc (int s);
65         [CCode (cname = "KEYMAP_ENTRY", has_type_id = false)]
66         public struct KeyMap {
67                 public char type;
68                 public CommandFunc function;
69         }
71         [CCode (cname = "KEYMAP_SIZE")]
72         public int KEYMAP_SIZE;
74         [CCode (cname = "ANYOTHERKEY")]
75         public int ANYOTHERKEY;
77         [CCode (cname = "KEYMAP_ENTRY_ARRAY")]
78         public KeyMap[] KEYMAP_ENTRY_ARRAY;
80         [CCode (cname = "Keymap")]
81         public KeyMap Keymap;
83         [CCode (cname = "ISFUNC")]
84         public int ISFUNC;
86         [CCode (cname = "ISKMAP")]
87         public int ISKMAP;
89         [CCode (cname = "ISMACR")]
90         public int ISMACR;
92         [CCode (cname = "RL_READLINE_VERSION")]
93         public const uint READLINE_VERSION;
95         [CCode (cname = "RL_VERSION_MAJOR")]
96         public const int VERSION_MAJOR;
98         [CCode (cname = "RL_VERSION_MINOR")]
99         public const int VERSION_MINOR;
101         [CCode (cname = "enum undo_code", cprefix = "UNDO_", has_type_id = false)]
102         public enum UndoCode {
103                 DELETE,
104                 INSERT,
105                 BEGIN,
106                 END
107         }
109         [CCode (cname = "UNDO_LIST", has_type_id = false)]
110         public struct UndoList {
111                 public void*    next;
112                 public int      start;
113                 public int      end;
114                 public string   text;
115                 public UndoCode what;
116         }
118         [CCode (cname = "rl_undo_list")]
119         public UndoList undo_list;
121         [CCode (cname = "FUNMAP", has_type_id = false)]
122         public struct FunMap {
123                 public string      name;
124                 public CommandFunc function;
125         }
127         [CCode (cname = "funmap")]
128         public FunMap[] funmap;
130         [CCode (cname = "rl_digit_argument")]
131         public int digit_argument (int a, int b);
133         [CCode (cname = "rl_universal_argument")]
134         public int universal_argument (int a, int b);
136         [CCode (cname = "rl_forward_byte")]
137         public int forward_byte (int a, int b);
139         [CCode (cname = "rl_forward_char")]
140         public int forward_char (int a, int b);
142         [CCode (cname = "rl_forward")]
143         public int forward (int a, int b);
145         [CCode (cname = "rl_backward_byte")]
146         public int backward_byte (int a, int b);
148         [CCode (cname = "rl_char")]
149         public int backward_char (int a, int b);
151         [CCode (cname = "rl_backward")]
152         public int backward (int a, int b);
154         [CCode (cname = "rl_beg_of_line")]
155         public int beg_of_line (int a, int b);
157         [CCode (cname = "rl_end_of_line")]
158         public int end_of_line (int a, int b);
160         [CCode (cname = "rl_forward_word")]
161         public int forward_word (int a, int b);
163         [CCode (cname = "rl_backward_word")]
164         public int backward_word (int a, int b);
166         [CCode (cname = "rl_refresh_line")]
167         public int refresh_line (int a, int b);
169         [CCode (cname = "rl_clear_screen")]
170         public int clear_screen (int a, int b);
172         [CCode (cname = "rl_array_keys")]
173         public int arrow_keys (int a, int b);
175         [CCode (cname = "rl_insert")]
176         public int insert (int a, int b);
178         [CCode (cname = "rl_quoted_insert")]
179         public int quoted_insert (int a, int b);
181         [CCode (cname = "rl_tab_insert")]
182         public int tab_insert (int a, int b);
184         [CCode (cname = "rl_newline")]
185         public int newline (int a, int b);
187         [CCode (cname = "rl_do_lowercase_version")]
188         public int do_lowercase_version (int a, int b);
190         [CCode (cname = "rl_rubout")]
191         public int rubout (int a, int b);
193         [CCode (cname = "rl_delete")]
194         public int del (int a, int b);
196         [CCode (cname = "rl_rubout_or_delete")]
197         public int rubout_or_delete (int a, int b);
199         [CCode (cname = "rl_delete_horizontal_space")]
200         public int delete_horizontal_space (int a, int b);
202         [CCode (cname = "rl_delete_or_show_completions")]
203         public int delete_or_show_completions (int a, int b);
205         [CCode (cname = "rl_insert_comment")]
206         public int insert_comment (int a, int b);
208         [CCode (cname = "rl_upcase_word")]
209         public int upcase_word (int a, int b);
211         [CCode (cname = "rl_downcase_word")]
212         public int downcase_word (int a, int b);
214         [CCode (cname = "rl_capitalize_word")]
215         public int capitalize_word (int a, int b);
217         [CCode (cname = "rl_transpose_words")]
218         public int transpose_words (int a, int b);
220         [CCode (cname = "rl_transpose_chars")]
221         public int transpose_chars (int a, int b);
223         [CCode (cname = "rl_char_search")]
224         public int char_search (int a, int b);
226         [CCode (cname = "rl_backward_char_search")]
227         public int backward_char_search (int a, int b);
229         [CCode (cname = "rl_beginning_of_history")]
230         public int beginning_of_history (int a, int b);
232         [CCode (cname = "rl_end_of_history")]
233         public int end_of_history (int a, int b);
235         [CCode (cname = "rl_get_next_history")]
236         public int get_next_history (int a, int b);
238         [CCode (cname = "rl_get_previous_history")]
239         public int get_previous_history (int a, int b);
241         [CCode (cname = "rl_set_mark")]
242         public int set_mark (int a, int b);
244         [CCode (cname = "rl_exchange_point_and_mark")]
245         public int exchange_point_and_mark (int a, int b);
247         [CCode (cname = "rl_vi_editing_mode")]
248         public int vi_editing_mode (int a, int b);
250         [CCode (cname = "rl_emacs_editing_mode")]
251         public int emacs_editing_mode (int a, int b);
253         [CCode (cname = "rl_overwrite_mode")]
254         public int overwrite_mode (int a, int b);
256         [CCode (cname = "rl_re_read_init_file")]
257         public int re_read_init_file (int a, int b);
259         [CCode (cname = "rl_dump_functions")]
260         public int dump_functions (int a, int b);
262         [CCode (cname = "rl_dump_macros")]
263         public int dump_macros (int a, int b);
265         [CCode (cname = "rl_dump_variables")]
266         public int dump_variables (int a, int b);
268         [CCode (cname = "rl_complete")]
269         public int complete (int a, int b);
271         [CCode (cname = "rl_possible_completions")]
272         public int possible_completions (int a, int b);
274         [CCode (cname = "rl_insert_completions")]
275         public int insert_completions (int a, int b);
277         [CCode (cname = "rl_menu_complete")]
278         public int menu_complete (int a, int b);
280         [CCode (cname = "rl_kill_word")]
281         public int kill_word (int a, int b);
283         [CCode (cname = "rl_backward_kill_word")]
284         public int backward_kill_word (int a, int b);
286         [CCode (cname = "rl_kill_line")]
287         public int kill_line (int a, int b);
289         [CCode (cname = "rl_backward_kill_line")]
290         public int backward_kill_line (int a, int b);
292         [CCode (cname = "rl_kill_full_line")]
293         public int kill_full_line (int a, int b);
295         [CCode (cname = "rl_unix_word_rubout")]
296         public int unix_word_rubout (int a, int b);
298         [CCode (cname = "rl_unix_filename_rubout")]
299         public int unix_filename_rubout (int a, int b);
301         [CCode (cname = "rl_unix_line_discard")]
302         public int unix_line_discard (int a, int b);
304         [CCode (cname = "rl_copy_region_to_kill")]
305         public int copy_region_to_kill (int a, int b);
307         [CCode (cname = "rl_kill_region")]
308         public int kill_region (int a, int b);
310         [CCode (cname = "rl_copy_forward_word")]
311         public int copy_forward_word (int a, int b);
313         [CCode (cname = "rl_copy_backward_word")]
314         public int copy_backward_word (int a, int b);
316         [CCode (cname = "rl_yank")]
317         public int yank (int a, int b);
319         [CCode (cname = "rl_yank_pop")]
320         public int yank_pop (int a, int b);
322         [CCode (cname = "rl_yank_nth_arg")]
323         public int yank_nth_arg (int a, int b);
325         [CCode (cname = "rl_yank_last_arg")]
326         public int yank_last_arg (int a, int b);
328         [CCode (cname = "rl_paste_from_clipboard")]
329         public int paste_from_clipboard (int a, int b);
331         [CCode (cname = "rl_reverse_search_history")]
332         public int reverse_search_history (int a, int b);
334         [CCode (cname = "rl_forward_search_history")]
335         public int forward_search_history (int a, int b);
337         [CCode (cname = "rl_start_kbd_macro")]
338         public int start_kbd_macro (int a, int b);
340         [CCode (cname = "rl_end_kbd_macro")]
341         public int end_kbd_macro (int a, int b);
343         [CCode (cname = "rl_call_last_kbd_macro")]
344         public int call_last_kbd_macro (int a, int b);
346         [CCode (cname = "rl_revert_line")]
347         public int revert_line (int a, int b);
349         [CCode (cname = "rl_undo_command")]
350         public int undo_command (int a, int b);
352         [CCode (cname = "rl_tilde_expand")]
353         public int tilde_expand (int a, int b);
355         [CCode (cname = "rl_restart_output")]
356         public int restart_output (int a, int b);
358         [CCode (cname = "rl_stop_output")]
359         public int stop_output (int a, int b);
361         [CCode (cname = "rl_abort")]
362         public int abort (int a, int b);
364         [CCode (cname = "rl_tty_status")]
365         public int tty_status (int a, int b);
367         [CCode (cname = "rl_history_search_forward")]
368         public int history_search_forward (int a, int b);
370         [CCode (cname = "rl_history_search_backward")]
371         public int history_search_backward (int a, int b);
373         [CCode (cname = "rl_noninc_forward_search")]
374         public int noninc_forward_search (int a, int b);
376         [CCode (cname = "rl_noninc_reverse_search")]
377         public int noninc_reverse_search (int a, int b);
379         [CCode (cname = "rl_noninc_forward_search_again")]
380         public int noninc_forward_search_again (int a, int b);
382         [CCode (cname = "rl_noninc_reverse_search_again")]
383         public int noninc_reverse_search_again (int a, int b);
385         [CCode (cname = "rl_insert_close")]
386         public int insert_close (int a, int b);
388         [CCode (cname = "rl_callback_handler_install")]
389         public void callback_handler_install (string prompt, VcpFunc func);
391         [CCode (cname = "rl_callback_read_char")]
392         public void callback_read_char ();
394         [CCode (cname = "rl_callback_handler_remove")]
395         public void callback_handler_remove ();
397         [CCode (cname = "rl_vi_redo")]
398         public int vi_redo (int a, int b);
400         [CCode (cname = "rl_vi_undo")]
401         public int vi_undo (int a, int b);
403         [CCode (cname = "rl_vi_yank_arg")]
404         public int vi_yank_arg (int a, int b);
406         [CCode (cname = "rl_vi_fetch_history")]
407         public int vi_fetch_history (int a, int b);
409         [CCode (cname = "rl_vi_search_again")]
410         public int vi_search_again (int a, int b);
412         [CCode (cname = "rl_vi_search")]
413         public int vi_search (int a, int b);
415         [CCode (cname = "rl_vi_complete")]
416         public int vi_complete (int a, int b);
418         [CCode (cname = "rl_vi_tilde_expand")]
419         public int vi_tilde_expand (int a, int b);
421         [CCode (cname = "rl_vi_prev_word")]
422         public int vi_prev_word (int a, int b);
424         [CCode (cname = "rl_vi_next_word")]
425         public int vi_next_word (int a, int b);
427         [CCode (cname = "rl_vi_end_word")]
428         public int vi_end_word (int a, int b);
430         [CCode (cname = "rl_vi_insert_beg")]
431         public int vi_insert_beg (int a, int b);
433         [CCode (cname = "rl_vi_append_mode")]
434         public int vi_append_mode (int a, int b);
436         [CCode (cname = "rl_vi_append_eol")]
437         public int vi_append_eol (int a, int b);
439         [CCode (cname = "rl_vi_eof_maybe")]
440         public int vi_eof_maybe (int a, int b);
442         [CCode (cname = "rl_vi_insertion_mode")]
443         public int vi_insertion_mode (int a, int b);
445         [CCode (cname = "rl_vi_movement_mode")]
446         public int vi_movement_mode (int a, int b);
448         [CCode (cname = "rl_vi_arg_digit")]
449         public int vi_arg_digit (int a, int b);
451         [CCode (cname = "rl_vi_change_case")]
452         public int vi_change_case (int a, int b);
454         [CCode (cname = "rl_vi_put")]
455         public int vi_put (int a, int b);
457         [CCode (cname = "rl_vi_column")]
458         public int vi_column (int a, int b);
460         [CCode (cname = "rl_vi_delete_to")]
461         public int vi_delete_to (int a, int b);
463         [CCode (cname = "rl_vi_change_to")]
464         public int vi_change_to (int a, int b);
466         [CCode (cname = "rl_vi_yank_to")]
467         public int vi_yank_to (int a, int b);
469         [CCode (cname = "rl_vi_rubout")]
470         public int vi_rubout (int a, int b);
472         [CCode (cname = "rl_vi_delete")]
473         public int vi_delete (int a, int b);
475         [CCode (cname = "rl_vi_back_to_indent")]
476         public int vi_back_to_indent (int a, int b);
478         [CCode (cname = "rl_vi_first_print")]
479         public int vi_first_print (int a, int b);
481         [CCode (cname = "rl_vi_char_search")]
482         public int vi_char_search (int a, int b);
484         [CCode (cname = "rl_vi_match")]
485         public int vi_match (int a, int b);
487         [CCode (cname = "rl_vi_change_char")]
488         public int vi_change_char (int a, int b);
490         [CCode (cname = "rl_vi_subst")]
491         public int vi_subst (int a, int b);
493         [CCode (cname = "rl_vi_overstrike")]
494         public int vi_overstrike (int a, int b);
496         [CCode (cname = "rl_vi_overstrike_delete")]
497         public int vi_overstrike_delete (int a, int b);
499         [CCode (cname = "rl_vi_replace")]
500         public int vi_replace (int a, int b);
502         [CCode (cname = "rl_vi_set_mark")]
503         public int vi_set_mark (int a, int b);
505         [CCode (cname = "rl_vi_goto_mark")]
506         public int vi_goto_mark (int a, int b);
508         [CCode (cname = "rl_vi_check")]
509         public int vi_check ();
511         [CCode (cname = "rl_vi_domove")]
512         public int vi_domove (int a, out int b);
514         [CCode (cname = "rl_vi_bracktype")]
515         public int vi_bracktype (int a);
517         [CCode (cname = "rl_vi_start_inserting")]
518         public void vi_start_inserting (int a, int b, int c);
520         [CCode (cname = "rl_vi_fWord")]
521         public int vi_fWord (int a, int b);
523         [CCode (cname = "rl_vi_bWord")]
524         public int vi_bWord (int a, int b);
526         [CCode (cname = "rl_vi_eWord")]
527         public int vi_eWord (int a, int b);
529         [CCode (cname = "rl_vi_fword")]
530         public int vi_fword (int a, int b);
532         [CCode (cname = "rl_bword")]
533         public int vi_bword (int a, int b);
535         [CCode (cname = "rl_vi_eword")]
536         public int vi_eword (int a, int b);
538         [CCode (cname = "readline")]
539         public void* _readline (string? prompt);
541         [CCode (cname = "__readline")]
542         public string? readline (string? prompt) {
543                 void* cstr = _readline (prompt);
544                 if ( cstr == null )
545                         return null;
546                 string str = ((string) cstr).dup ();
547                 _free (cstr);
548                 return str;
549         }
551         [CCode (cname = "rl_set_prompt")]
552         public int set_prompt (string prompt);
554         [CCode (cname = "rl_expand_prompt")]
555         public int expand_prompt (string prompt);
557         [CCode (cname = "rl_initialize")]
558         public int initialize ();
560         [CCode (cname = "rl_discard_argument")]
561         public int discard_argument ();
563         [CCode (cname = "rl_add_defun")]
564         public int add_defun (string name, CommandFunc func, int key);
566         [CCode (cname = "rl_bind_key")]
567         public int bind_key (int key, CommandFunc func);
569         [CCode (cname = "rl_bind_key_in_map")]
570         public int bind_key_in_map (int key, CommandFunc func, KeyMap map);
572         [CCode (cname = "rl_unbind_key")]
573         public int unbind_key (int key);
575         [CCode (cname = "rl_unbind_key_in_map")]
576         public int unbind_key_in_map (int key, KeyMap map);
578         [CCode (cname = "rl_bind_key_if_unbound")]
579         public int bind_key_if_unbound (int key, CommandFunc func);
581         [CCode (cname = "rl_bind_key_if_unbound_in_map")]
582         public int bind_key_if_unbound_in_map (int key, CommandFunc func, KeyMap map);
584         [CCode (cname = "rl_unbind_function_in_map")]
585         public int unbind_function_in_map (CommandFunc func, KeyMap map);
587         [CCode (cname = "rl_unbind_command_in_map")]
588         public int unbind_command_in_map (string command, KeyMap map);
590         [CCode (cname = "rl_bind_keyseq")]
591         public int bind_keyseq (string keyseq, CommandFunc func);
593         [CCode (cname = "rl_bind_keyseq_in_map")]
594         public int bind_keyseq_in_map (string keyseq, CommandFunc func, KeyMap map);
596         [CCode (cname = "rl_bind_keyseq_if_unbound")]
597         public int bind_keyseq_if_unbound (string keyseq, CommandFunc func);
599         [CCode (cname = "rl_bind_keyseq_if_unbound_in_map")]
600         public int bind_keyseq_if_unbound_in_map (string keyseq, CommandFunc func, KeyMap map);
602         [CCode (cname = "rl_generic_bing")]
603         public int generic_bind (int type, string keyseq, string data, KeyMap map);
605         [CCode (cname = "rl_variable_value")]
606         public string variable_value (string variable);
608         [CCode (cname = "rl_variable_bind")]
609         public int variable_bind (string variable, string value);
611         [CCode (cname = "rl_set_key")]
612         public int set_key (string keyseq, CommandFunc func, KeyMap map);
614         [CCode (cname = "rl_macro_bind")]
615         public int macro_bind (string keyseq, string macro, KeyMap map);
617         [CCode (cname = "rl_translate_keyseq")]
618         public int translate_keyseq (string a, string b, out int c);
620         [CCode (cname = "rl_untranslate_keyseq")]
621         public string untranslate_keyseq (int keyseq);
623         [CCode (cname = "rl_named_function")]
624         public CommandFunc named_function (string name);
626         [CCode (cname = "rl_function_of_keyseq")]
627         public CommandFunc function_of_keyseq (string keyseq, KeyMap map, out int type);
629         [CCode (cname = "rl_list_funmap_names")]
630         public void list_funmap_names ();
632         [CCode (cname = "rl_invoking_keyseqs_in_map")]
633         public unowned string[] invoking_keyseqs_in_map (CommandFunc func, KeyMap map);
635         [CCode (cname = "rl_invoking_keyseqs")]
636         public unowned string[] invoking_keyseqs (CommandFunc func);
638         [CCode (cname = "rl_function_dumper")]
639         public void function_dumper (int readable);
641         [CCode (cname = "rl_macro_dumper")]
642         public void macro_dumper (int readable);
644         [CCode (cname = "rl_variable_dumper")]
645         public void variable_dumper (int readable);
647         [CCode (cname = "rl_read_init_file")]
648         public int read_init_file (string filename);
650         [CCode (cname = "rl_parse_and_bind")]
651         public int parse_and_bind (owned string line);
653         [CCode (cname = "rl_make_bare_keymap")]
654         public KeyMap make_bare_keymap ();
656         [CCode (cname = "rl_copy_keymap")]
657         public KeyMap copy_keymap (KeyMap map);
659         [CCode (cname = "rl_make_keymap")]
660         public KeyMap make_keymap ();
662         [CCode (cname = "rl_discard_keymap")]
663         public void discard_keymap (KeyMap map);
665         [CCode (cname = "rl_get_keymap_by_name")]
666         public KeyMap get_keymap_by_name (string name);
668         [CCode (cname = "rl_get_keymap_name")]
669         public string get_keymap_name (KeyMap map);
671         [CCode (cname = "rl_set_keymap")]
672         public void set_keymap (KeyMap map);
674         [CCode (cname = "rl_get_keymap")]
675         public KeyMap get_keymap ();
677         [CCode (cname = "rl_set_keymap_from_edit_mode")]
678         public void set_keymap_from_edit_mode ();
680         [CCode (cname = "rl_get_keymap_name_from_edit_mode")]
681         public string get_keymap_name_from_edit_mode ();
683         [CCode (cname = "rl_add_funmap_entry")]
684         public int add_funmap_entry (string name, CommandFunc func);
686         [CCode (cname = "rl_funmap_names")]
687         public unowned string[] funmap_names ();
689         [CCode (cname = "rl_initialize_funmap")]
690         public void initialize_funmap ();
692         [CCode (cname = "rl_push_macro_input")]
693         public void push_macro_input (string macro);
695         [CCode (cname = "rl_add_undo")]
696         public void add_undo (UndoCode what, int start, int end, string text);
698         [CCode (cname = "rl_free_undo_list")]
699         public void free_undo_list ();
701         [CCode (cname = "rl_do_undo")]
702         public int do_undo ();
704         [CCode (cname = "rl_begin_undo_group")]
705         public int begin_undo_group ();
707         [CCode (cname = "rl_end_undo_group")]
708         public int end_undo_group ();
710         [CCode (cname = "rl_modifying")]
711         public int modifying (int start, int end);
713         [CCode (cname = "rl_redisplay")]
714         public void redisplay ();
716         [CCode (cname = "rl_on_new_line")]
717         public int on_new_line ();
719         [CCode (cname = "rl_on_new_line_with_prompt")]
720         public int on_new_line_with_prompt ();
722         [CCode (cname = "rl_forced_update_display")]
723         public int forced_update_display ();
725         [CCode (cname = "rl_clear_message")]
726         public int clear_message ();
728         [CCode (cname = "rl_reset_line_state")]
729         public int reset_line_state ();
731         [CCode (cname = "rl_crlf")]
732         public int crlf ();
734         [CCode (cname = "rl_message")]
735         public int message (string format, ...);
737         [CCode (cname = "rl_show_char")]
738         public int show_char (int c);
740         [CCode (cname = "rl_character_len")]
741         public int character_len (int a, int b);
743         [CCode (cname = "rl_save_prompt")]
744         public void save_prompt ();
746         [CCode (cname = "rl_restore_prompt")]
747         public void restore_prompt ();
749         [CCode (cname = "rl_replace_line")]
750         public void replace_line (string text, int clear_undo);
752         [CCode (cname = "rl_insert_text")]
753         public int insert_text (string text);
755         [CCode (cname = "rl_delete_text")]
756         public int delete_text (int start, int end);
758         [CCode (cname = "rl_kill_text")]
759         public int kill_text (int start, int end);
761         [CCode (cname = "rl_copy_text")]
762         public string copy_text (int start, int end);
764         [CCode (cname = "rl_prep_terminal")]
765         public void prep_terminal (int meta_flag);
767         [CCode (cname = "rl_deprep_terminal")]
768         public void deprep_terminal ();
770         [CCode (cname = "rl_tty_set_default_bindings")]
771         public void tty_set_default_bindings (KeyMap map);
773         [CCode (cname = "rl_tty_unset_default_bindings")]
774         public void tty_unset_default_bindings (KeyMap map);
776         [CCode (cname = "rl_reset_terminal")]
777         public int reset_terminal (string terminal_name);
779         [CCode (cname = "rl_resize_terminal")]
780         public void resize_terminal ();
782         [CCode (cname = "rl_set_screen_size")]
783         public void set_screen_size (int rows, int cols);
785         [CCode (cname = "rl_get_screen_size")]
786         public void get_screen_size (out int rows, out int cols);
788         [CCode (cname = "rl_reset_screen_size")]
789         public void reset_screen_size ();
791         [CCode (cname = "rl_get_termcap")]
792         public string get_termcap (string cap);
794         [CCode (cname = "rl_stuff_char")]
795         public int stuff_char (int c);
797         [CCode (cname = "rl_execute_next")]
798         public int execute_next (int c);
800         [CCode (cname = "rl_clear_pending_input")]
801         public int clear_pending_input ();
803         [CCode (cname = "rl_read_key")]
804         public int read_key ();
806         [CCode (cname = "rl_getc")]
807         public int getc (GLib.FileStream stream);
809         [CCode (cname = "rl_set_keyboard_input_timeout")]
810         public int set_keyboard_input_timeout (int u);
812         [CCode (cname = "rl_extend_line_buffer")]
813         public void extend_line_buffer (int len);
815         [CCode (cname = "rl_ding")]
816         public int ding ();
818         [CCode (cname = "rl_alphabetic")]
819         public int alphabetic (int c);
821         [CCode (cname = "rl_set_signals")]
822         public int set_signals ();
824         [CCode (cname = "rl_clear_signals")]
825         public int clear_signals ();
827         [CCode (cname = "rl_cleanup_after_signal")]
828         public void cleanup_after_signal ();
830         [CCode (cname = "rl_reset_after_signal")]
831         public void reset_after_signal ();
833         [CCode (cname = "rl_free_line_state")]
834         public void free_line_state ();
836         [CCode (cname = "rl_set_paren_blink_timeout")]
837         public int set_paren_blink_timeout (int u);
839         [CCode (cname = "rl_maybe_save_line")]
840         public int maybe_save_line ();
842         [CCode (cname = "rl_maybe_unsave_line")]
843         public int maybe_unsave_line ();
845         [CCode (cname = "rl_maybe_replace_line")]
846         public int maybe_replace_line ();
848         [CCode (cname = "rl_complete_internal")]
849         public int complete_internal (int what_to_do);
851         [CCode (cname = "rl_display_match_list")]
852         public void display_match_list (string[] matches, int len, int max);
854         [CCode (cname = "rl_completion_matches", array_length = false, array_null_terminated = true)]
855         public unowned string[] completion_matches (string text, CompentryFunc func);
857         [CCode (cname = "rl_username_completion_function")]
858         public string username_completion_function (string text, int state);
860         [CCode (cname = "rl_filename_completion_function")]
861         public string filename_completion_function (string text, int state);
863         [CCode (cname = "rl_completion_mode")]
864         public int completion_mode (CommandFunc func);
866         [CCode (cname = "rl_library_version")]
867         public unowned string library_version;
869         [CCode (cname = "rl_readline_version")]
870         public int readline_version;
872         [CCode (cname = "rl_gnu_readline_p")]
873         public int gnu_readline_p;
875         [CCode (cname = "rl_readline_state")]
876         public int readline_state;
878         [CCode (cname = "rl_editing_mode")]
879         public int editing_mode;
881         [CCode (cname = "rl_insert_mode")]
882         public int insert_mode;
884         [CCode (cname = "rl_readline_name")]
885         public unowned string readline_name;
887         [CCode (cname = "rl_prompt")]
888         public string? prompt;
890         [CCode (cname = "rl_line_buffer")]
891         public string line_buffer;
893         [CCode (cname = "rl_point")]
894         public int point;
896         [CCode (cname = "rl_end")]
897         public int end;
899         [CCode (cname = "rl_mark")]
900         public int mark;
902         [CCode (cname = "rl_done")]
903         public int done;
905         [CCode (cname = "rl_pending_input")]
906         public int pending_input;
908         [CCode (cname = "rl_dispatching")]
909         public int dispatching;
911         [CCode (cname = "rl_explicit_arg")]
912         public int explicit_arg;
914         [CCode (cname = "rl_numeric_arg")]
915         public int numeric_arg;
917         [CCode (cname = "rl_last_func")]
918         public CommandFunc last_func;
920         [CCode (cname = "rl_terminal_name")]
921         public unowned string terminal_name;
923         [CCode (cname = "rl_instream")]
924         public GLib.FileStream? instream;
926         [CCode (cname = "rl_outstream")]
927         public GLib.FileStream? outstream;
929         [CCode (cname = "rl_prefer_env_winsize")]
930         public int prefer_env_winsize;
932         [CCode (cname = "rl_startup_hook")]
933         public HookFunc startup_hook;
935         [CCode (cname = "rl_pre_input_hook")]
936         public HookFunc pre_input_hook;
938         [CCode (cname = "rl_event_hook")]
939         public HookFunc event_hook;
941         [CCode (cname = "rl_getc_function")]
942         public GetcFunc getc_function;
944         [CCode (cname = "rl_redisplay_function")]
945         public VoidFunc redisplay_function;
947         [CCode (cname = "rl_prep_term_function")]
948         public VintFunc prep_term_function;
950         [CCode (cname = "rl_deprep_term_function")]
951         public VoidFunc deprep_term_function;
953         [CCode (cname = "rl_executing_keymap")]
954         public KeyMap executing_keymap;
956         [CCode (cname = "rl_binding_keymap")]
957         public KeyMap binding_keymap;
959         [CCode (cname = "rl_erase_empty_line")]
960         public int erase_empty_line;
962         [CCode (cname = "rl_already_prompted")]
963         public int already_prompted;
965         [CCode (cname = "rl_num_chars_to_read")]
966         public int num_chars_to_read;
968         [CCode (cname = "rl_executing_macro")]
969         public string executing_macro;
971         [CCode (cname = "rl_catch_signals")]
972         public int catch_signals;
974         [CCode (cname = "rl_catch_sigwinch")]
975         public int catch_sigwinch;
977         [CCode (cname = "rl_completion_entry_function")]
978         public CompentryFunc completion_entry_function;
980         [CCode (cname = "rl_ignore_some_completions_function")]
981         public CompignoreFunc ignore_some_completions_function;
983         [CCode (cname = "rl_attempted_completion_function")]
984         public CompletionFunc attempted_completion_function;
986         [CCode (cname = "rl_basic_word_break_characters")]
987         public string* basic_word_break_characters;
989         [CCode (cname = "rl_completer_word_break_characters")]
990         public string* completer_word_break_characters;
992         [CCode (cname = "rl_completion_word_break_hook")]
993         public CpvFunc completion_word_break_hook;
995         [CCode (cname = "rl_completer_quote_characters")]
996         public string* completer_quote_characters;
998         [CCode (cname = "rl_basic_quote_characters")]
999         public string* basic_quote_characters;
1001         [CCode (cname = "rl_filename_quote_characters")]
1002         public string* filename_quote_characters;
1004         [CCode (cname = "rl_special_prefixes")]
1005         public string* special_prefixes;
1007         [CCode (cname = "rl_directory_completion_hook")]
1008         public IcppFunc directory_completion_hook;
1010         [CCode (cname = "rl_directory_rewrite_hook")]
1011         public IcppFunc directory_rewrite_hook;
1013         [CCode (cname = "rl_completion_display_matches_hook")]
1014         public CompdispFunc completion_display_matches_hook;
1016         [CCode (cname = "rl_filename_completion_desired")]
1017         public int filename_completion_desired;
1019         [CCode (cname = "rl_filename_quoting_desired")]
1020         public int filename_quoting_desired;
1022         [CCode (cname = "rl_filename_quoting_function")]
1023         public QuoteFunc filename_quoting_function;
1025         [CCode (cname = "rl_filename_dequoting_function")]
1026         public DequoteFunc filename_dequoting_function;
1028         [CCode (cname = "rl_char_is_quoted_p")]
1029         public LinebufFunc char_is_quoted_p;
1031         [CCode (cname = "rl_attempted_completion_over")]
1032         public int attempted_completion_over;
1034         [CCode (cname = "rl_completion_type")]
1035         public int completion_type;
1037         [CCode (cname = "rl_completion_query_items")]
1038         public int completion_query_items;
1040         [CCode (cname = "rl_completion_append_character")]
1041         public int completion_append_character;
1043         [CCode (cname = "rl_completion_suppress_append")]
1044         public int completion_suppress_append;
1046         [CCode (cname = "rl_completion_quote_character")]
1047         public int completion_quote_character;
1049         [CCode (cname = "rl_completion_found_quote")]
1050         public int completion_found_quote;
1052         [CCode (cname = "rl_completion_suppress_quote")]
1053         public int completion_suppress_quote;
1055         [CCode (cname = "rl_completion_mark_symlink_dirs")]
1056         public int completion_mark_symlink_dirs;
1058         [CCode (cname = "rl_ignore_completion_duplicates")]
1059         public int ignore_completion_duplicates;
1061         [CCode (cname = "rl_inhibit_completion")]
1062         public int inhibit_completion;
1064         [CCode (cname = "READERR")]
1065         public const int READERR;
1067         [CCode (cname = "RL_PROMPT_START_IGNORE")]
1068         public const char PROMPT_START_IGNORE;
1070         [CCode (cname = "RL_PROMPT_END_IGNORE")]
1071         public const char PROMPT_END_IGNORE;
1073         [CCode (cname = "NO_MATCH")]
1074         public const int NO_MATCH;
1076         [CCode (cname = "SINGLE_MATCH")]
1077         public const int SINGLE_MATCH;
1079         [CCode (cname = "MULT_MATCH")]
1080         public const int MULT_MATCH;
1082         [CCode (cname = "RL_STATE_NONE")]
1083         public const uint STATE_NONE;
1085         [CCode (cname = "RL_STATE_INITIALIZING")]
1086         public const uint STATE_INITIALIZING;
1088         [CCode (cname = "RL_STATE_INITIALIZED")]
1089         public const uint STATE_INITIALIZED;
1091         [CCode (cname = "RL_STATE_TERMPREPPED")]
1092         public const uint STATE_TERMPREPPED;
1094         [CCode (cname = "RL_STATE_READCMD")]
1095         public const uint STATE_READCMD;
1097         [CCode (cname = "RL_STATE_METANEXT")]
1098         public const uint STATE_METANEXT;
1100         [CCode (cname = "RL_STATE_DISPATCHING")]
1101         public const uint STATE_DISPATCHING;
1103         [CCode (cname = "RL_STATE_MOREINPUT")]
1104         public const uint STATE_MOREINPUT;
1106         [CCode (cname = "RL_STATE_ISEARCH")]
1107         public const uint STATE_ISEARCH;
1109         [CCode (cname = "RL_STATE_NSEARCH")]
1110         public const uint STATE_NSEARCH;
1112         [CCode (cname = "RL_STATE_SEARCH")]
1113         public const uint STATE_SEARCH;
1115         [CCode (cname = "RL_STATE_NUMERICARG")]
1116         public const uint STATE_NUMERICARG;
1118         [CCode (cname = "RL_STATE_MACROINPUT")]
1119         public const uint STATE_MACROINPUT;
1121         [CCode (cname = "RL_STATE_MACRODEF")]
1122         public const uint STATE_MACRODEF;
1124         [CCode (cname = "RL_STATE_OVERWRITE")]
1125         public const uint STATE_OVERWRITE;
1127         [CCode (cname = "RL_STATE_COMPLETING")]
1128         public const uint STATE_COMPLETING;
1130         [CCode (cname = "RL_STATE_SIGHANDLER")]
1131         public const uint STATE_SIGHANDLER;
1133         [CCode (cname = "RL_STATE_UNDOING")]
1134         public const uint STATE_UNDOING;
1136         [CCode (cname = "RL_STATE_INPUTDEPENDING")]
1137         public const uint STATE_INPUTPENDING;
1139         [CCode (cname = "RL_STATE_TTYCSAVED")]
1140         public const uint STATE_TTYCSAVED;
1142         [CCode (cname = "RL_STATE_CALLBACK")]
1143         public const uint STATE_CALLBACK;
1145         [CCode (cname = "RL_STATE_VIMOTION")]
1146         public const uint STATE_VIMOTION;
1148         [CCode (cname = "RL_STATE_MULTIKEY")]
1149         public const uint STATE_MULTIKEY;
1151         [CCode (cname = "RL_STATE_VICMDONCE")]
1152         public const uint STATE_VICMDONCE;
1154         [CCode (cname = "RL_STATE_DONE")]
1155         public const uint STATE_DONE;
1157         [CCode (cname = "RL_SETSTATE")]
1158         public uint set_state (uint s);
1160         [CCode (cname = "RL_UNSETSTATE")]
1161         public uint unset_state (uint s);
1163         [CCode (cname = "RL_ISSTATE")]
1164         public int is_state (uint s);
1166         [CCode (cname = "struct readline_state", has_type_id = false)]
1167         public struct State {
1168                 public int point;
1169                 public int end;
1170                 public int mark;
1171                 public string buffer;
1172                 public int buflen;
1173                 public UndoList ul;
1174                 public string prompt;
1176                 public int rlstate;
1177                 public int done;
1178                 public KeyMap kmap;
1180                 public CommandFunc lastfunc;
1181                 public int insmode;
1182                 public int edmode;
1183                 public int kseqlen;
1184                 public GLib.FileStream inf;
1185                 public GLib.FileStream outf;
1186                 public int pendingin;
1187                 public string macro;
1189                 public int catchsigs;
1190                 public int catchsigwinch;
1192                 public char reserved[64];
1193         }
1195         [CCode (cname = "rl_save_state")]
1196         public int save_state (State state);
1198         [CCode (cname = "rl_restore_state")]
1199         public int restore_state (State state);
1201         [CCode (lower_case_cprefix = "", cheader_filename = "readline/history.h")]
1202         namespace History {
1203                 [CCode (cname = "HIST_ENTRY", has_type_id = false)]
1204                 public struct Entry {
1205                         public string line;
1206                         public string timestamp;
1207                         public void* data;
1208                 }
1210                 [CCode (cname = "HISTORY_STATE", has_type_id = false)]
1211                 public struct State {
1212                         public unowned History.Entry[]? entries;
1213                         public int offset;
1214                         public int length;
1215                         public int size;
1216                         public int flags;
1217                 }
1219                 [CCode (cname = "HS_STIFLED")]
1220                 public int STIFLED;
1222                 [CCode (cname = "using_history")]
1223                 public void using ();
1225                 [CCode (cname = "history_get_history_state")]
1226                 public History.State get_state ();
1228                 [CCode (cname = "history_set_history_state")]
1229                 public void set_state (History.State state);
1231                 [CCode (cname = "add_history")]
1232                 public void add (string line);
1234                 [CCode (cname = "add_history_time")]
1235                 public void add_time (string ts);
1237                 [CCode (cname = "remove_history")]
1238                 public History.Entry? remove (int which);
1240                 [CCode (cname = "free_history_entry")]
1241                 public void* free_entry (History.Entry entry);
1243                 [CCode (cname = "replace_history_entry")]
1244                 public History.Entry? replace_entry (int which, string s, void* data);
1246                 [CCode (cname = "clear_history")]
1247                 public void clear ();
1249                 [CCode (cname = "stifle_history")]
1250                 public void stifle (int max);
1252                 [CCode (cname = "unstifle_history")]
1253                 public int unstifle ();
1255                 [CCode (cname = "history_is_stifled")]
1256                 public int is_stifled ();
1258                 [CCode (cname = "history_list")]
1259                 public unowned History.Entry[] list ();
1261                 [CCode (cname = "where_history")]
1262                 public int where ();
1264                 [CCode (cname = "current_history")]
1265                 public History.Entry? current ();
1267                 [CCode (cname = "history_get")]
1268                 public History.Entry? get (int offset);
1270                 [CCode (cname = "history_get_time")]
1271                 public time_t get_time (History.Entry entry);
1273                 [CCode (cname = "history_total_bytes")]
1274                 public int total_bytes ();
1276                 [CCode (cname = "history_set_pos")]
1277                 public int set_pos (int pos);
1279                 [CCode (cname = "previous_history")]
1280                 public History.Entry? previous ();
1282                 [CCode (cname = "next_history")]
1283                 public History.Entry? next ();
1285                 [CCode (cname = "history_search")]
1286                 public int search (string s, int direction);
1288                 [CCode (cname = "history_search_prefix")]
1289                 public int search_prefix (string prfx, int direction);
1291                 [CCode (cname = "history_search_pos")]
1292                 public int search_pos (string str, int direction, int pos);
1294                 [CCode (cname = "read_history_range")]
1295                 public int read_range (string filename, int from, int to);
1297                 [CCode (cname = "read_history")]
1298                 public int read (string filename);
1300                 [CCode (cname = "write_history")]
1301                 public int write (string filename);
1303                 [CCode (cname = "append_history")]
1304                 public int append (int nelements, string filename);
1306                 [CCode (cname = "history_truncate_file")]
1307                 public int truncate_file (string filename, int nlines);
1309                 [CCode (cname = "history_expand")]
1310                 public int expand (string s, out string[] a);
1312                 [CCode (cname = "history_arg_extract")]
1313                 public string arg_extract (int first, int last, string s);
1315                 [CCode (cname = "get_history_event")]
1316                 public string get_event (string str, out int cindex, int qchar);
1318                 [CCode (cname = "history_tokenize")]
1319                 public string[] tokenize (string s);
1321                 [CCode (cname = "history_base")]
1322                 public int base;
1324                 [CCode (cname = "history_length")]
1325                 public int length;
1327                 [CCode (cname = "history_max_entries")]
1328                 public int max_entries;
1330                 [CCode (cname = "history_expansion_char")]
1331                 public char expansion_char;
1333                 [CCode (cname = "history_subst_char")]
1334                 public char subst_char;
1336                 [CCode (cname = "history_word_delimiter")]
1337                 public string word_delimiters;
1339                 [CCode (cname = "history_comment_char")]
1340                 public char comment_char;
1342                 [CCode (cname = "history_no_expand_chars")]
1343                 public string no_expand_chars;
1345                 [CCode (cname = "history_search_delimiter_chars")]
1346                 public string search_delimiter_chars;
1348                 [CCode (cname = "history_quotes_inhibit_expansion")]
1349                 public int quotes_inhibit_expansion;
1351                 [CCode (cname = "history_write_timestamps")]
1352                 public int write_timestamps;
1354                 [CCode (cname = "max_input_history")]
1355                 public int max_input;
1357                 [CCode (cname = "history_inhibit_expansion_function")]
1358                 public LinebufFunc inhibit_expansion_function;
1359         }
1361         [CCode (cname = "control_character_threshold", cheader_filename = "readline/chardefs.h")]
1362         public const char CONTROL_CHARACTER_THRESHOLD;
1364         [CCode (cname = "control_character_mask", cheader_filename = "readline/chardefs.h")]
1365         public const char CONTROL_CHARACTER_MASK;
1367         [CCode (cname = "meta_character_threshold", cheader_filename = "readline/chardefs.h")]
1368         public const char META_CHARACTER_THRESHOLD;
1370         [CCode (cname = "control_character_bit", cheader_filename = "readline/chardefs.h")]
1371         public const char CONTROL_CHARACTER_BIT;
1373         [CCode (cname = "meta_character_bit", cheader_filename = "readline/chardefs.h")]
1374         public const char META_CHARACTER_BIT;
1376         [CCode (cname = "largest_char", cheader_filename = "readline/chardefs.h")]
1377         public const char LARGEST_CHARACTER;
1379         [CCode (cname = "largest_char", cheader_filename = "readline/chardefs.h")]
1380         public char ctrl_char (char c);
1382         [CCode (cname = "META_CHAR", cheader_filename = "readline/chardefs.h")]
1383         public char meta_char (char c);
1385         [CCode (cname = "CTRL", cheader_filename = "readline/chardefs.h")]
1386         public char ctrl (char c);
1388         [CCode (cname = "META", cheader_filename = "readline/chardefs.h")]
1389         public char meta (char c);
1391         [CCode (cname = "UNMETA", cheader_filename = "readline/chardefs.h")]
1392         public char unmeta (char c);
1394         [CCode (cname = "UNCTRL", cheader_filename = "readline/chardefs.h")]
1395         public char unctrl (char c);
1397         [CCode (cname = "NEWLINE", cheader_filename = "readline/chardefs.h")]
1398         public const char NEWLINE;
1400         [CCode (cname = "RETURN", cheader_filename = "readline/chardefs.h")]
1401         public const char RETURN;
1403         [CCode (cname = "RUBOUT", cheader_filename = "readline/chardefs.h")]
1404         public const char RUBOUT;
1406         [CCode (cname = "TAB", cheader_filename = "readline/chardefs.h")]
1407         public const char TAB;
1409         [CCode (cname = "ABORT_CHAR", cheader_filename = "readline/chardefs.h")]
1410         public const char ABORT_CHAR;
1412         [CCode (cname = "PAGE", cheader_filename = "readline/chardefs.h")]
1413         public const char PAGE;
1415         [CCode (cname = "SPACE", cheader_filename = "readline/chardefs.h")]
1416         public const char SPACE;
1418         [CCode (cname = "ESC", cheader_filename = "readline/chardefs.h")]
1419         public const char ESC;