echo-area.h 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* echo-area.h -- Functions used in reading information from the echo area.
  2. $Id$
  3. Copyright 1993, 1997, 2004, 2007, 2008, 2011, 2013, 2014, 2015, 2016
  4. Free Software Foundation, Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. Originally written by Brian Fox. */
  16. #ifndef INFO_ECHO_AREA_H
  17. #define INFO_ECHO_AREA_H
  18. #define EA_MAX_INPUT 256
  19. extern int echo_area_is_active, info_aborted_echo_area;
  20. /* Non-zero means that the last command executed while reading input
  21. killed some text. */
  22. extern int echo_area_last_command_was_kill;
  23. extern REFERENCE **echo_area_completion_items;
  24. void inform_in_echo_area (const char *message);
  25. void echo_area_inform_of_deleted_window (WINDOW *window);
  26. void echo_area_prep_read (void);
  27. typedef int (*reference_bool_fn) (REFERENCE *);
  28. char *info_read_completing_internal (const char *prompt,
  29. REFERENCE **completions, int force, reference_bool_fn exclude);
  30. /* Read a line of text in the echo area. Return a malloc ()'ed string,
  31. or NULL if the user aborted out of this read. PROMPT, if
  32. non-null, is a prompt to print before reading the line. */
  33. char *info_read_in_echo_area (const char *prompt);
  34. /* Read a line in the echo area with completion over COMPLETIONS. */
  35. char *info_read_completing_in_echo_area (const char *prompt,
  36. REFERENCE **completions);
  37. /* Read a line in the echo area allowing completion over COMPLETIONS, but
  38. not requiring it. */
  39. char *info_read_maybe_completing (const char *prompt, REFERENCE **completions);
  40. /* Read a line in the echo area with completion over COMPLETIONS, using
  41. EXCLUDE to exclude items from the completion list. */
  42. char *
  43. info_read_completing_in_echo_area_with_exclusions (const char *prompt,
  44. REFERENCE **completions, reference_bool_fn exclude);
  45. void ea_insert (WINDOW *window, int count, int key);
  46. void ea_quoted_insert (WINDOW *window, int count);
  47. void ea_beg_of_line (WINDOW *window, int count);
  48. void ea_backward (WINDOW *window, int count);
  49. void ea_delete (WINDOW *window, int count);
  50. void ea_end_of_line (WINDOW *window, int count);
  51. void ea_forward (WINDOW *window, int count);
  52. void ea_abort (WINDOW *window, int count);
  53. void ea_rubout (WINDOW *window, int count);
  54. void ea_complete (WINDOW *window, int count);
  55. void ea_newline (WINDOW *window, int count);
  56. void ea_kill_line (WINDOW *window, int count);
  57. void ea_backward_kill_line (WINDOW *window, int count);
  58. void ea_transpose_chars (WINDOW *window, int count);
  59. void ea_yank (WINDOW *window, int count);
  60. void ea_tab_insert (WINDOW *window, int count);
  61. void ea_possible_completions (WINDOW *window, int count);
  62. void ea_backward_word (WINDOW *window, int count);
  63. void ea_kill_word (WINDOW *window, int count);
  64. void ea_forward_word (WINDOW *window, int count);
  65. void ea_yank_pop (WINDOW *window, int count);
  66. void ea_backward_kill_word (WINDOW *window, int count);
  67. void ea_scroll_completions_window (WINDOW *window, int count);
  68. #endif /* not INFO_ECHO_AREA_H */